/*

 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) 2012, 2014 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).


 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). 


 Copyright (c) 2011, 2013 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). 


 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) 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, 2013 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) 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-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) 2013 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) 2012, 2013 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).


 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). 


 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) 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
 RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/requirejs/text for details

 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, 2013 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) 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, 2013 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) 2009, 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) 2009, 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,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, 2014 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) 2012, 2014 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). 


 Copyright (c) 2012, 2013 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).


 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). 


 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, 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, 2013 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) 2013 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) 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).


 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). 


 Copyright (c) 2013 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: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2012, 2013 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: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2014 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: Anton McConville - 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: Anton McConville - 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). 


 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). 


 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: Anton McConville - 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) 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). 


 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). 


 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) 2009, 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, 2013 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) 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: Anton McConville - IBM Corporation - initial API and implementation
 Copyright (c) 2013 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). 


 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). 


 Copyright (c) 2014 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: Anton McConville - IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2013 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, 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) 2009, 2013 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). 


 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). 


 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) 2010, 2013 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, 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) 2009, 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, 2013 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, 2014 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). 


 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). 


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 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, 2014 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) 2014 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, 2013 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, 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) 2010, 2013 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, 2014 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, 2014 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) 2014 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, 2013 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) 2014 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, 2013 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) 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) 2009, 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) 2009, 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) 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, 2013 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, 2013 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, 2014 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, 2014 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, 2013 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
 RequireJS i18n 2.0.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/requirejs/i18n for details

 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, 2013 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) 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, 2013 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, 2013 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, 2013 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, 2014 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 f(c,d,e,b,a,g){d[c]&&(e.push(c),(!0===d[c]||1===d[c])&&b.push(a+c+"/"+g))}function l(c,d,e,b,a){d=b+d+"/"+a;require._fileExists(c.toUrl(d+".js"))&&e.push(d)}function h(c,d,e){for(var b in d)d.hasOwnProperty(b)&&(!c.hasOwnProperty(b)||e)?c[b]=d[b]:"object"===typeof d[b]&&h(c[b],d[b],e)}var d=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(c){var k=c.config?c.config():{},k=k||{};return{version:"2.0.1+",load:function(c,b,a,g){g=g||{};g.locale&&(k.locale=
g.locale);var m=d.exec(c),n=m[1],r=m[4],t=m[5],q=r.split("-"),p=[],s={},v,u="";m[5]?(n=m[1],c=n+t):(t=m[4],r=k.locale,r||(r=k.locale="undefined"===typeof navigator?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),q=r.split("-"));if(g.isBuild){p.push(c);l(b,"root",p,n,t);for(v=0;v<q.length;v++)g=q[v],u+=(u?"-":"")+g,l(b,u,p,n,t);b(p,function(){a()})}else b([c],function(g){var m=[],c;f("root",g,m,p,n,t);for(v=0;v<q.length;v++)c=q[v],u+=(u?"-":"")+c,f(u,g,m,p,n,t);b(p,function(){var c,
e,d;for(c=m.length-1;-1<c&&m[c];c--){d=m[c];e=g[d];if(!0===e||1===e)e=b(n+d+"/"+t);h(s,e)}a(s)})})}}})})();
define("orion/i18n",[],function(){return{load:function(f,l,h,d){d=d||{};var c=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,k=c.exec(f);if(k){if(!l.defined||l.defined(f))try{h(l(f));return}catch(e){}if(d.isBuild||d.isTest)h({});else if(l.specified&&!l.specified("orion/bootstrap"))h({});else{var b=k[1],a=k[3]?k[2]:"",g=k[3]||k[2];l(["orion/bootstrap"],function(m){m.startup().then(function(m){var e=m.serviceRegistry;m=e.getServiceReferences("orion.i18n.message");if(a)m.some(function(a){return f===a.getProperty("name")?
(e.getService(a).getMessageBundle().then(function(a){h(a)},function(){h({})}),!0):!1})||h({});else{var t={},q;m.forEach(function(m){var e=m.getProperty("name");if((k=c.exec(e))&&b===k[1]&&g===(k[3]||k[2]))if(a=k[3]?k[2]:""){if((m=d.locale||("undefined"!==typeof navigator?navigator.language||navigator.userLanguage:null))&&0===m.toLowerCase().indexOf(a.toLowerCase()))t[a]=!0,(!l.specified||!l.specified(e))&&define(e,["orion/i18n!"+e],function(a){return a})}else q=m});!l.specified||!l.specified(f)?q?
e.getService(q).getMessageBundle().then(function(a){Object.keys(t).forEach(function(b){"undefined"===typeof a[b]&&(a[b]=t[b])});define(f,[],a);h(a)},function(){define(f,[],t);h(t)}):(define(f,[],t),h(t)):h(t)}})})}}else h(null)}}});
define("git/nls/root/gitmessages",{Compare:"Compare","View the side-by-side compare":"View the side-by-side compare","Working Directory Version":"Working Directory Version","Working Directory":"Working Directory","View the working directory version of the file":"View the working directory version of the file","Loading...":"Loading...",Repositories:"All Git Repositories",Repo:"Repositories","0 on 1 - Git":"${0} on ${1} - Git",Git:"Git","Show in eclipse.org":"Show in eclipse.org","Show this repository at eclipse.org":"Show this repository at eclipse.org",
"Show in GitHub":"Show in GitHub","Show this repository in GitHub":"Show this repository in GitHub","Commit Details":"Commit Details","No Commits":"No Commits","commit: 0":"commit: ${0}","parent: 0":"parent: ${0}","authored by 0 (1) on 2":"authored by ${0} (${1}) on ${2}","committed by 0 (1)":"committed by ${0} (${1})","Tags:":"Tags:","No Tags":"No Tags",Diffs:"Changes",More:"More","Loading git log...":"Loading git log...",local:"local",remote:"remote","Git Log for ${0} branch ${1} on ":"Git Log for ${0} branch ${1} on ",
"Git Log for ${0} branch ${1}":"Git Log for ${0} branch ${1}","Log for branch ${0} - Git":"Log for branch ${0} - Git","Log for ${0} on ${1} - Git":"Log for ${0} on ${1} - Git","View All":"View All","Error ${0}: ":"Error ${0}: ","Loading ":"Loading ",Message:"Message",Author:"Author",Date:"Date",Actions:"Actions",Branches:"Branches",Tags:"Tags",Stage:"Stage","Unstaged removal":"Unstaged removal",Unstage:"Unstage","Staged removal":"Staged removal","Unstaged change":"Unstaged change","Staged change":"Staged change",
"Unstaged add":"Unstaged add","Staged add":"Staged add",Addition:"Addition",Deletion:"Deletion","Resolve Conflict":"Resolve Conflict",Conflicting:"Conflicting","Commit message":"Commit message","Record changes in the active branch":"Record changes in the active branch",Commit:"Commit",SmartCommit:"Type a message here to commit...",SmartCountCommit:"Commit ${0} file(s)","Amend last commit":"Amend last commit"," Amend":" Amend","Rebase in progress. Choose action:":"Rebase in progress. Choose action:",
RebaseProgress:"Commits (Rebase in progress)",RebaseProgressDetails:"Rebasing branch.\n\n\tUse Continue after resolving any conflicts;\n\tSkip to bypass the current patch;\n\tAbort to end the rebase at any time.","Committer name:":"Committer name:","email:":"email:","Author name: ":"Author name: ","Select a file on the left to compare...":"Select a file on the left to compare...",Unstaged:"Unstaged",Staged:"Staged",ChangedFiles:"Changed Files","Recent commits on":"Recent commits on","Git Status":"Git Status",
"Go to Git Status":"Open the Git Status page for the repository containing this file or folder.","Recent commits on ${0}":"Recent commits on ${0}","Status for ${0} - Git":"Status for ${0} - Git","Status (${0})":"Status (${0})","Getting git incoming changes...":"Getting git incoming changes...","Loading recent commits...":"Loading recent commits...","Show the side-by-side compare":"Show the side-by-side compare","Change Committer or Author":"Change Committer or Author","Use Default Committer and Author":"Use Default Committer and Author",
Checkout:"Checkout","Checkout the file, discarding the unstaged change":"Checkout the file, discarding the unstaged change","Your changes to the file will be lost. Are you sure you want to checkout?":"Your changes to the file will be lost. Are you sure you want to checkout?","Checking out...":"Checking out...","Stage the change":"Stage the change","Stage the selected changes":"Stage the selected changes","Staging...":"Staging...","Checkout all the selected files, discarding all changes":"Checkout all the selected files, discarding all changes",
"Your changes to all the selected files will be lost. Are you sure you want to checkout?":"Your changes to all the selected files will be lost. Are you sure you want to checkout?","Save Patch":"Save Patch","Save workspace changes as a patch":"Save workspace changes as a patch","Unstage the change":"Unstage the change","Unstaging...":"Unstaging...",Undo:"Undo",UndoTooltip:"Revert this commit, keeping all changed files and not making any changes to the working directory.",UndoConfirm:"The content of your active branch will be replaced with ${0}. All changes in the commit and working directory will be kept. Are you sure?",
Reset:"Reset","Reset the branch, discarding all staged and unstaged changes":"Reset the branch, discarding all staged and unstaged changes","All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered.":"All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered.","Are you sure you want to continue?":"Are you sure you want to continue?","Resetting local changes...":"Resetting local changes...","Continue rebase...":"Continue rebase...",
"Skipping patch...":"Skipping patch...","Aborting rebase...":"Aborting rebase...","Complete log":"Complete log","local VS index":"local VS index","index VS HEAD":"index VS HEAD","Compare(${0} : ${1})":"Compare(${0} : ${1})","Loading status...":"Loading status...","Committing...":"Committing...","The committer name is required.":"The committer name is required.","The committer mail is required.":"The committer mail is required.","The author name is required.":"The author name is required.","The author mail is required.":"The author mail is required.",
". Repository still contains conflicts.":". Repository still contains conflicts.",". Repository contains unmerged paths. Resolve conflicts first.":". Repository contains unmerged paths. Resolve conflicts first.","Rendering ${0}":"Rendering ${0}",Configuration:"Configuration","Getting configuration of":"Getting configuration of ${0}"," - Git":" - Git","Repositories - Git":"Repositories - Git",Repository:"Repository","Repository Not Found":"Repository Not Found","No Repositories":"No Repositories",
"Loading repository":"Loading repository","Loading repositories":"Loading repositories","(no remote)":"(no remote)","location: ":"location: ","${0} file(s) to stage and ${1} file(s) to commit.":"${0} file(s) to stage and ${1} file(s) to commit.","Nothing to commit.":"Nothing to commit.","Nothing to push.":"Nothing to push."," commit(s) to push.":" commit(s) to push.","You have no changes to commit.":"You have no changes to commit.","You have changes to commit in your workspace!":"You have changes to commit in your workspace!",
"Rebase in progress!":"Rebase in progress!","View all local and remote tracking branches":"View all local and remote tracking branches","tracks no branch, ":"tracks no branch, ","tracks ${0}, ":"tracks ${0}, ","last modified ${0} by ${1}":"last modified ${0} by ${1}","No Remote Branches":"No Remote Branches","Rendering branches":"Rendering branches",Commits:"Commits",GettingCurrentBranch:"Getting current branch for ${0}","See Full Log":"See Full Log","See the full log":"See the full log",'Getting commits for "${0}" branch':'Getting commits for "${0}" branch',
"Rendering commits":"Rendering commits","Getting outgoing commits":"Getting outgoing commits","The branch is up to date.":"The branch is up to date.","You have no outgoing or incoming commits.":"You have no outgoing or incoming commits.",") by ":") by "," (SHA ":" (SHA ","Getting tags":"Getting tags","View all tags":"View all tags"," on ":" on "," by ":" by ",Remotes:"Remotes","Rendering remotes":"Rendering remotes","No Remotes":"No Remotes","View all configuration entries":"View all configuration entries",
"Unstaged addition":"Unstaged addition","Staged addition":"Staged addition"," (Rebase in Progress)":" (Rebase in Progress)",Status:"Status","Log (0)":"Log (${0})","Log (0) - 1":"Log (${0}) - ${1}","Status for ${0} - Git ":"Status for ${0} - Git ","No Unstaged Changes":"No Unstaged Changes","No Staged Changes":"No Staged Changes",'Commits for "${0}" branch':'Commits for "${0}" branch','Commits for "${0}" branch against':'Commits for "${0}" branch against',"Add Remote":"Add Remote","Remote Name:":"Remote Name:",
"Remote URI:":"Remote URI:","Apply Patch":"Apply Patch","Git Repository":"Git Repository","Go to the git repository":"Open the Git Repository page for this file or folder.","Clone Git Repository":"Clone Git Repository","Repository URL:":"Repository URL:","Existing directory:":"Existing directory:","New folder:":"New folder:","Choose a Folder":"Choose a Folder","Commit Changes":"Commit Changes","Message:":"Message:","Amend:":"Amend:",SmartAmend:"Amend Previous Commit","ChangeId:":"ChangeId:",SmartChangeId:"Prepare for Gerrit",
"Committer Name:":"Committer Name:","Committer Email:":"Committer Email:","Author Name:":"Author Name:","Author Email:":"Author Email:","The commit message is required.":"The commit message is required.","Git Credentials":"Git Credentials","Username:":"Username:","Private key:":"Private key:","Passphrase (optional):":"Passphrase (optional):","commit:":"commit: ","parent:":"parent: ","branches: ":"branches: ","tags: ":"tags: "," authored by ${0} {${1}) on ${2}":" authored by ${0} (${1}) on ${2}",Content:"Content",
"Go to ${0} section":"Go to ${0} section","Find Commit":"Find Commit","Type the commit name (sha1):":"Type the commit name (sha1):",Search:"Search","Searching...":"Searching...",SelectAll:"Select All","Looking for the commit":"Looking for the commit","New Branch:":"New Branch:","No remote selected":"No remote selected","Enter a name...":"Enter a name...",OK:"OK"," [New branch]":" [New branch]","Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}.":"Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}.",
"Link Repository":"Link Repository","Folder name:":"Folder name:","Repository was linked to ":"Repository was linked to ","Checkout the current tag, creating a local branch based on its contents.":"Checkout this commit, creating a local branch based on its contents.","Checking out tag ${0}":"Checking out tag ${0}","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.":"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.",
"Checking out branch...":"Checking out branch...","Checking out branch ${0}...":"Checking out branch ${0}...","Branch checked out.":"Branch checked out.","New Branch":"New Branch","Add a new local branch to the repository":"Add a new local branch to the repository","Branch name":"Branch name",Delete:"Delete","Delete the local branch from the repository":"Delete the local branch from the repository","Are you sure you want to delete branch ${0}?":"Are you sure you want to delete branch ${0}?","Delete the remote tracking branch from the repository":"Delete the remote tracking branch from the repository",
"Are you sure?":"Are you sure?","You're going to delete remote branch ${0} and push the change.":"You're going to delete remote branch ${0} and push the change.","Removing remote branch: ":"Removing remote branch: ","Delete Remote Branch":"Delete Remote Branch","New Remote":"New Remote","Git Remote":"Git Remote","Go to Git Remote":"Open the remote Git Log page for this file or folder.","Add a new remote to the repository":"Add a new remote to the repository","Delete the remote from the repository":"Delete the remote from the repository",
"Are you sure you want to delete remote ${0}?":"Are you sure you want to delete remote ${0}?",Pull:"Pull","Pull from the repository":"Pull from the repository","Pulling: ":"Pulling: ","Pull Git Repository":"Pull Git Repository","Git Log":"Git Log","Go to Git Log":"Open the local Git Log page for this file or folder.","Open the log for the branch":"Open the log for the branch","Open the log for the repository":"Open the log for the repository","Open the status for the repository":"Open the status for the repository",
ShowInEditor:"Show in Editor",ShowInEditorTooltip:"Show the repository folder in the editor","Compare With Each Other":"Compare With Each Other","Compare With Working Tree":"Compare With Working Tree",Open:"Open",Fetch:"Fetch","Fetch from the remote":"Fetch from the remote","Password:":"Password:","User Name:":"User Name:","Fetching remote: ":"Fetching remote: ","Force Fetch":"Force Fetch","Fetch from the remote branch into your remote tracking branch overriding its current content":"Fetch from the remote branch into your remote tracking branch overriding its current content",
"You're going to override content of the remote tracking branch. This can cause the branch to lose commits.":"You're going to override content of the remote tracking branch. This can cause the branch to lose commits.",Merge:"Merge","Merge the content from the branch to your active branch":"Merge the content from the branch to your active branch",". Go to ${0}.":". Go to ${0}.","Git Status page":"Git Status page",Rebase:"Rebase","Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch ":"Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch ",
"Rebase on top of ":"Rebase on top of ",RebaseSTOPPED:". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing.",RebaseFAILED_WRONG_REPOSITORY_STATE:". Repository state is invalid (i.e. already during rebasing).",RebaseFAILED_UNMERGED_PATHS:". Repository contains unmerged paths.",RebaseFAILED_PENDING_CHANGES:". Repository contains pending changes. Please commit or stash them.",RebaseUNCOMMITTED_CHANGES:". There are uncommitted changes.","Rebase your commits by removing them from the active branch, ":"Rebase your commits by removing them from the active branch, ",
"starting the active branch again based on the latest state of '":"starting the active branch again based on the latest state of '","and applying each commit again to the updated active branch.":"and applying each commit again to the updated active branch.","Push All":"Push All","Push commits and tags from your local branch into the remote branch":"Push commits and tags from your local branch into the remote branch","Push Branch":"Push Branch","Push commits without tags from your local branch into the remote branch":"Push commits without tags from your local branch into the remote branch",
"Push for Review":"Push for Review","Push commits to Gerrit Code Review":"Push commits to Gerrit Code Review","Force Push Branch":"Force Push Branch","Push commits without tags from your local branch into the remote branch overriding its current content":"Push commits without tags from your local branch into the remote branch overriding its current content","Pushing remote: ":"Pushing remote: ","Choose Branch":"Choose Branch","Choose the remote branch.":"Choose the remote branch.","Force Push All":"Force Push All",
"Push commits and tags from your local branch into the remote branch overriding its current content":"Push commits and tags from your local branch into the remote branch overriding its current content","You're going to override content of the remote branch. This can cause the remote repository to lose commits.":"You're going to override content of the remote branch. This can cause the remote repository to lose commits.","\x3c Previous Page":"\x3c Previous Page","Show previous page of git log":"Show previous page of git log",
"Show previous page of git tags":"Show previous page of git tags","Next Page \x3e":"Next Page \x3e","Show next page of git log":"Show next page of git log","Show next page of git tags":"Show next page of git tags","Push from your local branch into the selected remote branch":"Push from your local branch into the selected remote branch","Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.":"Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.",
GitResetIndexConfirm:"The content of your active branch will be replaced with ${0}. All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?","Resetting index...":"Resetting index...","Name:":"Name:",Tag:"Tag","Create a tag for the commit":"Create a tag for the commit","Tag name":"Tag name","Delete the tag from the repository":"Delete the tag from the repository","Are you sure you want to delete tag ${0}?":"Are you sure you want to delete tag ${0}?","Cherry-Pick":"Cherry-Pick",
"Apply the change introduced by the commit to your active branch":"Apply the change introduced by the commit to your active branch","Nothing changed.":"Nothing changed.",". Some conflicts occurred":". Some conflicts occurred.","Fetch from the remote branch into your remote tracking branch":"Fetch from the remote branch into your remote tracking branch","Fetch Git Repository":"Fetch Git Repository",Push:"Push","Push from your local branch into the remote branch":"Push from your local branch into the remote branch",
"Push Git Repository":"Push Git Repository","Key:":"Key:","Value:":"Value:","New Configuration Entry":"New Configuration Entry",Edit:"Edit","Edit the configuration entry":"Edit the configuration entry","Delete the configuration entry":"Delete the configuration entry","Are you sure you want to delete ${0}?":"Are you sure you want to delete ${0}?","Clone Repository":"Clone Repository","Clone an existing Git repository to a folder":"Clone an existing Git repository to a folder","Cloning repository: ":"Cloning repository: ",
"Init Repository":"Init Repository","Create a new Git repository in a new folder":"Create a new Git repository in a new folder","Initializing repository: ":"Initializing repository: ","Init Git Repository":"Init Git Repository","Delete the repository":"Delete the repository","Are you sure you want do delete ${0} repositories?":"Are you sure you want do delete ${0} repositories?","Apply a patch on the selected repository":"Apply a patch on the selected repository","Show content":"Show content","Commit name:":"Commit name:",
"Open Commit":"Open Commit","Open the commit with the given name":"Open the commit with the given name","No commits found":"No commits found","Staging changes":"Staging changes","Commit message:":"Commit message:","Committing changes":"Committing changes","Fetching previous commit message":"Fetching previous commit message","Resetting local changes":"Resetting local changes","Checkout files, discarding all changes":"Checkout files, discarding all changes","Show Patch":"Show Patch","Show workspace changes as a patch":"Show workspace changes as a patch",
"Show checked changes as a patch":"Show checked changes as a patch",Continue:"Continue","Contibue Rebase":"Contibue Rebase","Skip Patch":"Skip Patch",Abort:"Abort","Abort Rebase":"Abort Rebase",Discard:"Discard ${0} file(s)","Your changes to the selected files will be discarded and cannot be recovered.":"Your changes to the selected files will be discarded and cannot be recovered.","Getting git log":"Getting git log","Active Branch Log":"Git Log (Active Branch)","Show the log for the active local branch":"Show the log for the active local branch",
"Remote Branch Log":"Git Log (Remote Branch)","Show the log for the corresponding remote tracking branch":"Show the log for the corresponding remote tracking branch","See Full Status":"See Full Status","See the status":"See the status","Choose target location":"Choose target location","Default target location":"Default target location","Change...":"Change...","Merge Squash":"Merge Squash","Squash the content of the branch to the index":"Squash the content of the branch to the index","Local Branch Name:":"Local Branch Name:",
Local:"local","Filter items":"Filter items","Filter remote branches":"Filter remote branches","Getting remote branches":"Getting remote branches ${0}","Getting branches":"Getting branches ${0}","Paste link in email or IM":"Paste link in email or IM","Show Commit in GitHub":"Show Commit in GitHub","Show Repository in GitHub":"Show Repository in GitHub","Show this commit in GitHub":"Show this commit in GitHub","Show Commit in eclipse.org":"Show Commit in eclipse.org","Show this commit in eclipse.org":"Show this commit in eclipse.org",
"Show Repository in eclipse.org":"Show Repository in eclipse.org","Show this repository in eclipse.org":"Show this repository in eclipse.org","Ask for review":"Ask for review","Ask for review tooltip":"Send email with request for commit review","Reviewer name":"Reviewer name","Contribution Review Request":"Contribution Review Request","Send the link to the reviewer":"Send the link to the reviewer","Private key file (optional):":"Private key file (optional):","Don't prompt me again:":"Don't prompt me again:",
"Your private key will be saved in the browser for further use":"Your private key will be saved in the browser for further use","Loading Contribution Review Request...":"Loading Contribution Review Request...","The commit can be found in the following repositories":"The commit can be found in the following repositories","Try to update your repositories":"Try to update your repositories","Create new repository":"Create new repository","Attach the remote to one of your existing repositories":"Attach the remote to one of your existing repositories",
"You are reviewing contribution ${0} from ${1}":"You are reviewing contribution ${0} from ${1}","Unfortunately the commit can not be found in your workspace. To see it try one of the following: ":"Unfortunately the commit can not be found in your workspace. To see it try one of the following: ","To review the commit you can also:":"To review the commit you can also:","Contribution Review Request for ${0} on ${1}":"Contribution Review Request for ${0} on ${1}","Failing paths: ${0}":"Failing paths: ${0}",
"Problem while performing the action":"Problem while performing the action","Go to the Orion repositories page to provide a git repository URL. Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL. Once the repository is created, it will appear in the Navigator.","URL:":"URL:","File:":"File:",Submit:"Submit","git url:":"git url: ",Revert:"Revert","Revert changes introduced by the commit into your active branch":"Revert changes introduced by the commit into your active branch",
". Could not revert into active branch":". Could not revert into active branch.",Login:"Login","Authentication required for: ${0}. ${1} and re-try the request.":"Authentication required for: ${0}. ${1} and re-try the request.","Remember my committer name and email:":"Remember my committer name and email:","Successfully edited ${0} to have value ${1}":"Successfully edited ${0} to have value ${1}","Successfully added ${0} with value ${1}":"Successfully added ${0} with value ${1}","Signed-off-by: ":"Signed-off-by: ",
"Change-Id: ":"Change-Id: ",REJECTED_NONFASTFORWARD:"Push is non-fastforward and was rejected. Use Fetch to see new commits that must be merged.","Commit and Push":"Commit and Push",Sync:"Sync",SyncTooltip:"Fetch from the remote branch. Rebase your commits by removing them from the local branch, starting the local branch again based on the latest state of the remote branch and applying each commit to the updated local branch. Push commits and tags from your local branch into the remote branch.",NoCommits:"No Commits",
Incoming:"Incoming",Outgoing:"Outgoing",Synchronized:"History",NoBranch:"No Branch",None:"None"});define("git/nls/gitmessages",["orion/i18n!git/nls/gitmessages","git/nls/root/gitmessages"],function(f,l){var h={root:l};Object.keys(f).forEach(function(d){"undefined"===typeof h[d]&&(h[d]=f[d])});return h});
(function(){function f(){for(var c=navigator.userAgent,d={browser:!1,version:!1},e=[{name:"Chrome/Chromium",regExp:/(?:chrome|crios|chromium)\/(\d+)/i,minVersion:24},{name:"Firefox",regExp:/firefox\/(\d+)/i,minVersion:17},{name:"Microsoft Internet Explorer",regExp:/msie\s(\d+)/i,minVersion:10},{name:"Microsoft Internet Explorer",regExp:/Trident\/(\d+)/i,minVersion:6},{name:"Safari",regExp:/version\/(\d+).*?safari/i,minVersion:6}],b=0;b<e.length;b++){var a=e[b],g=c.match(a.regExp);if(g){d.browser=
!0;d.version=g[1]>=a.minVersion;d.name=a.name;break}}return d}function l(){try{return"localStorage"in window&&null!==window.localStorage}catch(c){return!1}}function h(c){alert(c);throw Error("unsupported browser");}var d=f();if(d.browser)d.version||h("Sorry, your browser version is not supported.\n\nTo use Orion, please upgrade to the latest version of "+d.name+".\n");else if(l()&&!localStorage.skipBrowserCheck)if(confirm("Sorry, your browser is not supported. The latest version of Chrome, Firefox or Safari web browser is recommended.\nContinue anyway?"))localStorage.skipBrowserCheck=
1;else throw"unsupported browser";else l()||h("Sorry, your browser is not supported.\n\nTo use Orion, the latest version of the Chrome, Firefox, or Safari web browser is recommended.\n");return{isSupportedBrowser:f,supportsLocalStorage:l,throwBrowserAlert:h}})();define("orion/browserCompatibility",function(){});
(function(f,l){"function"===typeof define&&define.amd?define("orion/Deferred",l):"object"===typeof exports?module.exports=l():(f.orion=f.orion||{},f.orion.Deferred=l())})(this,function(){function f(){for(var b;b=c.shift();)b();k=!1}function l(b){c.push(b);k||(k=!0,e())}function h(b){return function(a){b(a)}}function d(){function b(){for(var a;a=k.shift();){var b=a.deferred,g="fulfilled"===e?"resolve":"reject";a=a[g];if("function"===typeof a)try{var m=a(c),d=m&&("object"===typeof m||"function"===typeof m)&&
m.then;if("function"===typeof d)if(m===b.promise)b.reject(new TypeError);else{var f=m.cancel;"function"===typeof f?b._parentCancel=f.bind(m):delete b._parentCancel;d.call(m,h(b.resolve),h(b.reject),h(b.progress))}else b.resolve(m)}catch(q){b.reject(q)}else b[g](c)}}function a(a){delete f._parentCancel;e="rejected";c=a;k.length&&l(b)}function g(m){function h(a){return function(b){(!e||"assumed"===e)&&a(b)}}delete f._parentCancel;try{var v=m&&("object"===typeof m||"function"===typeof m)&&m.then;if("function"===
typeof v)if(m===f)a(new TypeError);else{e="assumed";var u=m&&m.cancel;if("function"!==typeof u){var w=new d;m=w.promise;try{v(w.resolve,w.reject,w.progress)}catch(D){w.reject(D)}u=m.cancel;v=m.then}c=m;v.call(m,h(g),h(a));f._parentCancel=u.bind(m)}else e="fulfilled",c=m,k.length&&l(b)}catch(y){h(a)(y)}}function m(){var b=f._parentCancel;b?(delete f._parentCancel,b()):e||(b=Error("Cancel"),b.name="Cancel",a(b))}var c,e,k=[],f=this;this.resolve=function(a){e||g(a);return f};this.reject=function(b){e||
a(b);return f};this.progress=function(a){e||k.forEach(function(b){if(b.progress)try{b.progress(a)}catch(g){}});return f.promise};this.cancel=function(){f._parentCancel?setTimeout(m,0):m();return f};this.then=function(a,g,m){var c=new d;c._parentCancel=f.promise.cancel;k.push({resolve:a,reject:g,progress:m,deferred:c});("fulfilled"===e||"rejected"===e)&&l(b);return c.promise};this.promise={then:f.then,cancel:f.cancel}}var c=[],k=!1,e=function(){if("undefined"!==typeof process&&"function"===typeof process.nextTick){var b=
process.nextTick;return function(){b(f)}}if("function"===typeof MutationObserver){var a=document.createElement("div");(new MutationObserver(f)).observe(a,{attributes:!0});return function(){a.setAttribute("class","_tick")}}return function(){setTimeout(f,0)}}();d.all=function(b,a){function g(a,b){f||(e[a]=b,0===--c&&k.resolve(e))}function m(b,m){if(!f){if(a)try{g(b,a(m));return}catch(c){m=c}k.reject(m)}}var c=b.length,e=[],f=!1,k=new d;k.then(void 0,function(){f=!0;b.forEach(function(a){a.cancel&&a.cancel()})});
0===c?k.resolve(e):b.forEach(function(a,b){a.then(g.bind(void 0,b),m.bind(void 0,b))});return k.promise};d.when=function(b,a,g,m){var c;b&&"function"===typeof b.then||(c=new d,c.resolve(b),b=c.promise);return b.then(a,g,m)};return d});
define("orion/EventTarget",[],function(){function f(){this._namedListeners={}}f.prototype={dispatchEvent:function(f){if(!f.type)throw Error("unspecified type");var h=this._namedListeners[f.type];h&&h.forEach(function(d){try{"function"===typeof d?d(f):d.handleEvent(f)}catch(c){"undefined"!==typeof console&&console.log(c)}});return!f.defaultPrevented},addEventListener:function(f,h){if("function"===typeof h||h.handleEvent)this._namedListeners[f]=this._namedListeners[f]||[],this._namedListeners[f].push(h)},
removeEventListener:function(f,h){var d=this._namedListeners[f];if(d)for(var c=0;c<d.length;c++)if(d[c]===h){1===d.length?delete this._namedListeners[f]:d.splice(c,1);break}}};f.prototype.constructor=f;f.attach=function(l){var h=new f;l.dispatchEvent=h.dispatchEvent.bind(h);l.addEventListener=h.addEventListener.bind(h);l.removeEventListener=h.removeEventListener.bind(h)};return f});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(f,l){function h(b,a,g){this._properties=g||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function d(b,a,g){this._serviceId=b;this._serviceReference=a;this._internalRegistry=g}function c(b,a){function g(g){return function(){var m;try{if(!a())throw Error("Service was unregistered");var c=b[g].apply(b,Array.prototype.slice.call(arguments));if(c&&"function"===typeof c.then)return c;
m=new f;m.resolve(c)}catch(e){m=new f,m.reject(e)}return m.promise}}for(var m in b)"function"===typeof b[m]&&(this[m]=g(m))}function k(b,a){this.type=b;this.serviceReference=a}function e(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new l;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var g=b._entries[a];if(!g)throw Error("Service has already been unregistered: "+a);var m=g.reference;b._serviceEventTarget.dispatchEvent(new k("unregistering",
m));b._entries[a]=null;m.getProperty("objectClass").forEach(function(a){for(var g=b._namedReferences[a],c=0;c<g.length;c++)if(g[c]===m){1===g.length?delete b._namedReferences[a]:g.splice(c,1);break}})},modifyService:function(a){var g=b._entries[a];if(!g)throw Error("Service not found while trying to send modified event: "+a);b._serviceEventTarget.dispatchEvent(new k("modified",g.reference))}}}h.prototype={getPropertyKeys:function(){var b=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&
b.push(a);return b},getProperty:function(b){return this._properties[b]}};h.prototype.constructor=h;d.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("Service has already been unregistered: "+this._serviceId);return this._serviceReference},setProperties:function(b){var a=this._serviceReference._properties;this._serviceReference._properties=b||{};b["service.id"]=this._serviceId;
b.objectClass=a.objectClass;b["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};d.prototype.constructor=d;e.prototype={getService:function(b){var a;if("string"===typeof b)(b=this._namedReferences[b])&&b.some(function(b){a=this._entries[b.getProperty("service.id")].service;return!!a},this);else if(b=this._entries[b.getProperty("service.id")])a=b.service;return a||null},getServiceReferences:function(b){if(b)return this._namedReferences[b]?this._namedReferences[b]:
[];var a=[];this._entries.forEach(function(b){b&&a.push(b.reference)});return a},registerService:function(b,a,g){if("undefined"===typeof a||null===a)throw Error("invalid service");"string"===typeof b?b=[b]:Array.isArray(b)||(b=[]);var m=this._entries.length,e=new h(m,b,g),f=this._namedReferences;b.forEach(function(a){f[a]=f[a]||[];f[a].push(e)});b=new c(a,this._internalRegistry.isRegistered.bind(null,m));this._entries.push({reference:e,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new k("registered",
e));return new d(m,e,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};e.prototype.constructor=e;return{ServiceRegistry:e}});
define("orion/xhr",["orion/Deferred"],function(f){function l(f,d,c,k){var e="undefined"!==typeof c.response?c.response:c.responseText,b;try{b=c.status}catch(a){b=0}f={args:d,response:e,responseText:"string"===typeof e?e:null,status:b,url:f,xhr:c};"undefined"!==typeof k&&(f.error=k);return f}return function(h,d,c){c=c||{};var k=3<arguments.length&&arguments[3]?arguments[3]:new XMLHttpRequest,e=new f,b=c.headers||{},a=c.log||!1,g;"undefined"===typeof b["X-Requested-With"]&&(b["X-Requested-With"]="XMLHttpRequest");
if("undefined"!==typeof c.data&&("POST"===h||"PUT"===h))g=c.data;var m=!1,n=!1;e.promise.then(void 0,function(a){m=!0;!n&&(a instanceof Error&&"Cancel"===a.name)&&k.abort()});k.onabort=function(){n=!0;if(!m){var a=Error("Cancel");a.name="Cancel";e.reject(a)}};k.onload=function(){var b=l(d,c,k);200<=k.status&&400>k.status?e.resolve(b):(e.reject(b),a&&"undefined"!==typeof console&&console.log(Error(k.statusText)))};k.onerror=function(){var b=l(d,c,k);e.reject(b);a&&"undefined"!==typeof console&&console.log(Error(k.statusText))};
k.onprogress=function(a){a.xhr=k;e.progress(a)};try{k.open(h,d,!0);"string"===typeof c.responseType&&(k.responseType=c.responseType);if("number"===typeof c.timeout)if("number"===typeof k.timeout)k.timeout=c.timeout,k.addEventListener("timeout",function(a){e.reject(l(d,c,k,"Timeout exceeded"))});else{var r=setTimeout(function(){e.reject(l(d,c,k,"Timeout exceeded"))},c.timeout);e.promise.then(clearTimeout.bind(null,r),clearTimeout.bind(null,r))}Object.keys(b).forEach(function(a){k.setRequestHeader(a,
b[a])});k.send(g||null)}catch(t){e.reject(l(d,c,k,t))}return e.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(f,l,h){function d(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function c(a,b){return{get:function(c,e){if(0===b)return null;var d=localStorage.getItem(a+c);if(null===d)return null;d=JSON.parse(d);return e||-1===b||d._expires&&d._expires>(new Date).getTime()?(delete d._expires,d):null},set:function(c,e){if(0!==b)if(-1!==b&&(e._expires=(new Date).getTime()+
1E3*b),0===Object.keys(e).length)localStorage.removeItem(a+c);else{var d=JSON.stringify(e);localStorage.setItem(a+c,d);delete e._expires}},remove:function(b){localStorage.removeItem(a+b)}}}function k(a){this._currentPromises={};this._cache=new c("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var b=a.getServiceReferences("orion.core.preference.provider");0<b.length&&(this._service=a.getService(b[0]))}return!!this._service}}function e(a){this._location=
a;this._currentPromise=null;this._cache=new c("/orion/preferences/default",3600)}function b(){this._cache=new c("/orion/preferences/local",-1)}function a(a,m){this._userProvider=new k(a);this._localProvider=new b;m=m||"defaults.pref";-1===m.indexOf("://")&&(m=f.toUrl(m));this._defaultsProvider=new e(m);this._serviceRegistration=a.registerService("orion.core.preference",this)}d.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var c=this._stores[b];-1!==this._dirty.indexOf(c)&&
a.push(this._providers[b].put(this._name,c));if(this._pendingDeletes[b]&&0<this._pendingDeletes[b].length){for(c=0;c<this._pendingDeletes[b].length;c++)a.push(this._providers[b].remove(this._name,this._pendingDeletes[b][c]));delete this._pendingDeletes[b]}}this._dirty=[];return l.all(a)},_scheduleFlush:function(a){a&&-1===this._dirty.indexOf(a)&&this._dirty.push(a);this._flushPending||(this._flushPending=!0,window.setTimeout(function(){this._flushPending&&(this._flushPending=!1,this._flush())}.bind(this),
0))},_getCached:function(){if(!this._cached){this._cached={};for(var a=0;a<this._stores.length;++a){var b=this._stores[a],c;for(c in b)b.hasOwnProperty(c)&&"undefined"===typeof this._cached[c]&&(this._cached[c]=b[c])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(0!==this._stores.length){var c=this._stores[0];c[a]!==b&&(c[a]=b,this._cached=null,this._scheduleFlush(c))}},remove:function(a){for(var b=0;b<
this._stores.length;++b){var c=this._stores[b];if(c.hasOwnProperty(a))return delete c[a],this._pendingDeletes[b]||(this._pendingDeletes[b]=[]),this._pendingDeletes[b].push(a),this._cached=null,this._scheduleFlush(),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]={},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var b=this,c=[],e=0;e<this._providers.length;++e)c.push(this._providers[e].get(this._name,
a).then(function(a){return function(g){b._stores[a]=g}}(e)));return l.all(c).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};k.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var c=new l,e=null;b?this._cache.remove(a):e=this._cache.get(a);if(null!==e)c.resolve(e);else{this._currentPromises[a]=c;var d=this;this._service.get(a).then(function(b){d._cache.set(a,b);delete d._currentPromises[a];c.resolve(b)},function(b){404===b.status?
(b={},d._cache.set(a,b),delete d._currentPromises[a],c.resolve(b)):(delete d._currentPromises[a],c.resolve(d._cache.get(a,!0)||{}))})}return c},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)},remove:function(a,b){var c=this._cache.get(a);delete c[b];this._cache.set(a,c);return this._service.remove(a,b)}};e.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;var c=new l,e=null;b?this._cache.remove(a):e=this._cache.get(a);if(null!==e)c.resolve(e);else{this._currentPromise=
c;var d=this;h("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);d._cache.set(a,b[a]||{});d._currentPromise=null;c.resolve(b[a]||{})},function(b){401===b.xhr.status||404===b.xhr.status?(d._cache.set(a,{}),d._currentPromise=null,c.resolve({})):(d._currentPromise=null,b=d._cache.get(a,!0),null!==b?c.resolve(b[a]||{}):c.resolve({}))})}return c},put:function(a,b){var c=new l;c.resolve();return c},remove:function(a,b){var c=this._cache.get(a);
delete c[b];this.put(a,c)}};b.prototype={get:function(a){var b=new l;a=this._cache.get(a);null!==a?b.resolve(a):b.resolve({});return b},put:function(a,b){var c=new l;this._cache.set(a,b);c.resolve();return c},remove:function(a,b){var c=this._cache.get(a);delete c[b];this.put(a,c)}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(b,c,e){if(!c||"number"!==typeof c||7<c||1>c)e=c,c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",
e,!1);return 0!==(a.USER_SCOPE&c)?"/orion/preferences/user"+b:0!==(a.LOCAL_SCOPE&c)?"/orion/preferences/local"+b:"/orion/preferences/default"+b},getPreferences:function(b,c){if(!c||"number"!==typeof c||7<c||1>c)c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var e=[];a.USER_SCOPE&c&&this._userProvider.available()&&e.push(this._userProvider);a.LOCAL_SCOPE&c&&e.push(this._localProvider);a.DEFAULT_SCOPE&c&&e.push(this._defaultsProvider);var f=new d(b,e);return f.sync().then(function(){return f})},getSetting:function(a,
b,c){for(var e,d=0;d<a.length;d++)if(a[d].label===b)for(var f=0;f<a[d].data.length;f++)if(a[d].data[f].label===c){e=a[d].data[f].value;break}return e}};return{PreferencesService:a}});
(function(){function f(a){if("string"!==typeof a)throw new TypeError;}function l(a){return a?a.split("\x26"):[]}function h(a){return 0===a.length?"":a.join("\x26")}function d(a){var b=/([^=]*)(?:=?)(.*)/.exec(a);a=b[1]?decodeURIComponent(b[1]):"";b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function c(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="\x3d"+encodeURIComponent(a[1]));return b}function k(a,b){var g="",c=[],e=0;return{next:function(){g!==a.query&&(g=a.query,c=l(g));if(e<c.length){var m=
d(c[e++]);switch(b){case "keys":return m[0];case "values":return m[1];case "keys+values":return[m[0],m[1]];default:throw new TypeError;}}throw B;}}}function e(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function b(a){return a?/[1-9]\d*$/.exec(a)[0]:""}function a(a){var b=[];a.split("/").forEach(function(a){".."===a?b.pop():"."!==a&&b.push(a)});return b.join("/")}function g(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function m(c,e){if("string"!==
typeof c)throw new TypeError;c=g(c);var m=q.exec(c);if(!m)return null;var d={};d.scheme=m[1]||"";if(d.scheme&&!s.test(d.scheme))return null;var n=m[2];if(n&&(n=p.exec(n),d.userinfo=n[1],d.host=n[2],d.port=n[3],d.port&&!v.test(d.port)))return null;d.path=m[3];d.query=m[4];d.fragment=m[5];!d.scheme&&e&&(d.scheme=e.scheme,!d.host&&e.host&&(d.userinfo=e.userinfo,d.host=e.host,d.port=e.port,d.pathRelative=!0));d.pathRelative&&(d.path?"/"!==d.path[0]&&(m=/^(.*\/)[^\/]*$/.exec(e.path)[1]||"/",d.path=m+d.path):
d.path=e.path);d.scheme&&(d.scheme=d.scheme.toLowerCase());d.port&&(d.port=b(d.port));d.host&&d.path&&(d.path=a(d.path));return d}function n(a,b){var g;if(b){b=b.href||b;g=m(b);if(!g||!g.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:g})}g=m(a,g);if(!g)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:g,writable:!0});var c=new e(this);Object.defineProperty(this,"query",{get:function(){return this._url?
c:null},enumerable:!0})}try{var r;if("function"===typeof window.URL&&0!==window.URL.length&&"http:"===(r=new window.URL("http://www.w3.org?q")).protocol&&r.query)return}catch(t){}var q=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,p=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,s=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,v=/^\d*$/,u=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,w=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,D=/^([^?#\s]*)$/,y=/^([^\s]*)$/,E=/^\S*$/,A=/([^:]*):?(.*)/,B="undefined"!==
typeof StopIteration?StopIteration:Error("Stop Iteration"),x={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(e.prototype,{get:{value:function(a){f(a);var b;l(this._url.query).some(function(g){g=d(g);if(g[0]===a)return b=g[1],!0});return b},enumerable:!0},set:{value:function(a,b){f(a);f(b);var g=l(this._url.query);g.some(function(e,m){var n=d(e);if(n[0]===a)return n[1]=b,g[m]=c(n),!0})||g.push(c([a,b]));this._url.query=h(g)},enumerable:!0},has:{value:function(a){f(a);
return l(this._url.query).some(function(b){if(d(b)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){f(a);var b=l(this._url.query),g=b.filter(function(b){return d(b)[0]!==a});return g.length!==b.length?(this._url.query=h(g),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,b){if("function"!==typeof a)throw new TypeError;var g=k(this._url,"keys+values");try{for(;;){var c=g.next();a.call(b,c[1],c[0],this)}}catch(e){if(e!==B)throw e;
}},enumerable:!0},keys:{value:function(){return k(this._url,"keys")},enumerable:!0},values:{value:function(){return k(this._url,"values")},enumerable:!0},items:{value:function(){return k(this._url,"keys+values")}},size:{get:function(){return l(this._url.query).length},enumerable:!0},getAll:{value:function(a){f(a);var b=[];l(this._url.query).forEach(function(g){g=d(g);g[0]===a&&b.push(g[1])});return b},enumerable:!0},append:{value:function(a,b){f(a);f(b);var g=l(this._url.query);g.push(c([a,b]));this._url.query=
h(g)},enumerable:!0}});Object.defineProperties(n.prototype,{href:{get:function(){var a;if(this._url){a=this._url;var b=a.scheme?a.scheme+":":"";a.host&&(b+="//",a.userinfo&&(b+=a.userinfo+"@"),b+=a.host,a.port&&(b+=":"+a.port));b+=a.path;a.query&&(b+="?"+a.query);a.fragment&&(b+="#"+a.fragment);a=b}else a=this._input;return a},set:function(a){f(a);this._input=a;this._url=m(this._input,this._baseURL)},enumerable:!0},origin:{get:function(){return this._url&&this._url.host?this.protocol+"//"+this.host:
""},enumerable:!0},protocol:{get:function(){return this._url?this._url.scheme+":":":"},set:function(a){f(a);if(this._url&&(a=":"===a.slice(-1)?a.substring(0,a.length-1):a,""===a||s.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){f(a);this._url&&(this._url.userinfo=a)}},username:{get:function(){if(!this._url)return"";var a=A.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){f(a);if(this._url){var b=
A.exec(this._userinfo);a=[encodeURIComponent(a||"")];b[2]&&a.push(b[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=A.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){f(a);if(this._url){var b=[A.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")}},enumerable:!0},host:{get:function(){var a="";this._url&&this._url.host&&(a+=this._url.host,this._url.port&&(a+=":"+this._url.port));return a},
set:function(a){f(a);if(this._url&&(a=w.exec(a)))this._url.host=a[1],this._url.port=b(a[2])},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){f(a);this._url&&u.exec(a)&&(this._url.host=a)},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===x[this.protocol]&&(a="");return a},set:function(a){f(a);this._url&&v.exec(a)&&(this._url.port=b(a))},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(b){f(b);
this._url&&D.exec(b)&&(this._url.host&&(b&&"/"!==b[0])&&(b="/"+b),this._url.path=b?a(b):"")},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(a){f(a);this._url&&(a&&"?"===a[0]&&(a=a.substring(1)),y.exec(a)&&(this._url.query=a))},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){f(a);this._url&&(a&&"#"===a[0]&&(a=a.substring(1)),E.exec(a)&&(this._url.fragment=a))},enumerable:!0}});
if((r=window.URL||window.webkitURL)&&r.createObjectURL)Object.defineProperty(n,"createObjectURL",{value:r.createObjectURL.bind(r),enumerable:!1}),Object.defineProperty(n,"revokeObjectURL",{value:r.revokeObjectURL.bind(r),enumerable:!1});window.URL=n})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(f,l){function h(a,b){var g=Object.keys(a),c=Object.keys(b);if(g.length!==c.length)return!1;g.sort();c.sort();for(var e=0,m=g.length;e<m;e++){var d=g[e];if(d!==c[e])return!1;var f=a[d],d=b[d];if(f!==d&&JSON.stringify(f)!==JSON.stringify(d))return!1}return!0}function d(a){if(-1===a.indexOf("://"))try{return(new URL(a,location.href)).href}catch(b){}return a}function c(a){var b=null,g={key:function(g){return(b=
b||Object.keys(a))[g]},getItem:function(b){return a[b]},setItem:function(g,c){a[g]=c;b=null},removeItem:function(g){delete a[g];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}};Object.defineProperty(g,"length",{get:function(){return(b=b||Object.keys(a)).length}});return g}function k(a,b){if(b&&b instanceof XMLHttpRequest){var g,c;try{g=b.status,c=b.statusText}catch(e){g=0,c=""}return{status:g||0,statusText:c}}return b}function e(a){var b=a?JSON.parse(JSON.stringify(a,
k)):a;a instanceof Error&&(b.__isError=!0,b.message=b.message||a.message,b.name=b.name||a.name);return b}function b(a,b){this.type=a;this.plugin=b}function a(a,b){this.__objectId=a;this.__methods=b}function g(g,c,m){function d(a){K&&m.postMessage(a,K)}function k(b){if(!K)return(new f).reject(Error("plugin not connected"));b.id=String(Z++);var g=new f;P[b.id]=g;g.then(null,function(a){"active"===C&&(a instanceof Error&&"Cancel"===a.name)&&d({requestId:b.id,method:"cancel",params:a.message?[a.message]:
[]})});var c=Object.prototype.toString;b.params.forEach(function(m,e){if("[object Object]"===c.call(m)&&!(m instanceof a)){var d,n;for(d in m)"[object Function]"===c.call(m[d])&&(n=n||[],n.push(d));if(n){var f=X++;R[f]=m;d=function(){delete R[f]};g.then(d,d);b.params[e]=new a(f,n)}}});m.postMessage(b,K);return g.promise}function s(a,b){a||0===a?d({id:a,result:null,error:b}):console.log(b)}function v(a,b,g,c){c.forEach(function(a,b){if(a&&"undefined"!==typeof a.__objectId){var g={};a.__methods.forEach(function(b){g[b]=
function(){return k({objectId:a.__objectId,method:b,params:Array.prototype.slice.call(arguments)})}});c[b]=g}});var m=void 0===typeof a?null:{id:a,result:null,error:null};try{var n=g.apply(b,c);m&&(n&&"function"===typeof n.then?(S[a]=n,n.then(function(b){delete S[a];m.result=b;d(m)},function(b){S[a]&&(delete S[a],m.error=e(b),d(m))},function(){d({responseId:a,method:"progress",params:Array.prototype.slice.call(arguments)})})):(m.result=n,d(m)))}catch(f){m&&(m.error=e(f),d(m))}}function u(a){try{if(a.method){var b=
a.method,g=a.params||[];if("serviceId"in a){var c=$[a.serviceId];c||s(a.id,"service not found");b in c?v(a.id,c,c[b],g):s(a.id,"method not found")}else if("objectId"in a){var e=R[a.objectId];e||s(a.id,"object not found");b in e?v(a.id,e,e[b],g):s(a.id,"method not found")}else if("requestId"in a){var d=S[a.requestId];d&&("cancel"===b&&d.cancel)&&d.cancel.apply(d,g)}else if("responseId"in a){var n=P[a.responseId];n&&("progress"===b&&n.progress)&&n.progress.apply(n,g)}else if("plugin"===a.method){K.connected();
var f=a.params[0];O({headers:f.headers,services:f.services}).then(function(){H&&H.resolve(A)})}else if("timeout"===a.method)H&&H.reject(a.error);else throw Error("Bad method: "+a.method);}else{var k=P[String(a.id)];delete P[String(a.id)];if(a.error){var h=m.handleServiceError(A,a.error);k.reject(h)}else k.resolve(a.result)}}catch(r){console.log("Plugin._messageHandler "+r)}}function w(b){var g={};if(b.methods&&(b.methods.forEach(function(a){g[a]=function(){var g={serviceId:b.serviceId,method:a,params:Array.prototype.slice.call(arguments)};
return"active"===C?k(g):A.start({"transient":!0}).then(function(){return k(g)})}}),g.addEventListener&&g.removeEventListener)){var c=new l,m=X++;R[m]={handleEvent:c.dispatchEvent.bind(c)};var e=new a(m,["handleEvent"]),d=g.addEventListener;g.addEventListener=function(a,b){c._namedListeners[a]||d(a,e);c.addEventListener(a,b)};var n=g.removeEventListener;g.removeEventListener=function(a,b){c.removeEventListener(a,b);c._namedListeners[a]||n(a,e)}}return g}function D(a){var b=JSON.parse(JSON.stringify(a.properties));
b.__plugin__=g;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);b.objectClass=a;return b}function y(a){var b=w(a),g=D(a),g=m.registerService(a.names||a.type,b,g);J[a.serviceId]={registration:g,proxy:b}}function E(){m.persist(g,{created:B,headers:x,services:G,autostart:z,lastModified:F})}var A=this;c=c||{};var B=c.created||(new Date).getTime(),x=c.headers||{},G=c.services||[],z=c.autostart,F=c.lastModified||0,C="installed",I,H,K,L,J={},Z=0,X=0,S={},P={},R={},$={},O;this._default=!1;this._persist=E;
this._resolve=function(){C="resolved";m.dispatchEvent(new b("resolved",A))};this._getAutostart=function(){return z};this._getCreated=function(){return B};this.getLocation=function(){return g};this.getHeaders=function(){return JSON.parse(JSON.stringify(x))};this.getName=function(){var a=this.getHeaders();return a?a.name||"":null};this.getVersion=function(){var a=this.getHeaders();return a?a.version||"0.0.0":null};this.getLastModified=function(){return F};this.getServiceReferences=function(){var a=
[];Object.keys(J).forEach(function(b){a.push(J[b].registration.getReference())});return a};this.setParent=function(a){return L!==a?(L=a,A.stop({"transient":!0}).then(function(){if("started"===z)return A.start({"transient":!0});if("lazy"===z)return A.start({lazy:!0,"transient":!0})})):(new f).resolve()};this.getState=function(){return C};this.start=function(a){if("uninstalled"===C)return(new f).reject(Error("Plugin is uninstalled"));if(I)return I.promise.then(this.start.bind(this,a));if("active"===
C)return(new f).resolve();if(!a||!a.transient){var c=a&&a.lazy?"lazy":"started";c!==z&&(z=c,E())}c=m.getState();if("starting"!==c&&"active"!==c)return a.transient?(new f).reject(Error("start transient error")):(new f).resolve();if("installed"===C)try{this._resolve()}catch(e){return(new f).reject(e)}"resolved"===C&&G.forEach(function(a){y(a)});if(a&&a.lazy)return"starting"!==C&&(C="starting",m.dispatchEvent(new b("lazy activation",A))),(new f).resolve();var d=new f;I=d;C="starting";m.dispatchEvent(new b("starting",
A));H=new f;K=m.connect(g,u,L);H.then(function(){H=null;C="active";m.dispatchEvent(new b("started",A));I=null;d.resolve()},function(){H=null;C="stopping";m.dispatchEvent(new b("stopping",A));Object.keys(J).forEach(function(a){J[a].registration.unregister();delete J[a]});m.disconnect(K);K=null;C="resolved";I=null;m.dispatchEvent(new b("stopped",A));d.reject(Error("Failed to load plugin: "+g));A._default&&(F=0,E())});return d.promise};this.stop=function(a){if("uninstalled"===C)return(new f).reject(Error("Plugin is uninstalled"));
if(I)return I.promise.then(this.stop.bind(this,a));if((!a||!a.transient)&&"stopped"!==z)z="stopped",E();if("active"!==C&&"starting"!==C)return(new f).resolve();I=a=new f;C="stopping";m.dispatchEvent(new b("stopping",A));Object.keys(J).forEach(function(a){J[a].registration.unregister();delete J[a]});K&&(m.disconnect(K),K=null);C="resolved";I=null;m.dispatchEvent(new b("stopped",A));a.resolve();return a.promise};O=function(a){if("uninstalled"===C)return(new f).reject(Error("Plugin is uninstalled"));
if(!a)return 0===F&&(F=(new Date).getTime(),E()),m.loadManifest(g).then(O,function(){A._default&&(F=0,E());console.log("Failed to load plugin: "+g)});var c=x,e=G,d=z;x=a.headers||{};G=a.services||[];z=a.autostart||z;a.lastModified?F=a.lastModified:(F=(new Date).getTime(),E());if(h(x,c)&&h(G,e)&&z===d)return(new f).resolve();if("active"===C||"starting"===C){var k=[];Object.keys(G).forEach(function(a){var b=G[a];k.push(a);var g=J[a];if(g){if(h(b.methods,Object.keys(g.proxy))){a=D(b);var c=g.registration.getReference(),
m={};c.getPropertyKeys().forEach(function(a){m[a]=c.getProperty(a)});h(a,m)||g.registration.setProperties(a);return}g.registration.unregister();delete J[a]}y(b)});Object.keys(J).forEach(function(a){-1===k.indexOf(a)&&(J[a].registration.unregister(),delete J[a])})}"active"===C&&(m.disconnect(K),H=new f,K=m.connect(g,u,L),H.then(function(){H=null},function(){H=null;C="stopping";m.dispatchEvent(new b("stopping"),A);Object.keys(J).forEach(function(a){J[a].registration.unregister();delete J[a]});m.disconnect(K);
K=null;C="resolved";m.dispatchEvent(new b("stopped",A))}));return(new f).resolve()};this.update=function(a){return O(a).then(function(){m.dispatchEvent(new b("updated",A))})};this.uninstall=function(){if("uninstalled"===C)return(new f).reject(Error("Plugin is uninstalled"));if("active"===C||"starting"===C||"stopping"===C)return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));m.removePlugin(this);C="uninstalled";m.dispatchEvent(new b("uninstalled",A));return(new f).resolve()}}
var m=/^http[s]?/i;return{Plugin:g,PluginRegistry:function(a,e){function k(a){var b=a.source;u.some(function(g){if(b===g.target){try{var c;if("undefined"===typeof g.useStructuredClone){var m="string"!==typeof a.data;c=m?a.data:JSON.parse(a.data);g.useStructuredClone=m}else c=g.useStructuredClone?a.data:JSON.parse(a.data);g.handler(c)}catch(e){}return!0}})}e=e||{};var h=e.storage||localStorage;h.getItem||(h=c(h));var p="installed",s,v=[],u=[],w=new l,D={},y={registerService:a.registerService.bind(a),
connect:function(a,b,g,c){function m(a){a=Error(a);a.name="timeout";b({method:"timeout",error:a})}var e={handler:b,url:a},d=setTimeout(m.bind(null,"Load timeout for: "+a),c||15E3),n=document.createElement("iframe");n.name=a+"_"+(new Date).getTime();n.src=a;n.onload=function(){clearTimeout(d);d=setTimeout(m.bind(null,"Plugin handshake timeout for: "+a),5E3)};n.sandbox="allow-scripts allow-same-origin";n.style.width=n.style.height="100%";n.frameBorder=0;(g||s).appendChild(n);e.target=n.contentWindow;
e.connected=function(){clearTimeout(d)};e.close=function(){clearTimeout(d);if(n){var a=n.parentNode;a&&a.removeChild(n);n=null}};u.push(e);return e},disconnect:function(a){for(var b=0;b<u.length;b++)if(a===u[b]){u.splice(b,1);try{a.close()}catch(g){}break}},removePlugin:function(a){for(var b=0;b<v.length;b++)if(a===v[b]){v.splice(b,1);break}h.removeItem("plugin."+a.getLocation())},persist:function(a,b){h.setItem("plugin."+a,JSON.stringify(b))},postMessage:function(a,b){b.target.postMessage(b.useStructuredClone?
a:JSON.stringify(a),b.url)},dispatchEvent:function(a){try{w.dispatchEvent(a)}catch(b){console&&console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new f,g=y.connect(a,function(a){g&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],y.disconnect(g),g=null,b.resolve(a)):"timeout"===a.method&&(y.disconnect(g),g=null,b.reject(a.error)))});return b.promise},getState:function(){return p},handleServiceError:function(a,b){if(b&&401===b.status){var g=a.getHeaders(),
c=a.getName()||a.getLocation(),e=document.createElement("span");e.appendChild(document.createTextNode("Authentication required for: "+c+"."));g.login&&(e.appendChild(document.createTextNode(" ")),c=document.createElement("a"),c.target="_blank",c.textContent="Login",c.href=g.login,m.test(c.href)?(e.appendChild(c),e.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+g.login));return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(e)}}if(b.__isError){var d=
b;b=Error(d.message);Object.keys(d).forEach(function(a){b[a]=d[a]});delete b.__isError}return b}};this.getLocation=function(){return"System"};this.getHeaders=function(){return{}};this.getName=function(){return"System"};this.getVersion=function(){return"0.0.0"};this.getLastModified=function(){return 0};this.getState=y.getState;this.init=function(){if(!("starting"===p||"active"===p||"stopping"===p)){addEventListener("message",k,!1);for(var a=[],b=0,c=h.length;b<c;b++)a.push(h.key(b));a.forEach(function(a){if(0===
a.indexOf("plugin.")){var b=a.substring(7);a=JSON.parse(h.getItem(a));a.created&&v.push(new g(b,a,y))}});v.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});e.parent?s=e.parent:(s=document.createElement("div"),e.visible||(s.style.display="none",s.style.visibility="hidden"),document.body.appendChild(s));e.plugins&&Object.keys(e.plugins).forEach(function(a){a=d(a);var b=this.getPlugin(a);b?b._default=!0:(b=e.plugins[a],"object"!==typeof b&&(b={}),b.autostart=b.autostart||e.defaultAutostart||
"lazy",b=new g(a,b,y),b._default=!0,v.push(b))}.bind(this));p="starting"}};this.start=function(){"starting"!==p&&this.init();if("starting"!==p)return(new f).reject("Cannot start framework. Framework is already "+p+".");var a=[],b=(new Date).getTime();v.forEach(function(g){var c=g._getAutostart();0===g.getLastModified()?a.push(g.update().then(function(){if("started"===c)return g.start({"transient":!0});if("lazy"===c)return g.start({lazy:!0,"transient":!0});g._resolve()})):"started"===c?a.push(g.start({"transient":!0})):
"lazy"===c?(a.push(g.start({lazy:!0,"transient":!0})),b>g.getLastModified()+864E5&&g.update()):g._resolve()});return f.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){p="active"})};this.stop=function(){if("starting"!==p&&"active"!==p)return(new f).reject("Cannot stop registry. Registry is already "+p+".");p="stopping";var a=[];v.forEach(function(b){a.push(b.stop({"transient":!0}))});return f.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){if(!e.parent){var a=
s.parentNode;a&&a.removeChild(s)}s=null;removeEventListener("message",k);p="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new f).reject("Cannot uninstall registry")};this.installPlugin=function(a,c){a=d(a);var e=this.getPlugin(a);if(e)return(new f).resolve(e);if(D[a])return D[a];if(c)return e=new g(a,c,y),v.push(e),e._persist(),y.dispatchEvent(new b("installed",e)),(new f).resolve(e);var m=y.loadManifest(a).then(function(c){e=new g(a,
c,y);v.push(e);e._persist();delete D[a];y.dispatchEvent(new b("installed",e));return e},function(b){delete D[a];throw b;});return D[a]=m};this.getPlugins=function(){return v.slice()};this.getPlugin=function(a){var b=null;a=d(a);v.some(function(g){if(a===g.getLocation())return b=g,!0});return b};this.addEventListener=w.addEventListener.bind(w);this.removeEventListener=w.removeEventListener.bind(w);this.resolvePlugins=function(){var a=!0;v.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/objects",[],function(){function f(f){for(var h=Object.prototype.hasOwnProperty,d=1,c=arguments.length;d<c;d++){var k=arguments[d],e;for(e in k)h.call(k,e)&&(f[e]=k[e])}return f}return{clone:function(l){if(Array.isArray(l))return Array.prototype.slice.call(l);var h=Object.create(Object.getPrototypeOf(l));f(h,l);return h},mixin:f,toArray:function(f){return Array.isArray(f)?f:[f]}}});
define("orion/serviceTracker",[],function(){function f(d,c){function f(g){var c=g.getProperty("service.id"),e=this.addingService(g);e&&(b[c]=g,a[c]=e)}function e(g){var c=g.getProperty("service.id"),e=a[c];delete b[c];delete a[c];this.removedService(g,e)}this.serviceRegistry=d;var b={},a={},g=l,m,n;this.close=function(){if(g!==h)throw"Already closed";g=l;d.removeEventListener("registered",m);d.removeEventListener("unregistering",n);n=m=null;var a=this;this.getServiceReferences().forEach(function(b){e.call(a,
b)});if("function"===typeof this.onClose)this.onClose()};this.getServiceReferences=function(){var a=Object.keys(b);return!a.length?null:a.map(function(a){return b[a]})};this.open=function(){if(g!==l)throw"Already open";g=h;var a=this;m=function(b){if(-1!==b.serviceReference.getProperty("objectClass").indexOf(c)&&(f.call(a,b.serviceReference),"function"===typeof a.onServiceAdded))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};n=function(b){-1!==b.serviceReference.getProperty("objectClass").indexOf(c)&&
e.call(a,b.serviceReference)};d.addEventListener("registered",m);d.addEventListener("unregistering",n);d.getServiceReferences(c).forEach(function(b){f.call(a,b);if("function"===typeof a.onServiceAdded)return a.onServiceAdded(b,d.getService(b))});if("function"===typeof this.onOpen)this.onOpen()}}var l=0,h=1;f.prototype={addingService:function(d){return this.serviceRegistry.getService(d)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(d,c){}};return f});
define("orion/config",["orion/Deferred","orion/objects","orion/preferences","orion/serviceTracker"],function(f,l,h,d){var c=h.PreferencesService,k,e,b,a,g=c.DEFAULT_SCOPE,m="pid",n="/cm/configurations";k=function(a,b,g){function c(a,g,e){g.forEach(function(c,m){try{var d=a[m].getProperty("__plugin__"),n=d&&b.getPlugin(d);(!d||n&&"active"===n.getState())&&g[m].updated(e)}catch(f){"undefined"!==typeof console&&console.log(f)}})}d.call(this,a,"orion.cm.managedservice");var e={},n={},k=function(b){var c=
[];b.plugin.getServiceReferences().forEach(function(b){if(-1!==b.getProperty("objectClass").indexOf("orion.cm.managedservice")){var e=b.getProperty(m);b=a.getService(b);e&&b&&(e=(e=g._find(e))&&e.getProperties(),c.push(b.updated(e)))}});return f.all(c)};this.addingService=function(b){var g=b.getProperty(m),c=a.getService(b);if(!g||!c)return null;e[g]||(e[g]=[]);n[g]||(n[g]=[]);e[g].push(b);n[g].push(c);return c};this.onServiceAdded=function(a,b){var e=a.getProperty(m),e=g._find(e);c([a],[b],e&&e.getProperties())};
this.onOpen=function(){b.addEventListener("started",k)};this.onClose=function(){b.removeEventListener("started",k)};this.notifyUpdated=function(a){var b=a.getPid();c(e[b]||[],n[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();c(e[a]||[],n[a]||[],null)};this.removedService=function(a,b){var g=a.getProperty(m),c=e[g],d=n[g];1<c.length?c.splice(c.indexOf(a),1):delete e[g];1<d.length?d.splice(d.indexOf(b),1):delete n[g]}};h=function(){function a(g,c,m){this.store=new e(this,m);this.configAdmin=
new b(this,this.store);this.tracker=new k(g,c,this.store)}a.prototype={getConfigurationAdmin:function(){var a=this;return this.configAdmin._init().then(function(b){a.tracker.open();return b})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();b=function(){function a(b,g){this.factory=b;this.store=g}a.prototype={_prefName:n,_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},
getDefaultConfiguration:function(a){return this.store._find(a,g)},listConfigurations:function(){return this.store.list()}};return a}();e=function(){function b(a,c){this.factory=a;this.prefsService=c;this.pref=this.configs=this.defaultConfigs=null;var e=this;this.initPromise=f.all([this.prefsService.getPreferences(n,g),this.prefsService.getPreferences(n)]).then(function(a){var b=a[0];e.pref=a[1];e.defaultConfigs=e._toConfigs(b,!0);e.configs=e._toConfigs(e.pref,!1,b)})}b.prototype={_toConfigs:function(b,
g,c){var e=Object.create(null),d=this;b.keys().forEach(function(n){if(!e[n]){var f=b.get(n),k=c&&c.get(n);"object"===typeof f&&(null!==f&&0<Object.keys(f).length)&&(f[m]=n,e[n]=new a(d.factory,d,f,g,k))}});return e},_init:function(){return this.initPromise},_find:function(a,b){return b===c.DEFAULT_SCOPE?this.defaultConfigs[a]||null:this.configs[a]||null},get:function(b){var c=this._find(b),e=this._find(b,g);c||(c=e&&e.getProperties(!0),c=new a(this.factory,this,b,!1,c),this.configs[b]=c);return c},
list:function(){var a=this,b=[];this.pref.keys().forEach(function(g){(g=a._find(g))&&null!==g.getProperties()&&b.push(g)});return b},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,b){var c=b.getProperties(!0)||{},e=this._find(a,g);if(e){var m=e.getProperties(!0);Object.keys(m).forEach(function(a){Object.prototype.hasOwnProperty.call(c,a)&&c[a]===m[a]&&delete c[a]})}this.pref.put(a,c)}};return b}();a=function(){function a(b,g){g=l.clone(g);delete g[m];b.properties=g}
function b(g,c,e,d,n){this.factory=g;this.store=c;this.readOnly=d;if(null!==e&&"object"===typeof e)this.pid=e[m],a(this,e);else if("string"===typeof e)this.pid=e,this.properties=null;else throw Error("Invalid pid/properties "+e);if(n){var f=this;Object.keys(n).forEach(function(a){a===m||Object.prototype.hasOwnProperty.call(f.properties,a)||(f.properties[a]=n[a])})}}b.prototype={_checkReadOnly:function(){if(this.readOnly)throw Error("Configuration is read only");},_checkRemoved:function(){if(this.removed)throw Error("Configuration was removed");
},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(a){this._checkRemoved();var b=null;this.properties&&(b=l.clone(this.properties),a||(b[m]=this.pid));return b},remove:function(){this._checkReadOnly();this._checkRemoved();this.factory.notifyDeleted(this);this.store.remove(this.pid);this.removed=!0},update:function(b){this._checkReadOnly();this._checkRemoved();a(this,b);this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+
this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return b}();return{ConfigurationAdminFactory:h}});
define("orion/bootstrap","require orion/Deferred orion/serviceregistry orion/preferences orion/pluginregistry orion/config".split(" "),function(f,l,h,d,c,k){var e;return{startup:function(){if(e)return e;e=new l;var b=new h.ServiceRegistry,a=new d.PreferencesService(b);return a.getPreferences("/plugins").then(function(g){var m={plugins:{}};g.keys().forEach(function(a){var b=f.toUrl(a);m.plugins[b]=g[a]});var d=new c.PluginRegistry(b,m);return d.start().then(function(){if(0<b.getServiceReferences("orion.core.preference.provider").length)return a.getPreferences("/plugins",
a.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=f.toUrl(a);d.getPlugin(a)||b.push(d.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return l.all(b,function(a){console.log(a)})})}).then(function(){return(new k.ConfigurationAdminFactory(b,d,a)).getConfigurationAdmin().then(b.registerService.bind(b,"orion.cm.configadmin"))}).then(function(){var a=b.getService("orion.core.auth");if(a){var g=a.getUser().then(function(b){if(b)localStorage.setItem("lastLogin",
(new Date).getTime());else return a.getAuthForm(window.location.href).then(function(a){setTimeout(function(){window.location=a},0)})}),c=localStorage.getItem("lastLogin");if(!c||c<(new Date).getTime()-9E5)return g}}).then(function(){var g={serviceRegistry:b,preferences:a,pluginRegistry:d};e.resolve(g);return g})})}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell",ShellLinkWorkspace:"Workspace Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor",EditorRelatedLink:"Show Current Folder",EditorRelatedLinkParent:"Show Enclosing Folder",EditorLinkWorkspace:"Show Workspace",EditorRelatedLinkProj:"Show Project","Filter bindings":"Filter bindings","Orion Editor":"Orion Editor","Orion Image Viewer":"Orion Image Viewer","Orion Markdown Editor":"Orion Markdown Editor","Orion Markdown Viewer":"Orion Markdown Viewer",
"Orion JSON Editor":"Orion JSON Editor","View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion.","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer","Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it",
"Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown","Unknown item":"Unknown item","Can't search: no search service is available":"Can't search: no search service is available","could not find banner parent, id was ":"could not find banner parent, id was ",
Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Bugs","Privacy Policy":"Privacy","Terms of Use":"Terms","Copyright Agent":"Copyright","Orion Logo":"Orion Logo","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"2014-06-28_22-01-29","LOG: ":"LOG: ",View:"View","no parent":"no parent","no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ","Resource is out of sync with the server. Do you want to save it anyway?":"Resource is out of sync with the server. Do you want to save it anyway?",
Operations:"Operations","Operations running":"Operations running","Some operations finished with warning":"Some operations finished with warning","Some operations finished with error":"Some operations finished with error","no service registry":"no service registry",Tasks:"Tasks",Close:"Close","Expand all":"Expand all","Collapse all":"Collapse all",Search:"Search","Advanced search":"Advanced search",Submit:"Submit",More:"More","Recent searches":"Recent searches","Regular expression":"Regular expression",
"Search options":"Search options","Global search":"Global search","Orion Home":"Orion Home","Close notification":"Close notification","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations","Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Toggle side panel":"Toggle side panel","Open or close the side panel":"Open or close the side panel",Projects:"Projects","Toggle Sidebar":"Toggle Sidebar","Sample HTML5 Site":"Sample HTML5 Site",
"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.":"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.","Sample Orion Plugin":"Sample Orion Plugin","Generate a sample plugin for integrating with Orion.":"Generate a sample plugin for integrating with Orion.",Browser:"Web Browser",OutlineProgress:"Getting outline for ${0} from ${1}",UnknownError:"An unknown error occurred.",UnknownWarning:"An unknown warning occurred.",Filter:"Filter (* \x3d any string, ? \x3d any character)",
"To view the browser's context menu, trigger the context menu again.":"To view the browser's context menu, trigger the context menu again.",Edit:"Edit",CentralNavTooltip:"Toggle Navigation Menu"});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(f,l){var h={root:l};Object.keys(f).forEach(function(d){"undefined"===typeof h[d]&&(h[d]=f[d])});return h});
define("orion/util",[],function(){var f=navigator.userAgent,l=-1!==f.indexOf("MSIE")||-1!==f.indexOf("Trident")?document.documentMode:void 0,h=parseFloat(f.split("Firefox/")[1]||f.split("Minefield/")[1])||void 0,d=-1!==f.indexOf("Opera")?parseFloat(f.split("Version/")[1]):void 0,c=parseFloat(f.split("Chrome/")[1])||void 0,k=-1!==f.indexOf("Safari")&&!c,e=parseFloat(f.split("WebKit/")[1])||void 0,b=-1!==f.indexOf("Android"),a=-1!==f.indexOf("iPad"),f=-1!==f.indexOf("iPhone"),g=a||f,m=-1!==navigator.platform.indexOf("Mac"),
n=-1!==navigator.platform.indexOf("Win"),r=-1!==navigator.platform.indexOf("Linux"),t="undefined"!==typeof document&&"ontouchstart"in document.createElement("input");return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,g){return b[(g<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:l,isFirefox:h,isOpera:d,isChrome:c,isSafari:k,isWebkit:e,isAndroid:b,isIPad:a,isIPhone:f,
isIOS:g,isMac:m,isWindows:n,isLinux:r,isTouch:t,platformDelimiter:n?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(f){function l(a,b){b||(b=document);return b.querySelectorAll(a)}function h(a){var b=a.tabIndex;0===b&&f.isIE&&!{a:!0,body:!0,button:!0,frame:!0,iframe:!0,img:!0,input:!0,isindex:!0,object:!0,select:!0,textarea:!0}[a.nodeName.toLowerCase()]&&!a.attributes.tabIndex&&(b=-1);return b}function d(a){if(0<=h(a))return a;if(a.hasChildNodes())for(var b=0;b<a.childNodes.length;b++){var c=d(a.childNodes[b]);if(c)return c}return null}function c(a){if(0<=
h(a))return a;if(a.hasChildNodes())for(var b=a.childNodes.length-1;0<=b;b--){var e=c(a.childNodes[b]);if(e)return e}return null}function k(a,b){if(3===a.nodeType){var c=e.exec(a.nodeValue);c&&1<c.length&&b(a,c)}if(a.hasChildNodes())for(c=0;c<a.childNodes.length;c++)k(a.childNodes[c],b)}var e=/\$\{([^\}]+)\}/,b=null;return{$:function(a,b){b||(b=document);return b.querySelector(a)},$$:l,$$array:function(a,b){return Array.prototype.slice.call(l(a,b))},node:function(a){var b=a;"string"===typeof a&&(b=
document.getElementById(a));return b},contains:function(a,b){if(!a||!b)return!1;if(a===b)return!0;var c=a.compareDocumentPosition(b);return Boolean(c&16)},bounds:function(a){a=a.getBoundingClientRect();return{left:a.left+document.documentElement.scrollLeft,top:a.top+document.documentElement.scrollTop,width:a.width,height:a.height}},empty:function(a){for(;a.hasChildNodes();)a.removeChild(a.firstChild)},firstTabbable:d,lastTabbable:c,stop:function(a){window.document.all&&(a.keyCode=0);a.preventDefault&&
(a.preventDefault(),a.stopPropagation())},processTextNodes:function(a,b){k(a,function(a,c){a.parentNode.replaceChild(document.createTextNode(b[c[1]]||c[1]),a)})},processDOMNodes:function(a,b){k(a,function(a,c){var e=b[c[1]];if(e){var d=document.createRange(),f=c.index;d.setStart(a,f);d.setEnd(a,f+c[0].length);d.deleteContents();d.insertNode(e)}})},addAutoDismiss:function(a,g){function c(a){b.forEach(function(b){var g=!1,c=b.excludeNodes.some(function(b){return document.body.contains(b)?(g=!0,b.contains(a.target)):
!1});if(g&&!c)try{b.dismiss(a)}catch(e){"undefined"!==typeof console&&console&&console.error(e&&e.message)}});b=b.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}null===b&&(b=[],document.addEventListener("click",c,!0),f.isIOS&&document.addEventListener("touchend",function(a){function b(){a.target.removeEventListener("click",b)}0===a.touches.length&&a.target.addEventListener("click",b)},!1));b.push({excludeNodes:a,dismiss:g})},setFramesEnabled:function(a){for(var b=
document.getElementsByTagName("iframe"),c=0;c<b.length;c++)b[c].parentNode.style.pointerEvents=a?"":"none"},removeAutoDismiss:function(a){b=b.filter(function(b){return a!==b.dismiss})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
define("text",["module"],function(f){var l,h,d=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],c=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,k=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e="undefined"!==typeof location&&location.href,b=e&&location.protocol&&location.protocol.replace(/\:/,""),a=e&&location.hostname,g=e&&(location.port||void 0),m=[],n=f.config&&f.config()||{};l={version:"2.0.5",strip:function(a){if(a){a=a.replace(c,"");var b=a.match(k);b&&(a=b[1])}else a="";return a},
jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:n.createXhr||function(){var a,b,g;if("undefined"!==typeof XMLHttpRequest)return new XMLHttpRequest;if("undefined"!==typeof ActiveXObject)for(b=0;3>b;b+=1){g=d[b];try{a=new ActiveXObject(g)}catch(c){}if(a){d=[g];break}}return a},parseName:function(a){var b,
g,c=!1,e=a.indexOf(".");b=0===a.indexOf("./")||0===a.indexOf("../");-1!==e&&(!b||1<e)?(b=a.substring(0,e),g=a.substring(e+1,a.length)):b=a;a=g||b;e=a.indexOf("!");-1!==e&&(c="strip"===a.substring(e+1),a=a.substring(0,e),g?g=a:b=a);return{moduleName:b,ext:g,strip:c}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,g,c){var e,m;e=l.xdRegExp.exec(a);if(!e)return!0;a=e[2];e=e[3];e=e.split(":");m=e[1];e=e[0];return(!a||a===b)&&(!e||e.toLowerCase()===g.toLowerCase())&&(!m&&!e||m===c)},finishLoad:function(a,
b,g,c){g=b?l.strip(g):g;n.isBuild&&(m[a]=g);c(g)},load:function(c,m,d,f){if(f.isBuild&&!f.inlineText)d();else{n.isBuild=f.isBuild;var k=l.parseName(c);f=k.moduleName+(k.ext?"."+k.ext:"");var h=m.toUrl(f),u=n.useXhr||l.useXhr;!e||u(h,b,a,g)?l.get(h,function(a){l.finishLoad(c,k.strip,a,d)},function(a){d.error&&d.error(a)}):m([f],function(a){l.finishLoad(k.moduleName+"."+k.ext,k.strip,a,d)})}},write:function(a,b,g,c){m.hasOwnProperty(b)&&(c=l.jsEscape(m[b]),g.asModule(a+"!"+b,"define(function () { return '"+
c+"';});\n"))},writeFile:function(a,b,g,c,e){b=l.parseName(b);var m=b.ext?"."+b.ext:"",d=b.moduleName+m,n=g.toUrl(b.moduleName+m)+".js";l.load(d,g,function(b){b=function(a){return c(n,a)};b.asModule=function(a,b){return c.asModule(a,n,b)};l.write(a,d,b,e)},e)}};if("node"===n.env||!n.env&&"undefined"!==typeof process&&process.versions&&process.versions.node)h=require.nodeRequire("fs"),l.get=function(a,b){var g=h.readFileSync(a,"utf8");0===g.indexOf("\ufeff")&&(g=g.substring(1));b(g)};else if("xhr"===
n.env||!n.env&&l.createXhr())l.get=function(a,b,g,c){var e=l.createXhr(),m;e.open("GET",a,!0);if(c)for(m in c)c.hasOwnProperty(m)&&e.setRequestHeader(m.toLowerCase(),c[m]);if(n.onXhr)n.onXhr(e,a);e.onreadystatechange=function(c){4===e.readyState&&(c=e.status,399<c&&600>c?(c=Error(a+" HTTP status: "+c),c.xhr=e,g(c)):b(e.responseText))};e.send(null)};else if("rhino"===n.env||!n.env&&"undefined"!==typeof Packages&&"undefined"!==typeof java)l.get=function(a,b){var g,c,e=new java.io.File(a),m=java.lang.System.getProperty("line.separator"),
e=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(e),"utf-8")),d="";try{g=new java.lang.StringBuffer;(c=e.readLine())&&(c.length()&&65279===c.charAt(0))&&(c=c.substring(1));for(null!==c&&g.append(c);null!==(c=e.readLine());)g.append(m),g.append(c);d=String(g.toString())}finally{e.close()}b(d)};return l});define("text!orion/banner/slideout.html",[],function(){return'\x3cdiv id\x3d"slideContainer" class\x3d"slideParameters slideContainer"\x3e\n\t\x3cspan id\x3d"pageCommandParameters" class\x3d"layoutLeft parameters"\x3e\x3c/span\x3e\n\t\x3cspan id\x3d"pageCommandDismiss" class\x3d"layoutRight parametersDismiss"\x3e\x3c/span\x3e\n\x3c/div\x3e'});
define("orion/commonHTMLFragments",["require","orion/webui/littlelib","text!orion/banner/slideout.html"],function(f,l,h){return{slideoutHTMLFragment:function(d){var c=document.createElement("div");c.innerHTML=h;var f=l.$("#slideContainer",c);f.id=d+f.id;f=l.$("#pageCommandParameters",c);f.id=d+f.id;f=l.$("#pageCommandDismiss",c);f.id=d+f.id;return c.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(f){function l(d,c,f,e,b,a){this.type=a||"keydown";this.keyCode="string"===typeof d&&"keydown"===this.type?d.toUpperCase().charCodeAt(0):d;this.mod1=void 0!==c&&null!==c?c:!1;this.mod2=void 0!==f&&null!==f?f:!1;this.mod3=void 0!==e&&null!==e?e:!1;this.mod4=void 0!==b&&null!==b?b:!1}function h(d){this.keys=d}l.prototype={getKeys:function(){return[this]},match:function(d,c){if(void 0!==c){if(0!==c)return!1}else if(d instanceof Array){if(1<d.length)return!1;
d=d[0]}return d.type!==this.type?!1:this.keyCode===d.keyCode||this.keyCode===String.fromCharCode(f.isOpera?d.which:void 0!==d.charCode?d.charCode:d.keyCode)?this.mod1!==(f.isMac?d.metaKey:d.ctrlKey)||"keydown"===this.type&&this.mod2!==d.shiftKey||this.mod3!==d.altKey||f.isMac&&this.mod4!==d.ctrlKey?!1:!0:!1},equals:function(d){return!d||this.keyCode!==d.keyCode||this.mod1!==d.mod1||this.mod2!==d.mod2||this.mod3!==d.mod3||this.mod4!==d.mod4||this.type!==d.type?!1:!0}};h.prototype={getKeys:function(){return this.keys.slice(0)},
match:function(d,c){var f=this.keys;if(void 0!==c)return c>f.length?!1:f[c].match(d)?c===f.length-1?!0:c+1:!1;d instanceof Array||(d=[d]);if(d.length>f.length)return!1;var e;for(e=0;e<d.length;e++)if(!f[e].match(d[e]))return!1;return e===f.length?!0:e},equals:function(d){if(!d.keys||d.keys.length!==this.keys.length)return!1;for(var c=0;c<d.keys.length;c++)if(!d.keys[c].equals(this.keys[c]))return!1;return!0}};return{KeyBinding:l,KeyStroke:l,KeySequence:h}});
define("orion/webui/dropdown",["require","orion/webui/littlelib","orion/EventTarget"],function(f,l,h){function d(c){h.attach(this);this._init(c)}function c(c,b){var a=document.createElement(void 0===b?"span":b);a.tabIndex=0;a.className="dropdownMenuItem";a.role="menuitem";var g=document.createElement("span");g.appendChild(document.createTextNode(c));g.classList.add("dropdownCommandName");a.appendChild(g);g=document.createElement("li");g.appendChild(a);return g}function k(){var c=document.createElement("li");
c.classList.add("dropdownSeparator");return c}d.prototype={_init:function(c){this._dropdownNode=l.node(c.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._populate=c.populate;this._selectionClass=c.selectionClass;this._parentDropdown=c.parentDropdown;this._positioningNode=c.positioningNode;if(!this._parentDropdown)for(var b=this._dropdownNode.parentNode;b&&document!==b;){if(b.classList&&b.classList.contains("dropdownMenu")){this._parentDropdown=b.dropdown;break}b=b.parentNode}this._dropdownNode.tabIndex=
0;this._triggerNode=c.triggerNode?c.triggerNode:l.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";if(!c.skipTriggerEventListeners){var a=this;this._triggerNode.addEventListener("click",function(b){a.toggle(b)&&l.stop(b)},!1);"span"===this._triggerNode.tagName.toLowerCase()&&this._triggerNode.addEventListener("keydown",function(b){if(b.keyCode===l.KEY.ENTER||b.keyCode===l.KEY.SPACE)a.toggle(),l.stop(b)},!1)}this._dropdownNode.addEventListener("keydown",
this._dropdownKeyDown.bind(this),!1)},addTriggerNode:function(c){var b=this;c.addEventListener("click",function(a){b.toggle(a)&&l.stop(a)},!1)},toggle:function(c){return this.isVisible()?this.close():this.open(c)},isVisible:function(){return this._isVisible},open:function(c){var b=!1;this.isVisible()||(this.dispatchEvent({type:"triggered",dropdown:this,event:c}),l.setFramesEnabled(!1),this._populate&&(this.empty(),this._populate(this._dropdownNode)),0<this.getItems().length&&(this._hookedAutoDismiss||
(this._boundAutoDismiss?l.removeAutoDismiss(this._boundAutoDismiss):this._boundAutoDismiss=this._autoDismiss.bind(this),b=l.$$array(".dropdownSubMenu",this._dropdownNode),l.addAutoDismiss([this._triggerNode].concat(b),this._boundAutoDismiss),this._hookedAutoDismiss=!0),this._triggerNode.classList.add("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.add(this._selectionClass),this._dropdownNode.classList.add("dropdownMenuOpen"),this._isVisible=!0,this._positionDropdown(c),this._focusDropdownNode(),
b=!0,this._parentDropdown&&this._parentDropdown.submenuOpen(this)));return b},_focusDropdownNode:function(){this._dropdownNode.focus()},_autoDismiss:function(c){if(this.close(!1)&&this._dropdownNode.contains(c.target))for(c=this._parentDropdown;c;)c.close(!1),c=c._parentDropdown},_positionDropdown:function(c){this._dropdownNode.style.left="";this._dropdownNode.style.top="";if(this._positioningNode)this._dropdownNode.style.left=this._positioningNode.offsetLeft+"px";else{c=l.bounds(this._dropdownNode);
var b=l.bounds(document.body);if(c.left+c.width>b.left+b.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-c.width+"px";else{var a=l.bounds(this._boundingNode(this._triggerNode)),g=l.bounds(this._triggerNode);this._dropdownNode.style.left=g.left-a.left-c.width+g.width+"px"}c=c.top+c.height-(b.top+b.height);0<c&&(this._dropdownNode.style.top=Math.floor(this._dropdownNode.style.top-c)+"px")}},_boundingNode:function(c){var b=window.getComputedStyle(c,null);
return null===b||"absolute"===b.getPropertyValue("position")||!c.parentNode||c===document.body?c:this._boundingNode(c.parentNode)},close:function(c){var b=!1;this.isVisible()&&(this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),l.setFramesEnabled(!0),c&&this._triggerNode.focus(),this._isVisible=!1,this._selectedItem&&(this._selectedItem.classList.remove("dropdownMenuItemSelected"),
this._selectedItem=null),b=!0);return b},getItems:function(){var c=[],b=this;l.$$array("li:not(.dropdownSeparator) \x3e .dropdownMenuItem",this._dropdownNode,!0).forEach(function(a){a.parentNode.parentNode===b._dropdownNode&&c.push(a)});c.forEach(function(a){a._hasDropdownMouseover||(a.addEventListener("mouseover",function(g){a.dropdown?a.dropdown.open(g):(b._closeSelectedSubmenu(),l.stop(g));b._selectItem(a)}),a._hasDropdownMouseover=!0)});return c},empty:function(){var c=this;l.$$array("li",this._dropdownNode).forEach(function(b){b.parentNode===
c._dropdownNode&&b.parentNode.removeChild(b)});this._hookedAutoDismiss=!1},_dropdownKeyDown:function(c){if(c.keyCode===l.KEY.UP||c.keyCode===l.KEY.DOWN||c.keyCode===l.KEY.RIGHT||c.keyCode===l.KEY.ENTER||c.keyCode===l.KEY.LEFT){var b=this.getItems();if(b.length&&0<b.length){if(this._selectedItem){var a=b.indexOf(this._selectedItem);0>a&&(a=b.indexOf(this._selectedItem.parentNode));0<=a&&(c.keyCode===l.KEY.UP&&0<a?(a--,this._selectItem(b[a])):c.keyCode===l.KEY.DOWN&&a<b.length-1?(a++,this._selectItem(b[a])):
c.keyCode===l.KEY.ENTER||c.keyCode===l.KEY.RIGHT?this._selectedItem.classList.contains("dropdownTrigger")&&this._selectedItem.dropdown?(this._selectedItem.dropdown.open(),this._selectedItem.dropdown._selectItem()):c.keyCode===l.KEY.ENTER&&this._selectedItem.click():c.keyCode===l.KEY.LEFT&&this._selectedItem.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&(this.close(!0),this._parentDropdown&&this._parentDropdown._dropdownNode.focus()))}else this._selectItem(b[0]);l.stop(c)}}else c.keyCode===
l.KEY.ESCAPE&&(this.close(!0),l.stop(c))},_selectItem:function(c){if(c=c||this.getItems()[0])this._selectedItem&&this._selectedItem.classList.remove("dropdownMenuItemSelected"),this._selectedItem=c,this._selectedItem.classList.add("dropdownMenuItemSelected");document.activeElement!==this._dropdownNode&&this._dropdownNode.focus()},submenuOpen:function(c){c!==this._selectedSubmenu&&(this._closeSelectedSubmenu(),this._selectedSubmenu=c)},_closeSelectedSubmenu:function(){for(var c=this._selectedSubmenu;c;)c.close(),
c=c._selectedSubmenu},destroy:function(){this.empty();this._boundAutoDismiss&&l.removeAutoDismiss(this._boundAutoDismiss)},appendMenuItem:function(e,b){var a=c(e,b);this._dropdownNode.appendChild(a);return a},appendSeparator:function(){var c=k();this._dropdownNode.appendChild(c);return c}};d.prototype.constructor=d;return{Dropdown:d,appendKeyBindingString:function(c,b){var a=document.createElement("span");a.classList.add("dropdownKeyBinding");a.appendChild(document.createTextNode(b));c.appendChild(a)},
createMenuItem:c,createSeparator:k}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'\x3cbutton class\x3d"dropdownTrigger"\x3e${ButtonText}\x3c!--span class\x3d"dropdownArrowDown core-sprite-openarrow"\x3e\x3c/span--\x3e\x3c/button\x3e\x3cul class\x3d"dropdownMenu"\x3e\x3c/ul\x3e'});define("text!orion/webui/dropdowntriggerbuttonwitharrow.html",[],function(){return'\x3cbutton class\x3d"dropdownTrigger dropdownDefaultButton"\x3e${ButtonText}\x3cspan class\x3d"dropdownArrowDown core-sprite-openarrow"\x3e\x3c/span\x3e\x3c/button\x3e\x3cul class\x3d"dropdownMenu"\x3e\x3c/ul\x3e'});
define("text!orion/webui/submenutriggerbutton.html",[],function(){return'\x3cli class\x3d"dropdownSubMenu"\x3e\x3cspan class\x3d"dropdownTrigger dropdownMenuItem" role\x3d"menuitem" tabindex\x3d"0"\x3e\x3cspan class\x3d"dropdownCommandName"\x3e${ButtonText}\x3c/span\x3e\x3cspan class\x3d"dropdownArrowRight core-sprite-closedarrow"\x3e\x3c/span\x3e\x3c/span\x3e\x3cul class\x3d"dropdownMenu"\x3e\x3c/ul\x3e\x3c/li\x3e'});define("text!orion/webui/checkedmenuitem.html",[],function(){return'\x3cli\x3e\x3clabel class\x3d"dropdownMenuItem"\x3e\x3cinput class\x3d"checkedMenuItem" role\x3d"menuitem" type\x3d"checkbox" /\x3e${ItemText}\x3c/label\x3e\x3c/li\x3e'});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(f,l){function h(d){this._init(d)}h.prototype={_init:function(d){this._node=l.node(d.node);if(!this._node)throw"no dom node for tooltip found";this._position=d.position||["right","above","below","left"];this._text=d.text;this._hideDelay=void 0===d.hideDelay?200:d.hideDelay;this._tailSize=d.tailSize||10;this._trigger=d.trigger||"mouseover";this._afterShowing=d.afterShowing;this._afterHiding=d.afterHiding;var c=this;if("click"===
this._trigger)this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(e){e.target===c._node&&(c.show(),l.stop(e))},!1);else if("mouseover"===this._trigger){this._showDelay=void 0===d.showDelay?500:d.showDelay;d=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(e){l.contains(c._node,e.target)&&(c.show(),l.stop(e))},!1);this._leaveHandler=function(e){l.contains(c._node,e.target)&&c.hide()};for(var f=0;f<d.length;f++)this._node.addEventListener(d[f],
this._leaveHandler,!1)}},_makeTipNode:function(){if(!this._tip){this._tip=document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("div");this._tipInner.classList.add("tooltip");if(this._text){this._tipTextContent=document.createElement("div");this._tipTextContent.classList.add("textContent");this._tipInner.appendChild(this._tipTextContent);var d=document.createTextNode(this._text);this._tipTextContent.appendChild(d)}this._tip.appendChild(this._tipInner);
document.body.appendChild(this._tip);var c=this;l.addAutoDismiss([this._tip,this._node],function(){c.hide()});"mouseover"===this._trigger&&(this._tipInner.role="tooltip",this._tipInner.id="tooltip"+(new Date).getTime().toString(),this._node.setAttribute("aria-describedby",this._tipInner.id),this._tip.addEventListener("mouseover",function(d){c._timeout&&(window.clearTimeout(c._timeout),c._timeout=null);c._tip.addEventListener("mouseout",function(e){l.contains(c._tip,e.target)&&(c.hide(),l.stop(e))},
!1)},!1))}return this._tip},_positionTip:function(d,c){this._makeTipNode();"left"===d?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var f=this._node,e;for(e=l.bounds(f);f&&!e.width&&!e.height;f=f.parentNode)e=l.bounds(f);var f=l.bounds(this._tipInner),b;switch(d){case "above":b=e.top-f.height-this._tailSize-1;e=e.left-this._tailSize;break;case "below":b=e.top+e.height+this._tailSize+1;e=e.left-this._tailSize;break;case "left":b=e.top-this._tailSize/2;e=e.left-f.width-
this._tailSize-1;break;default:b=e.top-this._tailSize/2,e=e.left+e.width+this._tailSize+1}var a=l.bounds(document.documentElement);if(b+f.height>a.height)if(c)b=a.height-f.height-1;else return!1;if(e+f.width>a.width)if(c)e=a.width-f.width-1;else return!1;if(0>e)if(c)e=4;else return!1;if(0>b)if(c)b=4;else return!1;this._tail&&this._tail.previousPosition!==d&&(this._tip.removeChild(this._tail),this._tail=null);this._tail||(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+
d),"above"===d||"left"===d?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner),this._tail.previousPosition=d);this._tip.style.top=b+"px";this._tip.style.left=e+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing"))this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),this._showDelay?this._timeout=window.setTimeout(this._showImmediately.bind(this),
this._showDelay):this._showImmediately()},_showImmediately:function(){for(var d=!1,c=0;!d&&c<this._position.length;)d=this._positionTip(this._position[c]),c++;d||this._positionTip(this._position[0],!0);this._tip.classList.add("tooltipShowing");this._afterShowing&&this._afterShowing()},hide:function(d){this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null);if(this._tip&&this._tip.classList.contains("tooltipShowing")){void 0===d&&(d=this._hideDelay);var c=this;this._timeout=window.setTimeout(function(){c._tip.classList.remove("tooltipShowing");
c._tip.removeAttribute("style");c._afterHiding&&c._afterHiding()},d)}},destroy:function(){this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null);this._tip&&(document.body.removeChild(this._tip),this._tail=this._tipTextContent=this._tipInner=this._tip=null);if(this._node){this._node.removeEventListener("click",this._clickHandler,!1);this._node.removeEventListener("mouseover",this._mouseoverHandler,!1);for(var d=["mouseout","click"],c=0;c<d.length;c++)this._node.removeEventListener(d[c],
this._leaveHandler,!1)}}};h.prototype.constructor=h;return{Tooltip:h}});
define("orion/commands","orion/util orion/webui/littlelib orion/webui/dropdown text!orion/webui/dropdowntriggerbutton.html text!orion/webui/dropdowntriggerbuttonwitharrow.html text!orion/webui/submenutriggerbutton.html text!orion/webui/checkedmenuitem.html orion/webui/tooltip".split(" "),function(f,l,h,d,c,k,e,b){function a(a){var b=a.invocation;if(b){var c=a.command;if(c.hrefCallback)return a=c.hrefCallback.call(b.handler||window,b),a.then?a.then(function(a){window.open(a)}):window.open(a),!0;if(b.commandRegistry)return b.commandRegistry._invoke(b),
!0;if(c.onClick||c.callback)return window.setTimeout(function(){(c.onClick||c.callback).call(b.handler||window,b)},0),!0}return!1}function g(b,c){for(var g in c)if(c[g]&&(c[g].keyBinding&&c[g].command)&&c[g].keyBinding.match(b)){var e=c[g],m=e.keyBinding;if((!m.domScope||l.contains(l.node(m.domScope),b.target))&&a(e)){l.stop(b);break}}}function m(){var a={};if(v){var b,c,g;c=Object.keys(u);for(b=0;b<c.length;b++)g=c[b],a[g]=u[g];var e=v();c=Object.keys(e);for(b=0;b<c.length;b++)g=c[b],a[g]=e[g]}else a=
u;return a}function n(a){g(a,m())}function r(a,b){a=a||window.event;if(function(a){if(f.isMac){if(a.metaKey&&!a.altKey)return!a.shiftKey&&!a.ctrlKey&&(65===a.keyCode||67===a.keyCode||86===a.keyCode||88===a.keyCode||90===a.keyCode)?!0:!1;if(a.ctrlKey)return!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(65===a.keyCode||67===a.keyCode||86===a.keyCode||88===a.keyCode||90===a.keyCode)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return 0<a["char"].length;if(a.charCode||a.keyCode)switch(a=a.charCode||
a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return 32<=a&&112>a||123<a}return!1}(a)){if("true"===a.target.contentEditable)return;var c=a.target.nodeName.toLowerCase();if("input"===c)switch(a.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("textarea"===c)return}b?b(a):n(a)}function t(){this._init()}
function q(a,b,c){b.classList.add("commandImage");var g;a.imageClass?a.addImageClassToElement?b.classList.add(a.imageClass):(g=document.createElement("span"),b.appendChild(g),g.classList.add(a.spriteClass),g.classList.add(a.imageClass)):(g=new Image,g.alt=a.name,g.name=c,g.id=c,g.src=a.image,b.appendChild(g));return g}function p(a,b,c,g,e){this.commandRegistry=e;this.handler=a;this.items=b;this.userData=c;this.command=g;g.parameters&&(this.parameters=g.parameters.makeCopy());this.id=g.id}function s(a){this._init(a)}
var v=null,u={};t.prototype={setProxy:function(a){this.proxy=a},setKeyBindings:function(a){this.bindings=a},_init:function(){var a=this;document.addEventListener("keydown",function(b){return r(b,function(b){var c=a.proxy,g=a.bindings;if(g&&c)for(var e=0;e<g.length;e++)g[e].match(b)&&(c.processKey({type:b.type,keyCode:b.keyCode,altKey:b.altKey,ctrlKey:b.ctrlKey,metaKey:b.metaKey,shiftKey:b.shiftKey}),l.stop(b))})})}};window.document.addEventListener("keydown",r,!1);p.prototype={collectsParameters:function(){return this.commandRegistry&&
this.commandRegistry.collectsParameters()},makeCopy:function(a){var b=new p(this.handler,this.items,this.userData,this.command,this.commandRegistry);b.domNode=this.domNode;b.domParent=this.domParent;a?b.parameters=a.makeCopy():this.parameters&&(b.parameters=this.parameters.makeCopy());return b}};p.prototype.constructor=p;s.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;
this.positioningNode=a.positioningNode;this.image=a.image||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC";this.imageClass=a.imageClass;this.addImageClassToElement=a.addImageClassToElement;this.extraClass=a.extraClass;this.selectionClass=a.selectionClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters;this.isEditor=a.isEditor},populateChoicesMenu:function(a,
b,c,g,e){c=this.getChoices(b,c,g);var m=c.some(function(a){return a.checked});c.forEach(function(c){if(c.name){var g=document.createElement("li");a.appendChild(g);var d=document.createElement("span");d.tabIndex=0;d.role="menuitem";d.classList.add("dropdownMenuItem");if(m){var f=document.createElement("span");f.classList.add("check");f.appendChild(document.createTextNode(c.checked?"\u25cf":""));d.appendChild(f)}f=document.createTextNode(c.name);d.appendChild(f);g.appendChild(d);d.choice=c;d.addEventListener("click",
function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);d.addEventListener("keydown",function(a){(a.keyCode===l.KEY.ENTER||a.keyCode===l.KEY.SPACE)&&a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1)}else e._generateMenuSeparator(a)})},getChoices:function(a,b,c){return this.choiceCallback?this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC"!==this.image}};s.prototype.constructor=s;return{Command:s,CommandInvocation:p,createDropdownMenu:function(a,b,g,e,m,f,n,k,p){a=l.node(a);if(!a)throw"no parent node was specified";var r=document.createRange();r.selectNode(a);r=p?r.createContextualFragment(c):r.createContextualFragment(d);l.processTextNodes(r,{ButtonText:b});a.appendChild(r);a=a.lastChild;
var s;p?(p=a.previousSibling,s=p.lastChild):p=a.previousSibling;e?p.classList.add(e):(p.classList.add("orionButton"),p.classList.add("commandButton"));m&&(f||(p.textContent="",p.setAttribute("aria-label",b)),q({spriteClass:"commandSprite",imageClass:m},p,b),p.classList.add("orionButton"));p.dropdown=new h.Dropdown({dropdown:a,populate:g,selectionClass:n,skipTriggerEventListeners:!!s,positioningNode:k});a.dropdown=p.dropdown;return{menuButton:p,menu:a,dropdown:p.dropdown,dropdownArrow:s}},createCheckedMenuItem:function(a,
b,c,g){a=l.node(a);if(!a)throw"no parent node was specified";var m=document.createRange();m.selectNode(a);m=m.createContextualFragment(e);l.processTextNodes(m,{ItemText:b});a.appendChild(m);a=l.$(".checkedMenuItem",a.lastChild);a.checked=c;a.addEventListener("change",g,!1);return a},createCommandItem:function(a,c,g,e,m,d,f){var n;d=d||!c.name&&c.hasImage();if(c.hrefCallback)n=document.createElement("a"),n.id=e,d&&c.hasImage()?q(c,n,e):(n.className="commandLink",n.appendChild(document.createTextNode(c.name))),
f=c.hrefCallback.call(g.handler,g),f.then?f.then(function(a){n.href=a}):n.href=f?f:"#";else{n=document.createElement("button");n.className="orionButton";c.extraClass&&n.classList.add(c.extraClass);d?c.hasImage()?(q(c,n,e),c.name&&n.setAttribute("aria-label",c.name)):(n.classList.add("commandButton"),n.classList.add("commandMissingImageButton"),n.appendChild(document.createTextNode(c.name))):(n.classList.add("commandButton"),e=document.createTextNode(c.name),n.appendChild(e));var k=f||c.callback;k&&
(c.onClick=k,n.addEventListener("click",function(a){k.call(g.handler,g)},!1))}"ul"===a.nodeName.toLowerCase()?(f=document.createElement("li"),a.appendChild(f),a=f):n.classList.add("commandMargins");a.appendChild(n);c.tooltip&&(n.commandTooltip=new b.Tooltip({node:n,text:c.tooltip,position:["above","below","right","left"]}));m&&(u[c.id]={keyBinding:m,command:c,invocation:g});return n},createCommandMenuItem:function(a,c,g,e,m,d){var n,f,k=a.dropdown;if(c.hrefCallback)f=h.createMenuItem(c.name,"a"),
n=f.firstElementChild,m=c.hrefCallback.call(g.handler,g),m.then?m.then(function(a){n.href=a}):n.href=m?m:"#",n.addEventListener("keydown",function(a){(a.keyCode===l.KEY.ENTER||a.keyCode===l.KEY.SPACE)&&n.click()},!1);else{f=h.createMenuItem(c.name);n=f.firstElementChild;var p=m||c.callback;p&&(c.onClick=p,n.addEventListener("click",function(a){k.close(!0);p.call(g.handler,g)},!1),n.addEventListener("keydown",function(a){if(a.keyCode===l.KEY.ENTER||a.keyCode===l.KEY.SPACE)a.preventDefault(),n.click()},
!1))}c.tooltip&&(n.commandTooltip=new b.Tooltip({node:n,text:c.tooltip,position:["above","below","right","left"]}));d&&h.appendKeyBindingString(n,d);a.appendChild(f);e&&(u[c.id]={keyBinding:e,command:c,invocation:g});return n},executeBinding:a,setKeyBindingProvider:function(a){v=a},localKeyBindings:u,CommandsProxy:t,getKeyBindings:m,processKey:n,NO_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC",
_testMethodProcessKey:g}});define("orion/explorers/navigationUtils",[],function(){function f(f,d,c,k){!l&&f&&(f.push({domNode:d}),d.tabIndex=-1,d.style.outline="none")}var l=-1!==navigator.userAgent.indexOf("iPad");return{addNavGrid:function(h,d,c){h&&(h=h.getGridNavHolder(d,!0))&&f(h,c)},generateNavGrid:f,removeNavGrid:function(f,d){if(f)for(var c=0;c<f.length;c++)if(f[c].domNode===d){f.splice(c,1);break}}}});
define("orion/PageUtil",[],function(){var f=/^http[s]?/i;return{hash:function(){var f=window.location.href.split("#")[1];return f?"#"+f:""},matchResourceParameters:function(f){f=f||window.location.toString();var h={resource:""},d=f.indexOf("#");if(-1!==d&&(f=f.substring(d+1),0!==f.length)){f=f.split(",");h.resource=decodeURIComponent(f[0]);for(d=1;d<f.length;d++){var c=/([^=]*)(=?)(.*)/.exec(f[d]),k=decodeURIComponent(c[1]||""),c=decodeURIComponent(c[3]||"");""!==k&&"resource"!==k&&(h[k]=c)}}return h},
validateURLScheme:function(l,h){var d=l;if(-1===l.indexOf("://")){var c=document.createElement("a");c.href=l;d=c.href}c=!1;if(c=h?h.some(function(c){return RegExp("^"+c+":","i").test(d)}):f.test(d))return l;console.log("Illegal URL Scheme: '"+l+"'");return""}}});
define("orion/uiUtils",["orion/webui/littlelib"],function(f){function l(d){var c="",k=-1!==navigator.platform.indexOf("Mac");k?(d.mod4&&(c+="\u2303"),d.mod3&&(c+="\u2325"),d.mod2&&(c+="\u21e7"),d.mod1&&(c+="\u2318")):(d.mod1&&(c+="Ctrl+"),d.mod2&&(c+="Shift+"),d.mod3&&(c+="Alt+"));if(d.alphaKey)return c+d.alphaKey;if("keypress"===d.type)return c+d.keyCode;for(var e in f.KEY)if(typeof("number"===f.KEY[e])&&f.KEY[e]===d.keyCode){if(k)switch(f.KEY[e]){case f.KEY.BKSPC:e="\u232b";break;case f.KEY.TAB:e=
"\u21e5";break;case f.KEY.ENTER:e="\u23ce";break;case f.KEY.ESCAPE:e="\u238b";break;case f.KEY.SPACE:e="\u2423";break;case f.KEY.PAGEUP:e="\u21de";break;case f.KEY.PAGEDOWN:e="\u21df";break;case f.KEY.END:e="\u21f2";break;case f.KEY.HOME:e="\u21f1";break;case f.KEY.DEL:e="\u2326"}switch(f.KEY[e]){case f.KEY.DOWN:e="\u2193";break;case f.KEY.UP:e="\u2191";break;case f.KEY.RIGHT:e="\u2192";break;case f.KEY.LEFT:e="\u2190"}return c+e}var b;switch(d.keyCode){case 59:b=d.mod2?":":";";break;case 61:b=d.mod2?
"+":"\x3d";break;case 188:b=d.mod2?"\x3c":",";break;case 190:b=d.mod2?"\x3e":".";break;case 191:b=d.mod2?"?":"/";break;case 192:b=d.mod2?"~":"`";break;case 219:b=d.mod2?"{":"[";break;case 220:b=d.mod2?"|":"\\";break;case 221:b=d.mod2?"}":"]";break;case 222:b=d.mod2?'"':"'"}return b?c+b:112<=d.keyCode&&123>=d.keyCode?c+"F"+(d.keyCode-111):c+String.fromCharCode(d.keyCode)}function h(d){var c=-1!==window.navigator.platform.indexOf("Mac");return c&&d.metaKey||!c&&d.ctrlKey}return{getUserKeyString:function(d){var c=
"";d=d.getKeys();for(var f=0;f<d.length;f++)0!==f&&(c+=" "),c+=l(d[f]);return c},getUserText:function(d){var c=d.id,k=d.refNode,e=d.hideRefNode,b=d.initialText,a=d.onComplete,g=d.onEditDestroy,m=d.selectTo,n=d.isInitialValid;d=d.insertAsChild;var h=!1,l=function(m){return function(d){if(!h){var l=f.node(c),t=l.value;l&&(m&&d.keyCode===f.KEY.ESCAPE?(e&&(k.style.display="inline"),h=!0,l.parentNode.removeChild(l),g&&g()):m&&d.keyCode!==f.KEY.ENTER||(0===t.length||!n&&t===b?e&&(k.style.display="inline"):
(a(t),e&&k.parentNode&&(k.style.display="inline")),h=!0,l.parentNode&&l.parentNode.removeChild(l),g&&g()))}}},q=document.createElement("input");q.id=c;q.value=b||"";d?k.appendChild(q):k.parentNode.insertBefore(q,k.nextSibling);q.classList.add("userEditBoxPrompt");e&&(k.style.display="none");q.addEventListener("keydown",l(!0),!1);q.addEventListener("blur",l(!1),!1);window.setTimeout(function(){q.focus();if(b){var a=f.node(c),g=m?b.indexOf(m):-1;0<g?a.createTextRange?(a=a.createTextRange(),a.collapse(!0),
a.moveStart("character",0),a.moveEnd("character",g),a.select()):a.setSelectionRange?a.setSelectionRange(0,g):void 0!==a.selectionStart&&(a.selectionStart=0,a.selectionEnd=g):a.select()}},0)},openInNewWindow:h,followLink:function(d,c){c&&h(c)?window.open(d):window.location=d},createButton:function(d,c){var k=document.createElement("button");k.className="orionButton commandButton commandMargins";k.addEventListener("click",function(e){c();f.stop(e)},!1);d&&k.appendChild(document.createTextNode(d));return k},
createDropdownButton:function(d,c,f){},isFormElement:function(d){switch(d.tagName.toLowerCase()){case "button":case "fieldset":case "form":case "input":case "keygen":case "label":case "legend":case "meter":case "optgroup":case "output":case "progress":case "select":case "textarea":return!0}return!1}}});
define("orion/commandRegistry","orion/commands orion/explorers/navigationUtils orion/PageUtil orion/uiUtils orion/webui/littlelib orion/webui/dropdown orion/webui/tooltip text!orion/webui/checkedmenuitem.html text!orion/webui/dropdowntriggerbutton.html text!orion/webui/submenutriggerbutton.html".split(" "),function(f,l,h,d,c,k,e,b,a,g){function m(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function n(a,b){this.token=a;this.parameterName=b}function r(a,b,c){this.event=a;this.handler=b;this.capture=c||!1}function t(a,b,c,g,e,m){this.name=a;this.type=b;this.label=c;this.value=g;this.lines=e||1;this.eventListeners=Array.isArray(m)?m:m?[m]:[]}function q(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=b&&b.clientCollect;this.getParameterElement=b&&b.getParameterElement;
this.getSubmitName=b&&b.getSubmitName}m.prototype={_init:function(a){this._selectionService=a.selection;var b=this;f.setKeyBindingProvider(function(){return b._activeBindings})},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var c=this._urlBindings[b].urlBinding.match(a);if(c){var g=this._urlBindings[b],e=g.command,m=g.invocation;if(m&&m.parameters&&e.callback){m.parameters.setValue(c.parameterName,c.parameterValue);
var d=this;window.setTimeout(function(){d._invoke(m)},0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(a,b,c,g,e,m){if(b){if((a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback)return b=new f.CommandInvocation(c,b,e,a,this),b.domParent=m,this._invoke(b,g)}else if((m=this._urlBindings[a])&&m.command&&m.command.callback)return this._invoke(m.invocation,g)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=
a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,b,c))},confirm:function(a,b,c,g,e,m){var d=!1;if(this._parameterCollector&&!e){var f=this;this._parameterCollector.close();if(this._parameterCollector.open(a,function(a,e){var m=document.createElement("span");m.classList.add("parameterPrompt");m.textContent=b;a.appendChild(m);m=document.createElement("button");m.addEventListener("click",function(a){d=!0;f._parameterCollector.close()},
!1);e.appendChild(m);m.appendChild(document.createTextNode(c));m.className="dismissButton";var n=document.createElement("button");n.addEventListener("click",function(a){d=!1;f._parameterCollector.close()},!1);e.appendChild(n);n.appendChild(document.createTextNode(g));n.className="dismissButton";return m},function(){m(d)}))return}d=window.confirm(b);m(d)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},
_invoke:function(a,b){return this._collectAndInvoke(a.makeCopy(b),!1)},_collectAndInvoke:function(a,b,c){if(a)if(this._parameterCollector&&a.parameters&&a.parameters.hasParameters()&&(b||a.parameters.shouldCollectParameters())){b=!1;a.parameters.updateParameters(a);if(a.parameters.shouldCollectParameters()&&(b=this._parameterCollector.collectParameters(a,c),!b)){var g=new e.Tooltip({node:a.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]});b=
g.contentContainer();b.classList.add("parameterPopup");var m=window.document.activeElement,d=this._parameterCollector.getFillFunction(a,function(){m&&m.focus();g.destroy()},c)(b);g.show();window.setTimeout(function(){d.focus();d.select()},0);b=!0}if(!b)return a.command.callback.call(a.handler||window,a)}else return a.command.callback.call(a.handler||window,a);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},collectParameters:function(a,
b){this._collectAndInvoke(a,!0,b)},showKeyBindings:function(a){function b(a){return function(){f.executeBinding(a)}}var c={},g,e,m=[],n;for(n in this._activeBindings)(e=this._activeBindings[n])&&(e.keyBinding&&e.command&&(e.command.name||e.command.tooltip))&&m.push(e);m.sort(function(a,b){return(a.command.name||a.command.tooltip).localeCompare(b.command.name||b.command.tooltip)});for(n=0;n<m.length;n++)e=m[n],e.keyBinding.scopeName?(c[e.keyBinding.scopeName]||(c[e.keyBinding.scopeName]=[]),c[e.keyBinding.scopeName].push(e)):
(g=d.getUserKeyString(e.keyBinding),a.createItem(g,e.command.name||e.command.tooltip,b(e)));for(var k in c)c[k].length&&0<c[k].length&&(a.createHeader(k),c[k].forEach(function(c){g=d.getUserKeyString(c.keyBinding);a.createItem(g,c.command.name||c.command.tooltip,b(c))}))},addCommand:function(a){this._commandList[a.id]=a;var b=this._pendingBindings[a.id];if(b){var c=this;b.forEach(function(b){c._addBinding(a,b.type,b.binding,b.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,
b,c,g,e,m,d,f,n,k){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));a[b]?(g&&(a[b].title=g),c&&(a[b].position=c),d&&(a[b].imageClass=d),f&&(a[b].tooltip=f),n&&(a[b].selectionClass=n),!0===k?a[b].pretendDefaultActionId=!0:a[b].defaultActionId=k,a[b].emptyGroupMessage=m):(a[b]={title:g,position:c,emptyGroupMessage:m,imageClass:d,tooltip:f,selectionClass:n,defaultActionId:!0===k?null:k,pretendDefaultActionId:!0===
k,children:{}},a.sortedContributions=null)},_createEntryForPath:function(a,b){b&&b.split("/").forEach(function(b){1<b.length&&(a[b]||(a[b]={position:0,children:{}},a.sortedContributions=null),a=a[b].children)});return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,c,g,e,m,d){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]=
{});a=this._contributionsByScopeId[a];g&&(a=this._createEntryForPath(a,g));a[b]={position:c};m&&((c=this._commandList[b])?this._addBinding(c,"key",m,e):this._addPendingBinding(b,"key",m,e));d&&((c=this._commandList[b])?this._addBinding(c,"url",d,e):this._addPendingBinding(b,"url",d,e));a.sortedContributions=null},unregisterCommandContribution:function(a,b,c){if(this._contributionsByScopeId[a]){delete this._commandList[b];delete this._activeBindings[b];delete this._urlBindings[b];delete this._pendingBindings[b];
var g=this._contributionsByScopeId[a];c&&c.split("/").forEach(function(a){1<a.length&&g[a]&&(g=g[a].children)});delete g[b];g.sortedContributions=null}},_addBinding:function(a,b,c,g){if(!a.id)throw Error("No command id: "+a);"key"===b?this._activeBindings[a.id]={command:a,keyBinding:c,bindingOnly:g}:"url"===b&&(this._urlBindings[a.id]={command:a,urlBinding:c,bindingOnly:g})},_addPendingBinding:function(a,b,c,g){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:b,
binding:c,bindingOnly:g})},_checkForTrailingSeparator:function(a,b,g){var e;if("tool"===b||"button"===b)if((e=0<a.childNodes.length?a.childNodes[a.childNodes.length-1]:null)&&e.classList.contains("commandSeparator"))return g?(a.removeChild(e),!1):!0;if("menu"===b&&(a=c.$$array("li \x3e *",a),0<a.length&&a[a.length-1].classList.contains("dropdownSeparator")))if(e=a[a.length-1],g)e.parentNode.parentNode.removeChild(e.parentNode);else return!0;return!1},renderCommands:function(a,b,g,e,m,d,f){if("string"!==
typeof a)throw"a scope id for rendering must be specified";b=c.node(b);if(!b)throw"no parent";var n=this._contributionsByScopeId[a];if(!g&&n){g=n.localSelectionService||this._selectionService;var k=this;g&&g.getSelections(function(c){k.renderCommands(a,b,c,e,m,d)})}else n&&(this._render(n,b,g,e,m||"button",d,f),this._checkForTrailingSeparator(b,m,!0))},destroy:function(a){a=c.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var b=a.firstChild;b.commandTooltip&&b.commandTooltip.destroy();b.emptyGroupTooltip&&
b.emptyGroupTooltip.destroy();this.destroy(b);a.removeChild(b)}},_render:function(a,b,c,g,m,n,k){var h=a.sortedContributions;if(!h){var h=[],r=!1,t;for(t in a)if(Object.prototype.hasOwnProperty.call(a,t)){var q=a[t];q&&"number"===typeof q.position&&(q.id=t,h.push(q),r=!0)}r&&(h.sort(function(a,b){return a.position-b.position}),a.sortedContributions=h)}var G=0,z=this;h.forEach(function(a){var h;a.imageClass||(a.imageClass=null);if(a.children&&0<Object.getOwnPropertyNames(a.children).length){var r=
a.children;if("tool"===m||"button"===m)if(a.title){var t;a.defaultActionId&&((r=z._commandList[a.defaultActionId])&&(r.visibleWhen?r.visibleWhen(c):1)?(t=new f.CommandInvocation(g,c,n,r,z),t.domParent=b):a.pretendDefaultActionId=!0);r=z._createDropdownMenu(b,a.title,null,null,a.imageClass,a.tooltip,a.selectionClass,null,t,a.pretendDefaultActionId);k&&l.generateNavGrid(k,r.menuButton);r&&(z._render(a.children,r.menu,c,g,"menu",n,k),z._checkForTrailingSeparator(r.menu,"menu",!0),0===r.menu.childNodes.length?
a.emptyGroupMessage?r.menuButton.emptyGroupTooltip||(r.menuButton.emptyGroupTooltip=new e.Tooltip({node:r.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})):(k&&l.removeNavGrid(k,r.menuButton),a=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},a(r.menu),a(r.menuButton),a(r.destroyButton)):r.menuButton.style.visibility="visible")}else{var q;0<b.childNodes.length&&!z._checkForTrailingSeparator(b,m)&&(q=z.generateSeparatorImage(b));z._render(r,b,
c,g,m,n,k);0<b.childNodes.length&&b.childNodes[b.childNodes.length-1]!==q&&(q=z.generateSeparatorImage(b))}else if(a.title){if(a=z._createDropdownMenu(b,a.title,!0,null,null,a.imageClass))z._render(r,a.menu,c,g,"menu",n,k),z._checkForTrailingSeparator(a.menu,"menu",!0),0===a.menu.childNodes.length&&a.destroyButton&&b.removeChild(a.destroyButton)}else 0<b.childNodes.length&&z._generateMenuSeparator(b),z._render(r,b,c,g,m,n,k),z._generateMenuSeparator(b)}else{var p=z._commandList[a.id],r=p?!0:!1;t=
a=null;if(p){h=new f.CommandInvocation(g,c,n,p,z);h.domParent=b;q=!1;try{q=r&&(p.visibleWhen?p.visibleWhen(c):!0)}catch(A){throw console.log(A),A;}z._activeBindings[p.id]&&z._activeBindings[p.id].keyBinding&&(a=z._activeBindings[p.id],a.invocation=q?h:null,a.bindingOnly&&(r=!1));z._urlBindings[p.id]&&z._urlBindings[p.id].urlBinding&&(t=z._urlBindings[p.id],t.invocation=q?h:null,t.bindingOnly&&(r=!1));r=r&&q}r&&(p.choiceCallback?("tool"===m||"button"===m?(a=b,r=!1,"ul"===b.nodeName.toLowerCase()&&
(a=document.createElement("li"),b.appendChild(a))):(a=b,r=!0),z._createDropdownMenu(a,p.name,r,function(a){p.populateChoicesMenu(a,c,g,n,z)}.bind(p),p.imageClass,p.tooltip||p.title,p.selectionClass,p.positioningNode)):(h.handler=h.handler||this,h.domParent=b,r=function(a){z._invoke(h)},"menu"===m?(t=null,a&&a.keyBinding&&(t=d.getUserKeyString(a.keyBinding)),a=f.createCommandMenuItem(b,p,h,null,r,t)):(a=m+p.id+G,a=f.createCommandItem(b,p,h,a,null,"tool"===m,r)),l.generateNavGrid(k,a),h.domNode=a,G++))}})},
_createDropdownMenu:function(a,b,m,d,n,h,r,l,t,q){a=c.node(a);if(!a||!c.contains(document.body,a))return null;var x,G,z=a;if(m)h=document.createRange(),h.selectNode(a),h=h.createContextualFragment(g),c.processTextNodes(h,{ButtonText:b}),a.appendChild(h),G=a.lastChild,n=G.lastChild,b=n.previousSibling,b.dropdown=new k.Dropdown({dropdown:n,populate:d,parentDropdown:a.dropdown}),n.dropdown=b.dropdown;else{"ul"===a.nodeName.toLowerCase()&&(z=document.createElement("li"),a.appendChild(z),G=z);a=null;n&&
(a="dropdownButtonWithIcon",h=h||b);h=n?h||b:h;var F=f.createDropdownMenu(z,b,d,a,n,!1,r,l,t||q);x=F.dropdownArrow;b=F.menuButton;if(x){t&&(t.domNode=F.menuButton);var C=this;b.onclick=function(a){var b=c.bounds(x);a.clientX>=b.left&&F.dropdown?F.dropdown.toggle(a):C._invoke(t)};F.dropdown&&(b.onkeydown=function(a){c.KEY.DOWN===a.keyCode&&(F.dropdown.toggle(a),c.stop(a))})}n=F.menu;var I;(d=t&&t.command&&(t.command.tooltip||t.command.name))?I=t.command.tooltip||t.command.name:d&&(I=h);I&&(b.commandTooltip=
new e.Tooltip({node:b,text:I,position:["above","below","right","left"]}))}return{menuButton:b,menu:n,dropdown:b.dropdown,destroyButton:G,dropdownArrow:x}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var c=document.createElement("span");c.classList.add("dropdownSeparator");b.appendChild(c);a.appendChild(b)}},generateSeparatorImage:function(a){var b;b="ul"===a.nodeName.toLowerCase()?document.createElement("li"):
document.createElement("span");a.appendChild(b);b.classList.add("core-sprite-sep");b.classList.add("imageSprite");b.classList.add("commandSeparator");return b}};m.prototype.constructor=m;n.prototype={match:function(a){a=h.matchResourceParameters(a);return"undefined"!==typeof a[this.token]?(this.parameterValue=a[this.token],this):null}};n.prototype.constructor=n;r.prototype.constructor=r;t.prototype={optionsRequested:function(){return this.optionsRequested}};t.prototype.constructor=t;q.prototype={_storeParameters:function(a){this.parameterTable=
null;if(a){var b=this.parameterTable={};a.forEach(function(a){b[a.name]=a})}},updateParameters:function(a){"function"===typeof this.getParameters&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return null!==this.parameterTable},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,b){var c=this.parameterTable[a];
c&&(c.value=b)},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=[];this.forEach(function(b){b=new t(b.name,b.type,b.label,b.value,b.lines,b.eventListeners);a.push(b)});var b=new q(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};q.prototype.constructor=q;return{CommandRegistry:m,URLBinding:n,
ParametersDescription:q,CommandParameter:t,CommandEventListener:r}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(f,l,h){function d(c,d){this._activeContainer=null;this._getElementsFunction=c;this._toolbarLayoutFunction=d}d.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&h.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&h.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();this._oldFocusNode&&(this._oldFocusNode.focus(),this._oldFocusNode=null)}this._activeElements=null},open:function(c,d,e){"string"===typeof c&&(c=h.node(c));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===c)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(c))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=e;var b=d(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!b)return!1;this._activeElements.focusNode=b;c=h.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(0===c.length){d=this._activeElements.dismissArea||
this._activeElements.parameterArea;c=document.createElement("button");c.id="closebox";c.className="imageSprite core-sprite-close dismissButton";c.title=f.Close;d.appendChild(c);var a=this;c.addEventListener("click",function(b){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);b&&(this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){b.focus();b.select&&b.select()},0));this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(c,d){h.$$array("input",d).forEach(function(b){"checkbox"===b.type?c.parameters.setValue(b.parameterName,b.checked):"button"!==b.type&&c.parameters.setValue(b.parameterName,b.value.trim())});h.$$array("textArea",d).forEach(function(b){c.parameters.setValue(b.parameterName,b.value.trim())});var e=c.parameters.getParameterElement;e&&c.parameters.forEach(function(b){(b=e(b,d))&&("checkbox"===b.type?
c.parameters.setValue(b.parameterName,b.checked):"button"!==b.type?c.parameters.setValue(b.parameterName,b.value.trim()):"textarea"!==b.type&&c.parameters.setValue(b.parameterName,b.value.trim()))});c.command.callback&&c.command.callback.call(c.handler,c)},collectParameters:function(c,d){return c.parameters?(c.domNode&&c.domNode.classList.add("commandMarker"),this.open(c.domNode||c.domParent,this.getFillFunction(c,null,d))):!1},getFillFunction:function(c,d,e){var b=this;return function(a,g){var m=
null,n=function(){d&&d();b.close()},r=function(g){g.keyCode===h.KEY.ENTER&&(b._collectAndCall(c,a),n(),h.stop(g));g.keyCode===h.KEY.ESCAPE&&("function"===typeof e&&e(),n(),h.stop(g))},l=c.parameters;l.forEach(function(b){var g=l.getParameterElement?l.getParameterElement(b,a):null,e=null;!g&&b.label&&(e=document.createElement("label"),e.classList.add("parameterInput"),e.setAttribute("for",b.name+"parameterCollector"),e.textContent=b.label,a.appendChild(e));var d=b.name+"parameterCollector",e=e||a;
"text"===b.type&&"number"===typeof b.lines&&1<b.lines?(g||(g=document.createElement("textarea"),g.rows=b.lines,g.type="textarea",g.id=d,e.appendChild(g)),r=function(a){a.keyCode===h.KEY.ESCAPE&&(n(),h.stop(a))}):"boolean"===b.type?(g||(g=document.createElement("input"),g.type="checkbox",g.id=d,e.appendChild(g)),b.value&&(g.checked=!0)):(g||(g=document.createElement("input"),g.type=b.type,g.id=d,e.appendChild(g)),b.value&&(g.value=b.value));g.classList.add("parameterInput");g.setAttribute("speech",
"speech");g.setAttribute("x-webkit-speech","x-webkit-speech");g.parameterName=b.name;m||(m=g);0<b.eventListeners.length&&b.eventListeners.forEach(function(a){g.addEventListener(a.event,function(b){return a.handler(b,c)},a.capture)});g.addEventListener("keydown",r,!1)});var q=g;q||(q=document.createElement("span"),q.classList.add("layoutRight"),q.classList.add("parametersDismiss"),a.appendChild(q));var p=function(a,b){var c=document.createElement("button");b.appendChild(c);a&&c.appendChild(document.createTextNode(a));
c.classList.add("dismissButton");return c};c.parameters.hasOptionalParameters()&&(c.parameters.optionsRequested=!1,p(f.More,q).addEventListener("click",function(){c.parameters.optionsRequested=!0;b._collectAndCall(c,a);n()},!1));p(l.getSubmitName?l.getSubmitName(c):f.Submit,q).addEventListener("click",function(){b._collectAndCall(c,a);n()},!1);q=p(null,q);q.id="closebox";q.classList.add("imageSprite");q.classList.add("core-sprite-close");q.title=f.Close;q.addEventListener("click",function(a){n();
"function"===typeof e&&e()},!1);return m}}};d.prototype.constructor=d;return{CommandParameterCollector:d}});define("orion/regex",[],function(){return{escape:function(f){return f.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$\x26")},parse:function(f){return(f=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(f))?{pattern:f[1],flags:f[2]}:null}}});
define("orion/contentTypes",[],function(){function f(a,b){if("string"!==typeof a)return null;for(var c=a&&a.split(".").pop(),e=null,d=0;d<b.length;d++){var f=b[d],k;a:{k=e;var h=f,l=c,u=0<=h.filename.indexOf(a),w;w=l.toLowerCase();w=-1!==h.extension.indexOf(w);if(u||w){if(!(w=!k))u&&(l=l.toLowerCase(),u=-1!==k.extension.indexOf(l)),w=u;if(w){k=h;break a}}}k===f&&(e=f)}return e}function l(a){return null===a||"undefined"===typeof a?[]:Array.isArray(a)?a:[a]}function h(a){return l(a).map(function(a){return String.prototype.toLowerCase.call(a)})}
function d(a){return{id:a.id,name:a.name,image:a.image,imageClass:a.imageClass,"extends":a["extends"],extension:h(a.extension),filename:l(a.filename)}}function c(a){var b=Object.create(null);a.map(d).forEach(function(a){Object.prototype.hasOwnProperty.call(b,a.id)||(b[a.id]=a)});return b}function k(g){if(g&&g.registerService){this.serviceRegistry=g;for(var m=g.getServiceReferences(b).concat(g.getServiceReferences(a)),d=[],f=0;f<m.length;f++)for(var k=l(m[f].getProperty("contentTypes")),h=0;h<k.length;h++)d.push(k[h]);
this.map=c(d);g.registerService(e,this)}else if(Array.isArray(g))this.serviceRegistry=null,this.map=c(g);else throw Error("Invalid parameter");}var e="orion.core.contentTypeRegistry",b="orion.core.contenttype",a="orion.file.contenttype";k.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),b=[],c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(a[c]);return b},getContentTypesMap:function(){return this.map},getFileContentType:function(a){return f(a.Name,this.getContentTypes())},
getFilenameContentType:function(a){return f(a,this.getContentTypes())},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,b){a="string"===typeof a?this.getContentType(a):a;b="string"===typeof b?this.getContentType(b):b;if(!a||!b)return!1;if(a.id===b.id)return!0;for(var c=a,e={};c&&(c=this.getContentType(c["extends"]));){if(c.id===b.id)return!0;if(e[c.id])throw Error("Cycle: "+c.id);e[c.id]=!0}return!1},isSomeExtensionOf:function(a,b){for(var c=0;c<b.length;c++)if(this.isExtensionOf(a,
b[c]))return!0;return!1}};return{ContentTypeRegistry:k,getFilenameContentType:f}});
define("orion/URITemplate",[],function(){function f(a){this._text=a}function l(a){return a.replace("%25","%")}function h(a,b){if("U"===b)return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if("U+R"===b)return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(g,l);if("U+R-,"===b)return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function d(a,b,c){for(var g=
[],e=0;e<a.length;e++)"undefined"!==typeof a[e]&&g.push(h(a[e],b));return g.join(c)}function c(a,b,c,g){for(var e=Object.keys(a),d=[],f=0;f<e.length;f++)"undefined"!==typeof a[e[f]]&&d.push(h(e[f],b)+c+h(a[e[f]],b));return d.join(g)}function k(c){if(0===c.length)throw Error("Invalid Expression: 0 length expression");(this._operator=b[c[0]])?c=c.substring(1):this._operator=b.NUL;for(var g=[],e=c.split(","),d=0;d<e.length;d++){var f=e[d].match(a);if(null===f)throw Error("Bad VarSpec: "+c);g.push({name:f[1],
explode:!!f[2],prefix:f[3]?parseInt(f[3],10):-1})}this._varSpecList=g}function e(a){for(var b=[],c=0,g=a.indexOf("{",c);-1!==g;){b.push(new f(a.substring(c,g)));c=a.indexOf("}",g+1);if(-1===c)throw Error("Invalid template: "+a);b.push(new k(a.substring(g+1,c)));c+=1;g=a.indexOf("{",c)}b.push(new f(a.substring(c)));this._templateComponents=b}var b={NUL:{first:"",sep:",",named:!1,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R"},".":{first:".",sep:",",named:!1,ifemp:"",allow:"U"},
"/":{first:"/",sep:"/",named:!1,ifemp:"",allow:"U"},";":{first:";",sep:";",named:!0,ifemp:"",allow:"U"},"?":{first:"?",sep:"\x26",named:!0,ifemp:"\x3d",allow:"U"},"\x26":{first:"\x26",sep:"\x26",named:!0,ifemp:"\x3d",allow:"U"},"#":{first:"#",sep:",",named:!1,ifemp:"",allow:"U+R"},",":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R-,"}},a=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/,g=/%25[0-9A-F][0-9A-F]/g;f.prototype={expand:function(a){return encodeURI(this._text)}};
k.prototype={expand:function(a){for(var b=[],g=0;g<this._varSpecList.length;g++){var e=this._varSpecList[g],f=e.name,k=a[f],l=typeof k;if("undefined"!==l&&null!==k){var v=0===b.length?this._operator.first:this._operator.sep;if("string"===l)this._operator.named&&(v+=h(f,"U+R"),v+=0===k.length?this._operator.ifemp:"\x3d"),-1!==e.prefix&&e.prefix<k.length&&(k=k.substring(0,e.prefix)),v+=h(k,this._operator.allow);else if(Array.isArray(k)){if(0===k.length)continue;e.explode?v+=d(k,this._operator.allow,
this._operator.sep):(e=d(k,this._operator.allow,","),this._operator.named&&(v+=h(f,"U+R"),v+=0===e.length?this._operator.ifemp:"\x3d"),v+=e)}else if("object"===l){if(0===Object.keys(k).length)continue;e.explode?v+=c(k,this._operator.allow,"\x3d",this._operator.sep):(e=c(k,this._operator.allow,",",","),this._operator.named&&(v+=h(f,"U+R"),v+=0===e.length?this._operator.ifemp:"\x3d"),v+=e)}else throw Error("bad param type: "+f+" : "+l);b.push(v)}}return b.join("")}};e.prototype={expand:function(a){for(var b=
[],c=0;c<this._templateComponents.length;c++)b.push(this._templateComponents[c].expand(a));return b.join("")}};return e});
define("orion/i18nUtil",["require","orion/Deferred"],function(f,l){function h(c){if(c=localStorage.getItem("orion/messageBundle/"+c))if(c=JSON.parse(c),c._expires&&c._expires>(new Date).getTime())return delete c._expires,c;return null}var d={};return{getMessageBundle:function(c){function k(a){a?f(["i18n!"+c],function(a){if(a){var g=c;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+g,JSON.stringify(a));delete a._expires}b.resolve(a)}):e(Error(c))}function e(a){b.reject(a)}
if(d[c])return d[c];var b=new l;d[c]=b;var a=h(c);if(a)return b.resolve(a),b;try{f([c],k,e)}catch(g){f(["orion/i18n!"+c],k,e)}return b},formatMessage:function(c){var d=arguments;return c.replace(/\$\{([^\}]+)\}/g,function(c,b){return d[(b<<0)+1]})}}});
define("orion/PageLinks","require orion/Deferred orion/PageUtil orion/URITemplate orion/i18nUtil orion/objects orion/URL-shim".split(" "),function(f,l,h,d,c,k,e){function b(){return f.toUrl?(new URL(f.toUrl("orion/../"),window.location.href)).href.slice(0,-1):(new URL("/",window.location.href)).href.slice(0,-1)}function a(a){var b={};a.getPropertyKeys().forEach(function(c){"objectClass"!==c&&("service.names"!==c&&"service.id"!==c&&"__plugin__"!==c)&&(b[c]=a.getProperty(c))});return b}function g(a){return c.getMessageBundle(a.nls).then(function(b){a.textContent=
a.nameKey?b[a.nameKey]:a.name;return a},function(b){a.textContent=a.nameKey||a.name;return a})}function m(c,e){var m=c.getServiceReferences(e||"orion.page.link"),f=h.matchResourceParameters(window.location.href),n={OrionHome:b(),Location:f.resource},k=[];m.forEach(function(b){b=a(b);if(b.uriTemplate&&(b.nls||b.name)){var c=(new d(b.uriTemplate)).expand(n),c=h.validateURLScheme(c);b.href=c;b.nls?k.push(g(b)):(b.textContent=b.name,k.push((new l).resolve(b)))}});return l.all(k)}function n(a){var b=this.categories=
Object.create(null);a.forEach(function(a){b[a.id]=a})}function r(a){this.allPageLinks=a;this.allPageLinks.sort(t)}function t(a,b){var c=a.textContent&&a.textContent.toLowerCase(),g=b.textContent&&b.textContent.toLowerCase();return c<g?-1:c>g?1:0}var q;k.mixin(n.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(a){return this.categories[a]||null}});k.mixin(r.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(a){var b=a.href;a=
a.textContent;var c=document.createElement("a");c.href=b;c.target="_self";c.classList.add("targetSelector");c.textContent=a;return c})},getAllLinks:function(){return this.allPageLinks}});return{getCategoriesInfo:function(b){var c;return!q?(c=[],b.getServiceReferences("orion.page.link.category").forEach(function(e){var m=a(e);if(m.id&&(m.name||m.nameKey))m.service=b.getService(e),m.nls?c.push(g(m)):(m.textContent=m.name,c.push((new l).resolve(m)))}),l.all(c).then(function(a){return q=new n(a)})):(new l).resolve(q)},
getPageLinksInfo:function(a,b){return m(a,b).then(function(a){return new r(a)})},getOrionHome:b}});
define("orion/edit/nls/root/messages",{Editor:"Editor",switchEditor:"Switch Editor",Fetching:"Fetching: ${0}",confirmUnsavedChanges:"There are unsaved changes.  Do you still want to navigate away?",searchFiles:"Search Files...",searchTerm:"Enter search term:",unsavedChanges:"There are unsaved changes.",unsavedAutoSaveChanges:"Please stay on the page until Auto Save is complete.",Save:"Save",Saved:"Saved",Blame:"Blame",BlameTooltip:"Show blame annotations",saveOutOfSync:"Resource is out of sync with the server. Do you want to save it anyway?",
loadOutOfSync:"Resource is out of sync with the server. Do you want to load it anyway? This will overwrite your local changes.",ReadingMetadata:"Reading metadata of ${0}",ReadingMetadataError:"Can not get metadata of ${0}",Reading:"Reading ${0}",readonly:"Read Only.",saveFile:"Save this file",gotoLine:"Go to Line...",gotoLineTooltip:"Go to specified line number",gotoLinePrompt:"Go to line:",Undo:"Undo",Redo:"Redo",Find:"Find...",noResponse:"No response from server.  Check your internet connection and try again.",
savingFile:"Saving file ${0}",running:"Running ${0}","Saving...":"Saving...",View:"View",SidePanel:"Side Panel",SidePanelTooltip:"Choose what to show in the side panel.",Actions:"Actions",Navigator:"Navigator",FolderNavigator:"Folder Navigator",Project:"Project",New:"New",File:"File",Edit:"Edit",Tools:"Tools",Add:"Add",noActions:"There are no actions for the current selection.",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding.",LocalEditorSettings:"Local Editor Settings",
NoProject:"${0} is not a project. To convert it to a project use ${1}.",NoProjects:"There are no projects in your workspace. Use the ${0} menu to create projects.",disconnected:"(disconnected)",ChooseFS:"Choose Filesystem",ChooseFSTooltip:"Choose the filesystem you want to view.",FSTitle:"${0} (${1})",Deploy:"Deploy","Deploy As":"Deploy As",Import:"Import",Export:"Export",OpenWith:"Open With",OpenRelated:"Open Related",Dependency:"Dependency",UnnamedCommand:"Unnamed"});
define("orion/edit/nls/messages",["orion/i18n!orion/edit/nls/messages","orion/edit/nls/root/messages"],function(f,l){var h={root:l};Object.keys(f).forEach(function(d){"undefined"===typeof h[d]&&(h[d]=f[d])});return h});
define("orion/extensionCommands","require orion/Deferred orion/commands orion/regex orion/contentTypes orion/URITemplate orion/i18nUtil orion/URL-shim orion/PageLinks i18n!orion/edit/nls/messages".split(" "),function(f,l,h,d,c,k,e,b,a,g){function m(a){var b={};a.getPropertyKeys().forEach(function(c){b[c]=a.getProperty(c)});return b}var n={},r=a.getOrionHome();n._cloneItemWithoutChildren=function s(a){if(null===a||"object"!==typeof a)return a;var b=a.constructor(),c;for(c in a)"children"!==c&&"Children"!==
c&&(b[c]=s(a[c]));return b};n._getOpenWithNavCommandExtensions=function(a,b){function c(a,b){for(var g=a.getServiceReferences("orion.navigate.openWith"),e=[],m=[],d=0;d<g.length;d++){var f=g[d];if(f.getProperty("editor")===b.id){var n=f.getProperty("contentType");n instanceof Array?e=e.concat(n):e.push(n||"*/*");f=f.getProperty("excludedContentTypes");f instanceof Array?m=m.concat(f):null!==f&&"undefined"!==typeof f&&m.push(f)}}0===e.length&&(e=null);0===m.length&&(m=null);return{contentTypes:e,excludedContentTypes:m}}
for(var g=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],g=0;g<b.length;g++){var e=b[g],m=e.getProperty("id");c.push({id:m,"default":e.getProperty("default")||!1,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||e.getProperty("uriTemplate"),validationProperties:e.getProperty("validationProperties")||[]})}return c}(),e=[],m,d=0;d<g.length;d++){var f=g[d],n=c(a,f),n={properties:{name:f.name||f.id,nameKey:f.nameKey,
id:"eclipse.openWithCommand."+f.id,contentType:n.contentTypes,excludedContentTypes:n.excludedContentTypes,uriTemplate:f.uriTemplate,nls:f.nls,forceSingleItem:!0,isEditor:f["default"]?"default":"editor",validationProperties:f.validationProperties},service:{}};"orion.editor"===f.id?m=n:e.push(n)}m&&e.push(m);return e};n._makeValidator=function(a,b,g,e){function m(a,b,c,g,e){var d=!1,f;if("!"===b.charAt(0))return"undefined"===typeof a[b.substring(1)];if("undefined"!==typeof a[b]){if("undefined"===typeof c)f=
a[b],d=!0;else if("string"===typeof c){if(!typeof("string"===a[b]))return!1;if(g.variableName){if(c=RegExp(c).exec(a[b]))d=c[0],f="before"===g.variableMatchPosition?a[b].substring(0,c.index):"after"===g.variableMatchPosition?a[b].substring(c.index+d.length):"only"===g.variableMatchPosition?d:a[b],d=!0}else return RegExp(c).test(a[b])}else a[b]===c&&(f=a[b],d=!0);b=g.variableName;g=g.replacements;if(d&&b&&(e[b]=f,e.itemCached=a,g)){if("string"!==typeof f)return window.console.log("Cannot replace "+
b+", value is not a string: "+f),d;for(a=0;a<g.length;a++){f=!1;if(g[a].pattern){c=g[a].pattern;var n=g[a].replacement||"";e[b]=e[b].replace(RegExp(c),n).replace(RegExp(c),n)}else f=!0;f&&window.console.log("Invalid replacements specified in validation property.  "+g[a])}}return d}return!1}function d(a,b,c,g){var e=c.match,f,n;if(0<=(f=b.indexOf("["))){if(0>(n=b.indexOf("]")))return!1;var k=b.substring(0,f),h;if(!(h=a[k])||!Array.isArray(h))return!1;f=b.substring(f+1,n);f=parseInt(f,10);if(isNaN(f))return!1;
0>f&&(f+=h.length);b=b.substring(n+1);b=k+":"+String(f)+b}return 0<=b.indexOf("|")?(f=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),d(a,f,c,g)?!0:d(a,b,c,g)):0<=b.indexOf(":")?(f=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[f]?d(a[f],b,c,g):!1):m(a,b,e,c,g)}function f(b,g,e){if(e.info.validationProperties)for(var m=0;m<e.info.validationProperties.length;m++){var n=e.info.validationProperties[m];if("undefined"!==typeof n.source){if(!d(b,n.source,n,e))return!1}else return window.console.log("Invalid validationProperties in "+
a.id+".  No source property specified."),!1}var m=!0,k=g?c.getFilenameContentType(b.Name,g):null,k=k||{id:"application/octet-stream"};e.info.excludedContentTypes&&g&&(m=e.info.excludedContentTypes.every(function(a){a=a.replace(/([*?])/g,".$1");return-1!==k.id.search(a)?!1:!0}));m&&(e.info.contentType&&g)&&(m=e.info.contentType.some(function(a){a=a.replace(/([*?])/g,".$1");return-1!==k.id.search(a)?!0:!1}));return m}return{info:a,validationFunction:function(a){"function"===typeof e&&(a=e.call(this,
a));if(a){if(Array.isArray(a)){if((this.info.forceSingleItem||this.info.uriTemplate)&&1!==a.length||1>a.length)return!1}else a=[a];for(var b=0;b<a.length;b++)if(!f(a[b],g,this))return!1;return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var b={},c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);if(this.info.validationProperties)for(c=0;c<this.info.validationProperties.length;c++){var g=this.info.validationProperties[c];
g.source&&g.variableName&&(this.itemCached===a&&this[g.variableName]||d(a,g.source,g,this),a[g.variableName]?window.console.log("Variable name "+g.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[g.variableName]=this[g.variableName])}b.OrionHome=r;return(new k(this.info.uriTemplate)).expand(b)}return null}}};var t=g.UnnamedCommand;n._createCommandOptions=function(a,b,c,g,m,d){function f(e,k){var h=n._makeValidator(a,c,g,d);e.visibleWhen=
h.validationFunction.bind(h);if(m)if(h.generatesURI.bind(h)())e.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return h.getURI.bind(h)(a)};else{var l=a;e.callback=function(a){var g;if(l.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,g=n._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){g=[];for(var m=0;m<a.items.length;m++)g.push(n._cloneItemWithoutChildren(a.items[m]))}else g=n._cloneItemWithoutChildren(a.items);if(c)var d=c.getService("orion.page.progress");
b.run?d?d.progress(b.run(g),"Running command: "+e.name):b.run(g):c&&(d?d.progress(c.getService(b).run(g),"Running command: "+e.name):c.getService(b).run(g))}}k.resolve(e)}var k=new l;if(a.nls){var h=function(b){var c;b?(c=a.tooltipKey&&b[a.tooltipKey],b=a.nameKey&&b[a.nameKey]||a.name||t,c=c||a.tooltip||""):(b=a.name||a.nameKey||t,c=a.tooltip||a.tooltipKey||"");f({name:b,image:a.image,id:a.id||a.name,tooltip:c,isEditor:a.isEditor,showGlobally:a.showGlobally},k)};e.getMessageBundle(a.nls).then(h,h.bind(this,
null))}else f({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},k);return k};n.getOpenWithCommand=function(a,b,c){var g;a=c||n.getOpenWithCommands(a);for(c=0;c<a.length;c++)if(a[c].visibleWhen(b)){var e="default"===a[c].isEditor;if(!g||e)if(g=a[c],e)break}return g};n.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var g=a._commandList[c];g.isEditor&&b.push(g)}return b};var q;n.createAndPlaceFileCommandsExtension=function(a,
b,c,e,m,d){return n.createFileCommands(a,null,d?"all":void 0,!!d,b).then(function(a){m&&0<a.length&&(b.addCommandGroup(c,"eclipse.openWith",1E3,g.OpenWith,m,null,null,null,"dropdownSelection"),b.addCommandGroup(c,"eclipse.fileCommandExtensions",1E3,g.OpenRelated,m));a.forEach(function(a){var g=null;m&&(g=a.isEditor?m+"/eclipse.openWith":m+"/eclipse.fileCommandExtensions");b.registerCommandContribution(c,a.id,e,g)});return{}})};n.createFileCommands=function(a,b,c,g,e){c=void 0===c?"global":c;g=void 0===
g?!0:g;var m=[];n._cachedFileCommands||n._createCachedFileCommands(a);("all"===c||"global"===c)&&n._cachedFileCommands.forEach(function(a){var b=a.properties;("all"===c||b.forceSingleItem&&b.showGlobally)&&m.push(a)});return l.when(function(){var c=a.getService("orion.core.contentTypeRegistry")||b;return q||l.when(c.getContentTypes(),function(a){return q=a})}(),function(){g&&(n._cachedOpenWithExtensions||(n._cachedOpenWithExtensions=n._getOpenWithNavCommandExtensions(a,q)),m=m.concat(n._cachedOpenWithExtensions),
e._addedOpenWithCommands=g);var b=m.map(function(b){var c=b.properties;b=b.service;var g=e.findCommand(c.id||c.name);return g?(new l).resolve(g):n._createCommandOptions(c,b,a,q,!0).then(function(a){a=new h.Command(a);e.addCommand(a);return a})});return l.all(b,function(a){return{_error:a}}).then(function(a){return a})})};n._createCachedFileCommands=function(a){var b=a.getServiceReferences("orion.navigate.command");n._cachedFileCommands=[];for(var c=0;c<b.length;c++)if("orion.navigateFromMetadata"!==
b[c].getProperty("id")){var g=a.getService(b[c]),e=m(b[c]);n._cachedFileCommands.push({properties:e,service:g})}};n.getFileCommandIds=function(){var a=[];if(n._cachedFileCommands)n._cachedFileCommands.length&&(a=n._cachedFileCommands.map(function(a){return a.properties.id}));else throw"extensionCommandUtils._cachedFileCommands is not initialized";return a};n.createOpenWithCommands=function(a,b,c){return c&&c._addedOpenWithCommands?(new l).resolve(n.getOpenWithCommands(c)):n.createFileCommands(a,b,
"none",!0,c)};return n});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(f,l){function h(d){this._init(d)}h.prototype={_init:function(d){var c=l.node(d.container);if(!c)throw"no parent container";this._container=c;c.classList.remove("currentLocation");this._id=d.id||"eclipse.breadcrumbs";this._resource=d.resource||null;this._rootSegmentName=d.rootSegmentName;this._workspaceRootSegmentName=d.workspaceRootSegmentName;this._workspaceRootURL=d.workspaceRootURL;this._makeHref=d.makeHref;this._makeFinalHref=
d.makeFinalHref;this._maxLength=d.maxLength;this.path="";this.measure();this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var d;if(this._resource&&this._resource.Parents&&!this._resource.skip){d=document.createElement("a");var c=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(d,c):d.href=f.toUrl("edit/edit.html")+"#"+c}else d=document.createElement("span");l.empty(d);d.appendChild(document.createTextNode(this._workspaceRootSegmentName));
return d}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],buildSegment:function(d){var c=document.createElement("a");c.classList.add("breadcrumb");c.appendChild(document.createTextNode(d));return c},addSegmentHref:function(d,c){this._makeHref?this._makeHref(d,c.Location,c):d.href=f.toUrl("edit/edit.html")+"#"+c.ChildrenLocation},buildSegments:function(d,c){if(this._resource.Parents){var f=this._resource.Parents.slice(0),e,b;f&&(f=f.slice(0),"reverse"===c&&(f=f.reverse().slice(0)),
f.forEach(function(a){a.skip||(d?(b=d,d=null):b=a.Name,e=this.buildSegment(b),this.path+=a.Name,this.addSegmentHref(e,a),e.include=!1,this.segments.push(e))}.bind(this)))}},addDivider:function(){var d=document.createElement("span");d.appendChild(document.createTextNode(" / "));this.path+="/";d.classList.add("breadcrumbSeparator");this.append(d)},refresh:function(){(this.crumbs=l.node(this._id))?l.empty(this.crumbs):(this.crumbs=document.createElement("span"),this.crumbs.id=this._id,this._container.appendChild(this.crumbs),
this.dirty=document.createElement("span"),this.dirty.id="dirty",this.dirty.className="modifiedFileMarker",this._container.appendChild(this.dirty));this.crumbs.style.width="auto";this.crumbs.style.visibility="visible";this.crumbs.parentNode.className="currentLocation";this.crumbs.parentNode.style.width="auto"},append:function(d){this.crumbs.appendChild(d)},addTitle:function(d,c){var f=c||document.title;0===this.crumbs.childNodes.length&&(d=document.createElement("span"),d.appendChild(document.createTextNode(f)),
d.classList.add("breadcrumb"),d.classList.add("currentLocation"),this.append(d))},finalSegment:function(d,c){if(!this._resource.skip){var f;f=c?c:this._resource.Name;this._makeFinalHref?(d=this.buildSegment(f),this.addSegmentHref(d,this._resource)):(d=document.createElement("span"),d.appendChild(document.createTextNode(f)));d.classList.add("currentLocation");this.path+=this._resource.Name;this.append(d)}},firstSegment:function(d){d&&(this.append(d),this._resource&&this._resource.Parents&&!this._resource.skip?
(d.classList.add("breadcrumb"),this.addDivider()):(this._resource.skip||(d.href=""),d.classList.add("currentLocation")))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(d){!0===d.include&&(this.append(d),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var d=this.segments.slice(0).reverse();d.forEach(function(c){this.append(c);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?c.include=
!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=d.reverse()}},measure:function(){var d=this._container;d.style.width="auto";this.MAX_LENGTH=this._maxLength?this._maxLength:d.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var d=this.getNavigatorWorkspaceRootSegment(),c=this._rootSegmentName;c?this.addTitle(d,c):(this.finalSegment(d,c),this._resource&&this._resource.Parents&&(this.buildSegments(c,"reverse"),this.measureSegments(),this.firstSegment(d)),
this.crumbs.offsetWidth>=this.MAX_LENGTH&&(this.INCLUDE_FIRST_SECTION=!1))},render:function(){this.refresh();var d=this.getNavigatorWorkspaceRootSegment(),c=this._rootSegmentName;c?this.addTitle(d,c):(!0===this.INCLUDE_FIRST_SECTION&&this.firstSegment(d),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(d,c)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};h.prototype.constructor=h;return{BreadCrumbs:h}});
define("orion/webui/splitter",["orion/EventTarget","orion/util","orion/webui/littlelib"],function(f,l,h){function d(c){f.attach(this);this._init(c)}d.prototype={_init:function(c){this._tracking=null;this._animationDelay=501;this._closeReversely=c.closeReversely;this.$node=h.node(c.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=h.node(c.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=h.node(c.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";
this._vertical=c.vertical||!1;var d=this.$node.classList;d.add("split");d.add(this._vertical?"splitVerticalLayout":"splitLayout");d=this.$sideNode.classList;d.add("hasSplit");d.add(this._vertical?"sidePanelVerticalLayout":"sidePanelLayout");d=this.$mainNode.classList;d.add("hasSplit");d.add(this._vertical?"mainPanelVerticalLayout":"mainPanelLayout");this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");c.toggle&&(this._thumb=document.createElement("div"),this.$node.appendChild(this._thumb),
this._thumb.classList.add("splitThumb"),this._thumb.classList.add(this._vertical?"splitVerticalThumbLayout":"splitThumbLayout"));this._closeByDefault="closed"===this.$node.getAttribute("data-initial-state");"undefined"!==typeof c.closeByDefault&&(this._closeByDefault=c.closeByDefault);this._initializeFromStoredSettings();this._closed?(this._closed=!1,this._thumbDown(!0,!0)):this._adjustToSplitPosition();this.$node.style.visibility="visible";this.$mainNode.style.display="block";this.$sideNode.style.display=
"block";l.isIOS||l.isAndroid?(this.$node.addEventListener("touchstart",this._touchStart.bind(this),!1),this._thumb&&this._thumb.addEventListener("touchstart",this._touchStart.bind(this),!1),this.$node.addEventListener("touchmove",this._touchMove.bind(this),!1),this.$node.addEventListener("touchend",this._touchEnd.bind(this),!1)):(this.$node.addEventListener("mousedown",this._mouseDown.bind(this),!1),window.addEventListener("mouseup",this._mouseUp.bind(this),!1));window.addEventListener("resize",this._resize.bind(this),
!1)},isClosed:function(){return this._closed},getOrientation:function(){return this._vertical?"vertical":"horizontal"},setOrientation:function(c){c="vertical"===c;c!==this._vertical&&(this._vertical=c,c=this.$node.classList,c.toggle("splitLayout"),c.toggle("splitVerticalLayout"),this.$node.style.left="",this.$node.style.top="",c=this.$sideNode.classList,c.toggle("sidePanelLayout"),c.toggle("sidePanelVerticalLayout"),this.$sideNode.style.left="",this.$sideNode.style.top="",this.$sideNode.style.width=
"",this.$sideNode.style.height="",c=this.$mainNode.classList,c.toggle("mainPanelLayout"),c.toggle("mainPanelVerticalLayout"),this.$mainNode.style.left="",this.$mainNode.style.top="",this.$mainNode.style.width="",this.$mainNode.style.height="",this._thumb&&(c=this._thumb.classList,c.toggle("splitThumbLayout"),c.toggle("splitVerticalThumbLayout")),this._initializeFromStoredSettings(),this._closed?(this._closed=!1,this._thumbDown(!0,!0)):this._adjustToSplitPosition())},toggleSidePanel:function(){this._thumbDown()},
openSidePanel:function(){this._closed||this._thumbDown()},addResizeListener:function(c){this.addEventListener("resize",function(d){c(d.node)})},_initializeFromStoredSettings:function(){var c=localStorage.getItem(this._prefix+"/toggleState");this._closed="string"===typeof c?"closed"===c:this._closeByDefault;var c=h.bounds(this.$node.parentNode),d=h.bounds(this.$node),e;this._vertical?(e=localStorage.getItem(this._prefix+"/yPosition"))?(this._splitTop=parseInt(e,10),this._splitTop>c.top+c.height-d.height&&
(this._splitTop=c.top+c.height/2)):this._closeByDefault&&(this._initialSplit=this._getSplitPosition(),this._splitTop=0):(e=localStorage.getItem(this._prefix+"/xPosition"))?(this._splitLeft=parseInt(e,10),this._splitLeft>c.left+c.width-d.width&&(this._splitLeft=c.left+c.width/2)):this._closeByDefault&&(this._initialSplit=this._getSplitPosition(),this._splitLeft=0)},_getSplitPosition:function(){var c=h.bounds(this.$node),d=h.bounds(this.$node.parentNode);return this.vertical?c.top-d.top:c.left-d.left},
_adjustToSplitPosition:function(c){var d=h.bounds(this.$node),e=h.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=d.height;if(c||!this._splitTop)this._splitTop=d.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);c=this._splitTop;c=this._splitTop-e.top;this.$sideNode.style.height=c+"px";this.$sideNode.style.display="block";this.$node.style.top=c+"px"}else{this._splitWidth=d.width;if(c||!this._splitLeft)this._splitLeft=d.left,localStorage.setItem(this._prefix+"/xPosition",
this._splitLeft);c=this._splitLeft;c=this._splitLeft-e.left;this.$sideNode.style.width=c+"px";this.$sideNode.style.display="block";this.$node.style.left=c+"px"}this._resize()},_resize:function(c,d,e){c=c||0;var b=h.bounds(this.$node.parentNode),a=h.bounds(this.$node);this._vertical?(void 0===e&&(e=a.top-b.top),e+=a.height,this.$mainNode.style.top=e+"px"):(void 0===d&&(d=a.left-b.left),d+=a.width,this.$mainNode.style.left=d+"px");var g=this;window.setTimeout(function(){g._notifyResizeListeners(g.$mainNode);
g._notifyResizeListeners(g.$sideNode)},c)},_notifyResizeListeners:function(c){this.dispatchEvent({type:"resize",node:c})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(c,d){c||this._addAnimation();var e=this._splitTop,b=this._splitLeft;if(this._closed)this._closed=!1,!this._splitLeft&&(!this._splitTop&&"number"===typeof this._initialSplit)&&(e=b=this._initialSplit);else if(this._closed=!0,this._closeReversely){var a=h.bounds(this.$node.parentNode),
g=h.bounds(this.$node);this._vertical?e=a.height-g.height:b=a.width-g.width}else e=b=0;this._vertical?(this.$sideNode.style.height=e+"px",this.$node.style.top=e+"px"):(this.$sideNode.style.width=b+"px",this.$node.style.left=b+"px");this._resize(this._animationDelay,b,e);c||this._removeAnimation();d||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var m=this;window.setTimeout(function(){m._notifyToggleListeners()},this._animationDelay)},_removeAnimation:function(){var c=
this;window.setTimeout(function(){c.$sideNode.classList.remove(c._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");c.$mainNode.classList.remove(c._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");c.$node.classList.remove(c._vertical?"splitVerticalLayoutAnimation":"splitLayoutAnimation")},this._animationDelay)},_addAnimation:function(){this.$sideNode.classList.add(this._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");this.$mainNode.classList.add(this._vertical?
"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");this.$node.classList.add(this._vertical?"splitVerticalLayoutAnimation":"splitLayoutAnimation")},_down:function(){this.$node.classList.add("splitTracking");this.$mainNode.classList.add("panelTracking");this.$sideNode.classList.add("panelTracking")},_move:function(c,d){var e=h.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=d;this._splitTop<e.top+5?this._splitTop=e.top+5:this._splitTop>e.top+e.height-5&&(this._splitTop=e.top+
e.height-5);var b=this._splitTop,b=this._splitTop-e.top;this.$node.style.top=b+"px"}else this._splitLeft=c,this._splitLeft<e.left+5?this._splitLeft=e.left+5:this._splitLeft>e.left+e.width-5&&(this._splitLeft=e.left+e.width-5),b=this._splitLeft,b=this._splitLeft-e.left,this.$node.style.left=b+"px";this._adjustToSplitPosition(!0)},_up:function(){this.$node.classList.remove("splitTracking");this.$mainNode.classList.remove("panelTracking");this.$sideNode.classList.remove("panelTracking")},_mouseDown:function(c){if(c.target===
this._thumb)return h.stop(c),this._thumbDown();this._tracking||(this._down(c),this._tracking=this._mouseMove.bind(this),window.addEventListener("mousemove",this._tracking),h.setFramesEnabled(!1),h.stop(c))},_mouseMove:function(c){this._tracking&&this._move(c.clientX,c.clientY)},_mouseUp:function(c){this._tracking&&(h.setFramesEnabled(!0),window.removeEventListener("mousemove",this._tracking),this._tracking=null,this._up(),h.stop(c))},_touchStart:function(c){if(1===c.touches.length){h.stop(c);if(c.target===
this._thumb)return this._thumbDown();this._down(c);this._touching=!0}},_touchMove:function(c){this._touching&&(c=c.touches,1===c.length&&(c=c[0],this._move(c.clientX,c.clientY)))},_touchEnd:function(c){0===c.touches.length&&(this._touching=!1,this._up())}};d.prototype.constructor=d;return{Splitter:d,ORIENTATION_HORIZONTAL:"horizontal",ORIENTATION_VERTICAL:"vertical"}});
define("orion/keyAssist",["i18n!orion/nls/messages","orion/webui/littlelib","orion/util"],function(f,l,h){function d(c){this.commandRegistry=c.commandRegistry;this.create();this._filterString="";this._providers=[]}d.prototype={addProvider:function(c){this._providers.push(c)},create:function(){var c=this._keyAssistDiv=document.createElement("div");c.id="keyAssist";c.style.display="none";c.classList.add("keyAssistFloat");c.setAttribute("role","menu");var d=this._keyAssistInput=document.createElement("input");
d.classList.add("keyAssistInput");d.type="text";d.placeholder=f["Filter bindings"];c.appendChild(d);var e=this._keyAssistContents=document.createElement("div");e.classList.add("keyAssistContents");if(h.isIOS||h.isAndroid)e.style.overflowY="auto";c.appendChild(e);var b=this._keyAssistTable=document.createElement("table");b.tabIndex=0;b.classList.add("keyAssistList");e.appendChild(b);document.body.appendChild(c);d.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));b.addEventListener("keydown",
function(a){this._keyDown(a)}.bind(this));d.addEventListener("input",function(a){this.filterChanged()}.bind(this));e.addEventListener(h.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&this.hide()}.bind(this));l.addAutoDismiss([c],function(){this.hide()}.bind(this))},createContents:function(){l.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;for(var c=this._idCount=
this._keyAssistContents.scrollTop=0;c<this._providers.length;c++)this._providers[c].showKeyBindings(this);this.createHeader(f.Global);this.commandRegistry.showKeyBindings(this)},createItem:function(c,d,e){if(this._filterString){var b=this._filterString.toLowerCase(),a;b!==this._filterString?(b=this._filterString,a=function(a){return a}):a=function(a){return a.toLowerCase()};if(-1===a(d).indexOf(b)&&-1===a(c).indexOf(b)&&-1===a(this._lastHeader).indexOf(b))return}var g=this._keyAssistTable.insertRow(-1);
g.id="keyAssist-keyBinding-"+this._idCount++;g.setAttribute("role","menuitem");g._execute=e;g.classList.add("keyAssistItem");g.addEventListener("click",function(a){this._selectedRow=g;this.execute();a.preventDefault()}.bind(this));e=g.insertCell(-1);e.classList.add("keyAssistName");e.appendChild(document.createTextNode(d));e=g.insertCell(-1);e.classList.add("keyAssistAccel");e.appendChild(document.createTextNode(c))},createHeader:function(c){this._lastHeader=c;var d=this._keyAssistTable.insertRow(-1);
d.classList.add("keyAssistSection");var d=d.insertCell(-1),e=document.createElement("h2");e.appendChild(document.createTextNode(c));d.appendChild(e)},execute:function(){window.setTimeout(function(){this.hide();var c=this._selectedRow;this._selectedRow=null;c&&c._execute&&c._execute()}.bind(this),0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var c=this._keyAssistInput.value;this._filterString!==c&&(this._filterString=
c,this.createContents())}.bind(this),100)},hide:function(){if(this.isVisible()){var c=document.activeElement,d=this._keyAssistDiv,c=d===c||0!==(d.compareDocumentPosition(c)&16);d.style.display="none";c&&1!==document.compareDocumentPosition(this._previousActiveElement)&&this._previousActiveElement.focus();this._previousActiveElement=null}},isVisible:function(){return"block"===this._keyAssistDiv.style.display},removeProvider:function(c){c=this._providers.indexOf(c);-1!==c&&this._providers.splice(c,
1)},select:function(c){var d=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(0===d.length)this._selectedIndex=-1;else{var e=this._selectedIndex,e=(e+(c?1:-1))%d.length;0>e&&(e=d.length-1);-1!==this._selectedIndex&&(c=d[this._selectedIndex],c.classList.remove("selected"),this._selectedRow=null);this._selectedIndex=e;if(-1!==this._selectedIndex){this._selectedRow=c=d[this._selectedIndex];c.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",c.id);this._keyAssistTable.focus();
var d=c.getBoundingClientRect(),b=this._keyAssistContents,a=b.getBoundingClientRect();c.offsetTop<b.scrollTop?0===e?b.scrollTop=0:c.scrollIntoView(!0):d.bottom>a.bottom&&c.scrollIntoView(!1)}}},show:function(){this.isVisible()||(this._previousActiveElement=document.activeElement,this.createContents(),this._keyAssistContents.style.height=Math.floor(0.75*this._keyAssistDiv.parentNode.clientHeight)+"px",this._keyAssistDiv.style.display="block",this._keyAssistInput.value=this._filterString,this._keyAssistInput.focus(),
this._keyAssistInput.select())},_keyDown:function(c){if(40===c.keyCode)this.select(!0);else if(38===c.keyCode)this.select(!1);else if(13===c.keyCode)this.execute();else return;c.preventDefault()},_scrollWheel:function(c){var d=0,d=h.isIE||h.isOpera?-c.wheelDelta:h.isFirefox?40*c.detail:-c.wheelDeltaY,e=this._keyAssistContents,b=e.scrollTop;e.scrollTop+=d;if(b!==e.scrollTop)return c.preventDefault&&c.preventDefault(),!1}};return{KeyAssistPanel:d}});
define("orion/widgets/themes/ThemePreferences",[],function(){function f(f,h){this._preferences=f;this._themeData=h;var d=h.getThemeStorageInfo();this._themeVersion=d.version;var c=f.listenForChangedSettings(d.storage,2,function(d){d.key===c&&this.apply()}.bind(this))}f.prototype={_initialize:function(f,h,d){var c,k;void 0===this._themeVersion||d.get("version")===this._themeVersion?(c=d.get(f.styleset),(k=d.get("selected"))&&(k=JSON.parse(k))):k=c=null;c||(c=h.getStyles(),d.put(f.styleset,JSON.stringify(c)));
if(!k||void 0===k[f.selectedKey])k=k||{},k[f.selectedKey]=f.defaultTheme,d.put("selected",JSON.stringify(k));d.put("version",this._themeVersion)},apply:function(){this.setTheme()},getTheme:function(f){var h=this._themeData,d=h.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(c){this._initialize(d,h,c);var k=JSON.parse(c.get("selected"));c=JSON.parse(c.get(d.styleset));var e;if(c)for(var b=0;b<c.length;b++)if(c[b].name===k[d.selectedKey]){e=c[b];break}f({style:e,styles:c})}.bind(this))},
setTheme:function(f,h){var d=this._themeData,c=d.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(k){this._initialize(c,d,k);var e=JSON.parse(k.get("selected"));f||(f=e[c.selectedKey]);e[c.selectedKey]=f;k.put("selected",JSON.stringify(e));h?k.put(c.styleset,JSON.stringify(h)):h=JSON.parse(k.get(c.styleset));for(var b=0;b<h.length;b++)if(h[b].name===e[c.selectedKey]){d.processSettings(h[b]);break}k.put("version",this._themeVersion)}.bind(this))},setFontSize:function(f){var h=
this._themeData,d=h.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(c){this._initialize(d,h,c);var k=JSON.parse(c.get("selected")),e=JSON.parse(c.get(d.styleset)),b;if(e)for(var a=0;a<e.length;a++)e[a].fontSize=f,e[a].name===k[d.selectedKey]&&(b=e[a]);c.put(d.styleset,JSON.stringify(e));h.processSettings(b)}.bind(this))}};return{ThemePreferences:f}});
define("orion/settings/nls/root/messages",{"Plugin Description":"Plugin Description",Create:"Create","Loading...":"Loading...","Label:":"Label:",Title:"Title",Plugins:"Plugins","User Profile":"User Profile",Git:"Git","Git Settings":"Git Settings",General:"General",Navigation:"Navigation",Links:"Links","Open in same tab":"Open in same tab","Open in new tab":"Open in new tab",Font:"Font",Family:"Family","Sans Serif":"Sans Serif",Serif:"Serif",Size:"Size","8pt":"8pt","9pt":"9pt","10pt":"10pt","12pt":"12pt",
Color:"Color",Background:"Background",Strings:"Strings","String Types":"String Types",blue:"blue",Weight:"Weight",Normal:"Normal",Bold:"Bold",Comments:"Comments","Comment Types":"Comment Types",green:"green",Keywords:"Keywords","Keyword Types":"Keyword Types",darkred:"darkred",Categories:"Categories",Username:"Username","Full Name":"Full Name","Email Address":"Email Address","Email Confirmed":"Email Confirmed",Account:"Account","Current Password":"Current Password","New Password":"New Password","Verify Password":"Verify Password",
Password:"Password",OpenId:"OpenId",AOL:"AOL",Yahoo:"Yahoo",Google:"Google",Unlink:"Unlink",Link:"Link",Unlinked:"Unlinked",Linked:"Linked","Linked Accounts":"Linked Accounts","Git Email Address":"Git Email Address","Git Username":"Git Username","Git Credentials Storage":"Git Credentials Storage",Update:"Update","Update Profile Settings":"Update Profile Settings","Update Git User Settings":"Update Git User Settings","Update Git Credentials":"Update Git Credentials","User profile data successfully updated.":"User profile data successfully updated.",
"Git user data successfully updated.":"Git user data successfully updated.","Git Credentials successfully updated.":"Git Credentials successfully updated.","Edit Plugin JavaScript":"Edit Plugin JavaScript","Install Plugin":"Install Plugin","Plugin Name:":"Plugin Name:","Author Name:":"Author Name:","Licence:":"Licence:","Description:":"Description:","A plugin for Eclipse Orion":"A plugin for Eclipse Orion","Plugin Link":"Plugin Link",Install:"Install","Install a plugin by specifying its URL":"Install a plugin by specifying its URL",
"Plugin URL:":"Plugin URL:",Disable:"Disable",DisableTooltip:"Disable the plugin",Enable:"Enable",EnableTooltip:"Enable the plugin","Reload all":"Reload all","Reload all installed plugins":"Reload all installed plugins","Create a new Orion Plugin":"Create a new Orion Plugin","Find More Orion Plugins":"Find More Orion Plugins","Get Plugins":"Get Plugins",Reload:"Reload","Reload the plugin":"Reload the plugin",Delete:"Delete","Delete this plugin from the configuration":"Delete this plugin from the configuration",
DeleteUser:"Delete User Profile as well as workspaces and projects",DeleteUserComfirmation:"WARNING: This will permanently delete your user profile as well all your work!","Type a plugin url here ...":"Type a plugin url here ...","Installed ":"Installed ","Installing ":"Installing ","Already installed":"Already installed"," plugin":" plugin","Reloaded ":"Reloaded ","Uninstalled ":"Uninstalled ","Are you sure you want to uninstall '":"Are you sure you want to uninstall '",Services:"Services",Value:"Value",
"JavaScript Object":"JavaScript Object","click here, then check javascript console to drill down":"click here, then check javascript console to drill down",Item:"Item","Git Config":"Git Config","Clear Git Credentials":"Clear Git Credentials","Enable Storage":"Enable Storage","Please be aware that your credentials will be stored persistently in the browser.":"Please be aware that your credentials will be stored persistently in the browser.","Do you wish to enable the Key Storage?":"Do you wish to enable the Key Storage?",
general:"General",validation:"Validation","Deleted git credentials for ${0}":"Deleted git credentials for ${0}",Editor:"Editor",editorSettings:"Settings",EditorThemes:"Themes",Import:"Import","Import a theme":"Import a theme",Export:"Export","Export a theme":"Export a theme","Theme name:":"Theme name:",yourTheme:"yourTheme",fileManagement:"File Management",typing:"Typing",autoSave:"Auto Save",autoSaveTimeout:"Save interval (ms)",autoLoad:"Auto Load",saveDiffs:"Save file as diffs",trimTrailingWhiteSpace:"Trim Trailing Whitespace on Save",
Restore:"Restore Defaults",Default:"Default",keys:"Keys",tabs:"Tabs",tabSize:"Tab Size",expandTab:"Insert spaces for tabs",smoothScrolling:"Smooth Scrolling",scrollAnimation:"Scrolling Animation",scrollAnimationTimeout:"Scrolling Duration (ms)",keyBindings:"Key Bindings",rulers:"Rulers",annotationRuler:"Show Annotation Ruler",lineNumberRuler:"Show Line Number Ruler",foldingRuler:"Show Folding Ruler",overviewRuler:"Show Overview Ruler",whitespaces:"White Spaces",wrapping:"Wrapping",wordWrap:"Word Wrap",
showMargin:"Show Margin",marginOffset:"Margin Column",showTabs:"Show Tabs",showSpaces:"Show Spaces",autoSaveTimeoutInvalid:"Invalid save interval.",scrollAnimationTimeoutInvalid:"Invalid scrolling duration.",tabSizeInvalid:"Invalid tab size.",localSettingsTooltip:"Toggle whether this setting is shown in the local editor settings drop down.",editorSettingsInfo:"Use the ${0} and ${1} to toggle whether a given setting is shown in the local editor settings drop down ${2}.",autoPairParentheses:"Autopair (Parentheses)",
autoPairBraces:"Autopair {Braces}",autoPairSquareBrackets:"Autopair [Square] Brackets",autoPairAngleBrackets:"Autopair \x3cAngle\x3e Brackets",autoPairQuotations:'Autopair "Strings"',autoCompleteComments:"Autocomplete /** Block Comments */",smartIndentation:"Smart Indentation",sourceControl:"Source Control",showBlame:"Show Blame",languageTools:"Language Tools",showOccurrences:"Show Occurrences",contentAssistAutoTrigger:"Show Content Assist automatically","Editor preferences updated":"Editor preferences updated",
"Editor defaults restored":"Editor defaults restored",Theme:"Theme","Font Size":"Font Size","New Theme Name:":"New Theme Name:","Font Size:":"Font Size:","UI Theme":"UI Theme","Navigation Bar":"Navigation Bar","Navigation Text":"Navigation Text","Search Box":"Search Box","Tool Panel":"Tool Panel","Selection Bar":"Selection Bar",Location:"Location",Content:"Content","Main Panel":"Main Panel",Button:"Button","Button Text":"Button Text","Section Text":"Section Text","Side Panel":"Side Panel","Line Color":"Line Color",
"Line Numbers":"Line Numbers",Foreground:"Foreground","Current Line":"Current Line","HTML Attribute":"HTML Attribute","Overview Ruler":"Overview Ruler","HTML Tag":"HTML Tag","Annotation Ruler":"Annotation Ruler","Show Guide":"Show Guide","Check Guide":"Check Guide",Cancel:"Cancel","Revert Theme":"Revert Theme","Update Theme":"Update Theme","Theme:":"Theme:",clickDiagram:"Click diagram to style.",clickUpdate:"Click Update button to save preview.","CSS Class Name":"CSS Class Name","CSS Attribute":"CSS Attribute",
"CSS Value":"CSS Value","CSS Text":"CSS Text","COLOR:":"Color:","NEW COLOR:":"New Color:",Ok:"Ok","OR HEX:":"Or Hex: ",splitEditors:"Split Editors",splitOrientation:"Split Orientation",horizontal:"Horizontal",vertical:"Vertical"});define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages","orion/settings/nls/root/messages"],function(f,l){var h={root:l};Object.keys(f).forEach(function(d){"undefined"===typeof h[d]&&(h[d]=f[d])});return h});
define("orion/editor/eventTarget",[],function(){function f(){}f.addMixin=function(l){var h=f.prototype,d;for(d in h)h.hasOwnProperty(d)&&(l[d]=h[d])};f.prototype={addEventListener:function(f,h,d){this._eventTypes||(this._eventTypes={});var c=this._eventTypes[f];c||(c=this._eventTypes[f]={level:0,listeners:[]});c.listeners.push({listener:h,useCapture:d})},dispatchEvent:function(f){var h=f.type;this._dispatchEvent("pre"+h,f);this._dispatchEvent(h,f);this._dispatchEvent("post"+h,f)},_dispatchEvent:function(f,
h){var d=this._eventTypes?this._eventTypes[f]:null;if(d){var c=d.listeners;try{if(d.level++,c)for(var k=0,e=c.length;k<e;k++)if(c[k]){var b=c[k].listener;"function"===typeof b?b.call(this,h):b.handleEvent&&"function"===typeof b.handleEvent&&b.handleEvent(h)}}finally{if(d.level--,d.compact&&0===d.level){for(k=c.length-1;0<=k;k--)c[k]||c.splice(k,1);0===c.length&&delete this._eventTypes[f];d.compact=!1}}}},isListening:function(f){return!this._eventTypes?!1:void 0!==this._eventTypes[f]},removeEventListener:function(f,
h,d){if(this._eventTypes){var c=this._eventTypes[f];if(c){for(var k=c.listeners,e=0,b=k.length;e<b;e++){var a=k[e];if(a&&a.listener===h&&a.useCapture===d){0!==c.level?(k[e]=null,c.compact=!0):k.splice(e,1);break}}0===k.length&&delete this._eventTypes[f]}}}};return{EventTarget:f}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(f,l,h){function d(c){c=c||{};this._document=c.document||document}var c={};d.getTheme=function(f){f=f||"default";var e=c[f];e||(e=c[f]=new d);return e};d.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(c,e){var b=this,a=b._themeClass;b._themeClass=c;this._load(c,e,function(){b.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:b.getThemeClass()})})},onThemeChanged:function(c){return this.dispatchEvent(c)},
buildStyleSheet:function(c,e){function b(b,e,d){e&&(a.push("."+c+" ."+b+" {"),a.push("\t"+(d?"background-color":"color")+": "+e+";"),a.push("}"))}var a=[];a.push("");a.push("."+c+" {");e.fontFamily&&a.push("\tfont-family: "+e.fontFamily+";");e.fontSize&&a.push("\tfont-size: "+e.fontSize+";");e.fontSize&&a.push("\tcolor: "+e.text+";");a.push("}");a.push("."+c+".textview {");e.background&&a.push("\tbackground-color: "+e.background+";");a.push("}");a.push("."+c+" .textviewLeftRuler {");e.leftRuler&&
a.push("\tborder-right: 1px solid "+e.leftRuler+";");a.push("}");a.push("."+c+" .textviewRightRuler {");e.rightRuler&&a.push("\tborder-left: 1px solid "+e.rightRuler+";");a.push("}");b("ruler.annotations",e.annotationRuler,!0);b("ruler.lines",e.annotationRuler,!0);b("ruler.folding",e.annotationRuler,!0);b("ruler.overview",e.overviewRuler,!0);b("rulerLines",e.lineNumber,!1);b("rulerLines.even",e.lineNumberEven,!1);b("rulerLines.odd",e.lineNumberOdd,!1);b("annotationLine.currentLine",e.currentLine,
!0);b("entity-name-tag",e.keyword,!1);b("entity-other-attribute-name",e.attribute,!1);b("string-quoted",e.string,!1);b("meta.annotation.currentLine",e.currentLine,!0);b("keyword",e.keyword,!1);b("string",e.string,!1);b("constant",e.constant,!1);b("comment",e.comment,!1);b("comment.block.documentation",e.comment,!1);b("keyword.other.documentation.markup",e.comment,!1);b("keyword.other.documentation.markup",e.comment,!1);return a.join("\n")},_createStyle:function(c,e,b,a){var g=this._document;c="orion-theme-"+
c;var d=g.getElementById(c);if(d){if(a||d.firstChild.data===e)return;d.removeChild(d.firstChild);d.appendChild(g.createTextNode(e))}else a?(d=h.createElement(g,"link"),d.rel="stylesheet",d.type="text/css",d.href=e,d.addEventListener("load",function(){b()})):(d=h.createElement(g,"style"),d.appendChild(g.createTextNode(e))),d.id=c,(g.getElementsByTagName("head")[0]||g.documentElement).appendChild(d);a||b()},_load:function(c,e,b){if(c)if("string"===typeof e)this._createStyle(c,e,b);else if(e=e.href,
".css"!==e.substring(e.length-4)&&(e+=".css"),/^\//.test(e)||/[a-zA-Z0-9]+:\/\//i.test(e)||!f.toUrl)this._createStyle(c,e,b,!0);else{var a=this;f(["text!"+e],function(g){a._createStyle(c,g,b,!1)})}else b()}};l.EventTarget.addMixin(d.prototype);return{TextTheme:d}});
define("orion/widgets/themes/ThemeClass",[],function(){function f(f){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=f;this.classString="."+f+"{ "}f.prototype.className=null;f.prototype.classString=void 0;f.prototype.style=void 0;f.prototype.closeString=" }\n";f.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:f}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(f){function l(){}l.prototype.navbar="white";l.prototype.button="#777777";l.prototype.location="#EFEFEF";l.prototype.selection="#cedce7";l.prototype.sidepanel="#F7F7F7";l.prototype.mainpanel="white";l.prototype.navtext="#bfbfbf";l.prototype.content="#3087B3";l.prototype.search="#444";l.prototype.toolpanel="white";l.prototype.writeNavigationStyle=function(){var h="",d=[],c=new f.ThemeClass("orionPage");
c.style.backgroundColor="#fdfdfd";c.style.width="100%";c.style.height="100%";d.push(c);c=new f.ThemeClass("topRowBanner");c.style.margin="0";c.style.border="0";c.style.backgroundColor=this.navbar;c.style.height="16px";c.style.padding="10px";c.style.paddingLeft="6px";c.style.paddingRight="2px";c.style.borderBottom="none";c.style.boxShadow="0 2px 2px 0 rgba(0, 0, 0, 0.1),0 1px 0 0 rgba(0, 0, 0, 0.1)";c.style.zIndex="100";d.push(c);c=new f.ThemeClass("a");c.style.textDecoration="none";c.style.color=
this.content;d.push(c);c=new f.ThemeClass("navlink");c.style.display="inline-block";c.style.padding="2px";c.style.color=this.content;c.style.verticalAlign="bottom";d.push(c);c=new f.ThemeClass("primaryNav");c.style.color=this.navtext;c.style.fontSize="8pt";c.style.fontWeight="normal";c.style.paddingTop="0";c.style.verticalAlign="baseline";d.push(c);c=new f.ThemeClass("primaryNav a");c.style.fontSize="8pt";c.style.color=this.navtext;c.style.marginRight="6px";c.style.marginLeft="6px";c.style.verticalAlign=
"baseline";c.style.textDecoration="none";d.push(c);c=new f.ThemeClass("primaryNav a:hover");c.style.color="#bfbfbf";c.style.cursor="hand";c.style.color="white";c.style.fontWeight="normal";d.push(c);for(var k in d)h+=d[k].toString();return h};l.prototype.writeLocationStyle=function(){var h="",d=[],c=new f.ThemeClass("titleArea");c.style.margin="0";c.style.paddingTop="5px";c.style.border="0";c.style.background=this.location;c.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+
this.location+"), color-stop(100%,"+this.location+"))";c.style.borderBottom="1px solid "+this.location;c.style.minHeight="20px";d.push(c);c=new f.ThemeClass("breadcrumb");c.style.fontSize="8pt";c.style.textDecoration="none";c.style.color="#f1f1f2;";c.style.paddingTop="2px";d.push(c);c=new f.ThemeClass("a.breadcrumb:hover");c.style.textDecoration="none";c.style.borderBottom="1px dotted";c.style.color="#F58B0F";c.style.cursor="pointer";d.push(c);c=new f.ThemeClass("breadcrumbSeparator");c.style.fontSize=
"8pt";c.style.textDecoration="none";c.style.color=this.separator;c.style.fontWeight="bold";d.push(c);c=new f.ThemeClass("currentLocation");c.style.fontWeight="bold";c.style.fontSize="8pt";c.style.color=this.breadcrumb;c.style.textDecoration="none";c.style.textWrap="normal";c.style.lineHeight="10pt";d.push(c);c=new f.ThemeClass("a.currentLocation:hover");c.style.fontWeight="bold";c.style.fontSize="10pt";c.style.color="#666666";c.style.textDecoration="none";c.style.borderBottom="0";d.push(c);c=new f.ThemeClass("navlinkonpage");
c.style.color=this.content;c.style.verticalAlign="middle";d.push(c);this.bannerProgress&&(c=new f.ThemeClass("topRowBanner .progressPane_running"),c.style.borderColor=this.bannerProgress,d.push(c));for(var k in d)h+=d[k].toString();return h};l.prototype.writeButtonStyle=function(){var h="",d=[],c=new f.ThemeClass("commandButton");c.style.color="#666";c.style.border="1px solid #dedede";c.style.backgroundColor="#ddd";c.style.textAlign="center";c.style.verticalAlign="middle";c.style.cursor="pointer";
c.style.display="inline-block";c.style.padding="4px 6px";c.style.borderRadius="3px";c.style.lineHeight="12px";c.style.fontSize="9pt";c.style.userSelect="none";d.push(c);c=new f.ThemeClass("commandButton:over");c.style.backgroundColor="#e6e6e6";c.style.border="1px solid #808080";d.push(c);c=new f.ThemeClass("commandMenu");c.style.color="#222";c.style.display="inline-block";c.style.verticalAlign="baseline";c.style.margin="0";c.style.fontSize="8pt";c.style.fontWeight="normal";c.style.border="1px solid #dedede";
c.style.backgroundColor="#efefef";c.style.cursor="pointer";c.style.borderRadius="1px";d.push(c);c=new f.ThemeClass("commandMenuItem");c.style.border="0";c.style.padding="0";c.style.margin="0";d.push(c);for(var k in d)h+=d[k].toString();return h};l.prototype.writeMainStyle=function(){var h="",d=[],c=new f.ThemeClass("searchbox");c.style.backgroundImage="url(../images/core_sprites.png)";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="4px -297px";c.style.width="12px";c.style.height=
"12px";c.style.backgroundColor=this.search;c.style.border="1px solid "+this.search;c.style.fontSize="11px";c.style.width="15em";c.style.height="16px";c.style.borderRadius="10px";c.style.color="#999";c.style.padding="0";c.style.paddingLeft="20px";c.style.marginLeft="5px";c.style.marginTop="6px !important";c.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";d.push(c);c=new f.ThemeClass("searchbox:focus");c.style.color="white";c.style.outline=
"none";d.push(c);c=new f.ThemeClass("checkedRow");c.style.cssText="background-color:"+this.selection+" !important;";d.push(c);c=new f.ThemeClass("navbar-item-selected");c.style.background=this.selection;c.style.color=this.content;d.push(c);c=new f.ThemeClass("auxpane");c.style.border="0";c.style.background=this.sidepanel;d.push(c);c=new f.ThemeClass("mainpane");c.style.background=this.mainpanel;c.style.border=0;d.push(c);c=new f.ThemeClass("mainToolbar");c.style.background=this.toolpanel;d.push(c);
for(var k in d)h+=d[k].toString();return h};l.prototype.render=function(f){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};l.prototype.getSheet=function(f){f.navbar.value?(this.navbar=f.navbar.value,this.button=f.button.value,this.location=f.location.value,this.selection=f.selection.value,this.sidepanel=f.sidepanel.value,this.mainpanel=f.mainpanel.value,this.navtext=f.navtext.value,this.search=
f.search.value,this.content=f.content.value,this.toolpanel=f.toolpanel.value,this.bannerProgress=f.bannerProgress.value):(this.navbar=f.navbar,this.button=f.button,this.location=f.location,this.selection=f.selection,this.sidepanel=f.sidepanel,this.mainpanel=f.mainpanel,this.navtext=f.navtext,this.search=f.search,this.content=f.content,this.toolpanel=f.toolpanel,this.bannerProgress=f.bannerProgress);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};
return{ThemeSheetWriter:l}});define("orion/widgets/themes/ThemeVersion",[],function(){return"6.1"});
define("orion/widgets/themes/container/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter","orion/widgets/themes/ThemeVersion"],function(f,l,h,d){function c(){}function k(){this.styles=[];var b=new c;b.name="Orion";b.navbar="white";b.button="#EFEFEF";b.location="#efefef";b.selection="FEC";b.sidepanel="#FBFBFB";b.mainpanel="white";b.toolpanel="white";b.navtext="#bfbfbf";b.content="#3087B3";b.search="#444";b.breadcrumb="#3087B3";
b.separator="#333";b.bannerProgress="whitesmoke";this.styles.push(b);b=new c;b.name="Orion2014";b.navbar="white";b.button="#EFEFEF";b.location="#EFEFEF";b.selection="FEC";b.sidepanel="#EEEEEE";b.mainpanel="#EEEEEE";b.toolpanel="#EEEEEE";b.navtext="#BFBFBF";b.content="#333333";b.search="#444444";b.breadcrumb="#333333";b.separator="#333333";b.bannerProgress="orange";this.styles.push(b);b=new c;b.name="Green Zone";b.navbar="seagreen";b.button="lavender";b.location="darkseagreen";b.selection="moccasin";
b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="darkgreen";b.search="darkgreen";b.breadcrumb="#3087B3";b.separator="seagreen";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new c;b.name="Pretty In Pink";b.navbar="plum";b.button="lavender";b.location="pink";b.selection="lavender";b.sidepanel="seashell";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="mediumorchid";b.search="violet";b.breadcrumb="#3087B3";b.separator="plum";b.bannerProgress=
"#F2F2F2";this.styles.push(b);b=new c;b.name="Blue Monday";b.navbar="cornflowerblue";b.button="lavender";b.location="skyblue";b.selection="lavender";b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="royalblue";b.search="royalblue";b.breadcrumb="#3087B3";b.separator="cornflowerblue";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new c;b.name="Vanilla Skies";b.navbar="sandybrown";b.button="lemmonchiffon";b.location="cornsilk";b.selection="lemonchiffon";
b.sidepanel="white";b.mainpanel="white";b.toolpanel="white";b.navtext="lemonchiffon";b.content="chocolate";b.search="moccasin";b.breadcrumb="#3087B3";b.separator="sandybrown";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new c;b.name="Beetlejuice";b.navbar="indigo";b.button="slateblue";b.location="darkslateblue";b.selection="silver";b.sidepanel="lavender";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="mediumslateblue";b.search="#444";b.breadcrumb="#3087B3";b.separator="indigo";
b.bannerProgress="#F2F2F2";this.styles.push(b);b=new c;b.name="Red";b.navbar="#CD2127";b.button="#777777";b.location="#D85F56";b.selection="lightcoral";b.sidepanel="#EFDAB2";b.mainpanel="#FDFADD";b.toolpanel="#FDFADD";b.navtext="#FBFBFB";b.content="darkred";b.search="#D85F56";b.breadcrumb="darkred";b.separator="#CD2127";b.bannerProgress="#F2F2F2";this.styles.push(b)}function e(){return this.styles}c.prototype.name="Orion";c.prototype.navbar="#404648";c.prototype.button="#EFEFEF";c.prototype.location=
"#333";c.prototype.breadcrumb="#3087B3";c.prototype.separator="#333";c.prototype.selection="FEC";c.prototype.sidepanel="#FBFBFB";c.prototype.mainpanel="white";c.prototype.toolpanel="white";c.prototype.navtext="#bfbfbf";c.prototype.content="#3087B3";c.prototype.search="#444";c.prototype.bannerProgress="white";k.prototype.styles=[];k.prototype.getStyles=e;k.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion2014",selectedKey:"selected",version:d}};
k.prototype.getViewData=function(){var b={top:10,left:10,width:350,height:350};b.shapes=[{type:"RECTANGLE",name:f["Navigation Bar"],x:10,y:10,width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:f["Navigation Text"],label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:f["Search Box"],x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:f["Tool Panel"],x:150,y:71,width:209,height:30,
family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",name:f["Selection Bar"],x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},{type:"RECTANGLE",name:f.Location,x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:f["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:f.Content,label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},
{type:"TEXT",name:f.Content,label:"/",x:78,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif",order:9},{type:"TEXT",name:f.Content,label:"Location",x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:f["Main Panel"],x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:f.Button,x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:f["Button Text"],label:"Button",x:158,y:90,
family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"},{type:"TEXT",name:f["Section Text"],label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:f["Line Color"],x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:f["Line Color"],x1:150,
y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:f["Line Color"],x1:20,y1:100,x2:140,y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:f["Side Panel"],x:10,y:71,width:140,height:289,family:"sidepanel",fill:"#FBFBFB",order:12},{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"},{type:"TEXT",name:f["Navigation Text"],label:"Navigator",
x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"}];for(var a=0;3>a;a++)b.shapes.push({type:"TEXT",name:f.Content,label:"org.eclipse.orion.content",x:170,y:127+20*a,fill:"#3087B3",family:"content"});for(a=0;3>a;a++)b.shapes.push({type:"TEXT",name:f.Content,label:"Item",
x:25,y:115+20*a,fill:"#3087B3",family:"content"});for(a=0;3>a;a++)b.shapes.push({type:"TRIANGLE",name:"twisty",x1:160,y1:121+20*a,x2:165,y2:124+20*a,x3:160,y3:127+20*a,family:"navbar",fill:"#333"});b.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return b};k.prototype.processSettings=function(b){var a=new h.ThemeSheetWriter;(new l.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",a.getSheet(b))};return{ThemeData:k,getStyles:e}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," \x3cNo available services or timed out, check URL and try reloading\x3e":" \x3cNo available services or timed out, check URL and try reloading\x3e",Properties:"Properties",
" (Service Id: ":" (Service Id: ",Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? \x3d any character, * \x3d any string):":"Type the name of a file to open (? \x3d any character, * \x3d any string):",Search:"Search","FileName FolderName":"FileName FolderName(Optional)","Searching...":"Searching...","Searching for occurrences of":'Searching for occurrences of: "${0}"',
name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","\x3c/a\x3e":"\x3c/a\x3e","\x3e":"\x3e","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Report a Bug":"Report a Bug","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:",
"Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination","Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'.","Main Pages":"Main Pages","Related Links":"Related Links",Yes:"Yes",No:"No","Click or use delete key to delete the search term":"Click or use delete key to delete the search term"});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(f,l){var h={root:l};Object.keys(f).forEach(function(d){"undefined"===typeof h[d]&&(h[d]=f[d])});return h});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(f){function l(h,d,c){this.elements=c;this.taskPanel=document.createElement("div");this.taskPanel.className="UAContainer";this.taskPanel.innerHTML='\x3cheader class\x3d"UAHeader"\x3eDevelop software from within the cloud\x3c/header\x3e';this.elementNode=document.createElement("div");this.switchesContainer=document.createElement("div");this.switches=document.createElement("span");this.radioButtons=[];this.elementNode.className=
"UAContainer-body";this.taskPanel.appendChild(this.elementNode);this.switchesContainer.className="UAContainer-switch-body";this.switches.className="UAContainer-switches";this.switchesContainer.innerHTML="";this.switchesContainer.appendChild(this.switches);this.taskPanel.appendChild(this.switchesContainer);!0===d?(this.container=document.createElement("div"),this.container.className="UAModal",this.container.appendChild(this.taskPanel),this.backdrop=document.createElement("div"),this.backdrop.className=
"UAModalBackground",document.body.appendChild(this.backdrop),document.body.appendChild(this.container),f.addAutoDismiss([this.container],this.destroy.bind(this))):h.appendChild(this.taskPanel);this.chosenSwitch=this.createSwitch(null,!0);this.chosenSwitch.firstChild.className="chosenCircle";this.initialize();this.elements.forEach(this.createSwitch.bind(this))}l.prototype.elementNode=null;l.prototype.switchesContainer=null;l.prototype.switches=null;l.prototype.radioButtons=null;l.prototype.chosenSwitch=
null;l.prototype.addElement=function(f){var d=document.createElement("span");d.className="UAContainer-icon";d.innerHTML='\x3cspan class\x3d"workingSpan"\x3e\x3cimg src\x3d"'+f.image+'" id\x3d"'+f.label+'ImageNode" alt\x3d"'+f.alt+'" height\x3d"64" width\x3d"64"\x3e\x3c/span\x3e\x3cspan class\x3d"UAIcon-label"\x3e\x3cspan class\x3d"UALabel" id\x3d"'+f.label+'LabelNode" \x3e'+f.label+"\x3c/span\x3e\x3c/span\x3e";d.onmouseover=function(){document.getElementById(f.label+"ImageNode").src=f.secondaryImage;
document.getElementById(f.label+"LabelNode").className="UALabel-live";d.className="UAContainer-icon-live"};d.onmouseout=function(){document.getElementById(f.label+"ImageNode").src=f.image;document.getElementById(f.label+"LabelNode").className="UALabel";d.className="UAContainer-icon"};var c=this;d.onclick=function(){c.showMedia(f)};this.elementNode.appendChild(d)};l.prototype.clearElements=function(){this.elementNode.innerHTML=""};l.prototype.showMedia=function(f){this.clearElements();this.addElement(f);
var d=document.createElement("span");d.className="UAContainer-media";d.innerHTML='\x3cdiv\x3e\x3c/div\x3e\x3cdiv\x3e\x3c/div\x3e\x3cspan class\x3d"mediaSpan"\x3e\x3cimg src\x3d"'+f.media+'" alt\x3d"'+f.alt+'" height\x3d"300" width\x3d"400"\x3e\x3c/span\x3e';this.elementNode.appendChild(d);setTimeout(function(){d.style.opacity=1},100);f=document.getElementById(f.label+"switch");this.chosenSwitch.firstChild.className="circle";this.chosenSwitch=f.parentNode;f.className="chosenCircle"};l.prototype.createSwitch=
function(f){var d;d=f?f.label+"switch":"indexSwitch";var c=document.createElement("span");c.className="workingSpan";c.innerHTML='\x3cdiv class\x3d"circle" id \x3d"'+d+'"\x3e\x3c/div\x3e';var k=this;c.onclick=f?function(){k.showMedia(f)}:function(){k.initialize();k.chosenSwitch.firstChild.className="circle";k.chosenSwitch=c;k.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(c);return this.radioButtons[this.radioButtons.length]=c};l.prototype.initialize=function(){this.clearElements();
this.elements.forEach(this.addElement.bind(this))};l.prototype.destroy=function(){document.body.removeChild(this.backdrop);document.body.removeChild(this.container)};return l});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(f,l,h,d){function c(){}var k=null;c.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'\x3cdiv class\x3d"dialog" role\x3d"dialog"\x3e\x3cdiv class\x3d"dialogTitle"\x3e\x3cspan id\x3d"title" class\x3d"dialogTitleText layoutLeft"\x3e\x3c/span\x3e\x3cbutton aria-label\x3d"Close" class\x3d"dismissButton layoutRight core-sprite-close imageSprite" id\x3d"closeDialog"\x3e\x3c/button\x3e\x3c/div\x3e\x3cdiv id\x3d"dialogContent" class\x3d"dialogContent layoutBlock"\x3e\x3c/div\x3e\x3cdiv id\x3d"buttons" class\x3d"dialogButtons"\x3e\x3c/div\x3e\x3c/div\x3e',_initialize:function(){var c=
document.body;this.$frameParent=c;this.$$modalExclusions=this.$$modalExclusions||[];var b=document.createRange();b.selectNode(c);b=b.createContextualFragment(this.CONTAINERTEMPLATE);c.appendChild(b);this.$frame=c.lastChild;this.title&&h.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=h.$("#closeDialog",this.$frame);var a=this;this.$close.addEventListener("click",function(b){a.hide()},!1);this.$parent=h.$(".dialogContent",this.$frame);b=document.createRange();b.selectNode(this.$parent);
c=b.createContextualFragment(this.TEMPLATE);this.messages&&h.processTextNodes(c,this.messages);this.$parent.appendChild(c);this.$buttonContainer=h.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(b){b.keyCode===h.KEY.ESCAPE?a.hide():b.keyCode===h.KEY.ENTER&&"function"===typeof a._defaultCallback&&a._defaultCallback()},!1);this._bindElements(this.$parent);"function"===typeof this._bindToDom&&this._bindToDom(this.$parent)},_makeButtons:function(){if(this.$buttonContainer&&
Array.isArray(this.buttons)){var c=this;this.buttons.forEach(function(b){var a=d.createButton(b.text,b.callback);b.id&&(a.id=b.id,c["$"+a.id]=a);b.isDefault&&(c._defaultCallback=b.callback,c._defaultButton=a);c.$buttonContainer.appendChild(a)})}},_makeModal:function(c){var b=this;this.$frame.addEventListener("blur",function(a){b.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var c=!h.contains(b.$frame,a.target);if(c)for(var g=0;g<b.$$modalExclusions.length;g++)if(h.contains(b.$$modalExclusions[g],
a.target)){c=!1;break}c&&(window.setTimeout(function(){(b.$lastFocusedElement||b.$parent).focus()},0),h.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);c=this.$frameParent.childNodes;var a=!1;this._addedBackdrop=[];for(var g=0;g<c.length;g++){for(var d=0;d<this.$$modalExclusions.length;d++)if(h.contains(this.$$modalExclusions[d],c[g])){a=!0;break}!a&&(c[g]!==b.$frame&&c[g].classList&&!c[g].classList.contains("tooltipContainer"))&&
(d=c[g],d.classList.contains("modalBackdrop")||(d.classList.add("modalBackdrop"),this._addedBackdrop.push(d)))}(c=h.lastTabbable(this.$buttonContainer)||h.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===h.KEY.TAB){var c=b._getFirstFocusField();c&&c!==a.target&&c.focus();h.stop(a)}},!1)},_addChildDialog:function(c){this.$$modalExclusions.push(c.$frame||c.$parent)},_inModalExclusion:function(c){return this.$$modalExclusions.some(function(b){return c.$frame===b||
c.$parent===b})},_bindElements:function(c){for(var b=0;b<c.childNodes.length;b++){var a=c.childNodes[b];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},hide:function(c){!c&&k===this&&(k=null);"function"===typeof this._beforeHiding&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0));this.$frame.classList.remove("dialogShowing");h.setFramesEnabled(!0);"function"===typeof this._afterHiding&&
this._afterHiding();var b=this;this.keepAlive||window.setTimeout(function(){b.destroy()},0)},show:function(c){if(this.modal)if(this._makeModal(),k){if(!k._inModalExclusion(this)){this.hide(!0);return}}else k=this;"function"===typeof this._beforeShowing&&this._beforeShowing();h.setFramesEnabled(!1);var b=h.bounds(this.$frame),a=h.bounds(document.documentElement),g;c?(g=h.bounds(c),c=g.top+g.height+4,g=g.left+4,c+b.height>a.height&&(c=Math.max(0,a.height-b.height-4)),g+b.width>a.width&&(g=Math.max(0,
a.width-b.width-4))):(g=Math.max(0,(a.width-b.width)/2),c=Math.max(0,(a.height-b.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=c+"px";this.$frame.style.left=g+"px";this.$frame.classList.add("dialogShowing");"function"===typeof this._afterShowing&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return h.firstTabbable(this.$parent)||this._defaultButton||h.firstTabbable(this.$buttonContainer)||this.$close},
destroy:function(){this.$frame&&(k===this&&(k=null),h.setFramesEnabled(!0),this._addedBackdrop&&0<this._addedBackdrop.length&&this._addedBackdrop.forEach(function(c){c.classList.remove("modalBackdrop")}),this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0),this.$frameParent.removeChild(this.$frame),this.$parent=this.$frame=void 0)}};c.prototype.constructor=c;return{Dialog:c}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages require orion/webui/littlelib orion/PageLinks orion/widgets/userAssistance/UATaskPanel orion/webui/dialog orion/webui/dropdown".split(" "),function(f,l,h,d,c,k,e){function b(a){this._displaySignOut=!0;this._init(a)}b.prototype={_init:function(a){this._dropdownNode=h.node(a.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=a.dropdown;this._serviceRegistry=a.serviceRegistry;this.authenticatedServices=
{};this.unauthenticatedServices={};this._noSeparator=a.noSeparator;this._dropDownItemClass=a.dropDownItemClass;this._keyAssistClass=a.keyAssistClass;void 0!==a.signOut&&(this._displaySignOut=a.signOut)},isSingleService:function(){return 1===this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)},hasServices:function(){return 0<this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)},length:function(a){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;
return b},_makeMenuItem:function(a,b){var c=e.createMenuItem(a).firstElementChild;"string"===typeof this._dropDownItemClass&&""!==this._dropDownItemClass&&c.classList.add(this._dropDownItemClass);c.addEventListener("click",b,!1);c.addEventListener("keydown",function(a){(a.keyCode===h.KEY.ENTER||a.keyCode===h.KEY.SPACE)&&b()},!1);return c},_renderAuthenticatedService:function(a,b){var c=this,e=this.authenticatedServices[a].authService;if(e&&e.logout&&this._displaySignOut){var d=this._makeMenuItem(f["Sign Out"],
function(){e.logout().then(function(){c.addUserItem(a,e,c.authenticatedServices[a].label);localStorage.removeItem(a);localStorage.removeItem("lastLogin");for(var b=localStorage.length-1;0<=b;b--){var g=localStorage.key(b);g&&0===g.indexOf("/orion/preferences/user")&&localStorage.removeItem(g)}e.getAuthForm(window.location.href).then(function(a){window.location=a})})});this._dropdownNode.appendChild(d.parentNode)}},renderServices:function(){function a(a){c[a]||(c[a]=b.createDocumentFragment());return c[a]}
var b=document,c=[],n=this._serviceRegistry;d.getPageLinksInfo(n,"orion.page.link.user").then(function(d){this._dropdown?this._dropdown.empty():this._dropdownNode&&h.empty(this._dropdownNode);d.getAllLinks().forEach(function(c){var e,d;if(c.category&&(d=/user\.(\d+)/.exec(c.category)))e=parseInt(d[1],10);if("number"!==typeof e||isNaN(e))e=1;e=a(e);d=b.createElement("li");var m=b.createElement("a");m.role="menuitem";"string"===typeof this._dropDownItemClass?""!==this._dropDownItemClass&&m.classList.add(this._dropDownItemClass):
m.classList.add("dropdownMenuItem");m.href=c.href;m.textContent=c.textContent;d.appendChild(m);e.appendChild(d);m.addEventListener("keydown",function(a){(a.keyCode===h.KEY.ENTER||a.keyCode===h.KEY.SPACE)&&m.click()},!1)}.bind(this));this.keyAssistFunction&&(d=this._makeMenuItem(f["Keyboard Shortcuts"],this.keyAssistFunction),"string"===typeof this._keyAssistClass?""!==this._keyAssistClass&&d.classList.add(this._keyAssistClass):d.classList.add("key-assist-menuitem"),d=d.parentNode,a(0).appendChild(d));
if(d=n.getServiceReferences("orion.page.getstarted")[0])d=d.getProperty("data"),d=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,d)).parentNode,a(0).appendChild(d);var k=this;c.sort(function(a,b){return a-b}).forEach(function(a,b){if(b<c.length-1&&!this._noSeparator){var g=e.createSeparator();a.appendChild(g)}k._dropdownNode.appendChild(a)}.bind(this));if(this.isSingleService())for(var l in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(l)&&this._renderAuthenticatedService(l,
0)}.bind(this))},getStartedDialog:function(a){new c(null,!0,a)},setKeyAssist:function(a){this.keyAssistFunction=a;this.renderServices()},addUserItem:function(a,b,c,e){e?(this.unauthenticatedServices[a]&&delete this.unauthenticatedServices[a],this.authenticatedServices[a]={authService:b,label:c,data:e}):(this.authenticatedServices[a]&&delete this.authenticatedServices[a],this.unauthenticatedServices[a]=this.unauthenticatedServices[a]?{authService:b,label:c,pending:this.unauthenticatedServices[a].pending}:
{authService:b,label:c});this.renderServices()}};b.prototype.constructor=b;return{UserMenu:b}});
define("orion/crawler/nls/root/messages",{"Searching file:":"Searching file:","is not supported in this file system":"is not supported in this file system","${0} files found out of ${1}":"${0} files found out of ${1}","The search term on this location will not use indexed files.":"The search term on this location will not use indexed files.","It will take longer time. Do you want to proceed?":"It will take longer time. Do you want to proceed?","Search cancelled by user":"Search cancelled by user",
Cancel:"Cancel"});define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages","orion/crawler/nls/root/messages"],function(f,l){var h={root:l};Object.keys(f).forEach(function(d){"undefined"===typeof h[d]&&(h[d]=f[d])});return h});
define("orion/searchUtils","i18n!orion/nls/messages require orion/regex orion/commandRegistry orion/PageUtil orion/URITemplate".split(" "),function(f,l,h,d,c,k){function e(a,b,c){var e="";c&&(e="^");if(e=h.parse("/"+e+a.searchStr+"/"))c=e.pattern,e=e.flags,-1===e.indexOf("i")&&!b.caseSensitive&&(e+="i"),a.regExp={pattern:c,flags:e},a.wildCard=!0}var b={ALL_FILE_TYPE:"*.*",doSearch:function(a,c,e,d){a?(c=e,e=!0,"*"===c&&(c=""),""===c&&(e=d&&d.type!==b.ALL_FILE_TYPE),e&&(a=a.createSearchParams(c,!1,
!1,d),a=b.generateSearchHref(a),window.location=a)):window.alert(f["Can't search: no search service is available"])},generateSearchHelper:function(a,c){var d=a.keyword,f=d,h={};a.fileType&&(a.fileType!==b.ALL_FILE_TYPE&&""===d)&&(f="*."+a.fileType);if(a.regEx)h.searchStr=d,e(h,a,c);else{var k=-1<d.indexOf("*"),l=-1<d.indexOf("?");k&&(d=d.split("*").join(".*"));l&&(d=d.split("?").join("."));!k&&!l&&!a.nameSearch?(h.searchStr=a.caseSensitive?d.split("\\").join(""):d.split("\\").join("").toLowerCase(),
h.wildCard=!1):(h.searchStr=a.caseSensitive?d:d.toLowerCase(),e(h,a,c),h.wildCard=!0)}h.searchStrLength=h.searchStr.length;return{params:a,inFileQuery:h,displayedSearchTerm:f}},convertSearchParams:function(a){void 0!==a.rows&&(a.rows=parseInt(a.rows,10));void 0!==a.start&&(a.start=parseInt(a.start,10));"string"===typeof a.regEx&&(a.regEx="true"===a.regEx.toLowerCase());"string"===typeof a.caseSensitive&&(a.caseSensitive="true"===a.caseSensitive.toLowerCase());"string"===typeof a.nameSearch&&(a.nameSearch=
"true"===a.nameSearch.toLowerCase());void 0!==a.fileNamePatterns&&(a.fileNamePatterns=b.getFileNamePatternsArray(a.fileNamePatterns))},getFileNamePatternsArray:function(a){var b=void 0;a&&(a=a.trim(),a=a.replace(/^(\s*,\s*)+/g,""),a=a.replace(/([^\\]),(\s*,\s*)*/g,"$1/"),a=a.replace(/(\s*\/\s*)/g,"/"),a=a.replace(/\/\/+/g,"/"),a=a.replace(/\/+$/g,""),b=a.split("/"));return b},copySearchParams:function(a,b){var c={},e;for(e in a)if(void 0!==a[e]&&null!==a[e]&&(b||"replace"!==e))c[e]=a[e];return c},
generateSearchHref:function(a){var c=l.toUrl("search/search.html");a=b.copySearchParams(a,!0);var e=a.resource;a.resource=void 0;return"undefined"!==typeof a.keyword?(new k(c+"#{,resource,params*}")).expand({resource:e,params:a}):(new k(c+"#{,resource}")).expand({resource:e})},generateFindURLBinding:function(a,b,c,e,d){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:"string"===typeof e?e:void 0,atLine:"number"===typeof c?c:void 0};return d?a:","+
(new k("{,params*}")).expand({params:a})},convertFindURLBinding:function(a){"string"===typeof a.regEx&&(a.regEx="true"===a.regEx.toLowerCase());"string"===typeof a.caseSensitive&&(a.caseSensitive="true"===a.caseSensitive.toLowerCase());"string"===typeof a.atLine&&(a.atLine=parseInt(a.atLine,10))},replaceRegEx:function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)},replaceStringLiteral:function(a,c,e){c=h.parse("/"+c+"/gim");return b.replaceRegEx(a,c,e)},searchOnelineLiteral:function(a,b,c){var e;
e=0;for(var d=!1,f=[];!(e=b.indexOf(a.searchStr,e),0>e);){f.push({startIndex:e,length:a.searchStrLength});d=!0;if(c)break;e+=a.searchStrLength}return d?f:null},findRegExp:function(a,b,c,e){if(!b)return null;c=c||"";c+=(-1===c.indexOf("g")?"g":"")+(-1===c.indexOf("m")?"m":"");var d=null;return(d=RegExp(b,c).exec(a.substring(e)))&&{startIndex:d.index+e,length:d[0].length}},searchOnelineRegEx:function(a,c,e){for(var d=0,f=!1,h=[];;)if(d=b.findRegExp(c,a.regExp.pattern,a.regExp.flags,d)){h.push(d);f=
!0;if(e)break;d=d.startIndex+d.length}else break;return f?h:null},generateNewContents:function(a,c,e,d,f,h){if(d&&c){a||(e.contents=[]);for(var k=0;k<c.length;k++){for(var l=c[k],s=!1,v=!1,u=[],w,D=0,y=0;y<d.children.length;y++)if(d.children[y].lineNumber-1===k){D=y;for(s=0;s<d.children[y].matches.length;s++)!1!==d.children[y+s].checked&&u.push(s);v=0<u.length;w=d.children[y].matches;s=!0;break}if(s){if(v){u=b.replaceCheckedMatches(l,f,w,u,h);l=u.replacedStr;for(s=0;s<d.children[D].matches.length;s++)d.children[D+
s].newMatches=u.newMatches}else for(s=0;s<d.children[D].matches.length;s++)d.children[D+s].newMatches=d.children[D+s].matches;a?e.contents[k]=l:e.contents.push(l)}else a||e.contents.push(l)}}},generateMatchContext:function(a,b,c){var e=[],d=2*a+1,f;b.length<=d?(f=0,a=b.length-1):(f=c-a,0>f?(f=0,a=f+d-1):(a=c+a,a>b.length-1&&(a=b.length-1,f=a-d+1)));for(d=f;d<=a;d++)e.push({context:b[d],current:d===c});return e},splitFile:function(a){for(var b=0,c=0,e=0,d=0,f=[];;){-1!==b&&b<=e&&(b=a.indexOf("\r",
e));-1!==c&&c<=e&&(c=a.indexOf("\n",e));if(-1===c&&-1===b){f.push(a.substring(d));break}var h=1;-1!==b&&-1!==c?b+1===c?(h=2,e=c+1):e=(b<c?b:c)+1:e=-1!==b?b+1:c+1;f.push(a.substring(d,e-h));d=e}return f},searchWithinFile:function(a,c,e,d,f,h){e=b.splitFile(e);f&&(c.contents=e);if(c){c.children=[];for(var k=d=0;k<e.length;k++){var l=e[k];if(l&&0<l.length){var s=h?l:l.toLowerCase();if(s=a.wildCard?b.searchOnelineRegEx(a,s):b.searchOnelineLiteral(a,s)){var v,u=k+1;if(f)for(var w=0;w<s.length;w++)v=w+
1,v={parent:c,checked:c.checked,type:"detail",matches:s,lineNumber:u,matchNumber:v,name:l,location:c.location+"-"+u+"-"+v},c.children.push(v);else v={parent:c,context:b.generateMatchContext(2,e,k),checked:c.checked,type:"detail",matches:s,lineNumber:u,name:l,location:c.location+"-"+u},c.children.push(v);d+=s.length}}}c.totalMatches=d}},replaceCheckedMatches:function(a,b,c,e,d){for(var f=0,h="",k=[],l=0;l<c.length;l++){f!==c[l].startIndex&&(h+=a.substring(f,c[l].startIndex));c[l].length&&(d=c[l].length);
for(var f=!1,v=0;v<e.length;v++)if(e[v]===l){f=!0;break}f?(k.push({startIndex:h.length,length:b.length}),h+=b):(k.push({startIndex:h.length,length:d}),h+=a.substring(c[l].startIndex,c[l].startIndex+d));f=c[l].startIndex+d}f<a.length&&(h+=a.substring(f));return{replacedStr:h,newMatches:k}},fullPathNameByMeta:function(a){var b=a.length,c="";if(0<b)for(b-=1;-1<b;b--)c=c+(""===c?"":"/")+a[b].Name;return c},path2FolderName:function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))},getOpenSearchPref:function(a,
b){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");b(a&&"undefined"!==a["links.newtab"]?a["links.newtab"]?!0:!1:!1)})},setOpenSearchPref:function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})}};return b});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages require orion/i18nUtil orion/searchUtils orion/contentTypes orion/Deferred".split(" "),function(f,l,h,d,c,k){function e(b,a,c,e){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=e&&e.searchOnName;this._buildSkeletonOnly=e&&e.buildSkeletonOnly;this._fetchChildrenCallBack=e&&e.fetchChildrenCallBack;this._searchParams=c;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:d.generateSearchHelper(c);this._location=e&&e.location;this._childrenLocation=e&&e.childrenLocation?e.childrenLocation:this._location;this._reportOnCancel=e&&e.reportOnCancel;this._cancelled=!1;this._statusService=this.registry.getService("orion.page.message");this._progressService=this.registry.getService("orion.page.progress");this._statusService&&this._statusService.setCancelFunction(function(){this._cancelFileContentsSearch()}.bind(this))}e.prototype.search=function(b){var a=
this.registry.getService("orion.core.contentTypeRegistry");this._onSearchComplete=b;this._cancelled=!1;this._deferredArray=[];a.getContentTypes().then(function(a){this.contentTypesCache=a;var b=this;this._visitRecursively(this._childrenLocation).then(function(){(!b._cancelled||b._reportOnCancel)&&b._reportResult();b._cancelled&&b._HandleStatus({name:"Cancel"})}.bind(b),function(a){b._reportResult();b._HandleStatus(a)}.bind(b))}.bind(this))};e.prototype.searchName=function(b,a){b&&(this._searchParams=
b,this.searchHelper=d.generateSearchHelper(b,!0));a&&(this.onSearchNameComplete=a);var c=[];this._cancelled=!1;this._deferredArray=[];this._sort(this.fileSkeleton);if(0<this.fileSkeleton.length){for(var e=0;e<this.fileSkeleton.length;e++){var f=this.fileSkeleton[e].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(c.push(this.fileSkeleton[e]),c.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:c.length,
docs:c}})}else this.onSearchNameComplete({response:{numFound:0,docs:[]}})};e.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=[];var e=this;b();c.getContentTypes().then(function(b){e.contentTypesCache=b;e._visitRecursively(e._childrenLocation).then(function(){e._buildingSkeleton=!1;a();e.searchHelper&&!e._buildSkeletonOnly&&e.searchName()})})};e.prototype._sort=function(b){b.sort(function(a,
b){var c,e;if("Path asc"===this._searchParams.sort){c=a.Location&&a.Location.toLowerCase();c=d.path2FolderName(c,a.Name&&a.Name.toLowerCase(),!0);e=b.Location&&b.Location.toLowerCase();e=d.path2FolderName(e,b.Name&&b.Name.toLowerCase(),!0);if(c<e)return-1;if(c>e)return 1}return this._sortOnNameSingle(a,b)}.bind(this))};e.prototype._HandleStatus=function(b){this._statusService&&"Cancel"===b.name&&(console.log("Crawling search cancelled. Deferred array length : "+this._deferredArray.length),this._statusService.setProgressResult({Message:f["Search cancelled by user"],
Severity:"Warning"}))};e.prototype._reportResult=function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}})};e.prototype._sortOnNameSingle=function(b,a){var c=b.Name&&b.Name.toLowerCase(),e=a.Name&&a.Name.toLowerCase();return c<e?-1:c>e?1:0};e.prototype._fileNameMatches=function(b){var a=!0;this.searchHelper.params.fileNamePatterns&&(a=this.searchHelper.params.fileNamePatterns.some(function(a){a="^"+a.replace(/([*?])/g,
".$1")+"$";return b.match(a)}));return a};e.prototype._visitRecursively=function(b){var a=[],g=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);return(g._progressService?this._progressService.progress(g.fileClient.fetchChildren(b),"Crawling search for children of "+b):g.fileClient.fetchChildren(b)).then(function(b){for(var e=0;e<b.length;e++)if(void 0!==b[e].Directory&&!1===b[e].Directory)if(g._searchOnName)a.push(g._buildSingleSkeleton(b[e]));else if(g._buildSkeletonOnly)a.push(g._buildSingleSkeleton(b[e]));
else{if(!g._cancelled){var d=c.getFilenameContentType(b[e].Name,g.contentTypesCache);if(d&&("text/plain"===d["extends"]||"text/plain"===d.id)&&g._fileNameMatches(b[e].Name))d=g._sniffSearch(b[e]),a.push(d),g._deferredArray.push(d)}}else if(b[e].Location)if(g._cancelled)break;else d=g._visitRecursively(b[e].ChildrenLocation),a.push(d),g._deferredArray.push(d);return k.all(a)})};e.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?
d.searchOnelineRegEx(this.searchHelper.inFileQuery,b,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,b,!0)};e.prototype._reportSingleHit=function(b){this._cancelled||(b.LastModified=b.LocalTimeStamp,this.fileLocations.push(b),this._hitCounter++,this._sort(this.fileLocations),this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0))};e.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(b){b.cancel()})};
e.prototype._sniffSearch=function(b){this._totalCounter++;var a=this;if(!this._cancelled)if(""===this.searchHelper.params.keyword)this._reportSingleHit(b),this._statusService&&this._statusService.setProgressResult({Message:h.formatMessage(f["${0} files found out of ${1}"],this._hitCounter,this._totalCounter)});else return(a._progressService?a._progressService.progress(a.fileClient.read(b.Location),"Reading file "+b.Location):a.fileClient.read(b.Location)).then(function(c){a._hitOnceWithinFile(c)&&
a._reportSingleHit(b);a._statusService&&a._statusService.setProgressResult({Message:h.formatMessage(f["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)},f.Cancel)},function(a){a&&(a.message&&"cancel"!==a.message.toLowerCase())&&console.error("Error loading file content: "+a.message)})};e.prototype._buildSingleSkeleton=function(b){this._totalCounter++;this.fileSkeleton.push(b);this.searchHelper&&(!this._buildSkeletonOnly&&0===this._totalCounter%100)&&this.searchName();b=new k;b.resolve(this._totalCounter);
return b};e.prototype.constructor=e;return{SearchCrawler:e}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages orion/crawler/searchCrawler orion/contentTypes require orion/webui/littlelib orion/util orion/webui/dialog".split(" "),function(f,l,h,d,c,k,e){function b(a){this._init(a)}b.prototype=new e.Dialog;b.prototype.TEMPLATE='\x3cdiv role\x3d"search"\x3e\x3cdiv\x3e\x3clabel id\x3d"fileNameMessage" for\x3d"fileName"\x3e${Type the name of a file to open (? \x3d any character, * \x3d any string):}\x3c/label\x3e\x3c/div\x3e\x3cdiv\x3e\x3cinput id\x3d"fileName" type\x3d"text" class\x3d"setting-control" style\x3d"width:90%;"/\x3e\x3c/div\x3e\x3cdiv id\x3d"progress" style\x3d"padding: 2px 0 0; width: 100%;"\x3e\x3cimg src\x3d"'+d.toUrl("../../../images/progress_running.gif")+
'" class\x3d"progressPane_running_dialog" id\x3d"crawlingProgress"\x3e\x3c/img\x3e\x3c/div\x3e\x3cdiv id\x3d"results" style\x3d"max-height:250px; height:auto; overflow-y:auto;" aria-live\x3d"off"\x3e\x3c/div\x3e\x3cdiv id\x3d"statusbar"\x3e\x3c/div\x3e\x3c/div\x3e';b.prototype._init=function(a){this.title=a.title||f["Find File Named"];this.modal=!0;this.messages=f;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=new h.ContentTypeRegistry(this._searcher.registry);
if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=a.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=a.initialText;this._message=a.message;this._nameSearch=!0;void 0!==a.nameSearch&&(this._nameSearch=a.nameSearch);this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(f["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||
"function"!==typeof this._searchRenderer.makeRenderFunction)throw Error(f["Missing required argument: searchRenderer"]);this._initialize()};b.prototype._bindToDom=function(a){var b=this;b.$crawlingProgress.style.display="none";this._nameSearch?this.$fileName.setAttribute("placeholder",f["FileName FolderName"]):this.$fileName.setAttribute("placeholder",f.Search);this.$fileName.addEventListener("input",function(a){b._time=+new Date;b._timeoutId&&clearTimeout(b._timeoutId);b._timeoutId=setTimeout(b.checkSearch.bind(b),
0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===c.KEY.ENTER){var e=c.$("a",b.$results);e&&(c.stop(a),(k.isMac?a.metaKey:a.ctrlKey)?window.open(e.href):(window.location.href=e.href,b.hide()))}},!1);a.addEventListener("keydown",function(a){var e,d,f;if(a.keyCode===c.KEY.DOWN||a.keyCode===c.KEY.UP)e=c.$$array("a",b.$results),d=document.activeElement,f=e.indexOf(d),a.keyCode===c.KEY.DOWN?0<=f?(d.classList.remove("treeIterationCursor"),e=f<e.length-1?e[f+1]:e[0],e.focus(),
e.classList.add("treeIterationCursor")):0<e.length&&(e=e[0],e.focus(),e.classList.add("treeIterationCursor")):0<=f?(d.classList.remove("treeIterationCursor"),d=b.$fileName,e=0<f?e[f-1]:d,e.focus(),0<f&&e.classList.add("treeIterationCursor")):0<e.length&&(e[e.length-1].focus(),e[e.length-1].classList.add("treeIterationCursor")),c.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);setTimeout(function(){if(b._forceUseCrawler||!b._fileService.getService(b._searcher.getSearchLocation()).search){var a=
b._searchOnRoot?b._searcher.getSearchRootLocation():b._searcher.getChildrenLocation(),a=new l.SearchCrawler(b._searcher.registry,b._fileService,"",{searchOnName:!0,location:a});b._searcher.setCrawler(a);a.buildSkeleton(function(){b.$crawlingProgress.style.display="inline";b.$progress.appendChild(document.createTextNode(f["Building file skeleton..."]))},function(){b.$crawlingProgress.style.display="none";b.$progress.removeChild(b.$progress.lastChild)})}},0);this._message&&(this.$fileNameMessage.removeChild(this.$fileNameMessage.firstChild),
this.$fileNameMessage.appendChild(document.createTextNode(this._message)));this._initialText&&(this.$fileName.value=this._initialText,this.doSearch())};b.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var a=(new Date).getTime();a-this._time>this._searchDelay?(this._time=a,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};b.prototype._detectFolderKeyword=function(a){var b,c=a,e=null;if(this._nameSearch&&(b=/(\S+)\s*(.*)/,(a=b.exec(a))&&3===a.length))a[1]&&
(c=a[1]),a[2]&&(e=a[2]);return{keyword:c,folderKeyword:e}};b.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var b=this._detectFolderKeyword(a),e=this._searcher.createSearchParams(b.keyword,this._nameSearch,this._searchOnRoot),d=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));this.currentSearch=d;var h=document.createElement("div");h.appendChild(document.createTextNode(this._nameSearch?f["Searching..."]:k.formatMessage(f["Searching for occurrences of"],
a)));c.empty(this.$results);this.$results.appendChild(h);this._searcher.search(e,b.folderKeyword,function(){d===this.currentSearch&&d.apply(null,arguments)}.bind(this))}};b.prototype.decorateResult=function(a){function b(a){0===a.button&&(!a.ctrlKey&&!a.metaKey)&&e.hide()}var e=this;a=c.$$array("a",a);for(var d=0;d<a.length;d++)a[d].addEventListener("click",b,!1)};b.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};b.prototype._afterHiding=function(){this._onHide&&this._onHide()};
b.prototype.constructor=b;return{OpenResourceDialog:b}});define("text!orion/banner/banner.html",[],function(){return'\x3cheader id\x3d"banner" role\x3d"banner"\x3e\n\t\x3c!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\x3e\n\n\t\x3cdiv id\x3d"staticBanner" class\x3d"layoutBlock topRowBanner"\x3e \x3c!-- primaryNav --\x3e\n\t\t\x3cdiv id\x3d"centralNavigationArea" style\x3d"position:absolute;left:0;top:0;width:39px;height:36px; z-index:1;border-right:1px solid #ddd;"\x3e\x3c/div\x3e\n\n\t\t\x3c!-- Static "Home" link. TODO delete this --\x3e\n\t\t\x3ca id\x3d"home" class\x3d"layoutLeft "\x3e\x3c/a\x3e\n\n\t\t\x3c!-- Left banner component: hamburger --\x3e\n\t\t\x3cnav id\x3d"primaryNav" class\x3d"bannerLeftArea" style\x3d"z-index:2;" role\x3d"navigation"\x3e\n\t\t\t\t\x3cbutton class\x3d"centralNavigation commandSprite core-sprite-hamburger" type\x3d"button"id\x3d"centralNavigation"\x3e\x3c/button\x3e\n\t\t\x3c/nav\x3e\n\n\t\t\x3c!-- Middle banner component: Breadcrumb bar --\x3e\n\t\t\x3cdiv class\x3d"clear navigationBreadcrumb bannerMiddleArea" \x3e\n\t\t\t\x3cdiv id\x3d"location" class\x3d"currentLocation"\x3e\x3c/div\x3e\n\t\t\x3c/div\x3e\n\n\t\t\x3c!-- Right banner component: user identity --\x3e\n\t\t\x3cdiv class\x3d"bannerRightArea" style\x3d"z-index:2;"\x3e\n\t\t\t\x3c!-- Global commands support. --\x3e\n\t\t\t\x3cdiv id\x3d"globalActions" class\x3d"spacingLeft layoutLeft"\x3e\x3c/div\x3e\n\n\t\t\t\x3c!-- Search. TODO delete this --\x3e\n\t\t\t\x3cinput type\x3d"text" id\x3d"search" autocomplete\x3d"off" class\x3d"layoutLeft spacingLeft searchbox" role\x3d"search" style\x3d"display:none;"\x3e\n\t\t\t\x3cdiv id\x3d"searchOptions" class\x3d"layoutLeft" style\x3d"padding-top:1px;display:none;"\x3e\x3c/div\x3e\n\n\t\t\t\x3c!-- User identity menu and Progress --\x3e\n\t\t\t\x3cdiv id\x3d"userMenu" class\x3d"spacingRight layoutRight" style\x3d"color:#ccc;line-height:16px;"\x3e\n\t\t\t\t\x3cdiv id\x3d"progressPane" class\x3d"progressWatch" tabindex\x3d"0" role\x3d"progressbar"\x3e\n\t\t\t\t\t\x3cdiv id\x3d"watchButton" class\x3d"watchButton"\x3e\x3c/div\x3e\n\t\t\t\t\t\x3cdiv id\x3d"watchBody" class\x3d"watchBody"\x3e\n\t\t\t\t\t\t\x3cspan class\x3d"hand longMinute"\x3e\n\t\t\t\t\t\t\t\x3cspan class\x3d"darkSide"\x3e\x3c/span\x3e\n\t\t\t\t\t\t\x3c/span\x3e\n\t\t\t\t\t\t\x3cspan class\x3d"hand longHour"\x3e\n\t\t\t\t\t\t\t\x3cspan class\x3d"darkSide"\x3e\x3c/span\x3e\n\t\t\t\t\t\t\x3c/span\x3e\n\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t\t\n\t\t\t\t\x3cdiv style\x3d"position: absolute;right: 0px;top:0;width: 39px;height:36px; z-index:-50;border-left: 1px solid #ddd;"\x3e\x3c/div\x3e\n\t\t\t\t\x3cspan id\x3d"userTrigger" tabindex\x3d"0" role\x3d"button" class\x3d"dropdownTrigger" style\x3d"z-index:2;"\x3e\n\t\t\t\t\x3c/span\x3e\n\t\t\t\t\x3cul id\x3d"userDropdown" class\x3d"dropdownMenu" role\x3d"menu"\x3e\x3c/ul\x3e\n\t\t\t\x3c/div\x3e\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\n\t\x3c!-- IDE notification messages go in here --\x3e\n\t\x3cdiv id\x3d"notificationArea" class\x3d"notificationHide"\x3e\n\t\t\x3cdiv class\x3d"layoutLeft" id\x3d"notifications" aria-live\x3d"assertive" aria-atomic\x3d"true"\x3e\x3c/div\x3e\n\t\t\x3cdiv class\x3d"layoutRight"\x3e\x3cbutton aria-label\x3d"Close" class\x3d"dismissButton layoutRight core-sprite-close imageSprite" type\x3d"button" id\x3d"closeNotifications"\x3e\x3c/span\x3e\x3c/div\x3e\n\t\x3c/div\x3e\n\x3c/header\x3e'});
define("text!orion/banner/footer.html",[],function(){return'\x3c!--\n\x3cfooter id\x3d"footerContent" class\x3d"layoutBlock footerLayout" role\x3d"contentinfo"\x3e\n\t\x3cdiv class\x3d"logoFooter commandSprite core-sprite-orion-logo"\x3e\x3c/div\x3e\n\t\x3cdiv class\x3d"footerBlock"\x3e${Orion is in Beta. Please try it out but BEWARE your data may be lost.}\x3c/div\x3e\n\t\x3cdiv class\x3d"footerRightBlock"\x3e\n\t\t\x3cul\x3e\n\t\t\t\x3cli\x3e\x3ca href\x3d"https://bugs.eclipse.org/bugs/enter_bug.cgi?product\x3dOrion\x26version\x3d5.0" target\x3d"_blank"\x3e${Report a Bug}\x3c/a\x3e\n\t\t\t\x3cli\x3e\x3ca href\x3d"http://www.eclipse.org/legal/privacy.php" target\x3d"_blank"\x3e${Privacy Policy}\x3c/a\x3e\x3c/li\x3e\n\t\t\t\x3cli\x3e\x3ca href\x3d"http://www.eclipse.org/legal/termsofuse.php" target\x3d"_blank"\x3e${Terms of Use}\x3c/a\x3e\x3c/li\x3e\n\t\t\t\x3cli\x3e\x3ca href\x3d"http://www.eclipse.org/legal/copyright.php" target\x3d"_blank"\x3e${Copyright Agent}\x3c/a\x3e\x3c/li\x3e\n\t\t\x3c/ul\x3e\n\t\x3c/div\x3e\n\x3c/footer\x3e\n--\x3e'});
define("text!orion/banner/toolbar.html",[],function(){return'\x3cul class\x3d"layoutLeft commandList pageActions" id\x3d"pageActions"\x3e\x3c/ul\x3e\n\x3cul class\x3d"layoutLeft commandList pageActions" id\x3d"selectionTools"\x3e\x3c/ul\x3e\n\x3cul class\x3d"layoutLeft commandList pageActions" id\x3d"navActions"\x3e\x3c/ul\x3e\n\x3cdiv class\x3d"layoutLeft" style\x3d"padding-left:7px;padding-right:7px;margin-top:2px;" id\x3d"filterBox" style\x3d"visibility: hidden;"\x3e\x3c/div\x3e\n\x3cul class\x3d"layoutRight commandList pageActions" id\x3d"settingsActions"\x3e\x3c/ul\x3e\n\x3cdiv class\x3d"layoutRight status" id\x3d"statusPane" role\x3d"status" aria-live\x3d"off"\x3e\x3c/div\x3e\n\x3cul class\x3d"layoutRight commandList pageActions" id\x3d"pageNavigationActions"\x3e\x3c/ul\x3e'});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(f,l){function h(d,c,f){if(d=l.node(d))this._parent=d;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;d=document.createElement("div");d.classList.add("dropdownMenu");d.classList.add("dropdownMenuOpen");d.id=this.navDropDownId;d.style.display="none";this._parent.appendChild(d);this._dropdownMenu=
d;if(c=l.node(c))this._triggerNode=c;else throw"Trigger node of dropdown menu not found";"hidden"===this._triggerNode.style.visibility&&(this._triggerNode.style.visibility="visible");f.noClick||(this._triggerNode.onclick=this.click.bind(this));this._dropdownMenu.addEventListener("keydown",function(c){c.keyCode===l.KEY.ESCAPE&&this.clearPanel()}.bind(this))}f.mixin(h.prototype,{click:function(){"none"===this._dropdownMenu.style.display?this.updateContent(this.getContentNode(),function(){l.setFramesEnabled(!1);
this._dropdownMenu.style.display="";this._positionDropdown();this.selectionClass&&this._triggerNode.classList.add(this.selectionClass);this.handle=l.addAutoDismiss([this._triggerNode,this._dropdownMenu],this.clearPanel.bind(this));if(this.options.onShow)this.options.onShow()}.bind(this)):this.clearPanel()},clearPanel:function(){if(this.isVisible()&&(this._dropdownMenu.style.display="none",l.setFramesEnabled(!0),this.selectionClass&&this._triggerNode.classList.remove(this.selectionClass),this.options.onHide))this.options.onHide()},
addContent:function(d){this._dropdownMenu.innerHTML=d},getContentNode:function(){return this._dropdownMenu},updateContent:function(d,c){c()},_positionDropdown:function(){this._dropdownMenu.style.right="";var d=l.bounds(this._dropdownMenu),c=l.bounds(document.body);d.left+d.width>c.left+c.width&&(d=l.bounds(this._boundingNode(this._triggerNode)),c=l.bounds(this._triggerNode),this._dropdownMenu.style.right=d.width-(c.left-d.left+c.width)+"px")},_boundingNode:function(d){var c=window.getComputedStyle(d,
null);return null===c||"absolute"===c.getPropertyValue("position")||!d.parentNode||d===document.body?d:this._boundingNode(d.parentNode)},isDestroyed:function(){return!this._dropdownMenu.parentNode},isVisible:function(){return"none"!==this._dropdownMenu.style.display&&!this.isDestroyed()},focus:function(){this._dropdownMenu.focus()},destroy:function(){this._parent&&(l.setFramesEnabled(!0),l.empty(this._parent),this._parent=this.select=null)}});return h});define("orion/customGlobalCommands",[],function(){return{}});
define("orion/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize strings from JavaScript files in this folder.",
"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Export as zip":"Zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"Folder","Folder name:":"Folder name:","Create a new folder":"Create a new folder",
"Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file",
"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.",
"Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.","Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Go Into":"Go Into","Move into the selected folder":"Move into the selected folder",
"File or zip archive":"File or zip archive","Import a file or zip archive from your local file system":"Import a file or zip archive from your local file system","SFTP from...":"SFTP","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location",Exporting:"Exporting to ${0}",
"Pasting ${0}":"Pasting ${0}","Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location",Cut:"Cut",Copy:"Copy","Fetching children of ":"Fetching children of ",Paste:"Paste","Cannot paste into the Workspace root":"Cannot paste into the Workspace root",
"Open With":"Open With","Loading ":"Loading ",New:"New",File:"File",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system","Create new content":"Create new content","Import from HTTP...":"HTTP","File URL:":"File URL:","Import a file from a URL and optionally unzip it":"Import a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.",
"You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.","Unzip ${0}?":"Unzip ${0}?","Upload progress: ":"Upload progress: ","Uploading ":"Uploading ","Cancel upload":"Cancel upload","Uploading the following file failed: ":"Uploading the following file failed: ","Enter project name:":"Enter project name:","Creating project ":"Creating project ",NoFile:"Use the ${0} menu to create new files and folders. Click a file to start coding.",
Download:"Download",Download_tooltips:"Download the file contents as the displayed name","Downloading...":"Reading file contents...","Download not supported":"Contents download is not supported in this browser."});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(f,l){var h={root:l};Object.keys(f).forEach(function(d){"undefined"===typeof h[d]&&(h[d]=f[d])});return h});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(f,l,h){function d(c,b,a){if(!c[b])throw b+f[" is not supported in this file system"];return c[b].apply(c,a)}function c(e,b,a,g){if(!e.readBlob)throw f["source file service does not support binary read"];if(!a.writeBlob)throw f["target file service does not support binary write"];if("/"!==b[b.length-1])return d(e,"readBlob",[b]).then(function(b){return d(a,"writeBlob",[g,b])});var m=g.substring(0,
g.length-1),n=decodeURIComponent(m.substring(m.lastIndexOf("/")+1)),m=m.substring(0,m.lastIndexOf("/")+1);return d(a,"createFolder",[m,n]).then(function(){},function(){}).then(function(){return d(e,"fetchChildren",[b]).then(function(b){for(var d=[],f=0;f<b.length;++f){var m=b[f].Location,n=m;b[f].Directory&&(n=m.substring(0,m.length-1));n=decodeURIComponent(n.substring(n.lastIndexOf("/")+1));n=g+encodeURIComponent(n);b[f].Directory&&(n+="/");d[f]=c(e,m,a,n)}return l.all(d)})})}function k(c,b){function a(a){var b=
new l;b.reject(f["No Matching FileService for location:"]+a);return b}var g=c.getServiceReferences("orion.core.file"),d=g;if(b)for(var d=[],n=0;n<g.length;++n)b(g[n])&&d.push(g[n]);for(var k=[],t=[],q=[],p=[],s={fetchChildren:function(){var a=new l;a.resolve(p);return a},createWorkspace:function(){var a=new l;a.reject(f["no file service"]);return a},loadWorkspaces:function(){var a=new l;a.reject(f["no file service"]);return a},loadWorkspace:function(a){var b=new l;window.setTimeout(function(){b.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:f["File Servers"],Location:"/",Children:p,ChildrenLocation:"/"})},100);return b},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},g=0;g<d.length;++g)p[g]={Directory:!0,Length:0,LocalTimeStamp:0,Location:d[g].getProperty("top"),ChildrenLocation:d[g].getProperty("top"),Name:d[g].getProperty("Name")},n=d[g].getProperty("pattern")||d[g].getProperty("top").replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"^"!==n[0]&&(n=
"^"+n),k[g]=RegExp(n),t[g]=c.getService(d[g]),q[g]=d[g].getProperty("Name"),d[g].getProperty("NameKey")&&d[g].getProperty("nls")&&h.getMessageBundle(d[g].getProperty("nls")).then(function(a,b){p[a].Name=b[d[a].getProperty("NameKey")];q[a]=b[d[a].getProperty("NameKey")]}.bind(this,g));this._getServiceIndex=function(a){if("/"===a)return-1;if(!a||a.length&&0===a.length)return t[0]?0:-1;for(var b=0;b<k.length;++b)if(k[b].test(a))return b;throw f["No Matching FileService for location:"]+a;};this._getService=
function(a){a=this._getServiceIndex(a);return-1===a?s:t[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return-1===a?s.Name:q[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return-1===a?s.Location:p[a].Location}}k.prototype={getService:function(c){return this._getService(c)},fileServiceName:function(c){return this._getServiceName(c)},fileServiceRootURL:function(c){return this._getServiceRootURL(c)},fetchChildren:function(c){return d(this._getService(c),"fetchChildren",
arguments)},createWorkspace:function(c){return d(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return d(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(c){return d(this._getService(c),"loadWorkspace",arguments)},createProject:function(c,b,a,g){return d(this._getService(c),"createProject",arguments)},createFolder:function(c,b){return d(this._getService(c),"createFolder",arguments)},createFile:function(c,b){return d(this._getService(c),"createFile",
arguments)},deleteFile:function(c){return d(this._getService(c),"deleteFile",arguments)},moveFile:function(e,b,a){var g=this._getService(e),f=this._getService(b);if(g===f)return d(g,"moveFile",arguments);var n="/"===e[e.length-1],h=b;"/"!==h[h.length-1]&&(h+="/");if(a)h+=encodeURIComponent(a);else{var k=e;n&&(k=k.substring(0,k.length-1));h+=k.substring(k.lastIndexOf("/")+1)}n&&"/"!==h[h.length-1]&&(h+="/");return c(g,e,f,h).then(function(){return d(g,"deleteFile",[e])})},copyFile:function(e,b,a){var g=
this._getService(e),f=this._getService(b);if(g===f)return d(g,"copyFile",arguments);var n="/"===e[e.length-1],h=b;"/"!==h[h.length-1]&&(h+="/");if(a)h+=encodeURIComponent(a);else{var k=e;n&&(k=k.substring(0,k.length-1));h+=k.substring(k.lastIndexOf("/")+1)}n&&"/"!==h[h.length-1]&&(h+="/");return c(g,e,f,h)},read:function(c,b){return d(this._getService(c),"read",arguments)},readBlob:function(c){return d(this._getService(c),"readBlob",arguments)},write:function(c,b,a){return d(this._getService(c),"write",
arguments)},remoteImport:function(c,b){return d(this._getService(c),"remoteImport",arguments)},remoteExport:function(c,b){return d(this._getService(c),"remoteExport",arguments)},search:function(c){return d(this._getService(c.resource),"search",arguments)}};k.prototype.constructor=k;return{FileClient:k}});
define("orion/webui/SideMenu",["orion/webui/littlelib","orion/PageUtil","orion/URL-shim"],function(f,l){function h(h,e){this._parentNode=f.node(h);if(!this._parentNode)throw Error("Missing parentNode");this._contentNode=f.node(e);this._categoryInfos=[];this._categorizedPageLinks={};this._categorizedRelatedLinks={};this._categorizedAnchors=null;this._state=localStorage.getItem(d)||c;this._currentCategory="";this._renderTimeout=this._notificationTimeout=null}var d="sideMenuNavigation",c="open";h.prototype=
{constructor:h.prototype.constructor,setCategories:function(c){this._categoryInfos=c.getCategoryIDs().map(function(e){return c.getCategory(e)}).sort(function(c,b){var a=c.order||100,g=b.order||100;return a<g?-1:g<a?1:c.textContent.localeCompare(b.textContent)})},setPageLinks:function(c){this._categorizedPageLinks={};c.getAllLinks().forEach(function(c){var b=c.category;this._categorizedPageLinks[b]=this._categorizedPageLinks[b]||[];this._categorizedPageLinks[b].push({title:c.textContent,order:c.order||
100,href:c.href})},this)},setRelatedLinks:function(c,e){this._categorizedRelatedLinks={};c.forEach(function(b){var a=b.relatedLink,c=b.command;b=b.invocation;if(!e||-1===e.indexOf(a.id)){var d=a.category;this._categorizedRelatedLinks[d]=this._categorizedRelatedLinks[d]||[];this._categorizedRelatedLinks[d].push({title:c.name,order:a.order||100,href:c.hrefCallback.call(b.handler,b)})}},this);this._updateCategoryAnchors();this._updateCategoryNotifications()},render:function(){if(null===this._categorizedAnchors){this._categorizedAnchors=
{};var c=new URL(window.location.href);this._currentCategory=c.hash="";Object.keys(this._categorizedPageLinks).some(function(b){if(this._categorizedPageLinks[b].some(function(a){var b=new URL(a.href);a.hash="";return c.href===b.href}))return this._currentCategory=b,!0},this);var e=document.createElement("ul");e.classList.add("sideMenuList");this._categoryInfos.forEach(function(b){var a=document.createElement("li");a.classList.add("sideMenuItem");a.classList.add("sideMenu-notification");this._currentCategory===
b.id&&a.classList.add("sideMenuItemActive");a.categoryId=b.id;a.categoryName=b.textContent||b.id;var c=document.createElement("a");c.classList.add("submenu-trigger");if("string"===typeof b.imageDataURI&&0===b.imageDataURI.indexOf("data:image")){var d=document.createElement("img");d.width="16";d.height="16";d.src=b.imageDataURI;c.appendChild(d)}else c.classList.add(b.imageClass||"core-sprite-blank-menu-item");a.appendChild(c);e.appendChild(a);this._categorizedAnchors[b.id]=c},this);this._updateCategoryAnchors();
this._show=function(){this._parentNode.appendChild(e);this._show=h.prototype._show};window.setTimeout(function(){this._show()}.bind(this),1E3)}"closed"===this._state?(this._contentNode.style.left="0",this._renderTimeout&&(window.clearTimeout(this._renderTimeout),this._renderTimeout=null),this._renderTimeout=window.setTimeout(function(){this._parentNode.style.display="none";this._renderTimeout=null}.bind(this),301),this._parentNode.classList.add("animating")):(this._renderTimeout&&(window.clearTimeout(this._renderTimeout),
this._renderTimeout=null),this._parentNode.classList.remove("animating"),this._parentNode.style.display="block",this._parentNode.style.width="40px",this._contentNode.style.left="40px")},hide:function(){localStorage.setItem(d,"closed");this._contentNode.style.left="0"},toggle:function(){var f=this._contentNode;f&&f.classList.add("content-fixedHeight-animation");this._state="open"===this._state?"closed":"open";this._state===c?localStorage.removeItem(d):localStorage.setItem(d,this._state);this.render()},
_updateCategoryAnchors:function(){var c=[];Object.keys(this._categorizedRelatedLinks).forEach(function(e){("git"===e||e.match(/-scm$/))&&c.push(e)});Object.keys(this._categorizedAnchors).forEach(function(e){var b=this._categorizedAnchors[e],a=[];e===this._currentCategory?(b.parentElement.style.display="",b.href="",b.onclick=function(){return!1},b.title=b.parentElement.categoryName):(this._categorizedPageLinks[e]&&a.push.apply(a,this._categorizedPageLinks[e]),this._categorizedRelatedLinks[e]&&a.push.apply(a,
this._categorizedRelatedLinks[e]),0===a.length||0!==c.length&&("git"===e||e.match(/-scm$/))&&-1===c.indexOf(e)?(b.href="",b.title=b.parentElement.categoryName,b.parentElement.style.display="none"):(b.parentElement.style.display="",a.sort(function(a,b){return a.order<b.order?-1:b.order<a.order?1:a.title.localeCompare(b.title)}),e=a.shift(),b.href=e.href,b.title=e.title))},this);this._show()},_updateCategoryNotifications:function(){clearTimeout(this._notificationTimeout);this._notificationTimeout=setTimeout(this._updateCategoryNotifications.bind(this),
3E5);var c=l.matchResourceParameters().resource,e=(new URL(c,window.location.href)).href;this._categoryInfos.forEach(function(b){if(b.service&&b.service.getNotifications){var a=this._categorizedAnchors[b.id].parentElement;b.service.getNotifications(e).then(function(b){if(c===l.matchResourceParameters().resource){var e="";b.forEach(function(a){"info"===a.level&&!e?e="info":"warn"===a.level&&(!e||"info"===e)?e="warn":"error"===a.level&&"error"!==e&&(e="error")});e?a.setAttribute("level",e):a.removeAttribute("level")}},
function(a){window.console.log(a)})}},this)},_show:function(){}};return h});
define("orion/globalCommands","i18n!orion/nls/messages require orion/commonHTMLFragments orion/keyBinding orion/EventTarget orion/commandRegistry orion/commands orion/parameterCollectors orion/extensionCommands orion/uiUtils orion/keyBinding orion/breadcrumbs orion/webui/littlelib orion/webui/splitter orion/webui/dropdown orion/webui/tooltip orion/contentTypes orion/URITemplate orion/keyAssist orion/PageUtil orion/widgets/themes/ThemePreferences orion/widgets/themes/container/ThemeData orion/Deferred orion/widgets/UserMenu orion/PageLinks orion/webui/dialogs/OpenResourceDialog text!orion/banner/banner.html text!orion/banner/footer.html text!orion/banner/toolbar.html orion/widgets/input/DropDownMenu orion/util orion/customGlobalCommands orion/fileClient orion/webui/SideMenu orion/objects".split(" "),function(f,
l,h,d,c,k,e,b,a,g,m,n,r,t,q,p,s,v,u,w,D,y,E,A,B,x,G,z,F,C,I,H,K,L,J){function Z(a,b){if(a.getLabel)return a.getLabel();var c=new E;c.resolve(b.properties.name);return c}function X(a){r.node("progressPane").setAttribute("aria-label",f["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function S(a,b){var c=a.getServiceReferences("orion.core.auth");V=[];var e=N.createMenuGenerator.apply(this,arguments);if(e)for(var g=0;g<
c.length;g++){var d=c[g],f=a.getService(d);Z(f,d).then(function(a){f.getKey().then(function(b){V.push(b);f.getUser().then(function(c){e.addUserItem(b,f,a,c)},function(c,g){e.addUserItem(b,f,a,g)});window.addEventListener("storage",function(c){Q[b]!==localStorage.getItem(b)&&(Q[b]=localStorage.getItem(b),f.getUser().then(function(c){e.addUserItem(b,f,a,c)},function(c){e.addUserItem(b,f,a)}))},!1)})})}}function P(a){return a}function R(b,c,g,d,f){function m(){if(q)return q;var a=b.getService("orion.core.contentTypeRegistry");
a||(a=new s.ContentTypeRegistry(b),a=b.getService("orion.core.contentTypeRegistry"));return a.getContentTypes().then(function(a){return q=a})}function h(a){for(var b={},c=a.getPropertyKeys(),e,g=0;g<c.length;g++)e=c[g],b[e]=a.getProperty(e);return b}function n(a,b){var c=null;a.some(function(a){return b===a.getProperty("id")?!!(c=a):!1});return c}function k(a){var b=a.command;return!b.visibleWhen||b.visibleWhen(c)?(a.invocation=new e.CommandInvocation(c,c,null,b,d),(new E).resolve(a)):"function"===
typeof f?(t||(t=f()),E.when(t,function(g){if(g&&c===W&&(!b.visibleWhen||b.visibleWhen(g)))return a.invocation=new e.CommandInvocation(g,g,null,b,d),a})):(new E).resolve()}function l(a,b,c){return c?(new E).resolve({relatedLink:a,command:c}):b.then(function(b){return{relatedLink:a,command:new e.Command(b)}})}var r=arguments,q,t,p=b&&b.getServiceReferences("orion.page.link.related");if(p&&0!==p.length){var M=this;E.when(m(),function(){if(N.beforeGenerateRelatedLinks.apply(M,r)){var c=b.getServiceReferences("orion.navigate.command"),
e=[];p.forEach(function(g){var f=h(g);if(f.id){var m;if((f.nls&&f.nameKey||f.name)&&f.uriTemplate)m=a._createCommandOptions(f,g,b,q,!0),e.push(l(f,m,null));else if(m=n(c,f.id)){var k=h(m);g={};J.mixin(g,k,f);(f=d.findCommand(f.id))?e.push(l(g,null,f)):(m=a._createCommandOptions(k,m,b,q,!0),e.push(l(g,m,null)))}}});E.all(e,P).then(function(a){a.sort(function(a,b){return a.command.name.localeCompare(b.command.name)});return E.all(a.map(k),P).then(function(b){var c=[];b=b.filter(function(b,e){if(b)return!0;
c.push(a[e]);return!1});N.addRelatedLinkCommands.call(M,d,b,c,g);N.afterGenerateRelatedLinks.apply(M,r)})})}})}}function $(a){var b=r.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function O(a){var b=window.getComputedStyle(a,null);return null===b||"absolute"===b.getPropertyValue("position")||!a.parentNode||a===document.body?a:O(a.parentNode)}function aa(a){var b={},c=null;"string"===typeof a&&(a=r.node(a));a||(a=r.node("pageActions"));for(var e=a;e&&e.classList;){if(e.classList.contains("toolComposite")){c=
e;break}e=e.parentNode}a.classList.contains("commandMarker")&&(b.commandNode=a);c||(c=r.node("pageToolbar"));c&&(b.slideContainer=r.$(".slideParameters",c),b.parameterArea=r.$(".parameters",c),b.dismissArea=r.$(".parametersDismiss",c),b.notifications=r.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=r.$(".toolbarTarget",c.parentNode),b.toolbarTarget&&(a=r.bounds(b.toolbarTarget),e=r.bounds(O(b.toolbarTarget.parentNode)),b.toolbarTargetY=a.top-e.top,b.toolbar=c)));return b}function ba(a){if(a=
a.slideContainer)if(a.style.left="",a.style.top="",a.classList.contains("slideContainerActive")){var b=r.bounds(a),c=r.bounds(a.parentNode);a.style.left=(c.width-b.width)/2+"px";a.style.top="0"}}k=function(a){var b=document.createElement("a");b.href=a;return b.href}(l.toUrl("auth/NotifyAuthentication.html"));var Q={},N={createMenuGenerator:H.createMenuGenerator||function(a,b){if(r.node("userMenu")){var c=r.node("userDropdown"),e=new q.Dropdown({dropdown:c}),c=new A.UserMenu({dropdownNode:c,dropdown:e,
serviceRegistry:a}),e=r.node("userTrigger");new p.Tooltip({node:e,text:f.Options,position:["below","left"]});var e=document.getElementById("userTrigger"),g=e.className;e.className=g+" imageSprite core-sprite-silhouette";c.setKeyAssist(b);return c}},beforeGenerateRelatedLinks:H.beforeGenerateRelatedLinks||function(a,b,c,e,g){return!0},addRelatedLinkCommands:H.addRelatedLinkCommands||function(a,b,c,e){this.sideMenu&&this.sideMenu.setRelatedLinks(b,e)},afterGenerateRelatedLinks:H.afterGenerateRelatedLinks||
function(a,b,c,e,g){},afterSetPageTarget:H.afterSetPageTarget||function(a){},generateNavigationMenu:H.generateNavigationMenu||function(a,b,c,e,g,d,m){if(a=r.node("sideMenu"))b=r.node("centralNavigation"),new p.Tooltip({node:b,text:f.CentralNavTooltip,position:["right"]}),this.sideMenu=new L(a,r.node("pageContent")),b.addEventListener("click",this.sideMenu.toggle.bind(this.sideMenu)),(a=r.node("sideMenuToggle"))&&a.addEventListener("click",this.sideMenu.toggle.bind(this.sideMenu))},afterGenerateNavigationMenu:H.afterGenerateNavigationMenu||
function(a,b,c,e,g,d,f){},afterGenerateBanner:H.afterGenerateBanner||function(a,b,c,e,g,d,f){}},V=[],W,T=[],M,Y=null,U=null,ca=new c;return{generateBanner:function(a,c,g,m,n,k,q,p){function M(a){a.registerService("orion.cm.managedservice",{updated:function(a){a=a&&"undefined"!==a["links.newtab"]?a["links.newtab"]?"_blank":"_self":"_self";for(var b=r.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}(new D.ThemePreferences(m,new y.ThemeData)).apply();var s=r.node(a);
if(!s)throw f["could not find banner parent, id was "]+a;var L=document.createRange();L.selectNode(s);L=L.createContextualFragment(G);r.processTextNodes(L,f);s.firstChild?s.insertBefore(L,s.firstChild):s.appendChild(L);s=r.node("home");s.href=l.toUrl("edit/edit.html");s.setAttribute("aria-label",f["Orion Home"]);r.node("progressPane").src=e.NO_IMAGE;if(s=r.node("pageToolbar"))s.classList.add("toolbarLayout"),s.innerHTML=F+h.slideoutHTMLFragment("mainToolbar");(s=r.node("closeNotifications"))&&s.setAttribute("aria-label",
f["Close notification"]);if(17>=I.isFirefox&&(s=r.node("staticBanner")))s.style.width="100%",s.style.MozBoxSizing="border-box";if(s=r.node("footer"))s.innerHTML=z,r.processTextNodes(s,f);g.setParameterCollector(new b.CommandParameterCollector(aa,ba));document.addEventListener("keydown",function(a){a.keyCode===r.KEY.ESCAPE&&(a=c.getService("orion.page.message"))&&a.setProgressMessage("")},!1);N.generateNavigationMenu.apply(this,arguments);N.afterGenerateNavigationMenu.apply(this,arguments);s=B.getCategoriesInfo(c);
L=B.getPageLinksInfo(c,"orion.page.link");E.all([s,L]).then(function(a){if(this.sideMenu){var b=a[1];this.sideMenu.setCategories(a[0]);this.sideMenu.setPageLinks(b);this.sideMenu.render()}}.bind(this));if(s=r.$(".split")){var L=r.$(".sidePanelLayout"),w=r.$(".mainPanelLayout");L&&w&&(Y={side:L,main:w},Y.splitter=new t.Splitter({node:s,sidePanel:L,mainPanel:w,toggle:!0,closeByDefault:p}),s=new e.Command({name:f["Toggle side panel"],tooltip:f["Open or close the side panel"],id:"orion.toggleSidePane",
callback:function(){Y.splitter.toggleSidePanel()}}),g.addCommand(s),g.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new d.KeyBinding("l",I.isMac?!1:!0,!0,!1,I.isMac?!0:!1)))}var v=!1,A=function(a,b){if(!v){var c=b.getService("orion.page.progress"),e=new x.OpenResourceDialog({searcher:a,progress:c,searchRenderer:a.defaultRenderer,onHide:function(){v=!1}});window.setTimeout(function(){v=!0;e.show()},0)}},s=new e.Command({name:f["Find File Named..."],tooltip:f["Choose a file by name and open an editor on it"],
id:"orion.openResource",callback:function(a){A(n,c)}});g.addCommand(s);g.registerCommandContribution("globalActions","orion.openResource",100,null,!0,new d.KeyBinding("f",!0,!0));var J=!1,s=function(){if(J)return!1;var a=r.node("banner"),b=r.node("footer"),c=r.node("sideMenu"),e=r.$(".content-fixedHeight"),g="hidden"===a.style.visibility;g?(a.style.visibility="visible",b.style.visibility="visible",e.classList.remove("content-fixedHeight-maximized"),c&&c.classList.remove("sideMenu-maximized")):(a.style.visibility=
"hidden",b.style.visibility="hidden",e.classList.add("content-fixedHeight-maximized"),c&&c.classList.add("sideMenu-maximized"));ca.dispatchEvent({type:"toggleTrim",maximized:!g});return!0};window.orionNoTrim?(s(),J=!0,this.sideMenu.hide()):(s=new e.Command({name:f["Toggle banner and footer"],tooltip:f["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:s}),g.addCommand(s),g.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new d.KeyBinding("m",!0,!0)));
s=new e.Command({name:f["System Configuration Details"],tooltip:f["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return l.toUrl("help/about.html")}});g.addCommand(s);g.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new d.KeyBinding(112,!0,!0));s=new e.Command({name:f["Background Operations"],tooltip:f["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return l.toUrl("operations/list.html")}});g.addCommand(s);
g.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new d.KeyBinding("o",!0,!0));U=new u.KeyAssistPanel({commandRegistry:g});s=new e.Command({name:f["Show Keys"],tooltip:f["Show a list of all the keybindings on this page"],id:"orion.keyAssist",callback:function(){U.isVisible()?U.hide():U.show();return!0}});g.addCommand(s);g.registerCommandContribution("globalActions","orion.keyAssist",100,null,!0,new d.KeyBinding(191,!1,!0));$(g);S(c,s.callback);X(c);window.addEventListener("hashchange",
function(){g.processURL(window.location.href)},!1);window.setTimeout(function(){M(c)},0);N.afterGenerateBanner.apply(this,arguments)},getToolbarElements:aa,getMainSplitter:function(){return Y},getKeyAssist:function(){return U},getGlobalEventTarget:function(){return ca},layoutToolbarElements:ba,setPageTarget:function(a){var b,c,e=a.breadcrumbRootName,g=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&(!a.breadcrumbTarget&&!a.staticBreadcrumb)&&
(c=(e?e+" ":"")+a.fileService.fileServiceName(a.target.Location),e=null),b=a.name||a.target.Name,W=a.target,R.call(this,g,a.target,T,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(e=e||a.task||a.name),b=a.name,R.call(this,g,{NoTarget:""},T,a.commandService,a.makeAlternate));(M=a.title)||(M=b?b+" - "+a.task:a.task);window.document.title=M;N.afterSetPageTarget.apply(this,arguments);if(b=a.breadCrumbContainer?r.node(a.breadCrumbContainer):r.node("location"))if(r.empty(b),a.staticBreadcrumb)new n.BreadCrumbs({container:b,
rootSegmentName:e});else{var d=g&&new K.FileClient(g),g=a.breadcrumbTarget||a.target,d=d&&g&&g.Location?d.fileServiceRootURL(g.Location):null;new n.BreadCrumbs({container:b,resource:g,rootSegmentName:e,workspaceRootSegmentName:c,workspaceRootURL:d,makeFinalHref:a.makeBreadcrumFinalLink,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){M&&("*"===M.charAt(0)&&!a&&(M=M.substring(1)),a&&"*"!==M.charAt(0)&&(M="*"+M),window.document.title=M);var b=r.node("dirty");b&&(b.textContent=a?"*":"")},
setPageCommandExclusions:function(a){T=a},notifyAuthenticationSite:k}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(f){return{detectValidURL:function(l){for(var h=/\[([^\]]*)\]\(([^\)]+)\)/g,d=h.exec(l),c=[],k=0;d;){if(3===d.length&&0<d[2].length){var e=new URL(d[2]);":"!==e.protocol&&f.validateURLScheme(e.href)&&(d.index>k&&c.push({segmentStr:l.substring(k,d.index)}),c.push({segmentStr:0<d[1].length?d[1]:d[2],urlStr:d[2]}),k=d.index+d[0].length)}d=h.exec(l)}if(0===k)return null;k<l.length&&c.push({segmentStr:l.substring(k)});return c},processURLSegments:function(f,
h){h.forEach(function(d){if(d.urlStr){var c=document.createElement("a");c.href=d.urlStr;c.appendChild(document.createTextNode(d.segmentStr))}else c=document.createElement("span"),c.textContent=d.segmentStr;f.appendChild(c)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(f,l,h,d){function c(c,b,a,g,d){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.message",this);this._operationsClient=b;this.notificationContainerDomId=d;this.domId=a;this.progressDomId=g||a;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var k;c.prototype={_init:function(){var c=l.node("closeNotifications");if(c&&
!this._hookedClose){c.style.cursor="pointer";this._hookedClose=!0;var b=l.node(this.notificationContainerDomId);l.addAutoDismiss([b],function(){this._clickToDisMiss&&this.close()}.bind(this));c.addEventListener("click",function(){this.close()}.bind(this));b.addEventListener("click",function(a){a&&a.target&&"a"===a.target.nodeName.toLowerCase()&&(a=l.$$("a",b))&&(a.length&&1===a.length)&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);var c=l.node("closeNotifications");
this._cancelMsg&&this._cancelFunc&&c?(c.innerHTML="",c.classList.remove("cancelButton"),c.classList.add("dismissButton"),c.classList.add("core-sprite-close"),c.classList.add("imageSprite"),this._cancelFunc(),this._cancelMsg=null):this.setProgressMessage("")},_getNotifierElements:function(){this._notifierElements||(this._notifierElements=h.getToolbarElements(this.notificationContainerDomId));return this._notifierElements},setMessage:function(c,b,a){this._init();this.currentMessage=c;var g=l.node(this.domId);
if("boolean"===typeof a){var d=g.getAttribute("aria-live");g.setAttribute("aria-live",a?"polite":"off");window.setTimeout(function(){c===this.currentMessage&&(l.empty(g),g.appendChild(document.createTextNode(c)),window.setTimeout(function(){g.setAttribute("aria-live",d)},100))}.bind(this),100)}else l.empty(g),g.appendChild(document.createTextNode(c));"number"===typeof b&&window.setTimeout(function(){c===this.currentMessage&&(l.empty(g),g.appendChild(document.createTextNode("")))}.bind(this),b)},setErrorMessage:function(c){this._clickToDisMiss=
!0;this.currentMessage=c;this._init();var b=c.responseText||c.message||c;if("string"===typeof b)try{b=JSON.parse(b)}catch(a){}c=b.Message||b;var g="red";if(b.Severity)switch(b.Severity){case "Warning":g="#FFCC00";break;case "Error":g="red";break;case "Info":case "Ok":g="green"}b=document.createElement("span");b.style.color=g;b.appendChild(document.createTextNode(c));c=l.node(this.domId);l.empty(c);c.appendChild(b)},setProgressMessage:function(c){this._clickToDisMiss=!1;this._init();this.currentMessage=
c;var b=document.createElement("span");b.classList.add("progressIcon");var a=l.node(this.progressDomId);l.empty(a);a.appendChild(b);a.appendChild(document.createTextNode(c));b=l.node(this.notificationContainerDomId);b.classList.remove("notificationHide");if(c&&0<c.length)b.classList.add("progressNormal"),b.classList.add("notificationShow");else{if(this._progressMonitors&&0<this._progressMonitors.length)return this._renderOngoingMonitors();b.classList.remove("notificationShow");b.classList.add("notificationHide")}},
setCancelFunction:function(c){this._cancelFunc=c},setProgressResult:function(c,b){this._clickToDisMiss=!1;this._cancelMsg=b;this.currentMessage=c;var a=c.responseText||c;if("string"===typeof a)try{a=JSON.parse(a)}catch(g){}this._init();var m=a.Message||a.toString(),h=f.UnknownError,k="core-sprite-information",t="progressNormal",q=document.createElement("span");q.classList.add("imageSprite");q.classList.add("progressIcon");var p=[];if(a.Severity)switch(a.Severity){case "Warning":h=f.UnknownWarning;
k="core-sprite-warning";t="progressWarning";p.push("progressInfo");p.push("progressError");p.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":k="core-sprite-error";t="progressError";p.push("progressWarning");p.push("progressInfo");p.push("progressNormal");this._clickToDisMiss=!0;break;default:t="progressNormal",p.push("progressWarning"),p.push("progressError"),p.push("progressNormal")}p.push("notificationHide");q.classList.add(k);var s=l.node(this.progressDomId),k=l.node(this.notificationContainerDomId);
l.empty(s);s.appendChild(q);m===Object.prototype.toString()&&(m=h);a.HTML?(a=document.createElement("span"),a.innerHTML=m,s.appendChild(a)):((h=d.detectValidURL(m))?(m=document.createDocumentFragment(),d.processURLSegments(m,h),Array.prototype.forEach.call(l.$$("a",m),function(a){a.target="_blank"})):("Warning"!==a.Severity&&("Error"!==a.Severity&&!b)&&(this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),5E3)),
m=document.createTextNode(m)),s.appendChild(m));if(t&&this.progressDomId!==this.domId){k.classList.add(t);for(t=0;t<p.length;t++)k.classList.remove(p[t])}k.classList.add("notificationShow");if(p=l.node("closeNotifications"))this._cancelMsg?(p.classList.add("cancelButton"),p.classList.remove("dismissButton"),p.classList.remove("core-sprite-close"),p.classList.remove("imageSprite"),p.innerHTML=this._cancelMsg):(p.innerHTML="",p.classList.remove("cancelButton"),p.classList.add("dismissButton"),p.classList.add("core-sprite-close"),
p.classList.add("imageSprite"))},showWhile:function(c,b){var a=this;if(b){a.setProgressMessage(b);var g=function(){b===a.currentMessage&&a.setProgressMessage("")};c.then(g,g)}return c},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(c,b){return new k(this,++this._lastProgressId,c,b)},_renderOngoingMonitors:function(){if(0<this._progressMonitors.length){var c="",b=!0,a;for(a in this._progressMonitors)this._progressMonitors[a].status&&(b||(c+=", "),c+=this._progressMonitors[a].status,
b=!1);this.setProgressMessage(c)}else this.setProgressMessage("")},_beginProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._renderOngoingMonitors()},_doneProgressMonitor:function(c){delete this._progressMonitors[c.progressId];this._progressMonitors.length--;c.status?this.setProgressResult(c.status):this._renderOngoingMonitors()}};c.prototype.constructor=
c;k=function(c,b,a,g){this.statusService=c;this.progressId=b;if(a){this.deferred=a;this.begin(g);var d=this;a.then(function(a,b){d.done.bind(d)()},function(a,b){d.done.bind(d)()})}};k.prototype.begin=function(c){this.status=c;this.statusService._beginProgressMonitor(this)};k.prototype.done=function(c){this.status=c;this.statusService._doneProgressMonitor(this)};k.prototype.worked=function(c){this.status=c;this.statusService._workedProgressMonitor(this)};k.prototype.constructor=k;return{StatusReportingService:c,
ProgressMonitor:k}});
define("orion/operations/nls/root/messages",{More:"More","No Matching OperationService for location:":"No Matching OperationService for location:","No operations services registered.":"No operations services registered.","could not find toolbar ":"could not find toolbar ","Remove Completed":"Remove Completed","Remove all completed operations":"Remove all completed operations",Remove:"Remove","Remove operations from the operations list.":"Remove operations from the operations list.",Cancel:"Cancel",
"Cancel operations from the operations list.":"Cancel operations from the operations list.","Operation resulted in a warning.":"Operation resulted in a warning.","Operation resulted in an error.":"Operation resulted in an error.","Operation is running.":"Operation is running.","Operation is canceled.":"Operation is canceled.","Operation failed.":"Operation failed.",Name:"Name",Actions:"Actions",Status:"Status",Scheduled:"Scheduled"});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages","orion/operations/nls/root/messages"],function(f,l){var h={root:l};Object.keys(f).forEach(function(d){"undefined"===typeof h[d]&&(h[d]=f[d])});return h});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(f,l,h,d){function c(){}c.prototype={_initialize:function(c,e,b,a,g){this._tooltip=new d.Tooltip({node:c,hideDelay:g||0,afterShowing:this._afterShowingFunction(e).bind(this),afterHiding:b,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";c=document.createRange();c.selectNode(this.$parent);c=c.createContextualFragment(this.TEMPLATE);
this.messages&&h.processTextNodes(c,f);this.$parent.appendChild(c);var m=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===h.KEY.ESCAPE&&m.hide()},!1);this._bindElements(this.$parent);"function"===typeof this._bindToDom&&this._bindToDom(this.$parent)},_bindElements:function(c){for(var d=0;d<c.childNodes.length;d++){var b=c.childNodes[d];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},_afterShowingFunction:function(c){return function(){c&&c.bind(this)();if(!this.customFocus){var d=
h.firstTabbable(this.$parent);d&&d.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};c.prototype.constructor=c;return{PopupDialog:c}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(f,l,h,d){var c={};(function(){var k=!1;c.updateNavTools=function(c,b,a,g,d,n){var l=h.node(g);if(l)b.destroy(l);else throw f["could not find toolbar "]+g;b.renderCommands(g,l,n,a,"button");if(d&&(g=h.node(d)))b.destroy(g),b.renderCommands(d,g,null,a,"button");k||(k=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",function(c){var g=h.node(d);
g&&(b.destroy(g),b.renderCommands(d,g,c.selections,a,"button"))}))};c.createOperationsCommands=function(c,b,a){function g(a){return!a.operation||!a.operation.type?!1:"loadstart"===a.operation.type||"progress"===a.operation.type}var m=new d.Command({name:f["Remove Completed"],tooltip:f["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(c){a.removeCompletedOperations().then(function(a){b.loadOperations.bind(b)()})},visibleWhen:function(a){return!0}});c.addCommand(m);
m=new d.Command({name:f.Remove,tooltip:f["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(c){c=Array.isArray(c.items)?c.items:[c.items];for(var g=0;g<c.length;g++){var d=c[g];a.removeOperation.bind(a)(d.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||0===a.length)return!g(a);for(var b in a)if(g(a[b]))return!1;return!0}});c.addCommand(m);
m=new d.Command({name:f.Cancel,tooltip:f["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(a){a=Array.isArray(a.items)?a.items:[a.items];for(var b=0;b<a.length;b++){var c=a[b];c.deferred&&c.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||0===a.length)return g(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!g(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;return!0}});c.addCommand(m)}})();
return c});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(f,l,h,d,c){function k(c){this._options=c}k.prototype=new d.PopupDialog;k.prototype.TEMPLATE='\x3ctable style\x3d"width: 360px;"\x3e\x3ctr\x3e\x3ctd\x3e\x3ch2\x3eRecent operations\x3c/h2\x3e\x3c/td\x3e\x3ctd style\x3d"text-align: right;"\x3e\x3ca id\x3d"allOperationsLink" class\x3d"navlinkonpage"\x3eAll Operations\x3c/a\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3cdiv id\x3d"operationsExist"\x3e\x3cdiv style\x3d"padding-left: 7px" id\x3d"myOperationsListEmpty"\x3eNo operations running on this page.\x3c/div\x3e\x3ctable id\x3d"myOperationsList" style\x3d"display: none;"\x3e\x3c/table\x3e\x3c/div\x3e\x3cdiv style\x3d"padding-left: 7px" id\x3d"operationsDontExist"\x3eNo operations running.\x3c/div\x3e';k.prototype._init=
function(d){this._myOperations=[];this._operationsDeferreds=[];this._commandService=d.commandRegistry;c.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(d.triggerNode)};k.prototype._bindToDom=function(c){this.$allOperationsLink.href=l.toUrl("operations/list.html");this._setOperationsVisibility()};k.prototype.setOperations=function(c,b){this._myOperations||this._init(this._options);
this._myOperations=[];this._operationsDeferreds=[];if(c)for(var a in c)this._myOperations.push(c[a]),this._operationsDeferreds.push(b[a]);this._renderOperations()};k.prototype.parseProgressResult=function(c){if(!c)return{};c=c.responseText||c;try{c=JSON.parse(c)}catch(b){}var a={Message:c.Message||c,Severity:c.Severity};c.DetailedMessage&&c.DetailedMessage!==a.Message&&(a.DetailedMessage=c.DetailedMessage);return a};k.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,
this._myOperations,this._operationsDeferreds)};k.prototype._renderOperationsTable=function(c,b,a){h.empty(c);for(var g=0;g<b.length;g++){var d=b[g],n=document.createElement("tr"),k=document.createElement("td");k.style.paddingLeft="5px";k.style.paddingRight="5px";k.textContent=d.Name;n.appendChild(k);var l=document.createElement("div");k.appendChild(l);k=document.createElement("span");k.style.paddingRight="5px";k.classList.add("imageSprite");switch(d.type){case "Warning":k.classList.add("core-sprite-warning");
k.setAttribute("aria-label",f["Operation resulted in a warning."]);break;case "error":k.classList.add("core-sprite-error");k.setAttribute("aria-label",f["Operation resulted in an error."]);break;case "loadstart":case "progress":k.classList.add("core-sprite-start");k.setAttribute("aria-label",f["Operation is running."]);break;case "abort":k.classList.add("core-sprite-stop");k.setAttribute("aria-label",f["Operation is canceled."]);break;case "load":case "loadend":k.classList.add("core-sprite-ok"),k.setAttribute("aria-label",
"Operation ok.")}l.appendChild(k);k=document.createElement("span");k.classList.add("operationStatus");k.textContent=d.Name;l.appendChild(k);if(d.error){var q=d.error.Message||d.error;d.error.DetailedMessage&&""!==d.error.DetailedMessage&&(q+=": "+d.error.DetailedMessage);k.textContent=q;k.classList.remove("operationStatus");k.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",l,{operation:d,deferred:a[g]},this,"tool");c.appendChild(n)}this._setOperationsVisibility()};
k.prototype._setOperationsVisibility=function(){this.$myOperationsList.style.display=0<this._myOperations.length?"":"none";this.$myOperationsListEmpty.style.display=0<this._myOperations.length?"none":"";this.$operationsDontExist.style.display=0<this._myOperations.length?"none":"";this.$operationsExist.style.display=0<this._myOperations.length?"":"none"};k.prototype.constructor=k;return{OperationsDialog:k}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(f,l,h,d,c){function k(b,a){if(!this._progressPane){this._progressPane=d.node(b);this._operationsDialog=new c.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var g=this;this._progressPane.addEventListener("keydown",function(a){(" "===a.charOrCode||a.keyCode===d.KEY.ENTER)&&g._operationsDialog.show()});this._progressPane.addEventListener("click",
function(a){g._operationsDialog.show()});this._operationsDialog.setOperations(null,null)}}function e(b,a,c,d){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.progress",this);this._commandRegistry=c;this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=d}k.prototype={_switchIconTo:function(b){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);
this._lastIconClass=b;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(b,a){var c={},d;for(d in b)b[d].progressMonitor||(c[d]=b[d]);if(this._isEmpty(c))this._switchIconTo("progressPane_empty"),this._progressPane.title=f.Operations,this._progressPane.alt=f.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var e="";for(d in c){var h=c[d];if(h.type&&("loadstart"===h.type||"progress"===h.type)){e=
"running";break}}""===e&&null!=this._lastOperation&&this._lastOperation.type&&"error"===this._lastOperation.type&&"error"==e;switch(e){case "running":this._progressPane.title=f["Operations running"];this._progressPane.alt=f["Operations running"];this._progressPane.setAttribute("aria-valuetext",f["Operations running"]);this._switchIconTo("running");break;case "warning":this._progressPane.title=f["Some operations finished with warning"];this._progressPane.alt=f["Some operations finished with warning"];
this._progressPane.setAttribute("aria-valuetext",f["Some operations finished with warning"]);this._switchIconTo("warning");break;case "error":this._progressPane.title=f["Some operations finished with error"];this._progressPane.alt=f["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",f["Some operations finished with error"]);this._switchIconTo("error");break;default:this._progressPane.title=f.Operations,this._progressPane.alt=f.Operations,this._progressPane.hasAttribute("aria-valuetext")&&
this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_empty")}}this._operationsDialog.setOperations(c,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};k.prototype.constructor=k;e.prototype={init:function(b){this._progressMonitorClass||(this._progressMonitorTool=new k(b,this._commandRegistry))},progress:function(b,a,c){var d=this,e=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(a));b.then(function(f){d._operations[e]&&
(f=d._operations[e],a&&(f.Name=a),d._lastOperation=f,f.type="loadend",c&&(f.progressMonitor=c),d.writeOperation.bind(d)(e,f,b),f.Location||d._removeOperationFromTheList.bind(d)(e))},function(f){if(d._operations[e]){var h=d._operations[e];a&&(h.Name=a);c&&(h.progressMonitor=c);d._lastOperation=h;h.type=f.canceled?"abort":"error";h.error=f;d.writeOperation.bind(d)(e,h,b);h.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){a&&(f.Name=a);c&&(f.progressMonitor=c);d.writeOperation.bind(d)(e,
f,b)});return b},removeOperation:function(b){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===b){this._removeOperationFromTheList(a);break}this._operationsClient.removeOperation.bind(this._operationsClient)(b)},_removeOperationFromTheList:function(b){var a=this._operations[b].progressMonitor;delete this._operations[b];delete this._operationDeferrds[b];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},
removeCompletedOperations:function(){for(var b in this._operations){var a=this._operations[b];a.type&&("loadstart"!==a.type&&"progress"!==a.type)&&((a=this._operations[b].progressMonitor)&&a.done(),delete this._operations[b],delete this._operationDeferrds[b])}this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},setProgressResult:function(b){this._serviceRegistry.getService("orion.page.message").setProgressResult(b)},showWhile:function(b,a,c){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);
var d=this;b.then(function(a){d._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){c?d._serviceRegistry.getService("orion.page.message").setProgressMessage(""):d.setProgressResult.bind(d)(a);return a});return this.progress(b,a)},writeOperation:function(b,a,c){this._operations[b]=a;this._operationDeferrds[b]=c;a.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(b){b.put(a.Location,{Name:a.Name,expires:a.expires})});
a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};e.prototype.constructor=e;return{ProgressService:e}});define("orion/dialogs",[],function(){function f(f){this._serviceRegistry=f;this._serviceRegistration=f.registerService("orion.page.dialog",this)}f.prototype={confirm:function(f,h){h(window.confirm(f))},openFiles:function(f){}};f.prototype.constructor=f;return{DialogService:f}});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(f,l){function h(d,c){c||(c="orion.page.selection");this._serviceRegistry=d;f.attach(this);this._serviceRegistration=d.registerService(c,this);this._selections=null}h.prototype={getSelection:function(d){var c=this._getSingleSelection();"function"===typeof d&&d(c);return c},getSelections:function(d){var c=Array.isArray(this._selections)?this._selections.slice():[];"function"===typeof d&&d(c);return c},_getSingleSelection:function(){return this._selections&&
0<this._selections.length?this._selections[0]:null},setSelections:function(d){var c=this._selections;Array.isArray(d)?this._selections=0<d.length?d.slice():null:this._selections=d?[d]:null;c!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};h.prototype.constructor=h;return{Selection:h}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(f,l){function h(c,b,a){return c[b].apply(c,a)}function d(c){this._location=c}function c(){var c=new l;c.reject(f["No Matching OperationService for location:"]+this._location);return c}function k(c){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=c.getService("orion.core.preference");for(var b=c.getServiceReferences("orion.core.operation"),
a=0;a<b.length;a++){var g=c.getService(b[a]);this._services[a]=g;g=b[a].getProperty("pattern")||".*";"^"!==g[0]&&(g="^"+g);this._patterns[a]=RegExp(g)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];this._operations.remove(a);return new d(a)}}d.prototype={getOperation:c,getOperations:c,removeCompletedOperations:c,removeOperation:c,cancelOperation:c};d.prototype.constructor=d;k.prototype={getOperations:function(){var c=
new l;if(this._operations)return c.resolve(this._operations),c;var b=this;this._preferenceService.getPreferences("/operations").then(function(a){b._operations=a;c.resolve(b._operations)});return c},getOperation:function(c){return h(this._getService(c),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],b=this,a=0;a<this._services.length;a++){var d=this._patterns[a],f=new l;c[a]=f.promise;h(this._services[a],"removeCompletedOperations").then(function(a){return function(c){Array.isArray(c)&&
b.getOperations.bind(b)().then(function(b){for(var e=b.keys(),f=0;f<e.length;f++){var m=e[f];d.test(m)&&0>c.indexOf(m)&&b.remove(m)}a.resolve()})}}(f),function(a){return function(b){a.reject(b)}}(f))}return l.all(c)},removeOperation:function(c){var b=this;return h(this._getService(c),"removeOperation",arguments).then(function(a){b.getOperations.bind(b)().then(function(a){a.remove(c)})},function(a){return a},function(a){return a})}};k.prototype.constructor=k;return{OperationsClient:k}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Next:"Next",Previous:"Previous",Replace:"Replace","Replace...":"Replace...",
"Replace All":"Replace All","Show Replace":"Show Replace","Hide Replace":"Hide Replace","Search ${0}":"Search ${0}","Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}",
"Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches",
"Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes","Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Show All":"Show All","Show all the results in one page":"Show all the results in one page","\x3c Previous Page":"\x3c Previous Page","Show previous page of search result":"Show previous page of search result","Next Page \x3e":"Next Page \x3e","Show next page of search result":"Show next page of search result","Next result":"Next result",
"Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results","Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results","Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename","Save frequently used searches by clicking on the ${0} button above.":"Save frequently used searches by clicking on the ${0} button above.",
Search:"Search","All types":"All types","File type":"File type","All ${0} files":"All ${0} files","${0} is already saved":"${0} is already saved","Type a search term":"Type a search term","Type a replace term":"Type a replace term","Case sensitive":"Case sensitive","File name":"File name","Path name":"Path name",Save:"Save","Type filter text":"Type filter text","Scope Search":"Scoped Search","Open in Search page for this directory":"Open the Search page for this folder.","${0}. Try your search again.":"${0}. Try your search again.",
"Click or use delete key to delete the search term":"Click or use delete key to delete the search term","${0} matches":"${0} matches","Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace \x3ctd([\\s\\S]*?)\x3c/td\x3e with \x3cspan$1\x3c/span\x3e.":"Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace \x3ctd([\\s\\S]*?)\x3c/td\x3e with \x3cspan$1\x3c/span\x3e.",
"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace \x3ctd([\\s\\S]*?)\x3c/td\x3e with \x3cspan$1\x3c/span\x3e.":"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace \x3ctd([\\s\\S]*?)\x3c/td\x3e with \x3cspan$1\x3c/span\x3e.",Scope:"Scope","Show previous search terms":"Show previous search terms","Show previous replace terms":"Show previous replace terms","Show replacement preview":"Show replacement preview",
"File name patterns (comma-separated)":"File name patterns (comma-separated)","(* \x3d any string, ? \x3d any character)":"(* \x3d any string, ? \x3d any character)","Choose a Folder":"Choose a Folder"});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(f,l){var h={root:l};Object.keys(f).forEach(function(d){"undefined"===typeof h[d]&&(h[d]=f[d])});return h});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(f,l){function h(d){this._init(d)}h.prototype={_init:function(d){var c=d.parent,h=this,c=l.node(c);if(!c)throw f["no parent"];if(!d.model)throw f["no tree model"];if(!d.renderer)throw f["no renderer"];this._parent=c;this._treeModel=d.model;this._onComplete=d.onComplete;this._renderer=d.renderer;this._showRoot=void 0===d.showRoot?!1:d.showRoot;this._indent=void 0===d.indent?16:d.indent;this._onCollapse=d.onCollapse;
this._labelColumnIndex=void 0===d.labelColumnIndex?0:d.labelColumnIndex;this._id=void 0===d.id?"treetable":d.id;this._tableStyle=d.tableStyle;this._tableElement=d.tableElement||"table";this._tableBodyElement=d.tableBodyElement||"tbody";this._tableRowElement=d.tableRowElement||"tr";this._treeModel.getRoot(function(c){h._root=c;h._showRoot?(c._depth=0,h._generate([c],0)):h._treeModel.getChildren(c,function(b){h.destroyed||h._generate(b,0)})})},destroy:function(){this.destroyed=!0},_generate:function(d,
c){l.empty(this._parent);var f=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(f);var e=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(e);e.id=this._id;this._tableStyle&&e.classList.add(this._tableStyle);this._renderer.initTable(e,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+
"tbody";0===d.length?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(d,c);e.appendChild(this._bodyElement);f.appendChild(e);this._parent.appendChild(f);this._rowsChanged();this._onComplete&&this._onComplete(this)},_generateChildren:function(d,c,f){for(var e=0;e<d.length;e++){var b=document.createElement(this._tableRowElement);b.id=this._treeModel.getId(d[e]);b._depth=c;b._item=d[e];this._renderer.render(d[e],b);var a=this._indent*c;b.childNodes[Math.min(b.childNodes.length-
1,this._labelColumnIndex)].style.paddingLeft=a+"px";this._renderer.rowCallback&&this._renderer.rowCallback(b,d[e]);f?(this._bodyElement.insertBefore(b,f.nextSibling),f&&(f=b)):this._bodyElement.appendChild(b)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(d,c,h){var e=this._treeModel.getId(d),b;if(e===this._id)this._removeChildRows(e),this._generateChildren(c,0),this._rowsChanged();else if(e===
this._treeModel.getId(this._root)&&d.removeAll)this._removeAllRows(),this._generateChildren(c,0),this._rowsChanged();else{var a=l.node(e);a?(a._item=d,a&&(h||a._expanded)?(this._removeChildRows(e),c?(a._expanded=!0,this._renderer.updateExpandVisuals(a,!0),this._generateChildren(c,a._depth+1,a),this._rowsChanged()):(b=this,this._renderer.updateExpandVisuals(a,"progress"),c=this._treeModel.getChildren(a._item,function(c){b.destroyed||(b._renderer.updateExpandVisuals(a,!0),a._expanded||(a._expanded=
!0,b._generateChildren(c,a._depth+1,a),b._rowsChanged()))}))):this._renderer.updateExpandVisuals(a,!1)):console.log(f["could not find table row "]+e)}},getItem:function(d){var c=l.node(d);return c&&c._item?c._item:d},toggle:function(d){var c=l.node(d);c&&(c._expanded?this.collapse(d):this.expand(d))},isExpanded:function(d){d="string"===typeof d?d:this._treeModel.getId(d);return(d=l.node(d))?d._expanded:!1},expand:function(d,c,f){d="string"===typeof d?d:this._treeModel.getId(d);var e=l.node(d);if(e){var b=
this;e._expanded?c&&c.apply(b,f):(this._renderer.updateExpandVisuals(e,"progress"),this._treeModel.getChildren(e._item,function(a){b.destroyed||(b._renderer.updateExpandVisuals(e,!0),e._expanded||(e._expanded=!0,b._generateChildren(a,e._depth+1,e),b._rowsChanged()),c&&c.apply(b,f))}))}},_removeChildRows:function(d){for(var c=d===this._id,f=!1,e=-1,b=[],a=l.$$array(".treeTableRow",this._parent),g=0;g<a.length;g++){var m=a[g];if(f)break;c?m._depth>e?b.push(m):f=!0:m.id===d&&(c=!0,e=m._depth)}for(d=
0;d<b.length;d++)c=b[d],c.parentNode.removeChild(c)},_removeAllRows:function(){for(var d=l.$$array(".treeTableRow",this._parent),c=0;c<d.length;c++)d[c].parentNode.removeChild(d[c])},collapse:function(d){d="string"===typeof d?d:this._treeModel.getId(d);var c=l.node(d);if(c){if(!c._expanded)return;c._expanded=!1;this._renderer.updateExpandVisuals(c,!1);this._removeChildRows(d);this._rowsChanged()}this._onCollapse&&this._onCollapse(c._item)},getIndent:function(){return this._indent}};h.prototype.constructor=
h;return{TableTree:h}});
define("orion/treeModelIterator",[],function(){var f={};f.TreeModelIterator=function(){function f(h,d){this.firstLevelChildren=h;this.reset();this._init(d)}f.prototype={_init:function(f){f&&(this.isExpanded=f.isExpanded,this.isExpandable=f.isExpandable,this.forceExpandFunc=f.forceExpandFunc,this.getChildrenFunc=f.getChildrenFunc)},topLevel:function(f){return f.parent?f.parent===this.root:!0},_getChildren:function(f){return"function"===typeof this.getChildrenFunc?this.getChildrenFunc(f):f?f.children:
null},_expanded:function(f){if(!f)return!0;var d=this._getChildren(f),d=d&&0<d.length;this.isExpanded&&d&&(d=this.isExpanded(f));return d},_expandable:function(f){return!f?!0:this.isExpandable?this.isExpandable(f):!1},_diveIn:function(f){return this._expanded(f)?(f=this._getChildren(f),this.setCursor(f[0]),this.cursor()):null},_drillToLast:function(f){return this._expanded(f)?(f=this._getChildren(f),this._drillToLast(f[f.length-1])):f},_forward:function(f){if(!this._cursor)return null;var d=this._diveIn(this._cursor);
if(!d){if(f&&this._expandable(this._cursor)&&this.forceExpandFunc){var c=this;return this.forceExpandFunc(this._cursor,"first",function(d){d&&c.setCursor(d)})}(d=this._findSibling(this._cursor,!0))&&this.setCursor(d)}return d},_backward:function(f){if(!this._cursor)return null;var d=this._findSibling(this._cursor,!1);d&&d!==this._cursor.parent&&(d=this._drillToLast(d));if(f&&d&&this._expandable(d)&&this.forceExpandFunc&&d!==this._cursor.parent){var c=this;return this.forceExpandFunc(d,"last",function(d){d&&
c.setCursor(d)})}d&&this.setCursor(d);return d},_findSibling:function(f,d){for(var c=this.topLevel(f),k=this._getChildren(f.parent),k=c?this.firstLevelChildren:k,e=0;e<k.length;e++)if(k[e]===f)return 0===e&&!d?c?null:f.parent:e===k.length-1&&d?c?null:this._findSibling(f.parent,d):d?k[e+1]:k[e-1];return null},_inParentChain:function(f,d){for(var c=f.parent;c;){if(c===d)return!0;c=c.parent}return!1},_getTopLevelParent:function(f){if(this.topLevel(f))return f;for(f=f.parent;f;){if(this.topLevel(f))return f;
f=f.parent}return null},_onCollapse:function(f){return this._expanded(f.parent)?f:this._onCollapse(f.parent)},_scan:function(f,d,c){this.setCursor(d);var k=[];for(k.push(d);;){if(this.iterate(f))k.push(this.cursor());else break;if(c===this.cursor())return k}return null},setCursor:function(f){this._prevCursor=this._cursor;this._cursor=f},setTree:function(f){this.firstLevelChildren=f;0<this.firstLevelChildren.length&&(this.root=this.firstLevelChildren[0].parent)},scan:function(f,d){var c=this.cursor(),
k=this._scan(!0,f,d);k||(k=this._scan(!1,f,d));this.setCursor(c);return k},iterate:function(f,d){return f?this._forward(d):this._backward(d)},iterateOnTop:function(f,d){var c=this._findSibling(this._getTopLevelParent(this.cursor()),f);c?this.setCursor(c):d&&0<this.firstLevelChildren.length&&this.setCursor(f?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(f){return!this._cursor?null:this._inParentChain(this._cursor,f)?(this.setCursor(f),this._cursor):
null},reset:function(){this.root=this._prevCursor=this._cursor=null;0<this.firstLevelChildren.length&&(this._cursor=this.firstLevelChildren[0],this.root=this.firstLevelChildren[0].parent)},cursorMoved:function(){return this._cursor!==this._prevCursor},cursor:function(){return this._cursor},prevCursor:function(){return this._prevCursor}};return f}();return f});
define("orion/explorers/explorerNavHandler",["orion/webui/littlelib","orion/treeModelIterator","orion/uiUtils"],function(f,l,h){var d={},c=-1!==navigator.userAgent.indexOf("iPad"),k=-1!==window.navigator.platform.indexOf("Mac");d.ExplorerNavHandler=function(){function d(b,a,c){this.explorer=b;this.model=this.explorer.model;this._navDict=a;this._listeners=[];this._selections=[];this._currentColumn=0;b=this._getEventListeningDiv();b.tabIndex=0;b.classList.add("selectionModelContainer");var e=this;this._modelIterator=
new l.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:c.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return e.explorer.renderer.isExpandable(a)}:function(a){return e.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return e.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(c);(!c||!1!==c.setFocus)&&b.focus();c=function(a){if(h.isFormElement(a.target)||e.explorer.preventDefaultFunc&&e.explorer.preventDefaultFunc(a,
e._modelIterator.cursor()))return!0;if(a.keyCode===f.KEY.DOWN)return e.onDownArrow(a);if(a.keyCode===f.KEY.UP)return e.onUpArrow(a);if(a.keyCode===f.KEY.RIGHT)return e.onRightArrow(a);if(a.keyCode===f.KEY.LEFT)return e.onLeftArrow(a);if(a.keyCode===f.KEY.SPACE)return e.onSpace(a);if(a.keyCode===f.KEY.ENTER)return e.onEnter(a)};b.addEventListener("keydown",c,!1);this._listeners.push({type:"keydown",listener:c});c=function(a){if(e.explorer.onFocus)e.explorer.onFocus(!1);else e.toggleCursor(null,!1)};
b.addEventListener("blur",c,!1);this._listeners.push({type:"blur",listener:c});c=function(a){if(e.explorer.onFocus)e.explorer.onFocus(!0);else e.toggleCursor(null,!0)};b.addEventListener("focus",c,!1);this._listeners.push({type:"focus",listener:c});this._parentDiv=b}d.prototype={destroy:function(){this._parentDiv.classList.remove("selectionModelContainer");this.removeListeners()},_init:function(b){this._linearGridMove=!1;b&&(this._selectionPolicy=b.selectionPolicy,this.gridClickSelectionPolicy=b.gridClickSelectionPolicy||
"none",this.preventDefaultFunc=b.preventDefaultFunc,this.postDefaultFunc=b.postDefaultFunc)},_ctrlKeyOn:function(b){return k?b.metaKey:b.ctrlKey},removeListeners:function(){if(this._listeners)for(var b=0;b<this._listeners.length;b++)this._parentDiv.removeEventListener(this._listeners[b].type,this._listeners[b].listener,!1)},focus:function(){var b=this._getEventListeningDiv();b&&b.focus()},_getEventListeningDiv:function(b){return this.explorer.keyEventListeningDiv&&"function"===typeof this.explorer.keyEventListeningDiv?
this.explorer.keyEventListeningDiv(b):f.node(this.explorer._parentId)},isExpandable:function(b){return!b?!1:f.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)))?!0:!1},isExpanded:function(b){return!b?!1:this.explorer.myTree.isExpanded(this.model.getId(b))},refreshSelection:function(b,a){var c=this;this.explorer.selection&&this.explorer.selection.getSelections(function(d){c._clearSelection(a);for(var e=0;e<d.length;e++)c._selections.push(d[e]);0<c._selections.length?c.cursorOn(c._selections[0],
!0,!1,b):c.cursorOn(null,!1,!1,b);c._shiftSelectionAnchor&&0<=c._inSelection(c._shiftSelectionAnchor)||(c._shiftSelectionAnchor=null)})},refreshModel:function(b,a,c,d){this._currentColumn=0;this.topIterationNodes=[];this.model=a;this._navDict=b;this.model.getTopIterationNodes?this.topIterationNodes=this.model.getTopIterationNodes():c&&(this.topIterationNodes=c);this._modelIterator.setTree(this.topIterationNodes);!d&&this.explorer.selection&&(this.toggleCursor(this._modelIterator.cursor(),!1),this._modelIterator.reset());
this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(b){b=this.model.getId(b);for(var a=0;a<this._selections.length;a++)if(b===this.model.getId(this._selections[a]))return a;return-1},_clearSelection:function(b){if(b)for(b=0;b<this._selections.length;b++)this._checkRow(this._selections[b],!0);this._selections=[]},getSelectionPolicy:function(){return this._selectionPolicy},setSelectionPolicy:function(b){this._selectionPolicy!==
b&&(("readonlySelection"===this._selectionPolicy||"readonlySelection"===b)&&this._toggleSelectionClass("disabledRow","readonlySelection"===b),this._selectionPolicy=b,"cursorOnly"===this._selectionPolicy&&this._clearSelection(!0))},setSelection:function(b,a,c){"readonlySelection"!==this._selectionPolicy&&("cursorOnly"===this._selectionPolicy?a&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(b,!0):this._isRowSelectable(b)&&(!a||"singleSelection"===this._selectionPolicy?(this._clearSelection(!0),
this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b):(a=this._inSelection(b),0<=a?(this._checkRow(b,!0),this._selections.splice(a,1)):(this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b)),c&&(this._shiftSelectionAnchor=this._lastSelection),this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))))},moveColumn:function(b,a){b||(b=this.currentModel());var c=this._getGridChildren(b);if(c&&1<c.length||
0===a&&c){0!==a&&this.toggleCursor(b,!1);var d=this._currentColumn,e=!0,d=d+a;0>d?(this._linearGridMove&&0!==a&&(this._modelIterator.iterate(!1)?b=this.currentModel():e=!1),d=e?c.length-1:this._currentColumn):d>=c.length&&(this._linearGridMove&&0!==a&&(this._modelIterator.iterate(!0)?b=this.currentModel():e=!1),d=e?0:this._currentColumn);this._currentColumn=d;0!==a&&this.toggleCursor(b,!0);return!0}return!1},_getGridChildren:function(b){return this._navDict?this._navDict.getGridNavHolder(b):null},
getCurrentGrid:function(b){b||(b=this.currentModel());return(b=this._getGridChildren(b))&&0<b.length?b[this._currentColumn]:null},getAriaContainerElement:function(b){for(var a=this._parentDiv,c;b&&b!==a&&"grid"!==(c=b.getAttribute("role"))&&"tree"!==c&&"treegrid"!==c;)b=b.parentNode;return b===a?null:b},toggleCursor:function(b,a){var c=this.getRowDiv(b),d=this.getCurrentGrid(b);d?(c&&(a?c.classList.add("treeIterationCursorRow"):c.classList.remove("treeIterationCursorRow")),d.domNode&&(c=this.getAriaContainerElement(d.domNode),
a?(d.domNode.classList.add("treeIterationCursor"),c&&c.setAttribute("aria-activedescendant",d.domNode.id)):d.domNode.classList.remove("treeIterationCursor"))):c&&(a?c.classList.add("treeIterationCursorRow_Dotted"):c.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(b,a,c,d){var e,f;if(b||a){if(f===this._modelIterator.cursor())return;e=this._modelIterator.cursor();f=b;this._modelIterator.setCursor(f)}else e=this._modelIterator.prevCursor(),
f=this._modelIterator.cursor();if(e!==f||a)if(this.toggleCursor(e,!1),!a||f){this.moveColumn(null,0);this.toggleCursor(f,!0);if((b=this.getRowDiv())&&!d){d=b.parentNode;for(a=document.documentElement;d&&d!==a;){var h=window.getComputedStyle(d,null);if(!h)break;h=h.getPropertyValue("overflow-y");if("auto"===h||"scroll"===h)break;d=d.parentNode}d&&(a=!0,b.offsetTop<=d.scrollTop?(a=!1,void 0===c&&(c=!1)):b.offsetTop+b.offsetHeight>=d.scrollTop+d.clientHeight&&(a=!1,void 0===c&&(c=!0)),a||b.scrollIntoView(!c))}if(this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,
f)}},getSelection:function(){return this._selections},getSelectionIds:function(){for(var b=[],a=0;a<this._selections.length;a++)b.push(this.model.getId(this._selections[a]));return b},getRowDiv:function(b){b=b?b:this._modelIterator.cursor();if(!b)return null;b=this.model.getId(b);var a=this._navDict.getValue(b);return a&&a.rowDomNode?a.rowDomNode:f.node(b)},iterate:function(b,a,c,d){var e=null;if(this.topIterationNodes&&0!==this.topIterationNodes.length)if(d){d=this.currentModel();for((e=this._modelIterator.iterate(b,
a))&&this._setCursorOnItem(b,c);e&&e.isNotSelectable;)(e=this._modelIterator.iterate(b,a))&&this._setCursorOnItem(b,c);e||(this.cursorOn(d,!0,!1,!0),this._setCursorOnItem(b,c))}else(e=this._modelIterator.iterate(b,a))&&this._setCursorOnItem(b,c)},_toggleSelectionClass:function(b,a){this._selections.forEach(function(c){(c=this.getRowDiv(c))&&(a?c.classList.add(b):c.classList.remove(b))}.bind(this))},_setCursorOnItem:function(b,a){this.cursorOn(null,!1,b);if(a){var c=this._inSelection(this._modelIterator.prevCursor()),
d=this._inSelection(this._modelIterator.cursor());0<=c&&0<=d?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)}},_checkRow:function(b,a){if(this.explorer.renderer._useCheckboxSelection&&"singleSelection"!==this._selectionPolicy){var c=this.getRowDiv(b);if(c){var d=f.node(this.explorer.renderer.getCheckBoxId(c.id)),e=a?!d.checked:!0;if(e!==d.checked)this.explorer.renderer.onCheck(c,d,e,!0)}}else this._select(b,a)},_select:function(b,a){b||(b=this._modelIterator.cursor());
var c=this.getRowDiv(b);c&&(0>this._inSelection(b)?c.classList.add("checkedRow"):c.classList.remove("checkedRow"))},_onModelGrid:function(b,a){var c=this._getGridChildren(b);if(c)for(var d=0;d<c.length;d++)if(a.target===c[d].domNode)return!0;return!1},onClick:function(b,a){if("readonlySelection"===this._selectionPolicy||this.isDisabled(this.getRowDiv(b)))f.stop(a);else{var d=f.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)));if(a.target!==d&&!("none"===this.gridClickSelectionPolicy&&
this._onModelGrid(b,a)))if(this.cursorOn(b,!0,!1,!0),c)this.setSelection(b,!0);else if(this._ctrlKeyOn(a))this.setSelection(b,!0,!0);else if(a.shiftKey&&this._shiftSelectionAnchor){if(d=this._modelIterator.scan(this._shiftSelectionAnchor,b)){this._clearSelection(!0);for(var e=0;e<d.length;e++)this.setSelection(d[e],!0)}}else this.setSelection(b,!1,!0)}},onCollapse:function(b){this._modelIterator.collapse(b)&&this.cursorOn()},onUpArrow:function(b){this.iterate(!1,!1,b.shiftKey,!0);!this._ctrlKeyOn(b)&&
!b.shiftKey&&this.setSelection(this.currentModel(),!1,!0);b.preventDefault();return!1},onDownArrow:function(b){this.iterate(!0,!1,b.shiftKey,!0);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),!1,!0);b.preventDefault();return!1},_shouldMoveColumn:function(b){var a=this.currentModel(),c=this._getGridChildren(a);return c&&1<c.length?this.isExpandable(a)?this._ctrlKeyOn(b):!0:!1},onLeftArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,-1),b.preventDefault(),
!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&this.isExpanded(a))return this.explorer.myTree.collapse(a),b.preventDefault(),!0;this._modelIterator.topLevel(a)?this.explorer.scopeUp&&"function"===typeof this.explorer.scopeUp&&this.explorer.scopeUp():(this.cursorOn(a.parent),this.setSelection(a.parent,!1,!0))},onRightArrow:function(b){if(this._shouldMoveColumn(b))return this.moveColumn(null,1),b.preventDefault(),!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&
!this.isExpanded(a))return this.explorer.myTree.expand(a),this.explorer.postUserExpand&&this.explorer.postUserExpand(this.model.getId(a)),b.preventDefault(),!1},_isRowSelectable:function(b){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(b):!0},onSpace:function(b){this.setSelection(this.currentModel(),!0,!0);b.preventDefault()},onEnter:function(b){var a=this.getCurrentGrid(this._modelIterator.cursor());if(a)if(a.widget)if("function"===typeof a.onClick)a.onClick();else"function"===
typeof a.widget.focus&&a.widget.focus();else{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(b),!1,!1,!1,0,null);a.domNode.dispatchEvent(c)}else if(a=this._modelIterator.cursor())if(this.explorer.renderer.getRowActionElement&&(c=this.explorer.renderer.getRowActionElement(this.model.getId(a)),c.href&&(this._ctrlKeyOn(b)?window.open(c.href):window.location.href=c.href)),this.explorer.renderer.performRowAction)return this.explorer.renderer.performRowAction(b,
a),b.preventDefault(),!1},setIsNotSelectable:function(b,a){b.isNotSelectable=a},disableItem:function(b){var a=this.getRowDiv(b);this.isExpandable(b)&&this.isExpanded(b)&&(this._modelIterator.collapse(b),this.explorer.myTree.toggle(a.id));a.classList.remove("checkedRow");a.classList.add("disabledNavRow");this.setIsNotSelectable(b,!0)},isDisabled:function(b){return b.classList.contains("disabledNavRow")},enableItem:function(b){var a=this.getRowDiv(b);a&&(a.classList.remove("disabledNavRow"),this.setIsNotSelectable(b,
!1))}};return d}();d.ExplorerNavDict=function(){function c(b){this._dict={};this._model=b}c.prototype={addRow:function(b,a){var c=this._model.getId(b);this._dict[c]={model:b,rowDomNode:a}},getValue:function(b){return this._dict[b]},getGridNavHolder:function(b,a){if(!b)return null;var c=this._model.getId(b);return this._dict[c]?(!this._dict[c].gridChildren&&a&&(this._dict[c].gridChildren=[]),this._dict[c].gridChildren):null},initGridNavHolder:function(b){if(!b)return null;b=this._model.getId(b);this._dict[b]&&
(this._dict[b].gridChildren=null)}};return c}();return d});
define("orion/explorers/explorer","i18n!orion/nls/messages require orion/webui/littlelib orion/webui/treetable orion/explorers/explorerNavHandler orion/commands".split(" "),function(f,l,h,d,c,k){var e={};e.Explorer=function(){function b(a,b,c,d){this.registry=a;this.renderer=c;this.selection=b;this.commandService=d;this.renderer&&(this.renderer.explorer=this);this.myTree=null}b.prototype={destroy:function(){this._navHandler&&this._navHandler.destroy();this.model&&this.model.destroy();this.myTree&&
this.myTree.destroy();this.destroyed=!0},changedItem:function(a,b){this.myTree&&this.myTree.refresh.bind(this.myTree)(a,b,!0)},updateCommands:function(a){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(a)},makeNewItemPlaceholder:function(a,b,c){var d=null;if(a=this.getRow(a)){var d=a.parentNode,e=document.createElement("tr");e.id=b+"placeHolderRow";e.classList.add("navRow");var f=document.createElement("td");f.id=b+"placeHolderCol";f.classList.add("navColumn");e.appendChild(f);
c?d.insertBefore(e,a.nextSibling):d.insertBefore(e,a);f.style.paddingLeft=a.firstChild.style.paddingLeft;d={wrapperNode:e,refNode:f,destroyFunction:function(){try{e&&e.parentNode&&e.parentNode.removeChild(e)}catch(a){}}}}return d},getRow:function(a){if(a=this.model.getId(a))return h.node(a)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this.myTree.collapse(a[b])},expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler){a=this._navHandler.getTopLevelNodes();
for(var b=0;b<a.length;b++)this._expandRecursively(a[b])}},_expandRecursively:function(a){if(this._navHandler&&this._navHandler.isExpandable(a)){var b=this;this.myTree.expand(a,function(){b.model.getChildren(a,function(a){if(!(void 0===a||null===a))for(var c=a.length,d=0;d<c;d++)b._expandRecursively(a[d])})})}},createTree:function(a,b,e){a="string"===typeof a?a:a.id||a;this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var f=a+"innerTree",
k=h.node(f);k&&h.empty(k);b&&(b.rootId=f);this.model=b;this._parentId=a;this._treeOptions=e;if(!e||e&&!e.noSelection)this.selectionPolicy=e?e.selectionPolicy:"",this._navDict=new c.ExplorerNavDict(this.model);this.myTree=new d.TableTree({id:f,model:b,parent:a,onComplete:e?e.onComplete:void 0,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:e?!!e.showRoot:!1,indent:e?e.indent:void 0,onCollapse:e?e.onCollapse:void 0,navHandlerFactory:e?e.navHandlerFactory:void 0,
tableElement:e?e.tableElement:void 0,tableBodyElement:e?e.tableBodyElement:void 0,tableRowElement:e?e.tableRowElement:void 0});this.renderer._initializeUIState();"cursorOnly"===this.selectionPolicy&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),b=[];if(a&&this.getNavDict())for(var c=a.getSelection(),d=0;d<c.length;d++){var e=a.getRowDiv(c[d]);e&&e.parentNode&&
(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&b.push(e.model))}this.selection.setSelections(b)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:null},initNavHandler:function(){var a=this._treeOptions;if(!a||a&&!a.noSelection){this.getNavHandler()||(this._navHandler=a&&a.navHandlerFactory&&"function"===typeof a.navHandlerFactory.createNavHandler?a.navHandlerFactory.createNavHandler(this,this._navDict,a):new c.ExplorerNavHandler(this,this._navDict,
{getChildrenFunc:a?a.getChildrenFunc:null,setFocus:a&&a.setFocus,selectionPolicy:a?a.selectionPolicy:null}));var b=this;this.model.getRoot(function(c){c instanceof Array?b.getNavHandler().refreshModel(b.getNavDict(),b.model,c):c.children&&c.children instanceof Array&&b.getNavHandler().refreshModel(b.getNavDict(),b.model,c.children);a&&a.setFocus&&b.getNavHandler().cursorOn(null,!1,!1,!0)})}},_lastHash:null,checkbox:!1};return b}();e.createExplorerCommands=function(b,a){function c(b){return"function"===
typeof b.getItemCount&&0<b.getItemCount()?a?a(b):!0:!1}var d=new k.Command({tooltip:f["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.expandAll()}}),e=new k.Command({tooltip:f["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.collapseAll()}});
b.addCommand(d);b.addCommand(e)};e.ExplorerModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.idPrefix=c||""}b.prototype={destroy:function(){this.destroyed=!0},getRoot:function(a){var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})},getChildren:function(a,b){a.Children?b(a.Children):a.ChildrenLocation?this.fetchItems(a.ChildrenLocation).then(function(c){a.Children=c;b(c)}):b([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;
a=a.Location.replace(/[\\\/]/g,"");for(var b=this.idPrefix,c=0;c<a.length;c++)b=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?b+a.charCodeAt(c):b+a[c];return b}};return b}();e.ExplorerFlatModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.root=c}b.prototype=new e.ExplorerModel;b.prototype.getRoot=function(a){if(this.root)a(this.root);else{var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})}};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};
return b}();e.ExplorerRenderer=function(){function b(a,b){this.explorer=b;this._init(a);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._progressImageClass="core-sprite-progress";this._twistieSpriteClass="modelDecorationSprite"}b.prototype={_init:function(a){a&&(this._useCheckboxSelection=void 0===a.checkbox?!1:a.checkbox,this.selectionPolicy=a.singleSelection?"singleSelection":"",this._cachePrefix=a.cachePrefix,a.getCheckedFunc&&(this.getCheckedFunc=
a.getCheckedFunc),a.onCheckedFunc&&(this.onCheckedFunc=a.onCheckedFunc),this._noRowHighlighting=a.noRowHighlighting,this._highlightSelection=!0,this._treeTableClass=a.treeTableClass||"treetable",!1===a.highlightSelection&&(this._highlightSelection=!1),this.actionScopeId||(this.actionScopeId=a.actionScopeId),this.commandService||(this.commandService=a.commandService))},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(a,b){this.tableTree=b;this.tableNode=a;h.empty(a);
this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){c=c||"tool";var f=document.createElement("td");f.id=b.id+"actionswrapper";d&&f.classList.add(d);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,f,a,this.explorer,c,null,e&&this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(a,!0):null):window.console.log("Warning, no command service or action scope was specified.  No commands rendered.");
return f},initCheckboxColumn:function(a){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),d=document.createElement("span");d.id=this.getCheckBoxId(b.id);d.classList.add("core-sprite-check");d.classList.add("selectionCheckmarkSprite");d.rowId=b.id;this.getCheckedFunc&&(d.checked=this.getCheckedFunc(a),d.checked?(this._highlightSelection&&b.classList.add("checkedRow"),d.classList.add("core-sprite-check_on")):
(this._highlightSelection&&b.classList.remove("checkedRow"),d.classList.remove("core-sprite-check_on")));c.appendChild(d);var e=this;d.addEventListener("click",function(c){e.onCheck(b,c.target,c.target.checked?!1:!0,!0,!1,a)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,d,e,f){(b.checked=c)?b.classList.add("core-sprite-check_on"):b.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(b.rowId,c,d,f);this.explorer.getNavHandler()&&
e&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),b=this._getUIStatePreferencePath();b&&window.sessionStorage&&(window.sessionStorage[b+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){var b=this.explorer.getNavDict(),c=this.explorer.getNavHandler();if(c&&(b&&"cursorOnly"!==c.getSelectionPolicy())&&(a=window.sessionStorage[a+
"selection"],"string"===typeof a&&(a=0<a.length?JSON.parse(a):null),a)){for(var d=[],c=0;c<a.length;c++){var e=b.getValue(a[c]);if(e&&(e.rowDomNode&&e.model)&&(d.push(e.model),this._highlightSelection&&e.rowDomNode.classList.add("checkedRow"),e=h.node(this.getCheckBoxId(e.rowDomNode.id))))e.checked=!0,e.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(d),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+
"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(a){var b=!1,c=window.sessionStorage[a+"expanded"];"string"===typeof c&&(c=0<c.length?JSON.parse(c):null);var d;if(c)for(d=0;d<c.length;d++)if(h.node(c[d])){this._expanded.push(c[d]);var e=this;this.tableTree.expand(c[d],function(){e._restoreSelections(a)});b=!0}return!b},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&a)return a=a.replace(/[^\.\:\-\_0-9A-Za-z]/g,""),
"/"+this._cachePrefix+"/"+a+"/uiState"}return null},expandCollapseImageId:function(a){return a+"__expand"},updateExpandVisuals:function(a,b){var c=h.node(this.expandCollapseImageId(a.id));c&&(c.classList.remove(this._expandImageClass),c.classList.remove(this._collapseImageClass),c.classList.remove(this._progressImageClass),c.classList.add("progress"===b?this._progressImageClass:b?this._expandImageClass:this._collapseImageClass))},getExpandImage:function(a,b,c,d){var e=document.createElement("span");
e.id=this.expandCollapseImageId(a.id);b.appendChild(e);e.classList.add(this._twistieSpriteClass);e.classList.add(this._collapseImageClass);if(c){var f=document.createElement("span");b.appendChild(f);f.classList.add(d||"imageSprite");f.classList.add(c)}var h=this;e.onclick=function(b){if(!h.explorer.getNavHandler().isDisabled(a)){h.tableTree.toggle(a.id);if(h.tableTree.isExpanded(a.id))h._expanded.push(a.id),h.explorer.postUserExpand&&h.explorer.postUserExpand(a.id);else for(var c in h._expanded)if(h._expanded[c]===
a.id){h._expanded.splice(c,1);break}(b=h._getUIStatePreferencePath())&&window.sessionStorage&&h._storeExpansions(b)}};return e},render:function(a,b){b.classList.add("navRow");this.renderRow(a,b)},rowsChanged:function(){"cursorOnly"!==this.explorer.selectionPolicy&&(this.explorer.refreshSelection(),this.explorer.initNavHandler());this._noRowHighlighting||(h.$(".sectionTreeTable",this.tableNode.parentNode)||h.$(".treetable",this.tableNode.parentNode))&&h.$$array(".treeTableRow",this.tableNode).forEach(function(a,
b){var c=!(b%2)?"lightSectionTreeTableRow":"darkSectionTreeTableRow",d="lightSectionTreeTableRow"===c?"darkSectionTreeTableRow":"lightSectionTreeTableRow";a.classList.add(c);a.classList.remove(d)})},updateCommands:function(){if(this.commandService)for(var a=h.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],d=h.node(c.id+"actionswrapper");this.commandService.destroy(d);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,d,c._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=
[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return b}();e.SelectionRenderer=function(){function b(a,b){this._init(a);this.explorer=b}b.prototype=new e.ExplorerRenderer;b.prototype.renderTableHeader=function(a){var b=document.createElement("thead"),c=document.createElement("tr");b.classList.add("navTableHeading");this._useCheckboxSelection&&c.appendChild(this.initCheckboxColumn(a));for(var d=0,e=this.getCellHeaderElement(d);e;)0<
e.innerHTML.length&&e.classList.add("navColumn"),c.appendChild(e),e=this.getCellHeaderElement(++d);b.appendChild(c);0<d&&a.appendChild(b)};b.prototype.renderRow=function(a,b){b.verticalAlign="baseline";b.classList.add("treeTableRow");if(void 0===a.selectable||a.selectable){var c=this.explorer.getNavDict();if(c){"cursorOnly"!==this.explorer.selectionPolicy&&b.classList.add("selectableNavRow");c.addRow(a,b);var d=this;b.addEventListener("click",function(b){if(d.explorer.getNavHandler())d.explorer.getNavHandler().onClick(a,
b)},!1)}if(c=this.getCheckboxColumn(a,b))c.classList.add("checkColumn"),b.appendChild(c)}for(var c=0,e=this.getCellElement(c,a,b);e;)b.appendChild(e),0===c?this.getPrimColumnStyle?e.classList.add(this.getPrimColumnStyle(a)):e.classList.add("navColumn"):this.getSecondaryColumnStyle?e.classList.add(this.getSecondaryColumnStyle()):e.classList.add("secondaryColumn"),e=this.getCellElement(++c,a,b)};b.prototype.getCellHeaderElement=function(a){};b.prototype.getCellElement=function(a,b,c){};return b}();
e.SimpleFlatModel=function(){function b(a,b,c){this.items=a;this.getKey=c;this.idPrefix=b;this.root={children:a}}b.prototype=new e.ExplorerModel;b.prototype.getRoot=function(a){a(this.root)};b.prototype.getId=function(a){a=this.getKey(a).replace(/[\\\/]/g,"");for(var b="",c=0;c<a.length;c++)b=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?b+a.charCodeAt(c):b+a[c];return this.idPrefix+b};b.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return b}();return e});
define("orion/widgets/browse/commitInfoRenderer",["orion/objects","orion/URITemplate","orion/webui/littlelib","orion/xhr","orion/URL-shim"],function(f,l,h,d){function c(b,a,c){return 0<b?1===b?a+" ":b+" "+c+" ":""}function k(b){b=new Date(b);var a=(new Date).getTime()-b.getTime();b=Math.floor(a/1E3/60/60/24/365);var a=a-31536E6*b,d=Math.floor(a/1E3/60/60/24/30),a=a-2592E6*d,e=Math.floor(a/1E3/60/60/24),a=a-864E5*e,f=Math.floor(a/1E3/60/60),h=Math.floor((a-36E5*f)/1E3/60),a=c(b,"a year","years"),k=
c(d,"a month","months"),l=c(e,"a day","days"),p=c(f,"an hour","hours"),h=c(h,"a minute","minutes"),s="";a?s=0<b?a:a+k:k?s=0<d?k:k+l:l?s=0<e?l:l+p:p?s=0<f?p:p+h:h&&(s=h);return s?s+"ago":"Just now"}function e(b){this._parentDomNode=h.node(b.parent);this._commitInfo=b.commitInfo}f.mixin(e.prototype,{destroy:function(){},_simpleMessage:function(b){var a=this._commitInfo.Message?this._commitInfo.Message:"";if(a){var c=a.replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n");c&&0<c.length&&(a=c[0]);10<b&&a.length>
b&&(a=a.substring(0,b-3)+"...")}return a},_generateMessageNode:function(b){var a;if(this._commitInfo.URL||this._commitInfo.SHA1){a=document.createElement("a");if(this._commitInfo.SHA1){var c=(new URL("commit",window.location.href)).href,c=decodeURIComponent(c);a.href=(new l(c+"{/SHA1}")).expand(this._commitInfo)}else a.href=this._commitInfo.URL;a.classList.add("commitInfolink")}else a=document.createElement("span");a.appendChild(document.createTextNode(b));return a},_requestPhotoURL:function(b,a){var c=
this,e=new URL("/manage/service/com.ibm.team.jazzhub.common.service.IPhotoService/getContributorPhotoURI",window.location.href);e.query.set("contributorUserId",b);d("GET",e.href,{timeout:15E3}).then(function(b){b=JSON.parse(b.response);a.src=b.photoURI},function(){c._useOtherPhotoURL(a)})},_useOtherPhotoURL:function(b){b.src=this._commitInfo.AvatarURL?this._commitInfo.AvatarURL:"https://www.gravatar.com/avatar/?d\x3dmm"},renderSimple:function(b){this._parentDomNode.appendChild(this._generateMessageNode(this._simpleMessage(b)))},
render:function(b,a){var c=this._commitInfo.Author&&this._commitInfo.Author.Date?k(this._commitInfo.Author.Date):"",d=this._simpleMessage(-1),e=this._commitInfo.Author&&this._commitInfo.Author.Name?this._commitInfo.Author.Name:"",f=b;f||(f="Commit");f="Last "+f;if(a){var l=document.createElement("div"),q=new Image;this._commitInfo.Author&&this._commitInfo.Author.UserId?this._requestPhotoURL(this._commitInfo.Author.UserId,q):this._useOtherPhotoURL(q);q.classList.add("commitInfoAvatar");l.appendChild(q)}else l=
document.createElement("div"),l.classList.add("commitInfoLabelContainer"),l.appendChild(document.createTextNode(f.toUpperCase()));this._parentDomNode.appendChild(l);l=document.createElement("div");l.classList.add("commitInfoMessageContainer");q=document.createElement("div");q.classList.add("commitInfoAutorContainer");var p=document.createDocumentFragment(),s=document.createElement("span");s.appendChild(document.createTextNode(e));s.classList.add("navColumnBold");a?(e=document.createElement("span"),
e.appendChild(document.createTextNode(f)),e.classList.add("navColumnBold"),p.textContent=c?"${0} by ${1} "+c+".":"${0} by ${1}.",c=[e,s]):(p.textContent=c?"by ${0} "+c+".":"by ${0}.",c=[s]);h.processDOMNodes(p,c);q.appendChild(p);l.appendChild(q);c=document.createElement("div");c.classList.add("commitInfoMessageTextContainer");c.appendChild(this._generateMessageNode(d));l.appendChild(c);this._parentDomNode.appendChild(l)}});return{CommitInfoRenderer:e,calculateTime:k}});
define("orion/explorers/navigatorRenderer","i18n!orion/navigate/nls/messages orion/Deferred orion/explorers/explorer orion/explorers/navigationUtils orion/extensionCommands orion/objects orion/URITemplate orion/widgets/browse/commitInfoRenderer orion/webui/littlelib".split(" "),function(f,l,h,d,c,k,e,b,a){function g(a){switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":return!0}return!1}function m(a,b,d,f,h,m,n,y,E){b=k.clone(b);
var A;if(b.Directory)A=document.createElement("a"),A.className="navlinkonpage",f=!a?r:new e(a+"#{,resource,params*}"),A.href=f.expand({resource:b.ChildrenLocation}),b.Name&&A.appendChild(document.createTextNode(b.Name));else{h||(h=c.getOpenWithCommands(d));A=document.createElement("a");A.className="navlink targetSelector";m&&"object"===typeof m&&Object.keys(m).forEach(function(a){A[a]=m[a]});var B=null,x=null;if(B=y?y.holderDom:A)x=document.createElement("span"),x.className="core-sprite-file modelDecorationSprite thumbnail",
B.appendChild(x);b.Name&&A.appendChild(document.createTextNode(b.Name));var G=b.Location;n&&"object"===typeof n&&(b.params={},k.mixin(b.params,n));(a=c.getOpenWithCommand(d,b,h))&&(G=a.hrefCallback({items:b}));l.when(f.getFileContentType(b),function(a){if(B){var c=B,d=x;if(a){var e,f=a.imageClass,h=a.image;f?(e=document.createElement("span"),e.className+=f,e.classList.add("thumbnail")):h&&(e=document.createElement("img"),e.src=h,e.classList.add("thumbnail"));e&&c.replaceChild(e,d)}}A.href=G;E&&"function"===
typeof E.updateFileNode&&E.updateFileNode(b,A,g(a))})}A.addEventListener("click",function(){t=b}.bind(this),!1);return A}function n(a,b,c,d){this.explorer=b;this.commandService=c;this.contentTypeService=d;this.openWithCommands=null;this.actionScopeId=a.actionScopeId;this._init(a);this.target="_self"}var r=new e("#{,resource,params*}"),t;n.prototype=new h.SelectionRenderer;n.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};n.prototype.tableCallback=function(a){a.setAttribute("aria-label",
f.Navigator);a.setAttribute("role","presentation")};n.prototype.rowCallback=function(a,b){a.setAttribute("role","treeitem")};n.prototype.emptyCallback=function(b){var c=document.createElement("tr"),d=document.createElement("td");d.colSpan=this.oneColumn?1:3;var e=document.createElement("div");e.classList.add("noFile");e.textContent=f.NoFile;var g=document.createElement("span");g.appendChild(document.createTextNode(f.File));a.processDOMNodes(e,[g]);d.appendChild(e);c.appendChild(d);b.appendChild(c)};
n.prototype.getDisplayTime=function(a){return(new Date(a)).toLocaleString()};n.prototype.getCommitRenderer=function(a,c){return new b.CommitInfoRenderer({parent:a,commitInfo:c})};n.prototype.getCellHeaderElement=function(a){if(this.oneColumn&&0!==a)return null;switch(a){case 0:case 1:case 2:document.createElement("th").style.height="8px"}};n.prototype.setTarget=function(a){this.target=a};n.prototype.getFolderImage=function(a){if(!this.showFolderImage)return null;a=document.createElement("span");a.className=
"core-sprite-folder modelDecorationSprite";return a};n.prototype.createFolderNode=function(a){var b;this.showFolderLinks?(b=m(this.folderLink||"",a,this.commandService,this.contentTypeService),(a=this.getFolderImage(a))&&b.insertBefore(a,b.firstChild)):(b=document.createElement("span"),b.textContent=a.Name);return b};n.prototype.updateFileNode=function(a,b,c){};n.prototype.showFolderLinks=!0;n.prototype.getCellElement=function(a,b,e){var f=b.LastCommit?2:1,g=b.LastCommit?3:2,h=b.LastCommit?1:-1;switch(a){case 0:return a=
document.createElement("td"),f=document.createElement("span"),f.id=e.id+"MainCol",f.setAttribute("role","presentation"),a.appendChild(f),a.setAttribute("role","presentation"),f.className="mainNavColumn",b.Directory?(this.getExpandImage(e,f),g=this.createFolderNode(b),f.appendChild(g),this.explorer._makeDropTarget(b,g),this.explorer._makeDropTarget(b,e)):(this.openWithCommands||(this.openWithCommands=c.getOpenWithCommands(this.commandService)),g=m("",b,this.commandService,this.contentTypeService,this.openWithCommands,
{target:this.target},null,null,this),f.appendChild(g)),g&&(g.id=e.id+"NameLink",1===g.nodeType&&(d.addNavGrid(this.explorer.getNavDict(),b,g),g.setAttribute("role","link"),g.setAttribute("tabindex","-1"))),this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,f,b,this.explorer,"tool",null,!0),a;case f:if(this.oneColumn)return null;e=document.createElement("td");b.LocalTimeStamp&&(e.textContent=this.getDisplayTime(b.LocalTimeStamp));return e;case g:if(this.oneColumn)return null;
e=document.createElement("td");!b.Directory&&"number"===typeof b.Length&&(b=parseInt(b.Length,10)/1024,e.textContent=Math.ceil(b).toLocaleString()+" KB");e.style.textAlign="right";return e;case h:if(this.oneColumn||!b.LastCommit)return null;e=document.createElement("td");this.getCommitRenderer(e,b.LastCommit).renderSimple(60);return e}};n.prototype.constructor=n;return{NavigatorRenderer:n,isImage:g,getClickedItem:function(){return t},createLink:m}});
define("orion/searchClient","i18n!orion/search/nls/messages require orion/webui/littlelib orion/i18nUtil orion/searchUtils orion/crawler/searchCrawler orion/explorers/navigatorRenderer orion/extensionCommands orion/Deferred".split(" "),function(f,l,h,d,c,k,e,b,a){function g(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function m(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new g(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}g.prototype.makeRenderFunction=function(g,m,k,q,p){var s=this.serviceRegistry,v=this.commandRegistry;this.openWithCommands=this.openWithCommands||b.createOpenWithCommands(s,g,v);var u=this;return function(b,s,y,E){a.when(u.openWithCommands,function(a){if(y)h.empty(m),a=document.createElement("div"),a.appendChild(document.createTextNode(f["Search failed."])),m.appendChild(a),"function"===typeof q&&q(m);else{var u=
function(){function a(b,c){var d=c.folderName?c.folderName:c.path,e=document.createElement("span");e.id=d.replace(/[^a-zA-Z0-9_\.:\-]/g,"");e.appendChild(document.createTextNode(" - "+d+" "));b.appendChild(e)}var b={};return function(c,d){var e=d.name;if(b.hasOwnProperty(e)){a(c,d);var f=b[e];"function"===typeof f&&(b[e]=null,f())}else b[e]=function(){a(c,d)}}}(),x=!1;h.empty(m);if(b&&0<b.length){var G=document.createElement("table");G.setAttribute("role","presentation");for(var z=0;z<b.length;z++){var F=
b[z],C;x||(x=!0,k&&(C=G.insertRow(0).insertCell(0),C.textContent=k));C=G.insertRow(-1).insertCell(0);C.colspan=2;p&&p(C);var I={Name:F.name,Directory:F.directory,Location:F.path||F.location},H=null;"number"===typeof F.LineNumber&&(H={},H.line=F.LineNumber);if(E&&E.keyword&&!E.nameSearch){var K=c.generateSearchHelper(E),H=H||{};H.find=K.inFileQuery.searchStr;H.regEx=K.inFileQuery.wildCard?!0:void 0}I=e.createLink(l.toUrl("edit/edit.html"),I,v,g,a,{"aria-describedby":(F.folderName?F.folderName:F.path).replace(/[^a-zA-Z0-9_\.:\-]/g,
""),style:{verticalAlign:"middle"}},H);F.LineNumber&&I.appendChild(document.createTextNode(" (Line "+F.LineNumber+")"));C.appendChild(I);u(C,F)}m.appendChild(G);"function"===typeof q&&q(m)}!x&&s&&(a=d.formatMessage(f["No matches found for ${0}"],s),h.empty(m),m.appendChild(document.createTextNode(a)),"function"===typeof q&&q(m))}})}};m.prototype={search:function(a,b,d){var e=function(a){for(var d=[],e=0;e<a.response.docs.length;e++){var f=a.response.docs[e],g=f.Location,h=c.path2FolderName(f.Path?
f.Path:f.Location,f.Name),m=h?h:g;(b?0<=m.indexOf(b):1)&&d.push({name:f.Name,path:g,folderName:h,directory:f.Directory,lineNumber:f.LineNumber})}return d};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,function(b){d(e(b),a.keyword,null,a)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(a),"Searching "+a.keyword).then(function(b){var c=a.keyword,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);d(e(b),c,null,a)},function(a){d(null,
null,a,null)})}catch(f){"string"===typeof f&&-1<f.indexOf("search")&&this._crawler?this._crawler.searchName(a,function(b){d(e(b),null,null,a)}):"string"===typeof f&&-1<f.indexOf("search")&&!a.nameSearch?(new k.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(b){d(e(b),null,null,a)}):this.registry.getService("orion.page.message").setErrorMessage(f)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=
a},handleError:function(a,b){console.error(a);h.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var c="",e=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&0<a.Parents.length?e="last"===b.index?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&(a.Directory&&a.Location&&a.Parents)&&(e=a);e?(this.setLocationbyURL(e.Location),c=e.Name,this._childrenLocation=e.ChildrenLocation):a&&(this.setLocationbyURL(this._searchRootLocation),
c=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation);e=h.node("search");c||(c="");if(e&&e.placeholder){e.value="";var g=d.formatMessage(f["Search ${0}"],c);e.placeholder=30<g.length?g.substring(0,27)+"...":d.formatMessage(f["Search ${0}"],c)}e&&e.title&&(e.title=f["Type a keyword or wild card to search in "]+c)},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=
a},getSearchLocation:function(){return this._searchLocation?this._searchLocation:this._fileService.fileServiceRootURL()},getSearchRootLocation:function(){return this._searchRootLocation?this._searchRootLocation:this._fileService.fileServiceRootURL()},getChildrenLocation:function(){return this._childrenLocation?this._childrenLocation:this._fileService.fileServiceRootURL()},createSearchParams:function(a,b,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:c,sort:"NameLower asc",
rows:100,start:0,nameSearch:!0,keyword:a}:{resource:c,sort:d&&d.sort?d.sort:"Path asc",rows:d&&d.rows?d.rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.fileType:void 0,fileNamePatterns:d&&d.fileNamePatterns?d.fileNamePatterns:void 0,keyword:a,replace:d?d.replace:void 0}}};m.prototype.constructor=m;return{Searcher:m}});
define("orion/operation",["orion/xhr","orion/Deferred"],function(f,l){function h(c,d,e,b){f("GET",c,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=a.response?JSON.parse(a.response):null;d.progress(a);!a.type||"loadstart"===a.type||"progress"===a.type?setTimeout(function(){h(c,d,e,b)},2E3):("error"===a.type||"abort"===a.type?d.reject(b?b(a):a.Result):d.resolve(e?e(a):a.Result.JsonData),a.Location||f("DELETE",c,{headers:{"Orion-Version":"1"},timeout:15E3}))},function(a){var b=a;if(void 0!==
a.responseText){b=a.responseText;try{b=JSON.parse(a.responseText)}catch(c){}}void 0!==b.Message?(b.HttpCode=void 0===b.HttpCode?a.status:b.HttpCode,b.Severity=void 0===b.Severity?"Error":b.Severity,d.reject(b)):d.reject({Severity:"Error",Message:b,HttpCode:a.status})})}function d(c,d){d.then(null,function(d){d instanceof Error&&"Cancel"===d.name&&f("PUT",c,{headers:{"Orion-Version":"1"},data:JSON.stringify({abort:!0}),timeout:15E3})})}return{handle:function(c,f,e){var b=new l;d(c,b);h(c,b,f,e);return b}}});
define("orion/git/gitClient",["require","orion/xhr","orion/Deferred","orion/operation"],function(f,l,h,d){var c=c||{};c.GitService=function(){function c(d){d&&(this._serviceRegistry=d,this._serviceRegistration=d.registerService("orion.git.provider",this))}c.prototype={checkGitService:function(){},cloneGitRepository:function(c,b,a,d,m,k,r,t,q,p,s){var v=this,u={};c&&(u.Name=c);a&&(u.Path=a);b&&(u.GitUrl=b);u.Location=d;m&&(u.GitSshUsername=m);k&&(u.GitSshPassword=k);r&&(u.GitSshKnownHost=r);t&&(u.GitSshPrivateKey=
t);q&&(u.GitSshPassphrase=q);p&&(p.GitMail&&(u.GitMail=p.GitMail),p.GitName&&(u.GitName=p.GitName));s&&(u.initProject=s);c=f.toUrl("gitapi/clone/._");c=c.substring(0,c.length-2);var w=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(u)}).then(function(a){v._getGitServiceResponse(w,a)},function(a){v._handleGitServiceResponseError(w,a)});return w},removeGitRepository:function(c){var b=this,a=new h;l("DELETE",
c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},getGitStatus:function(c){var b=this,a=new h;l("GET",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},
stage:function(c){var b=this,a=new h;l("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},stageMultipleFiles:function(c,b){var a=this,d=new h;l("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Path:b})}).then(function(b){a._getGitServiceResponse(d,
b)},function(b){a._handleGitServiceResponseError(d,b)});return d},unstageAll:function(c,b){var a=this,d=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Reset:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},unstage:function(c,b){var a=this,d=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},
timeout:15E3,handleAs:"json",data:JSON.stringify({Path:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},checkoutPath:function(c,b){var a=this,d=new h;l("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Path:b,RemoveUntracked:"true"})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},
commitAll:function(c,b,a){var d=this,f=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:a}).then(function(a){d._getGitServiceResponse(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},getGitClone:function(c){var b=this,a=new h;l("GET",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},
function(c){b._handleGitServiceResponseError(a,c)});return a},getGitCloneConfig:function(c){var b=this,a=new h;l("GET",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},getGitBranch:function(c){var b=this,a=new h;l("GET",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,
c)},function(c){b._handleGitServiceResponseError(a,c)});return a},getGitRemote:function(c){var b=this,a=new h;l("GET",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},checkoutBranch:function(c,b){var a=this,d=new h;l("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",
data:JSON.stringify({Branch:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},resetIndex:function(c,b,a){var d=this,f=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Commit:b,Reset:a?a:"HARD"})}).then(function(a){d._getGitServiceResponse(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},addBranch:function(c,b,a){var d=
this,f={};b&&(f.Name=b);a&&(f.Branch=a);var k=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(f)}).then(function(a){d._getGitServiceResponse(k,a)},function(a){d._handleGitServiceResponseError(k,a)});return k},removeBranch:function(c){var b=this,a=new h;l("DELETE",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,
c)},function(c){b._handleGitServiceResponseError(a,c)});return a},addRemote:function(c,b,a){var d=this,f=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Remote:b,RemoteURI:a})}).then(function(a){d._getGitServiceResponse(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},removeRemote:function(c){var b=this,a=new h;l("DELETE",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},
timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},doGitLog:function(c){var b=this,a=new h;l("GET",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},getDiff:function(c,b){var a=this,d=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},
timeout:15E3,handleAs:"json",data:JSON.stringify({New:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},doFetch:function(c,b,a,d,f,k,r){var t=this,q=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Fetch:"true",Force:b,GitSshUsername:a,GitSshPassword:d,GitSshKnownHost:f,GitSshPrivateKey:k,GitSshPassphrase:r})}).then(function(a){t._getGitServiceResponse(q,
a)},function(a){t._handleGitServiceResponseError(q,a)});return q},doPull:function(c,b,a,d,f,k,r){var t=this,q=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Pull:"true",Force:b,GitSshUsername:a,GitSshPassword:d,GitSshKnownHost:f,GitSshPrivateKey:k,GitSshPassphrase:r})}).then(function(a){t._getGitServiceResponse(q,a)},function(a){t._handleGitServiceResponseError(q,a)});return q},doMerge:function(c,
b,a){var d=this,f=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Merge:b,Squash:a})}).then(function(a){d._getGitServiceResponse(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},doCherryPick:function(c,b){var a=this,d=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({"Cherry-Pick":b})}).then(function(b){a._getGitServiceResponse(d,
b)},function(b){a._handleGitServiceResponseError(d,b)});return d},doRevert:function(c,b){var a=this,d=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Revert:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},doRebase:function(c,b,a){var d=this,f={};f.Rebase=b;a&&(f.Operation=a);var k=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},
timeout:15E3,handleAs:"json",data:JSON.stringify(f)}).then(function(a){d._getGitServiceResponse(k,a)},function(a){d._handleGitServiceResponseError(k,a)});return k},doPush:function(c,b,a,d,f,k,r,t,q){var p=this,s=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({PushSrcRef:b,PushTags:a,Force:d,GitSshUsername:f,GitSshPassword:k,GitSshKnownHost:r,GitSshPrivateKey:t,GitSshPassphrase:q})}).then(function(a){p._getGitServiceResponse(s,
a)},function(a){p._handleGitServiceResponseError(s,a)});return s},getLog:function(c,b){var a=this,d=new h,f=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({New:b})}).then(function(a){f.resolve(a.xhr.getResponseHeader("Location"))},function(b){a._handleGitServiceResponseError(d,b)});f.then(function(b){l("GET",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,
handleAs:"json"}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)})});return d},getDefaultRemoteBranch:function(c){var b=this,a=new h,d=new h;l("GET",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(a){b._getGitServiceResponse(d,a)},function(c){b._handleGitServiceResponseError(a,c)});d.then(function(c){l("GET",c.Children[0].Location,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},
timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)})});return a},doAddTag:function(c,b){var a=this,d=new h;l("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Name:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},doRemoveTag:function(c){var b=this,a=new h;l("DELETE",
c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},checkoutTag:function(c,b,a){var d=this,f=new h;l("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Tag:b,Branch:a})}).then(function(a){d._getGitServiceResponse(f,a)},function(a){d._handleGitServiceResponseError(f,
a)});return f},addCloneConfigurationProperty:function(c,b,a){var d=this,f=new h;l("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Key:b,Value:a})}).then(function(a){d._getGitServiceResponse(f,a)},function(a){d._handleGitServiceResponseError(f,a)});return f},editCloneConfigurationProperty:function(c,b){var a=this,d=new h;l("PUT",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},
timeout:15E3,handleAs:"json",data:JSON.stringify({Value:b})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},deleteCloneConfigurationProperty:function(c){var b=this,a=new h;l("DELETE",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json"}).then(function(c){b._getGitServiceResponse(a,c)},function(c){b._handleGitServiceResponseError(a,c)});return a},sendCommitReviewRequest:function(c,
b,a,d,f,k){var r=this,t=new h;l("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset\x3dUTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({ReviewReqCommit:c,ReviewReqUrl:d,ReviewReqNotifyLogin:a,ReviewReqAuthorName:f,ReviewMessage:k})}).then(function(a){r._getGitServiceResponse(t,a)},function(a){r._handleGitServiceResponseError(t,a)});return t},_getGitServiceResponse:function(c,b){var a=b.response?JSON.parse(b.response):null;if(b.xhr&&202===b.xhr.status){var f=d.handle(a.Location);
f.then(c.resolve,function(b){b.failedOperation=a.Location;c.reject(b)},c.progress);c.then(null,function(a){f.reject(a)})}else c.resolve(a)},_handleGitServiceResponseError:function(c,b){c.reject(b)}};return c}();return c});
define("orion/ssh/sshTools",["orion/Deferred","orion/xhr"],function(f,l){var h=h||{};h.SshService=function(){function d(c){if(c&&(this._serviceRegistry=c,this._authService=c.getService("orion.core.auth"),this._serviceRegistration=c.registerService("orion.net.ssh",this),!this._authService)){var d;this._authService={getUser:function(){if(d){var c=new f;c.resolve(d);return c}return l("POST","../../login",{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){return d=b.response?JSON.parse(b.response):
null},function(b){d=null;return b instanceof Error&&"Cancel"===b.name?"_cancel":b.response?JSON.parse(b.response):null})}}}}d.prototype={KNOWN_HOSTS:"knownHosts",addKnownHost:function(c){c=c||{};var d=new f,e=this,b=c.host,a=c.keyType,g=c.hostKey,h=c.port||22;if(!b||!a||!g||!h)return d.reject(),d;this._authService.getUser().then(function(c){for(var f=localStorage.getItem(c.login+"/"+e.KNOWN_HOSTS),f=f?JSON.parse(f):[],l=0;l<f.length;++l){var q=f[l];if(q.host===b&&q.port===h){d.resolve(q.host+" "+
q.keyType+" "+q.hostKey);return}}q={host:b,port:h,keyType:a,hostKey:g};f.push(q);localStorage.setItem(c.login+"/"+e.KNOWN_HOSTS,JSON.stringify(f));d.resolve(q.host+" "+q.keyType+" "+q.hostKey)},function(a){d.reject(a)});return d},clearKnownHosts:function(){var c=new f,d=this;this._authService.getUser().then(function(e){var b=localStorage.getItem(e.login+"/"+d.KNOWN_HOSTS),b=b?JSON.parse(b):[];localStorage.removeItem(e.login+"/"+d.KNOWN_HOSTS);c.resolve(b)},function(d){c.reject(d)});return c},getKnownHostCredentials:function(c,
d){var e=new f,b=this;d=d||22;if(!c||!d)return e.reject(),e;this._authService.getUser().then(function(a){a=(a=localStorage.getItem(a.login+"/"+b.KNOWN_HOSTS))?JSON.parse(a):[];for(var f=0;f<a.length;++f){var h=a[f];if(h.host===c&&h.port===d){e.resolve(h.host+" "+h.keyType+" "+h.hostKey);return}}e.resolve("")},function(a){e.reject(a)});return e}};return d}();return h});
define("orion/git/util",["orion/URL-shim"],function(f){function l(d){for(var e=0;e<c.length;e++)if(d.type===c[e])return!0;return!1}function h(c){for(var e=0;e<d.length;e++)if(c.type===d[e])return!0;return!1}var d=["Missing","Modified","Untracked","Conflicting"],c=["Added","Changed","Removed"];return{statusUILocation:"git/git-status.html",isStaged:l,isUnstaged:h,isChange:function(c){return l(c)||h(c)},hasStagedChanges:function(d){for(var e=0;e<c.length;e++)if(0<d[c[e]].length)return!0;return!1},hasUnstagedChanges:function(c){for(var e=
0;e<d.length;e++)if(0<c[d[e]].length)return!0;return!1},parseSshGitUrl:function(c){try{var d=new URL(c);return{host:d.hostname,port:d.port}}catch(b){try{var a=c.split(":")[0].split("@");return{host:1<a.length?a[1]:a[0],port:22}}catch(f){return{host:"",port:""}}}},trimCommitMessage:function(c){c=c.split(/\r\n|\n/);for(var d=0;0<c.length&&/^\s*$/.test(c[d]);)d++;return 100<c[d].length?c[d].substring(0,100)+"...":c[d]},getGerritFooter:function(c){c=c.split(/\r\n|\n/);for(var d={},b=0,a=c.length-1;0<=
a;--a)if(0===c[a].indexOf("Change-Id: ")){if(d.changeId=c[a].substring(11,c[a].length),1<++b){d={};break}}else 0===c[a].indexOf("Signed-off-by: ")&&(d.signedOffBy=c[a].substring(15,c[a].length));return d}}});
define("orion/git/widgets/ConfirmPushDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(f,l){function h(d){this._init(d)}h.prototype=new l.Dialog;h.prototype.TEMPLATE='\x3cdiv id\x3d"header"\x3e\x3c/div\x3e';h.prototype._init=function(d){var c=this;this.title="Git Push";this.modal=!0;this.messages=f;this.location=d.location;this.moreCallback=d.moreCallback;this.func=d.func;this._afterHiding=d.closeCallback;this.buttons=[];this.moreCallback&&this.buttons.push({callback:function(){c.destroy();
c.moreCallback()},text:"More"});this.buttons.push({callback:function(){c.destroy();c.func()},text:"OK"});this._initialize()};h.prototype._bindToDom=function(d){d=this.$header;d.appendChild(document.createTextNode("You are going to push to the following remote: "+this.location));d.appendChild(document.createElement("br"));this.moreCallback&&d.appendChild(document.createTextNode(" Click More to push to another remote or OK to push to default."))};h.prototype.constructor=h;return{ConfirmPushDialog:h}});
define("orion/git/gitPreferenceStorage",["orion/Deferred"],function(f){function l(f){this._prefix="/git/credentials";this._preferenceService=f.getService("orion.core.preference")}l.prototype={put:function(h,d){var c={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""};void 0!==d&&(void 0!==d.gitSshUsername&&null!==d.gitSshUsername&&(c.gitSshUsername=d.gitSshUsername),void 0!==d.gitSshPassword&&null!==d.gitSshPassword&&(c.gitSshPassword=d.gitSshPassword),void 0!==d.gitPrivateKey&&
null!==d.gitPrivateKey&&(c.gitPrivateKey=d.gitPrivateKey),void 0!==d.gitPassphrase&&null!==d.gitPassphrase&&(c.gitPassphrase=d.gitPassphrase));var k=new f;this._preferenceService.getPreferences(this._prefix,2).then(function(d){var b=d.get("settings");void 0===b?k.reject():b.enabled?(d.put(h,c),k.resolve()):k.reject()});return k},get:function(h){var d={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""},c=new f;this._preferenceService.getPreferences(this._prefix,2).then(function(f){var e=
f.get("settings");void 0===e?c.reject():e.enabled?(f=f.get(h),void 0!==f?c.resolve(f):c.resolve(d)):c.reject()});return c},isEnabled:function(){var h=new f;this._preferenceService.getPreferences(this._prefix,2).then(function(d){d=d.get("settings");void 0===d?h.resolve(!1):h.resolve(d.enabled)});return h},enable:function(){var h=new f;this._preferenceService.getPreferences(this._prefix,2).then(function(d){d.put("settings",{enabled:!0});h.resolve()});return h},disable:function(){var h=new f;this._preferenceService.getPreferences(this._prefix,
2).then(function(d){d.put("settings",{enabled:!1});h.resolve()});return h},remove:function(h){var d=new f;this._preferenceService.getPreferences(this._prefix,2).then(function(c){c.remove(h);d.resolve()});return d},getRepositories:function(){var h=new f;this._preferenceService.getPreferences(this._prefix,2).then(function(d){var c=[];d=d.keys();for(var f=0;f<d.length;++f)"settings"!==d[f]&&c.push(d[f]);h.resolve(c)});return h}};return l.prototype.constructor=l});
define("orion/git/widgets/GitCredentialsDialog",["i18n!git/nls/gitmessages","orion/git/gitPreferenceStorage","orion/webui/dialog","orion/git/util"],function(f,l,h,d){function c(c){this._init(c)}c.prototype=new h.Dialog;c.prototype.TEMPLATE='\x3cdiv id\x3d"gitCredentialsLabel" style\x3d"padding: 8px"\x3e${Repository URL:}\x3cstrong id\x3d"url"\x3e\x3c/strong\x3e\x3c/div\x3e\x3cdiv id\x3d"gitSshUsernameRow" style\x3d"padding: 8px"\x3e\x3clabel id\x3d"gitSshUsernameLabel" for\x3d"gitSshUsername"\x3e${Username:}\x3c/label\x3e\x3cinput id\x3d"gitSshUsername" value\x3d""\x3e\x3c/div\x3e\x3cdiv id\x3d"gitSshPasswordRow" style\x3d"padding: 8px"\x3e\x3cinput id\x3d"isSshPassword" type\x3d"radio" name\x3d"isSshPassword" checked value\x3d"password"/\x3e\x3clabel id\x3d"gitSshPasswordLabel" for\x3d"gitSshPassword" style\x3d"padding: 0 8px"\x3e${Password:}\x3c/label\x3e\x3cinput type\x3d"password" id\x3d"gitSshPassword" value\x3d"" style\x3d"width: 30em"\x3e\x3c/div\x3e\x3cdiv style\x3d"padding: 8px"\x3e\x3cdiv id\x3d"gitPrivateKeyRow"\x3e\x3cinput id\x3d"isPrivateKey" type\x3d"radio" name\x3d"isSshPassword" value\x3d"privateKey" style\x3d"vertical-align: top"/\x3e\x3clabel id\x3d"gitPrivateKeyLabel" for\x3d"gitPrivateKey" style\x3d"padding: 0 8px; vertical-align: top"\x3e${Private key:}\x3c/label\x3e\x3ctextarea id\x3d"gitPrivateKey" value\x3d""\x3e\x3c/textarea\x3e\x3c/div\x3e\x3cdiv id\x3d"gitPrivateKeyFileRow" style\x3d"padding-left: 8em"\x3e\x3clabel id\x3d"gitPrivateKeyFileLabel" for\x3d"gitPrivateKeyFile"\x3e${Private key file (optional):}\x3c/label\x3e\x3cbr\x3e\x3cinput id\x3d"gitPrivateKeyFile" multiple\x3d"false" type\x3d"file" size\x3d"53" label\x3d"Browse..."\x3e\x3c/div\x3e\x3cdiv id\x3d"gitPassphraseRow" style\x3d"padding-left: 8em"\x3e\x3clabel id\x3d"gitPassphraseLabel" for\x3d"gitPassphrase"\x3e${Passphrase (optional):}\x3c/label\x3e\x3cbr\x3e\x3cinput type\x3d"password" id\x3d"gitPassphrase" value\x3d"" style\x3d"width: 30em"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv id\x3d"gitSaveCredentialsRow" style\x3d"padding: 8px"\x3e\x3cimg id\x3d"gitSaveCredentialsInfo" src\x3d"/images/info.gif""\x3e\x3cinput id\x3d"gitSaveCredentials" type\x3d"checkbox" name\x3d"gitSaveCredentials"\x3e\x3clabel id\x3d"gitSaveCredentialsLabel" for\x3d"gitSaveCredentials"\x3e${Don\'t prompt me again:}\x3c/label\x3e\x3c/div\x3e';
c.prototype._init=function(c){var d=this;this.title=c.title||f["Git Credentials"];this.modal=!0;this.messages=f;this.options=c;this._afterHiding=c.closeCallback;!this.options.username&&(!this.options.password&&!this.options.privatekey&&!this.options.passphrase)&&(this.options.username=!0,this.options.password=!0,this.options.privatekey=!0,this.options.passphrase=!0);c.serviceRegistry&&(this._sshService=c.serviceRegistry.getService("orion.net.ssh"),this._progressService=c.serviceRegistry.getService("orion.page.progress"));
this.buttons=[];this.buttons.push({callback:function(){d.destroy();d._execute()},text:"OK",isDefault:!0});this._initialize()};c.prototype._bindToDom=function(c){var d=this;this.options.username||(this.$gitSshUsernameRow.style.display="none");this.options.password||(this.$gitSshPasswordRow.style.display="none");this.options.privatekey||(this.$gitPrivateKeyRow.style.display="none",this.$gitPrivateKeyFileRow.style.display="none");this.options.passphrase||(this.$gitPassphraseRow.style.display="none");
this.options.errordata&&this.options.errordata.Url&&(this.$gitCredentialsLabel.style.display="block",this.$url.textContent=this.options.errordata.Url);this.options.errordata&&(this.options.errordata.User&&""!==this.options.errordata.User)&&(this.$gitSshUsername.value=this.options.errordata.User,this.$gitSshUsernameRow.style.display="none",setTimeout(function(){d.$gitSshPassword.focus()},400));(new l(this.options.serviceRegistry)).isEnabled().then(function(b){b||(d.$gitSaveCredentials.style.display=
"none",d.$gitSaveCredentialsLabel.style.display="none",d.$gitSaveCredentialsInfo.style.display="none")});this.$gitSshPassword.addEventListener("focus",function(b){d.$isSshPassword.checked=!0});this.$gitPrivateKey.addEventListener("focus",function(b){d.$isPrivateKey.checked=!0});this.$gitPrivateKeyFile.addEventListener("focus",function(b){d.$isPrivateKey.checked=!0});this.$gitPassphrase.addEventListener("focus",function(b){d.$isPrivateKey.checked=!0});this.$gitPrivateKeyFile.addEventListener("change",
function(b){d.privateKeyFile=b.target.files[0]})};c.prototype._execute=function(){var c=this,f=this.$gitPrivateKey.value,b=this.$url.textContent,a=function(a){if(c._sshService){var f=d.parseSshGitUrl(b);c._sshService.getKnownHostCredentials(f.host,f.port).then(function(b){if(c.options.func){var d="undefined"===typeof c.options.failedOperation?c.options.errordata.failedOperation:c.options.failedOperation;"undefined"!==d&&c._progressService.removeOperation(d);c.options.func({gitSshUsername:c.$gitSshUsername.value,
gitSshPassword:c.$isSshPassword.checked?c.$gitSshPassword.value:"",gitPrivateKey:c.$isPrivateKey.checked?a:"",gitPassphrase:c.$isPrivateKey.checked?c.$gitPassphrase.value:"",knownHosts:b})}})}else c.options.func&&(f="undefined"===typeof c.options.failedOperation?c.options.errordata.failedOperation:c.options.failedOperation,"undefined"!==f&&c._progressService.removeOperation(f),c.options.func({gitSshUsername:c.$gitSshUsername.value,gitSshPassword:c.$gitSshPassword.value,gitPrivateKey:a,gitPassphrase:c.$gitPassphrase.value,
knownHosts:c.$gitSshKnownHosts.value}))};if(this.privateKeyFile){var g=new FileReader;g.onload=function(d){return function(d){f=d.target.result;d=new l(c.options.serviceRegistry);c.$gitSaveCredentials.checked?d.put(b,{gitPrivateKey:f,gitPassphrase:c.$gitPassphrase.value}).then(function(){a(f)}):a(f)}}(this.privateKeyFile);g.readAsText(this.privateKeyFile)}else 0<f.length?(g=new l(c.options.serviceRegistry),c.$gitSaveCredentials.checked?g.put(b,{gitPrivateKey:f,gitPassphrase:c.$gitPassphrase.value}).then(function(){a(f)}):
a(f)):(g=new l(c.options.serviceRegistry),c.$gitSaveCredentials.checked?g.put(b,{gitSshUsername:c.$gitSshUsername.value,gitSshPassword:c.$gitSshPassword.value}).then(function(){a(f)}):a(f))};c.prototype.constructor=c;return{GitCredentialsDialog:c}});
define("orion/git/logic/gitCommon","orion/git/util orion/i18nUtil orion/git/gitPreferenceStorage orion/git/widgets/GitCredentialsDialog orion/Deferred i18n!git/nls/gitmessages".split(" "),function(f,l,h,d,c,k){function e(a){var b;try{b=JSON.parse(a.responseText)}catch(c){b={Message:k["Problem while performing the action"]}}b.HttpCode=a.status;return b}var b=function(a,b,c,d){if(confirm(l.formatMessage(k["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],b.KeyType,
b.Host,b.HostFingerprint))){var e=f.parseSshGitUrl(b.Url);b={host:b.Host,keyType:b.KeyType,hostKey:b.HostKey,port:e.port};a.getService("orion.net.ssh").addKnownHost(b).then(function(b){c.knownHosts=b;"undefined"!==typeof c.failedOperation&&a.getService("orion.page.progress").removeOperation(c.failedOperation);d(c)})}},a=function(a,b,c,f,e,l){b=b?b.Url:void 0;var k=function(){(new d.GitCredentialsDialog({title:e,serviceRegistry:a,func:f,errordata:c.errordata,failedOperation:c.failedOperation,closeCallback:l})).show()};
c.gitSshUsername&&""!==c.gitSshUsername||c.gitSshPassword&&""!==c.gitSshPassword||c.gitPrivateKey&&""!==c.gitPrivateKey?k():(new h(a)).get(b).then(function(b){""!==b.gitPrivateKey||""!==b.gitSshUsername||""!==b.gitSshPassword?("undefined"!==typeof c.failedOperation&&a.getService("orion.page.progress").removeOperation(c.failedOperation),f({knownHosts:c.knownHosts,gitSshUsername:b.gitSshUsername,gitSshPassword:b.gitSshPassword,gitPrivateKey:b.gitPrivateKey,gitPassphrase:b.gitPassphrase})):k()},k)};
return{handleGitServiceResponse:function(a,b,c,d){a&&void 0!==a.status&&(a=e(a));if(!a||!a.HttpCode)c&&c(a);else switch(a.HttpCode){case 401:var f=new h(b);f.isEnabled().then(function(b){b&&void 0!==a.JsonData.Url?f.remove(a.JsonData.Url).then(function(){d(a)}):d(a)});break;case 400:if(a.JsonData&&a.JsonData.HostKey){d(a);break}default:var l=[];l.Severity=a.Severity||"Error";l.HTML=!1;l.Message="REJECTED_NONFASTFORWARD"===(a.DetailedMessage?a.DetailedMessage:a.Message)?k.REJECTED_NONFASTFORWARD:a.DetailedMessage?
a.DetailedMessage:a.Message;b.getService("orion.page.message").setProgressResult(l);c&&c(a)}},handleProgressServiceResponse:function(c,d,f,h,l,k){c&&void 0!==c.status&&(c=e(c));if(!c||void 0===c.HttpCode)h&&h(c);else switch(c.HttpCode){case 401:c.JsonData&&(d.errordata=c.JsonData);c.failedOperation&&(d.failedOperation=c.failedOperation);a(f,c.JsonData,d,l,k);break;case 400:if(c.JsonData&&c.JsonData.HostKey){c.failedOperation&&(d.failedOperation=c.failedOperation);b(f,c.JsonData,d,l);break}else if(c.JsonData&&
c.JsonData.Host){c.JsonData&&(d.errordata=c.JsonData);c.failedOperation&&(d.failedOperation=c.failedOperation);a(f,c.JsonData,d,l,k);break}default:d=[],d.Severity="Error",d.HTML=!1,d.Message=c.DetailedMessage?c.DetailedMessage:c.Message,f.getService("orion.page.message").setProgressResult(d),h&&h(c)}},gatherSshCredentials:function(a,b,e,r){var t=new c,q,p=b.items;p.LocalBranch&&p.RemoteBranch&&(p=p.LocalBranch);void 0!==p.RemoteLocation?q=p.RemoteLocation[0].GitUrl:void 0!==p.GitUrl?q=p.GitUrl:void 0!==
p.errorData?q=p.errorData.Url:void 0!==p.toRef&&(q=p.toRef.RemoteLocation[0].GitUrl);var p=a.getService("orion.net.ssh"),s=f.parseSshGitUrl(q),v=function(c){a.getService("orion.net.ssh").getKnownHostCredentials(s.host,s.port).then(function(a){b.sshObject=c;t.resolve({knownHosts:a,gitSshUsername:c.gitSshUsername,gitSshPassword:c.gitSshPassword,gitPrivateKey:c.gitPrivateKey,gitPassphrase:c.gitPassphrase})})},u=b.errorData;if(u&&u.HostKey){if(confirm(l.formatMessage(k["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],
u.KeyType,u.Host,u.HostFingerprint))){var w=f.parseSshGitUrl(u.Url);p.addKnownHost({host:u.Host,keyType:u.KeyType,hostKey:u.HostKey,port:w.port}).then(function(){b.sshObject&&(""!==b.sshObject.gitSshUsername||""!==b.sshObject.gitSshPassword||""!==b.sshObject.gitPrivateKey)?v({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""}):(new h(a)).get(q).then(function(a){v(a)},function(){v({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})})})}else"function"===typeof r&&
r();return t}var D=function(){if(!b.parameters&&!b.optionsRequested)v({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""});else if(b.parameters&&!b.optionsRequested){var c=b.parameters&&b.parameters.valueFor("sshuser")?b.parameters.valueFor("sshuser"):b.errorData.User,f=b.parameters?b.parameters.valueFor("sshpassword"):"",l=b.parameters&&b.parameters.valueFor("saveCredentials")?b.parameters.valueFor("saveCredentials"):!1,k=new h(a);l?k.put(q,{gitSshUsername:c,gitSshPassword:f}).then(function(){v({gitSshUsername:c,
gitSshPassword:f,gitPrivateKey:"",gitPassphrase:""})}):v({gitSshUsername:c,gitSshPassword:f,gitPrivateKey:"",gitPassphrase:""})}else(new d.GitCredentialsDialog({title:e,serviceRegistry:a,func:v,errordata:u,closeCallback:r})).show()};b.sshObject&&(""!==b.sshObject.gitSshUsername||""!==b.sshObject.gitSshPassword||""!==b.sshObject.gitPrivateKey)?D():(new h(a)).get(q).then(function(a){""!==a.gitPrivateKey||""!==a.gitSshUsername||""!==a.gitSshPassword?v(a):D()},D);return t},handleSshAuthenticationError:a,
handleKnownHostsError:b}});
define("orion/git/widgets/RemotePrompterDialog",["i18n!git/nls/gitmessages","orion/webui/dialog","orion/explorers/explorer","orion/selection"],function(f,l,h,d){function c(b,a){this.explorer=a;this._init(b)}function k(b){this._init(b)}var e=function(){function b(a,b,c,d){this.gitClient=a;this.rootPath=b;this.fetchItems=c;this.root=d?d:null}b.prototype=new h.ExplorerModel;b.prototype.getRoot=function(a){var b=this;this.root?a(this.root):this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})};
b.prototype.getIdentity=function(a){a.Location?(a=a.Location,a=a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")):a="ROOT";return a};b.prototype.getChildren=function(a,b){a.children=[];if(a.Children){for(var c=0;c<a.Children.length;c++)a.Children[c].parent=a,a.children[c]=a.Children[c];b(a.Children)}else a.BranchLocation&&a.RemoteLocation?(a.children=[{GroupNode:"true",Location:a.BranchLocation,Name:"Branches",parent:a},{GroupNode:"true",Location:a.RemoteLocation,BranchLocation:a.BranchLocation,Name:"Remotes",
parent:a},{GroupNode:"true",Location:a.TagLocation,Name:"Tags",parent:a}],b(a.children)):a.GroupNode?this.gitClient.getGitBranch(a.Location).then(function(c){a.children=c.Children;for(var d=0;d<c.Children.length;d++)c.Children[d].parent=a;b(c.Children)}):"Remote"===a.Type&&this.gitClient.getGitBranch(a.Location).then(function(c){a.children=c.Children;for(var d=0;d<c.Children.length;d++)c.Children[d].parent=a;b(c.Children)})};return b}();c.prototype=new h.SelectionRenderer;c.prototype.constructor=
c;c.prototype.getLabelColumnIndex=function(){return 0};c.prototype.getCellElement=function(b,a,c){var d=document.createElement("td");c.appendChild(d);b=document.createElement("span");b.id=c.id+"navSpan";d.appendChild(b);b.className="mainNavColumn singleNavColumn";(a.children||a.Children||a.GroupNode||"Remote"===a.Type||a.BranchLocation&&a.RemoteLocation)&&this.getExpandImage(c,b);c=a.Name;"RemoteTrackingBranch"===a.Type&&!a.Id&&(c=a.Name+f[" [New branch]"]);b.appendChild(document.createTextNode(c))};
k.prototype=new l.Dialog;k.prototype.TEMPLATE='\x3cdiv\x3e\x3cdiv id\x3d"treeContentPane" style\x3d"width:25em; min-height: 25em; max-height: 30em; height: auto; overflow-y: auto; padding: 8px"\x3e\x3c/div\x3e\x3cdiv id\x3d"newBranchPane" style\x3d"padding: 8px"\x3e\x3clabel for\x3d"newBranch"\x3e${New Branch:}\x3c/label\x3e\x3cinput id\x3d"newBranch" value\x3d"" disabled\x3dtrue/\x3e\x3c/div\x3e\x3c/div\x3e';k.prototype._init=function(b){var a=this;this.title=b.title||f["Choose a Folder"];this.modal=
!0;this.messages=f;this.func=b.func;this.treeRoot=b.treeRoot;this.gitClient=b.gitClient;this.hideNewBranch=b.hideNewBranch;this.serviceRegistry=b.serviceRegistry;this._afterHiding=b.closeCallback;this.buttons=[];this.buttons.push({callback:function(){a.$remoteOk.classList.contains(this.DISABLED)||(a.destroy(),a._execute.bind(a)())},text:"OK",isDefault:!0,id:"remoteOk"});this._initialize()};k.prototype._bindToDom=function(b){var a=this;this.$newBranch.addEventListener("input",function(b){a._validate()});
this.$newBranch.placeholder=f["No remote selected"];this.hideNewBranch&&(this.$newBranchPane.style.display="none")};k.prototype._beforeShowing=function(){this._loadRemoteChildren()};k.prototype._afterShowing=function(){this.$treeContentPane.focus();this._validate()};k.prototype._loadRemoteChildren=function(){var b=new e(this.gitClient,null,this.gitClient.getGitClone,this.treeRoot);this._createTree(b)};k.prototype._createTree=function(b){var a=this,e=this.serviceRegistry.getService("orion.remotePrompter.selection");
e||(e=new d.Selection(this.serviceRegistry,"orion.remotePrompter.selection"));var l=new c({checkbox:!1,singleSelection:!0,treeTableClass:"directoryPrompter"});this.explorer=new h.Explorer(this.serviceRegistry,e,l);l.explorer=this.explorer;this.explorer.createTree("treeContentPane",b);e.addEventListener("selectionChanged",function(b){b.selection&&"Remote"===b.selection.Type?(a.$newBranch.disabled=!1,a.$newBranch.placeholder=f["Enter a name..."]):(a.$newBranch.disabled=!0,a.$newBranch.placeholder=f["No remote selected"]);
a._validate(b.selection)})};k.prototype._validate=function(b){var a=function(a){a&&"RemoteTrackingBranch"===a.Type?this.$remoteOk.classList.remove(this.DISABLED):a&&"Remote"===a.Type&&""!==this.$newBranch.value?this.$remoteOk.classList.remove(this.DISABLED):this.$remoteOk.classList.add(this.DISABLED)};b?a.bind(this)(b):this.serviceRegistry.getService("orion.remotePrompter.selection").getSelection(a.bind(this))};k.prototype._execute=function(){var b=this;this.serviceRegistry.getService("orion.remotePrompter.selection").getSelection(function(a){if(b.func)if("RemoteTrackingBranch"===
a.Type)b.func(a,a.parent);else{var c=a.CloneLocation.substring(a.CloneLocation.indexOf(a.CloneLocation.split("/")[3])),d={};d.parent=a;d.FullName="refs/remotes/"+a.Name+"/"+b.$newBranch.value;d.Name=a.Name+"/"+b.$newBranch.value;d.Type="RemoteTrackingBranch";d.Location="/gitapi/remote/"+a.Name+"/"+encodeURIComponent(encodeURIComponent(b.$newBranch.value))+"/"+c;b.func(null,a,d)}})};k.prototype.constructor=k;return{RemotePrompterDialog:k}});
define("orion/git/logic/gitPush","i18n!git/nls/gitmessages orion/commandRegistry orion/git/widgets/ConfirmPushDialog orion/git/gitPreferenceStorage orion/git/logic/gitCommon orion/Deferred orion/git/widgets/RemotePrompterDialog".split(" "),function(f,l,h,d,c,k,e){var b=c.handleGitServiceResponse,a=c.handleProgressServiceResponse,g=c.gatherSshCredentials;return function(c){var n=c.serviceRegistry,r=c.commandService,t=c.tags,q=c.force,p=c.gerrit,s=c.confirmDialogCloseCallback,v=c.remotePrompterDialogCloseCallback,
u=c.sshCredentialsDialogCloseCallback,w=c.sshSlideoutCloseCallback,D=function(b,c,d){var g=new k,h=new k,l=n.getService("orion.git.provider"),m=n.getService("orion.page.progress");1===c.RemoteLocation.length&&c.RemoteLocation[0].Children&&1===c.RemoteLocation[0].Children.length?h=m.progress(l.getGitRemote(b.RemoteLocation),"Getting git remote details "+c.Name):h.resolve({Children:c.RemoteLocation});h.then(function(h){var k=function(b){a(b,{},n);g.reject(b)};(new e.RemotePrompterDialog({title:f["Choose Branch"],
serviceRegistry:n,gitClient:l,closeCallback:function(){g.reject()},treeRoot:{Children:h.Children},hideNewBranch:!1,func:function(a,f,e){var h;h=null===a?e:a;if(void 0===d||d){var n="branch."+c.Name+".remote";m.progress(l.addCloneConfigurationProperty(b.ConfigLocation,n,h.parent.Name),"Adding git configuration property "+c.Name).then(function(){g.resolve(h)},function(a){409===a.status?l.getGitCloneConfig(b.ConfigLocation).then(function(a){if(a.Children)for(var b=0;b<a.Children.length;b++)if(a.Children[b].Key===
n){m.progress(l.editCloneConfigurationProperty(a.Children[b].Location,h.parent.Name),"Updating configuration property "+h.parent.Name).then(function(){g.resolve(h)},k);break}},k):k(a)})}else g.resolve(h)}})).show()});return g};return{perform:function(a){function c(a){var k=a.targetBranch,u=a.confirmedWarnings;if(q&&!u)if(confirm(f["You're going to override content of the remote branch. This can cause the remote repository to lose commits."]+"\n\n"+f["Are you sure?"]))u=a.confirmedWarnings=!0;else{e.reject();
return}var s=a.items;s.LocalBranch&&s.RemoteBranch&&(k=s.RemoteBranch,s=s.LocalBranch);s.toRef&&(s=s.toRef);a.command||(a.command={},a.command.callback=c);var w=function(a,b){a.JsonData.HostKey?(b.parameters=null,b.errorData=a.JsonData,b.errorData.failedOperation=a.failedOperation,r.collectParameters(b,G)):b.optionsRequested?(b.errorData=a.JsonData,b.errorData.failedOperation=a.failedOperation,r.collectParameters(b,G)):(new d(n)).isEnabled().then(function(c){b.parameters=c?a.JsonData.User?new l.ParametersDescription([new l.CommandParameter("sshpassword",
"password",f["Password:"]),new l.CommandParameter("saveCredentials","boolean",f["Don't prompt me again:"])],{hasOptionalParameters:!0}):new l.ParametersDescription([new l.CommandParameter("sshuser","text",f["User Name:"]),new l.CommandParameter("sshpassword","password",f["Password:"]),new l.CommandParameter("saveCredentials","boolean",f["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new l.ParametersDescription([new l.CommandParameter("sshpassword","password",f["Password:"])],
{hasOptionalParameters:!0}):new l.ParametersDescription([new l.CommandParameter("sshuser","text",f["User Name:"]),new l.CommandParameter("sshpassword","password",f["Password:"])],{hasOptionalParameters:!0});b.errorData=a.JsonData;b.errorData.failedOperation=a.failedOperation;r.collectParameters(b,G)})};if(a.parameters&&a.parameters.optionsRequested)a.parameters=null,a.optionsRequested=!0,r.collectParameters(a,G);else{var y=n.getService("orion.git.provider"),L=n.getService("orion.page.progress");a.errorData&&
a.errorData.failedOperation&&L.removeOperation(a.errorData.failedOperation);var J=function(c,d,g,h,l){var k=n.getService("orion.page.message");c=L.progress(y.doPush(d,g,t,l,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase),f["Pushing remote: "]+h);k.createProgressMonitor(c,f["Pushing remote: "]+h);c.then(function(c){b(c,n,function(){e.resolve()},function(b){w(b,a)})},function(c){b(c,n,function(){e.resolve()},function(b){w(b,a)})})};L.progress(y.getGitClone(s.CloneLocation),
"Getting git repository details "+s.Name).then(function(b){var c=b.Children[0];g(n,a,null,x).then(function(b){if(k)J(b,k.Location,"HEAD",k.Name,q);else{var d=function(){D(c,s).then(function(c){a.targetBranch=c;a.items.RemoteLocation=c.parent;J(b,c.Location,"HEAD",c.Name,q)},function(){"function"===typeof v&&v();e.reject()})};if(1===s.RemoteLocation.length&&s.RemoteLocation[0].Children&&1===s.RemoteLocation[0].Children.length){var g=s.RemoteLocation[0].Children[0],l=s.Name;if(p){var t=s.RemoteLocation[0].Children[0].Location.split("/"),
l="refs/for/master";t[4]=encodeURIComponent(encodeURIComponent(l));t=t.join("/");g.Location=t;g.Name=l}(new h.ConfirmPushDialog({title:f["Choose Branch"],serviceRegistry:n,gitClient:y,moreCallback:function(){d()},location:g.Name,func:function(){a.targetBranch=g;J(b,g.Location,"HEAD",l,q)},closeCallback:m})).show()}else d()}})})}}var e=new k,m=function(){"function"===typeof s&&s();e.reject()},x=function(){"function"===typeof u&&u();e.reject()},G=function(){"function"===typeof w&&w();e.reject()};c(a);
return e},chooseRemote:D}}});
define("orion/git/widgets/gitCommitInfo","require i18n!git/nls/gitmessages orion/URITemplate orion/i18nUtil orion/git/util orion/objects".split(" "),function(f,l,h,d,c,k){function e(a){this.parent=a.parent;this.commit=a.commit;this.showTags=a.showTags;this.commitLink=a.commitLink}var b=new h("git/git-commit.html#{,resource,params*}?page\x3d1\x26pageSize\x3d1");k.mixin(e.prototype,{display:function(){var a=this.commit,e=this.parent,h=a.Message.split(/(\r?\n|$)/)[0],k;this.commitLink?(k=document.createElement("a"),
k.className="navlinkonpage",k.href=f.toUrl(b.expand({resource:a.Location}))):k=document.createElement("span");k.appendChild(document.createTextNode(c.trimCommitMessage(h)));e.appendChild(k);h=document.createElement("div");h.style.paddingTop="15px";e.appendChild(h);a.AuthorImage&&(e=new Image,e.src=a.AuthorImage,e.name=a.AuthorName,e.className="git-author-icon",h.appendChild(e));e=document.createElement("div");e.textContent=d.formatMessage(l[" authored by ${0} {${1}) on ${2}"],a.AuthorName,a.AuthorEmail,
(new Date(a.Time)).toLocaleString());h.appendChild(e);e=document.createElement("div");e.textContent=d.formatMessage(l["committed by 0 (1)"],a.CommitterName,a.CommitterEmail);h.appendChild(e);e=document.createElement("div");e.style.paddingTop="15px";e.textContent=l["commit:"]+a.Name;h.appendChild(e);e=c.getGerritFooter(a.Message);e.changeId&&(k=document.createElement("div"),k.style.paddingTop="15px",k.textContent=l["Change-Id: "]+e.changeId,h.appendChild(k));e.signedOffBy&&(k=document.createElement("div"),
k.textContent=l["Signed-off-by: "]+e.signedOffBy,h.appendChild(k));if(a.Parents&&0<a.Parents.length){k=document.createElement("div");k.textContent=l["parent:"];if(e.signedOffBy||e.changeId)k.style.paddingTop="15px";e=document.createElement("a");e.className="navlinkonpage";e.href=f.toUrl(b.expand({resource:a.Parents[0].Location}));e.textContent=a.Parents[0].Name;k.appendChild(e);h.appendChild(k)}k=this.showTags&&a.Tags&&0<a.Tags.length;if(a.Branches&&0<a.Branches.length){e=document.createElement("section");
e.style.paddingTop="15px";e.textContent=l["branches: "];h.appendChild(e);var r=document.createElement("div");e.appendChild(r);for(e=0;e<a.Branches.length;++e){var t=document.createElement("span");t.style.paddingLeft="10px";t.textContent=a.Branches[e].FullName;r.appendChild(t)}}if(k){e=document.createElement("div");e.style.paddingTop="15px";h.appendChild(e);e=document.createElement("section");h.appendChild(e);h=document.createElement("span");h.textContent=l["tags: "];e.appendChild(h);h=document.createElement("div");
e.appendChild(h);for(e=0;e<a.Tags.length;++e)k=document.createElement("span"),k.style.paddingLeft="10px",k.textContent=a.Tags[e].Name,h.appendChild(k)}}});return{GitCommitInfo:e}});
define("orion/git/widgets/CommitTooltipDialog",["orion/git/widgets/gitCommitInfo","orion/webui/popupdialog"],function(f,l){function h(d){this._init(d)}h.prototype=new l.PopupDialog;h.prototype.TEMPLATE='\x3cdiv id\x3d"parentPane" style\x3d"padding:10px; width:520px"\x3e\x3c/div\x3e';h.prototype._init=function(d){this.commit=d.commit;this._initialize(d.triggerNode,null,null,"mouseover",1E3)};h.prototype._bindToDom=function(d){this._displayCommit(this.commit)};h.prototype._displayCommit=function(d){(new f.GitCommitInfo({parent:this.$parentPane,
commit:d,showTags:!0,commitLink:!0})).display()};h.prototype.constructor=h;return{CommitTooltipDialog:h}});
define("orion/git/widgets/gitCommitList","require i18n!git/nls/gitmessages orion/commands orion/Deferred orion/explorers/explorer orion/URITemplate orion/git/util orion/commonHTMLFragments orion/git/logic/gitPush orion/i18nUtil orion/explorers/navigationUtils orion/git/widgets/CommitTooltipDialog orion/webui/littlelib orion/objects".split(" "),function(f,l,h,d,c,k,e,b,a,g,m,n,r,t){function q(a){this.root=a.root;this.section=a.section;this.location=a.location;this.handleError=a.handleError;this.repository=
a.repository;this.progressService=a.progressService;this.statusService=a.statusService;this.gitClient=a.gitClient;this.progressService=a.progressService;this.legacyLog=a.legacyLog;this.logDeferred=new d}function p(a){var b=new s({registry:a.serviceRegistry,commandService:a.commandRegistry,actionScopeId:a.actionScopeId,cachePrefix:"LogNavigator",checkbox:!1},this);c.Explorer.call(this,a.serviceRegistry,a.selection,b,a.commandRegistry);this.checkbox=!1;this.parentId=a.parentId;this.actionScopeId=a.actionScopeId;
this.section=a.section;this.root=a.root;this.handleError=a.handleError;this.location=a.location;this.gitClient=a.gitClient;this.progressService=a.progressService;this.statusService=a.statusService;this.legacyLog=a.legacyLog;this.incomingActionScope="IncomingActions";this.outgoingActionScope="OutgoingActions";this.syncActionScope="SynchronizedActions";this.createCommands()}function s(){c.SelectionRenderer.apply(this,arguments)}var v=new k("git/git-commit.html#{,resource,params*}?page\x3d1\x26pageSize\x3d1");
q.prototype=Object.create(c.Explorer.prototype);t.mixin(q.prototype,{destroy:function(){},getRoot:function(a){a(this.root)},_getRepository:function(){var a=this;return d.when(a.log||a._getLog(),function(b){return a.progressService.progress(a.gitClient.getGitClone(b.CloneLocation),"Getting repository details for "+b.Name).then(function(c){c=c.Children[0];b.Clone=c;b.ContentLocation=c.ContentLocation;return a.root.repository=c})},function(b){a.handleError(b)})},_getLog:function(){var a=this,b=a.location?
l["Getting git log"]:g.formatMessage(l['Getting commits for "${0}" branch'],a.currentBranch.Name);return a.progressService.progress(a.gitClient.doGitLog(a.location||a.currentBranch.CommitLocation+"?page\x3d1\x26pageSize\x3d20"),b).then(function(c){return a.location&&"RemoteTrackingBranch"===c.Type?a.progressService.progress(a.gitClient.doGitLog(c.CommitLocation),b).then(function(b){return a.log=b},function(b){a.handleError(b)}):a.log=c},function(b){a.handleError(b)})},_getOutgoing:function(){var a=
this,b=this.getLocalBranch(),c=this.getRemoteBranch().CommitLocation+(a.log?a.log.RepositoryPath:"");return a.progressService.progress(a.gitClient.getLog(c+"?page\x3d1\x26pageSize\x3d20",b.Name),l["Getting outgoing commits"]).then(function(b){return a.outgoingCommits=b.Children})},_getIncoming:function(){var a=this,b=this.getLocalBranch(),c=this.getRemoteBranch();return a.progressService.progress(a.gitClient.getLog(b.CommitLocation+(a.log?a.log.RepositoryPath:"")+"?page\x3d1\x26pageSize\x3d20",c.Name),
l["Getting git incoming changes..."]).then(function(b){return a.incomingCommits=b.Children})},getLocalBranch:function(){var a=this.log?this.log.toRef:this.currentBranch;return"RemoteTrackingBranch"===a.Type?(this.tracksRemoteBranch(),this.localBranch):a},getRemoteBranch:function(){if(this.remoteBranch)return this.remoteBranch;var a=this.log?this.log.toRef:this.currentBranch;return"RemoteTrackingBranch"===a.Type?a:a.RemoteLocation[0].Children[a.RemoteLocation[0].Children.length-1]},tracksRemoteBranch:function(){if(this.remoteBranch&&
this.isNewBranch(this.remoteBranch))return!1;var a=this.log&&this.log.toRef||this.currentBranch;if(a&&"RemoteTrackingBranch"===a.Type&&this.root.repository&&this.root.repository.Branches){var b=!1,c=this;this.root.repository.Branches.some(function(d){return d.RemoteLocation&&(1===d.RemoteLocation.length&&1===d.RemoteLocation[0].Children.length)&&d.RemoteLocation[0].Children[0].Name===a.Name?(c.localBranch=d,b=!0):!1});return b}return a&&a.RemoteLocation&&1===a.RemoteLocation.length&&1===a.RemoteLocation[0].Children.length},
isRebasing:function(){var a=this.root.repository;return a&&a.status&&"REBASING_INTERACTIVE"===a.status.RepositoryState},isNewBranch:function(a){return"RemoteTrackingBranch"===a.Type&&!a.Id},getChildren:function(a,b){var c=this,e=this.tracksRemoteBranch();if(a instanceof Array&&0<a.length)b(a);else if(a.children)b(a.children);else if("CommitRoot"===a.Type){var f=this.section,h=f.createProgressMonitor();h.begin(l["Getting git log"]);d.when(a.repository||c._getRepository(),function(e){var k=g.formatMessage(l.GettingCurrentBranch,
e.Name);h.worked(k);d.when(c.Branches||c.progressService.progress(c.gitClient.getGitBranch(e.BranchLocation+"?commits\x3d0"),k),function(k){var m;k=k.Children||k;k.some(function(a){return a.Current?(m=a,!0):!1});c.currentBranch=m;if(!c.currentBranch||!m.RemoteLocation[0])c.isRebasing()?(f.setTitle(l.RebaseProgress),b([])):(f.setTitle(l.NoBranch),b(c.processChildren(a,[]))),h.done();else{e.ActiveBranch=m.CommitLocation;c.Branches=k;k=c.getLocalBranch();var n=c.getRemoteBranch();k&&!c.legacyLog?f.setTitle(g.formatMessage(l['Commits for "${0}" branch against'],
k.Name)):f.setTitle(g.formatMessage(l['Commits for "${0}" branch'],n.Name));h.done();if(c.legacyLog)return d.when(c.log||c._getLog(),function(d){a.log=d;c.logDeferred.resolve(d);b(c.processChildren(a,d.Children))},function(a){c.handleError(a)});b(c.processChildren(a,[{Type:"Outgoing",localBranch:k,remoteBranch:n},{Type:"Incoming",localBranch:k,remoteBranch:n},{Type:"Synchronized"}]))}},function(a){h.done();c.handleError(a)})},function(a){h.done();c.handleError(a)})}else if("Incoming"===a.Type)if(e)d.when(c.incomingCommits||
c._getIncoming(),function(d){b(c.processChildren(a,d))},function(a){c.handleError(a)});else return d.when(c.log||c._getLog(),function(d){var e=[];"RemoteTrackingBranch"===d.toRef.Type&&(e=d.Children);b(c.processChildren(a,e))},function(a){c.handleError(a)});else if("Outgoing"===a.Type)if(e)d.when(c.outgoingCommits||c._getOutgoing(),function(d){b(c.processChildren(a,d))},function(a){c.handleError(a)});else return d.when(c.log||c._getLog(),function(d){var e=[];"Branch"===d.toRef.Type&&(e=d.Children);
b(c.processChildren(a,e))},function(a){c.handleError(a)});else if("Synchronized"===a.Type){if(e)return d.when(c.log||c._getLog(),function(e){a.log=e;c.logDeferred.resolve(e);d.when("RemoteTrackingBranch"===e.toRef.Type?c.incomingCommits||c._getIncoming():c.outgoingCommits||c._getOutgoing(),function(d){var f=[];e.Children.forEach(function(a){d.some(function(b){return b.Name===a.Name})||f.push(a)});b(c.processChildren(a,f))},function(a){c.handleError(a)})},function(a){c.handleError(a)});b(c.processChildren(a,
[]))}else b([])},getId:function(a){return a.Name||a.Type},processChildren:function(a,b){0===b.length&&(b=[{Type:"NoCommits"}]);b.forEach(function(b){b.parent=a});return a.children=b}});p.prototype=Object.create(c.Explorer.prototype);t.mixin(p.prototype,{changedItem:function(a){var b=new d,c=this,e=this.model;a||e.getRoot(function(b){a=b});"CommitRoot"===a.Type&&(e.incomingCommits=e.outgoingCommits=null);a.children=e.log=null;e.logDeferred=new d;var f=this.section.createProgressMonitor();f.begin(l["Getting git log"]);
e.getChildren(a,function(d){a.removeAll=!0;c.myTree.refresh.bind(c.myTree)(a,d,!1);c.expandSections(d);"Synchronized"===a.Type?c.updatePageCommands(a):c.updateCommands();f.done();b.resolve(d)});return b},display:function(){var a=this,b=new d,c=new q({root:this.root,registry:this.registry,progressService:this.progressService,statusService:this.statusService,gitClient:this.gitClient,section:this.section,location:this.location,handleError:this.handleError,legacyLog:this.legacyLog});this.createTree(this.parentId,
c,{onComplete:function(){a.status=c.status;var d=function(){a.model.getRoot(function(b){a.model.getChildren(b,function(b){a.expandSections(b)})});a.updateCommands();b.resolve(c.log)};a.fetch().then(d,d)}});return b},expandSections:function(a){!this.legacyLog&&(!this.model.isRebasing()&&2<a.length)&&(this.myTree.expand(this.model.getId(a[0])),this.myTree.expand(this.model.getId(a[1])),this.location&&this.myTree.expand(this.model.getId(a[2])))},createCommands:function(){var b=this,c=this.commandService,
d=new h.Command({name:l["Next Page \x3e"],tooltip:l["Show next page of git log"],id:"eclipse.orion.git.commit.nextPage",callback:function(a){var b=a.items;b.log&&(a.handler.model.location=b.log.NextLocation,a.handler.changedItem(b))},visibleWhen:function(a){return!!a.log.NextLocation}});c.addCommand(d);d=new h.Command({name:l["\x3c Previous Page"],tooltip:l["Show previous page of git log"],id:"eclipse.orion.git.commit.previousPage",callback:function(a){var b=a.items;b.log&&(a.handler.model.location=
b.log.PreviousLocation,a.handler.changedItem(b))},visibleWhen:function(a){return!!a.log.PreviousLocation}});c.addCommand(d);var e=new h.Command({name:l["Choose Branch"],tooltip:l["Choose the remote branch."],id:"eclipse.orion.git.commit.chooseBranch",callback:function(b){var c=b.handler,d=c.model;a({serviceRegistry:c.registry,commandService:c.commandService}).chooseRemote(d.root.repository,d.log?d.log.toRef:d.currentBranch).then(function(a){var c=b.handler.model;c.remoteBranch=a;c.getRoot(function(a){b.handler.changedItem(a)})})},
visibleWhen:function(a){var c=a.Name;b.model.isNewBranch(a)&&(c+=l[" [New branch]"]);e.name=c;return!0}});c.addCommand(e)},fetch:function(){var a=this.model;if(a.tracksRemoteBranch()&&!this.legacyLog&&!a.isRebasing()){var b=this.commandService,c=a.getRemoteBranch(),a=a.getLocalBranch();return b.runCommand("eclipse.orion.git.fetch",{LocalBranch:a,RemoteBranch:c,noAuth:!0},this)}return(new d).resolve()},updateCommands:function(){var a=this.model,b=a.currentBranch,c=this.root.repository,d=this.commandService,
e=this.section,f=e.actionsNode.id,e=e.titleLeftActionsNode.id;if(!b&&a.isRebasing())d.registerCommandContribution(f,"eclipse.orion.git.resetCommand",100),d.registerCommandContribution(f,"eclipse.orion.git.rebaseContinueCommand",200),d.registerCommandContribution(f,"eclipse.orion.git.rebaseSkipPatchCommand",300),d.registerCommandContribution(f,"eclipse.orion.git.rebaseAbortCommand",400),d.renderCommands(f,f,c.status,this,"button");else if(b&&!this.legacyLog){b=this.incomingActionScope;c=this.outgoingActionScope;
r.node(f)&&d.destroy(f);r.node(e)&&d.destroy(e);r.node(b)&&d.destroy(b);r.node(c)&&d.destroy(c);var g=a.tracksRemoteBranch(),h=a.getLocalBranch(),a=a.getRemoteBranch();g&&(d.registerCommandContribution(b,"eclipse.orion.git.fetch",100),d.registerCommandContribution(b,"eclipse.orion.git.merge",300),d.registerCommandContribution(b,"eclipse.orion.git.rebase",200),d.registerCommandContribution(b,"eclipse.orion.git.resetIndex",400),a.GitUrl=h.RemoteLocation[0].GitUrl,d.renderCommands(b,b,a,this,"button"),
d.registerCommandContribution(f,"eclipse.orion.git.sync",100),d.renderCommands(f,f,{LocalBranch:h,RemoteBranch:a},this,"button"));d.registerCommandContribution(e,"eclipse.orion.git.commit.chooseBranch",100);d.renderCommands(e,e,a,this,"button");d.addCommandGroup(c,"eclipse.gitPushGroup",1E3,"Push",null,null,null,"Push",null,"eclipse.orion.git.push");d.registerCommandContribution(c,"eclipse.orion.git.push",1100,"eclipse.gitPushGroup");d.registerCommandContribution(c,"eclipse.orion.git.pushBranch",
1200,"eclipse.gitPushGroup");d.registerCommandContribution(c,"eclipse.orion.git.pushToGerrit",1200,"eclipse.gitPushGroup");d.renderCommands(c,c,{LocalBranch:h,RemoteBranch:a},this,"button")}},updatePageCommands:function(a){var b=this;this.model.logDeferred.then(function(){var c=b.commandService;r.node(b.syncActionScope)&&c.destroy(b.syncActionScope);c.registerCommandContribution(b.syncActionScope,"eclipse.orion.git.commit.nextPage",200);c.registerCommandContribution(b.syncActionScope,"eclipse.orion.git.commit.previousPage",
100);c.renderCommands(b.syncActionScope,b.syncActionScope,a,b,"button")})}});s.prototype=Object.create(c.SelectionRenderer.prototype);t.mixin(s.prototype,{getCellElement:function(a,c,d){var g=this.explorer;switch(a){case 0:a=document.createElement("td");var h=document.createElement("div");a.appendChild(h);var k=document.createElement("div");k.style.overflow="hidden";h.appendChild(k);if("Commit"!==c.Type){if("NoCommits"!==c.Type){h.className="gitCommitSectionTableItem";h=document.createElement("div");
h.style.display="inline-block";h.style.styleFloat="left";h.style.cssFloat="left";var q=this.getExpandImage(d,h);"Synchronized"===c.Type&&q.addEventListener("click",function(){g.updatePageCommands(c)});k.appendChild(h);d.classList.add("gitCommitListSection")}else d.classList.add("gitCommitListNoCommit"),h.classList.add("sectionTableItem");d=document.createElement("div");d.className="stretch";k.appendChild(d);h=document.createElement("div");h.textContent=l[c.Type];"NoCommits"!==c.Type&&h.classList.add("gitCommitListSectionTitle");
d.appendChild(h);d=document.createElement("ul");d.className="layoutRight commandList";d.id=c.Type+"Actions";k.appendChild(d);k.classList.add("toolComposite");d=b.slideoutHTMLFragment(d.id);h=document.createElement("div");h.innerHTML=d;k.appendChild(h)}else{h.className="sectionTableItem";c.AuthorImage&&(d=document.createElement("div"),d.style["float"]="left",h=new Image,h.src=c.AuthorImage,h.name=c.AuthorName,h.className="git-author-icon",d.appendChild(h),k.appendChild(d));d=document.createElement("div");
d.className="stretch";k.appendChild(d);h=document.createElement("a");h.className="navlinkonpage";h.href=f.toUrl(v.expand({resource:c.Location}));h.textContent=e.trimCommitMessage(c.Message);d.appendChild(h);m.addNavGrid(this.explorer.getNavDict(),c,h);new n.CommitTooltipDialog({commit:c,triggerNode:h});h=document.createElement("div");d.appendChild(h);h=document.createElement("div");h.textContent=l[" (SHA "]+c.Name+l[") by "]+c.AuthorName+l[" on "]+(new Date(c.Time)).toLocaleString();d.appendChild(h);
var t=document.createElement("div");t.textContent=l["Tags:"];t.className="gitCommitListTagsTitle";c.Tags&&c.Tags.length?c.Tags.forEach(function(a){var b=document.createElement("span");b.textContent=a.Name;b.className="gitCommitListTag";t.appendChild(b);var c=document.createElement("span");c.className="core-sprite-close gitCommitListTagClose";c.addEventListener("click",function(){g.commandService.runCommand("eclipse.removeTag",a,g)});b.appendChild(c)}):(h=document.createElement("span"),h.textContent=
l.None,t.className="gitCommitListNoTag",t.appendChild(h));d.appendChild(t);d=document.createElement("ul");d.className="layoutRight commandList";d.id="itemLevelCommands";k.appendChild(d);g.commandService.renderCommands("itemLevelCommands",d,c,g,"tool")}return a}},emptyCallback:function(a){var b=document.createElement("tr"),c=document.createElement("td");c.colSpan=1;var d=document.createElement("div");d.classList.add("sectionTableItem");if(this.explorer.model.isRebasing())d.style.whiteSpace="pre",d.appendChild(document.createTextNode(l.RebaseProgressDetails));
else{var e=document.createElement("div");e.textContent=l["The branch is up to date."];d.appendChild(e);e=document.createElement("div");e.textContent=l["You have no outgoing or incoming commits."];d.appendChild(e)}c.appendChild(d);b.appendChild(c);a.appendChild(b)}});return{GitCommitListExplorer:p,GitCommitListRenderer:s}});
define("orion/section","orion/webui/littlelib orion/selection orion/commandRegistry orion/commonHTMLFragments orion/objects orion/selection".split(" "),function(f,l,h,d,c,k){function e(a,b){var c=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._progressImageClass="core-sprite-progress";this._twistieSpriteClass="modelDecorationSprite";if(!b.id)throw Error("Missing required argument: id");this.id=b.id;if(!b.title)throw Error("Missing required argument: title");
var e=b.useAuxStyle?["sectionWrapper","sectionWrapperAux","toolComposite"]:["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");a.appendChild(this.domNode);for(var h=0;h<e.length;h++)this.domNode.classList.add(e[h]);this.domNode.id=b.id;b.canHide&&(this.twistie=document.createElement("span"),this.twistie.classList.add("modelDecorationSprite"),this.twistie.classList.add("layoutLeft"),this.twistie.classList.add("sectionTitleTwistie"),this.domNode.style.cursor="pointer",this.domNode.appendChild(this.twistie),
this.domNode.tabIndex=0,this.domNode.addEventListener("click",function(a){(a.target===c.titleNode||a.target===c.twistie||a.target===c.domNode)&&c._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(a){a.keyCode===f.KEY.ENTER&&(a.target===c.domNode||a.target===c.titleNode||a.target===c.twistie)&&c._changeExpandedState()},!1));if(b.iconClass){var k=document.createElement("span");k.classList.add("sectionIcon");this.domNode.appendChild(k);e=Array.isArray(b.iconClass)?b.iconClass:
[b.iconClass];e.forEach(function(a){k.classList.add(a)})}b.headerClass&&(e=Array.isArray(b.headerClass)?b.headerClass:[b.headerClass],e.forEach(function(a){this.domNode.classList.add(a)}.bind(this)));this.titleActionsNode=document.createElement("div");this.titleActionsNode.id=b.id+"TitleActionsArea";this.titleActionsNode.classList.add("layoutLeft");this.titleActionsNode.classList.add("sectionActions");this.domNode.appendChild(this.titleActionsNode);this.titleNode=document.createElement("div");this.titleNode.id=
b.id+"Title";this.titleNode.classList.add("sectionAnchor");this.titleNode.classList.add("sectionTitle");this.titleNode.classList.add("layoutLeft");this.domNode.appendChild(this.titleNode);this.titleNode.textContent=b.title;"function"===typeof b.getItemCount&&(e=document.createElement("div"),e.classList.add("layoutLeft"),e.classList.add("sectionItemCount"),this.domNode.appendChild(e),e.textContent=b.getItemCount(this));this._progressNode=document.createElement("div");this._progressNode.id=b.id+"Progress";
this._progressNode.classList.add("sectionProgress");this._progressNode.classList.add("sectionTitle");this._progressNode.classList.add("layoutLeft");this._progressNode.style.display="none";this._progressNode.textContent="...";this.domNode.appendChild(this._progressNode);this.titleLeftActionsNode=document.createElement("div");this.titleLeftActionsNode.id=b.id+"LeftTitleActionsArea";this.titleLeftActionsNode.classList.add("layoutLeft");this.titleLeftActionsNode.classList.add("sectionActions");this.domNode.appendChild(this.titleLeftActionsNode);
e=document.createElement("div");e.id=b.id+"FilterSearchBox";this.domNode.appendChild(e);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=b.id+"ToolActionsArea";this._toolActionsNode.classList.add("layoutRight");this._toolActionsNode.classList.add("sectionActions");this.domNode.appendChild(this._toolActionsNode);this.actionsNode=document.createElement("ul");this.actionsNode.id=b.id+"ActionArea";this.actionsNode.classList.add("layoutRight");this.actionsNode.classList.add("commandList");
this.actionsNode.classList.add("sectionActions");this.domNode.appendChild(this.actionsNode);this.selectionNode=document.createElement("ul");this.selectionNode.id=b.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("commandList");this.selectionNode.classList.add("sectionActions");this.domNode.appendChild(this.selectionNode);b.slideout&&(e=d.slideoutHTMLFragment(b.id),h=document.createRange(),h.selectNode(this.domNode),e=h.createContextualFragment(e),
this.domNode.appendChild(e));this._contentParent=document.createElement("div");this._contentParent.id=this.id+"Content";this._contentParent.role="region";this._contentParent.classList.add("sectionTable");this._contentParent.setAttribute("aria-labelledby",this.titleNode.id);a.appendChild(this._contentParent);b.content&&this.setContent(b.content);"function"===typeof b.onExpandCollapse&&(this._onExpandCollapse=b.onExpandCollapse);this._preferenceService=b.preferenceService;this._collapse();if(this._preferenceService){var l=
this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(l.id);void 0===a?b.hidden||l._expand():a&&l._expand();l._updateExpandedState(!1)})}else b.hidden||this._expand(),this._updateExpandedState(!1);this._commandService=b.commandService;this._lastMonitor=0;this._loading={}}function b(a){this._section=a;this._id=++a._lastMonitor}e.prototype={setTitle:function(a){this.titleNode.textContent=a},getHeaderElement:function(a){return this.domNode},getTitleElement:function(a){return this.titleNode},
getActionElement:function(a){return this._toolActionsNode},setContent:function(a){"string"===typeof a?this._contentParent.innerHTML=a:(this._contentParent.innerHTML="",this._contentParent.appendChild(a))},getContentElement:function(){return this._contentParent},embedExplorer:function(a,b,d){this._contentParent.innerHTML="";a.parent||(a.parent=b);this._contentParent.appendChild(a.parent);a.section=this;c.mixin(a,{createActionSections:function(){this.actionsSections&&this.actionsSections.forEach(function(a){if(!f.node(a)){var b=
document.createElement("ul");b.id=a;b.classList.add("commandList");b.classList.add("layoutRight");this.section.actionsNode.appendChild(b)}}.bind(this))},getCommandsVisible:function(){return"hidden"!==this.section.actionsNode.style.visibility},setCommandsVisible:function(a,b){this.section.actionsNode.style.visibility=a?"":"hidden";void 0===b&&(b=a?null:"cursorOnly");this.renderer.selectionPolicy=b;var c=this.getNavHandler();c&&c.setSelectionPolicy(b);a?this.updateCommands():this.actionsSections&&this.actionsSections.forEach(function(a){f.node(a)&&
this.commandRegistry.destroy(a)}.bind(this))},destroy:function(){Object.getPrototypeOf(this).destroy.call(this);var a=this;this.actionsSections&&(this.actionsSections.forEach(function(b){delete a[b]}),delete this.actionsSections)},updateCommands:function(a){this.section.actionsNode&&this.getCommandsVisible()&&(this.createActionSections(),Object.getPrototypeOf(this).updateCommands.call(this,a))},loaded:function(){var a=this;!this.selection&&!d&&(this.serviceRegistry||this.registry?(this.selection=
new k.Selection(this.serviceRegistry||this.registry,this.parent.id+"Selection"),this.selection.addEventListener("selectionChanged",function(b){a.updateCommands(b.selections)})):window.console.error("Could not create a Selection for the explorer because of lack of serviceRegistry"));var b=this.registerCommands();!b||!b.then?a.updateCommands():b.then(function(){a.updateCommands()})}});a.renderer&&(a.renderer.section=this,c.mixin(a.renderer,{getCellHeaderElement:function(a){(a=Object.getPrototypeOf(this).getCellHeaderElement.call(this,
a))&&this.section.setTitle(a.innerHTML);return null}}))},createProgressMonitor:function(){return new b(this)},_setMonitorMessage:function(a,b){this._progressNode.style.display="block";this._loading[a]=b;var c="",d;for(d in this._loading)""!==c&&(c+="\n"),c+=this._loading[d];this._progressNode.title=c;this._updateExpandedState(!1)},_monitorDone:function(a){delete this._loading[a];a="";for(var b in this._loading)""!==a&&(a+="\n"),a+=this._loading[b];this._progressNode.title=a;""===a&&(this._progressNode.style.display=
"none");this._updateExpandedState(!1)},_changeExpandedState:function(){this.hidden?this._expand():this._collapse();this._updateExpandedState(!0)},_updateExpandedState:function(a){var b=!this.hidden,c=this.working,d=this.twistie,e=this.id;d&&(d.classList.remove(this._expandImageClass),d.classList.remove(this._collapseImageClass),d.classList.remove(this._progressImageClass),d.classList.add(c?this._progressImageClass:b?this._expandImageClass:this._collapseImageClass));this._preferenceService&&a&&this._preferenceService.getPreferences("/window/views").then(function(a){a.put(e,
b)});this._onExpandCollapse&&this._onExpandCollapse(b,this)},_expand:function(){this._contentParent.classList.remove("sectionClosed");this.domNode.classList.remove("sectionClosed");this.hidden=!1},_collapse:function(){this.hidden=!0;this._contentParent.classList.add("sectionClosed");this.domNode.classList.add("sectionClosed")}};e.prototype.constructor=e;b.prototype={begin:function(a){this._section.working=!0;this.status=a;this._section._setMonitorMessage(this.id,a)},worked:function(a){this.status=
a;this._section._setMonitorMessage(this.id,a)},done:function(a){this._section.working=!1;this.status=a;this._section._monitorDone(this.id)}};b.prototype.constructor=b;return{Section:e}});
define("orion/compare/compareUtils",["orion/URITemplate"],function(f){var l=l||{};l.compareUtils=l.compareUtils||{};l.compareUtils.lookUpMapper=function(f,d,c){for(var k=0,e=0;e<f.length;e++){var b=f[e][d];0===b&&(b=1);if(c>=k&&c<k+b)return{mapperIndex:e,startFrom:k};if(e===f.length-1)break;k+=f[e][d]}return{mapperIndex:f.length-1,startFrom:k}};l.compareUtils.lookUpLineIndex=function(f,d,c){if(0===c)return 0;for(var k=0,e=0;e<c;e++)k+=f[e][d];return k};l.compareUtils.updateMapper=function(f,d,c,k,
e){if(k!==e&&(0<k||0<e)){var b=l.compareUtils.lookUpMapper(f,d,c);if(!(0>b.mapperIndex)){if(0<k){var a=c-b.startFrom;for(c=b.mapperIndex;c<f.length;c++){a=f[c][d]-a;if(k<=a){f[c][d]-=k;break}f[c][d]-=a;k-=a;a=0}}0<e&&(f[b.mapperIndex][d]+=e)}}};l.compareUtils.overlapMapper=function(f,d,c,k,e){f=c+f[d]-1;f<c&&(f=c);e<k&&(e=k);return f<k||e<c?!1:!0};l.compareUtils.findFirstDiff=function(f,d,c,k){for(var e=0,b=null,a=0;a<f.length&&!(e>k)&&(!l.compareUtils.overlapMapper(f[a],d,e,c,k)||!(b={mapperIndex:a,
startFrom:e},0!==f[a][2]));a++)e+=f[a][d];return b};l.compareUtils.matchMapper=function(f,d,c,k){if(0===f.length)return c;var e=c+Math.round((k-c)/3),b=l.compareUtils.findFirstDiff(f,d,c,k),a=0===f[b.mapperIndex][d]?b.startFrom:b.startFrom+f[b.mapperIndex][d]-1,g=l.compareUtils.lookUpLineIndex(f,1-d,b.mapperIndex),m=b.startFrom-c;return 0===f[b.mapperIndex][2]?g-m:e>=b.startFrom&&e<=a?g-Math.round((k-c)/3):e<b.startFrom?g-m:(0===f[b.mapperIndex][1-d]?g:g+f[b.mapperIndex][1-d]-1)-(a-c)};l.compareUtils.getMapperLineCount=
function(f){for(var d=0,c=0;c<f.length;c++)d+=Math.max(f[c][0],f[c][1]);return d};l.compareUtils.getAnnotationIndex=function(f,d){for(var c=0;c<f.length;c++)if(f[c][0]===d)return c;return-1};l.compareUtils.getAnnotationMapperIndex=function(f,d){return f[d][1]};l.compareUtils.getAnnotationIndexByMapper=function(f,d){for(var c=0;c<f.length;c++)if(f[c][1]===d)return{current:c,prev:c-1,next:c+1};return{current:-1,prev:-1,next:-1}};l.compareUtils.isMapperConflict=function(f,d){return 0>d||!f[d][3]?!1:
1===f[d][3]};l.compareUtils.mergeDiffBlocks=function(f,d,c,k,e,b){for(var a=0;a<d.length;a++){var g=d[a][0],l=c[d[a][1]];if(0<l[0]){for(var n="",r=0;r<l[0];r++)n=n+k[l[2]-1+r].substring(e)+b;l=f.getLineCount();g>=l&&(g=f.getLineEnd(l-1),r=f.getLineEnd(l-1,!0),g===r?(f.setText(b,g,g),g=l):g=l-1);g=f.getLineStart(g);f.setText(n,g,g)}}};l.compareUtils.generateCompareHref=function(h,d){var c=require.toUrl("compare/compare.html");d.conflict||(d.conflict=void 0);d.readonly||(d.readonly=void 0);return(new f(c+
"#{,resource,params*}")).expand({resource:h,params:d})};l.compareUtils.generateCompareTreeHref=function(h,d){var c=require.toUrl("compare-tree/compare-tree.html");return(new f(c+"#{,resource,params*}")).expand({resource:h,params:d})};return l.compareUtils});
define("orion/git/gitConfigPreference",["orion/Deferred"],function(f){function l(f){this._prefix="/git/config";this._preferenceService=f.getService("orion.core.preference")}l.prototype={getConfig:function(){var h=new f;this._preferenceService.getPreferences(this._prefix).then(function(d){d=d.get("userInfo");h.resolve(d)});return h},setConfig:function(h){var d=new f;this._preferenceService.getPreferences(this._prefix).then(function(c){c.put("userInfo",h);d.resolve()});return d}};return l.prototype.constructor=
l});
define("orion/git/widgets/ReviewRequestDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(f,l){function h(d){this._init(d)}h.prototype=new l.Dialog;h.prototype.TEMPLATE='\x3cdiv\x3e\x3cdiv id\x3d"treeContentPane" style\x3d"padding: 8px"\x3e\x3clabel for\x3d"reviewReqUrl"\x3e${Paste link in email or IM}\x3c/label\x3e\x3cbr\x3e\x3cinput id\x3d"reviewReqUrl" style\x3d"width: 50em" value\x3d""/\x3e\x3c/div\x3e\x3cdiv id\x3d"newBranchPane" style\x3d"padding: 8px"\x3e\x3clabel for\x3d"reviewerName"\x3e${Send the link to the reviewer}\x3c/label\x3e\x3cbr\x3e\x3cinput id\x3d"reviewerName" style\x3d"width: 30em"  value\x3d""/\x3e\x3c/div\x3e\x3c/div\x3e';h.prototype._init=
function(d){var c=this;this.title=d.title||f["Contribution Review Request"];this.modal=!0;this.messages=f;this.url=d.url;this.func=d.func;this.buttons=[];this.buttons.push({callback:function(){c.destroy();c.func(c.$reviewerName.value)},text:f.Submit});this._initialize()};h.prototype._bindToDom=function(d){this.$reviewReqUrl.value=this.url};h.prototype.constructor=h;return{ReviewRequestDialog:h}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(f,l){var h;h=f.toUrl?(new URL(f.toUrl("workspace"),window.location.href)).href:(new URL("/",window.location.href)).href;return{makeRelative:function(d){if(!d)return d;var c=window.location.protocol+"//"+window.location.host;return 0===d.indexOf(c)?d.substring(c.length):d},isAtRoot:function(d){return!d?!1:"/workspace"===d?!0:0===(new URL(d,window.location.href)).href.indexOf(h)}}});
define("orion/explorers/explorer-table","i18n!orion/navigate/nls/messages orion/Deferred orion/webui/littlelib orion/i18nUtil orion/fileUtils orion/explorers/explorer orion/EventTarget orion/objects orion/util".split(" "),function(f,l,h,d,c,k,e,b,a){function g(a,b,c,d,e,f){this.registry=a;this.root=b;this.fileClient=c;this.idPrefix=d||"";this.excludeFiles=!!e;this.excludeFolders=!!f}function m(a){e.attach(this);this.registry=a.serviceRegistry;this.treeRoot=a.treeRoot;this.selection=a.selection;this.fileClient=
a.fileClient;this.excludeFiles=a.excludeFiles;this.excludeFolders=a.excludeFolders;this.navHandlerFactory=a.navHandlerFactory;this.parentId=a.parentId;this.renderer=a.rendererFactory(this);this.dragAndDrop=a.dragAndDrop;this.setFocus=a.setFocus;this.myTree=this.model=null;this._hookedDrag=this.checkbox=!1;var b=a.modelEventDispatcher?a.modelEventDispatcher:new e;this.modelEventDispatcher=b;var c=this;this._modelListeners={};"copy copyMultiple create delete deleteMultiple import move moveMultiple".split(" ").forEach(function(a){b.addEventListener(a,
c._modelListeners[a]=c.modelHandler[a].bind(c))});this._clickListener=function(a){if("A"===a.target.tagName){for(a=a.target;a&&!a._item;)a=a.parentNode;if(a&&a._item)c.onLinkClick({type:"linkClick",item:a._item})}};(a=h.node(this.parentId))&&a.addEventListener("click",this._clickListener);var d=this.renderer;this.registry&&this.registry.registerService("orion.cm.managedservice",{updated:function(a){a=a&&"undefined"!==a["links.newtab"]?a["links.newtab"]?"_blank":"_self":"_self";d.setTarget&&d.setTarget(a)}},
{pid:"nav.config"})}g.prototype=new k.ExplorerModel;b.mixin(g.prototype,{getRoot:function(a){a(this.root)},processParent:function(a,b){var c=a.Projects?[]:[a].concat(a.Parents||[]);if(this.excludeFiles||this.excludeFolders){var d=[],e;for(e in b)if(!(b[e].Directory?this.excludeFolders:this.excludeFiles))d.push(b[e]),b[e].parent=a,b[e].Parents||(b[e].Parents=c);b=d}else for(d in b)b[d].parent=a,b[d].Parents||(b[d].Parents=c);a.children=b;a.children.sort(this.sortChildren);return b},sortChildren:function(a,
b){var c=a.Directory;if(c!==b.Directory)return c?-1:1;var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0},getChildren:function(a,b){var c=this;if(a.children)b(a.children);else if(void 0!==a.Directory&&!1===a.Directory)b([]);else if(a.Children)b(c.processParent(a,a.Children));else if(a.Location){var d=null;this.registry&&(d=this.registry.getService("orion.page.progress"));(d?d.progress(this.fileClient.fetchChildren(a.ChildrenLocation),f["Fetching children of "]+
a.Name):this.fileClient.fetchChildren(a.ChildrenLocation)).then(function(d){c.destroyed||b(c.processParent(a,d))},function(){b([])})}else b([])},hasChildren:function(){var a=!1;this.root.Children&&(a=0<this.root.Children.length);return a}});g.prototype.constructor=g;var n,r;m.prototype=Object.create(k.Explorer.prototype);b.mixin(m.prototype,{destroy:function(){var a=this;Object.keys(this._modelListeners).forEach(function(b){a.modelEventDispatcher.removeEventListener(b,a._modelListeners[b])});var b=
h.node(this.parentId);b&&b.removeEventListener("click",this._clickListener);k.Explorer.prototype.destroy.call(this)},onLinkClick:function(a){this.dispatchEvent(a)},onModelCreate:function(a){return this.changedItem(a.parent,!0)},onModelCopy:function(a){var b=this,c={};(a.items||[a]).forEach(function(a){a=(a=a.parent)||b.treeRoot;c[a.Location]=a});return l.all(Object.keys(c).map(function(a){return b.changedItem(c[a],!0)}))},onModelMove:function(a){var b=this,c={};(a.items||[a]).forEach(function(a){var d=
b.treeRoot;if((d.Location||d.ContentLocation)===a.oldValue.Location){var e=b.treeRoot;a=a.newValue;a=a.ChildrenLocation?a:this.fileClient.read(a.ContentLocation,!0);return l.when(a,function(a){b.dispatchEvent({type:"rootMoved",oldValue:e,newValue:a});b.loadResourceList(a)})}d=(d=a.oldValue.parent)||b.treeRoot;c[d.Location]=d;d=(d=a.parent)||b.treeRoot;c[d.Location]=d;a.oldValue.Directory&&(a.newValue&&b.isExpanded(a.oldValue))&&(c[a.newValue.Location]=a.newValue)});return l.all(Object.keys(c).map(function(a){return b.changedItem(c[a],
!0)}))},onModelDelete:function(a){a=a.items||[a];var b=this,c=b.treeRoot,d;if(a.some(function(a){if(a.oldValue.Location===(c.Location||c.ContentLocation)){if(a.oldValue.Location!==(a.parent.Location||a.parent.ContentLocation))d=a.parent;return!0}return!1}))return this.loadResourceList(d);var e={};a.forEach(function(a){a=a.parent;e[a.Location]=a});return l.all(Object.keys(e).map(function(a){return b.changedItem(e[a],!0)}))},modelHandler:{copy:function(a){if(!a.count)return this.onModelCopy(a)},copyMultiple:function(a){return this.onModelCopy(a)},
create:function(a){return this.onModelCreate(a)},"delete":function(a){if(!a.count)return this.onModelDelete(a)},deleteMultiple:function(a){return this.onModelDelete(a)},"import":function(a){return this.changedItem(a.target,!0)},move:function(a){if(!a.count)return this.onModelMove(a)},moveMultiple:function(a){return this.onModelMove(a)}},makeNewChildItemPlaceholder:function(a,b,c){var d=new l;this.model.getChildren(a,function(e){var f=null,g=!1;if(e){e.push(b);e.sort(this.model.sortChildren);var f=
e.indexOf(b),h=f+1;e.length>h?f=e[h]:(g=f-1,f=0<=g?e[g]:a,g=!0)}else f=a;e=this.makeNewItemPlaceholder(f,c,g);d.resolve(e)}.bind(this));return d},_makeDropTarget:function(b,e,g){if(this.dragAndDrop){var k=this,m=this.dragAndDrop,u=function(a){n=a.target};g&&(this._oldDragStart&&e.removeEventListener("dragstart",this._oldDragStart,!1),this._oldDragStart=u);e.addEventListener("dragstart",u,!1);u=function(a){n=null};g&&(this._oldDragEnd&&e.removeEventListener("dragend",this._oldDragEnd,!1),this._oldDragEnd=
u);e.addEventListener("dragend",u,!1);u=function(a){e.classList.remove("dragOver");a.preventDefault();a.stopPropagation()};g&&(this._oldDragLeave&&e.removeEventListener("dragleave",this._oldDragLeave,!1),this._oldDragLeave=u);e.addEventListener("dragleave",u,!1);u=function(b){if(n)r=b.dataTransfer.dropEffect=(a.isMac?b.altKey:b.ctrlKey)?"copy":"move";else if(!a.isIE&&("all"===b.dataTransfer.effectAllowed||"uninitialized"===b.dataTransfer.effectAllowed||0<=b.dataTransfer.effectAllowed.indexOf("copy")))b.dataTransfer.dropEffect=
"copy";e.classList.add("dragOver");h.stop(b)};g&&(this._oldDragEnter&&e.removeEventListener("dragenter",this._oldDragEnter,!1),this._oldDragEnter=u);e.addEventListener("dragenter",u,!1);u=function(b){if(n)r=b.dataTransfer.dropEffect=(a.isMac?b.altKey:b.ctrlKey)?"copy":"move";else if(!a.isIE&&("all"===b.dataTransfer.effectAllowed||"uninitialized"===b.dataTransfer.effectAllowed||0<=b.dataTransfer.effectAllowed.indexOf("copy")))b.dataTransfer.dropEffect="copy";h.stop(b)};g&&!this._oldDragOver&&(e.addEventListener("dragover",
u,!1),this._oldDragOver=u);var w=null,D=null;k.registry&&(w=k.registry.getService("orion.page.progress"),D=k.registry.getService("orion.page.message"));var y=function(a){if(D){var b=null,b="string"===typeof a?{Severity:"Error",Message:a}:a&&a.error?{Severity:"Error",Message:a.error}:a;D.setProgressResult(b)}else window.console.log(a)},E=function(a,e,g,h,k,m){var n=!1,q=c.isAtRoot(e.Location);m?(n=!0,m.entryCount++):a.isDirectory&&(n=!0,m={entryCount:1,deferred:new l},g._makeUploadNode(e,a.name,!0).then(function(a){var b=
function(){a.destroyFunction();q?g.loadResourceList(g.treeRoot.Path,!0):g.changedItem(e)};m.deferred.then(b,b)}));var p=function(){m&&(m.entryCount--,0===m.entryCount&&m.deferred.resolve())},s=function(a){if(D){var b=null,b="string"===typeof a?{Severity:"Error",Message:a}:a&&a.error?{Severity:"Error",Message:a.error}:a;D.setProgressResult(b)}else window.console.log(a);p()};!e.Location&&e.fileMetadata&&(e=e.fileMetadata);if(a.isFile)q?s(f["You cannot copy files directly into the workspace.  Create a folder first."]):
a.file(function(a){if(m){var c=a.name.indexOf(".zip")===a.name.length-4&&window.confirm(d.formatMessage(f["Unzip ${0}?"],a.name));h(e,a,g,c,!1,{error:function(b){b=f["Uploading the following file failed: "]+a.name;D?D.setProgressResult({Severity:"Error",Message:b}):window.console.log(b)},loadend:p},!0)}else g._uploadFile(b,a,!0)}.bind(this));else if(a.isDirectory){var L=a.createReader(),r=function(a){L.readEntries(function(b){for(var c=0;c<b.length;c++)E(b[c],a,g,h,k,m);p()})};q?(w?w.progress(k.createProject(e.ChildrenLocation,
a.name),d.formatMessage(f["Creating ${0}"],a.name)):k.createProject(e.ChildrenLocation,a.name)).then(function(a){(w?w.progress(k.read(a.ContentLocation,!0),f["Loading "]+a.name):k.read(a.ContentLocation,!0)).then(function(a){r(a)},s)},s):(w?w.progress(k.createFolder(e.Location,a.name),d.formatMessage(f["Creating ${0}"],a.name)):k.createFolder(e.Location,a.name)).then(function(a){var c=g.modelEventDispatcher;n||c.dispatchEvent({type:"create",parent:b,newValue:a});r(a)},s)}},u=function(a){var g;e.classList.remove("dragOver");
if(n){g=k.fileClient;for(var l=n,p;l;){if(l._item){p=l._item;break}l=l.parentNode}if(!p)return;var u="copy"===r;g=(u?g.copyFile:g.moveFile).apply(g,[p.Location,b.Location,p.Name]);w&&(l=d.formatMessage(f[u?"Copying ${0}":"Moving ${0}"],p.Location),g=w.showWhile(g,l));g.then(function(a){k.modelEventDispatcher.dispatchEvent({type:u?"copy":"move",oldValue:p,newValue:a,parent:b})},y)}else if(a.dataTransfer.items&&0<a.dataTransfer.items.length)for(g=0;g<a.dataTransfer.items.length;g++)l=null,"function"===
typeof a.dataTransfer.items[g].getAsEntry?l=a.dataTransfer.items[g].getAsEntry():"function"===typeof a.dataTransfer.items[g].webkitGetAsEntry&&(l=a.dataTransfer.items[g].webkitGetAsEntry()),l&&E(l,b,k,m,k.fileClient);else if(a.dataTransfer.files&&0<a.dataTransfer.files.length)for(g=0;g<a.dataTransfer.files.length;g++)l=a.dataTransfer.files[g],!l.size&&!l.type?y(d.formatMessage(f["Did not drop ${0}.  Folder drop is not supported in this browser."],l.name)):c.isAtRoot(b.Location)?y(f["You cannot copy files directly into the workspace.  Create a folder first."]):
k._uploadFile(b,l,!0);h.stop(a)};g&&(this._oldDrop&&e.removeEventListener("drop",this._oldDrop,!1),this._oldDrop=u);e.addEventListener("drop",u,!1)}},_uploadFile:function(a,b,c){var e=a;!e.Location&&e.fileMetadata&&(e=e.fileMetadata);a=function(){this._makeUploadNode(e,b.name,!1).then(function(a){var c=a.refNode,g=a.progressBar,h=a.cancelButton,k=a.destroyFunction,l=this.registry.getService("orion.page.message");a={progress:function(a){var b="";if(a.lengthComputable){b=Math.floor(100*(a.loaded/a.total))+
"%";g.style.width=b;var d=Math.round(a.loaded/1024);a=Math.round(a.total/1024);g.title=f["Upload progress: "]+b+",  "+d+"/"+a+" KB";c.title=g.title}},loadend:function(a){k();this.changedItem(e)}.bind(this),error:function(a){a=f["Uploading the following file failed: "]+b.name;l?l.setProgressResult({Severity:"Error",Message:a}):window.console.log(a)}};var m=b.name.indexOf(".zip")===b.name.length-4&&window.confirm(d.formatMessage(f["Unzip ${0}?"],b.name)),n=this.dragAndDrop(e,b,this,m,!1,a,!0);h.addEventListener("click",
function(){n.abort()})}.bind(this))}.bind(this);c?this.expandItem(e,!1).then(a):a()},_makeUploadNode:function(a,b,c){var d=this.getRow(a).id;return this.makeNewChildItemPlaceholder(a,{Name:b,Directory:c},d).then(function(a){var d=null,e,g;if(a){d={};e=a.refNode;g=a.wrapperNode;e.classList.add("uploadNode");d.refNode=e;d.wrapperNode=g;g=document.createElement("span");g.classList.add("uploadNodeText");g.appendChild(document.createTextNode(b));e.appendChild(g);g=document.createElement("span");g.classList.add("progressBarWrapper");
var h=document.createElement("span");h.classList.add("progressBar");g.appendChild(h);e.appendChild(g);d.progressBar=h;c?(h.classList.add("continuous"),e.title=f["Uploading "]+b,h.title=e.title):(g=document.createElement("button"),g.classList.add("imageSprite"),g.classList.add("core-sprite-delete"),g.classList.add("uploadCancelButton"),g.title=f["Cancel upload"],e.appendChild(g),d.cancelButton=g);d.destroyFunction=a.destroyFunction}return d}.bind(this))},createModel:function(){return new g(this.registry,
this.treeRoot,this.fileClient,this.parentId,this.excludeFiles,this.excludeFolders)},changedItem:function(a,b){if(this.treeRoot&&this.treeRoot.Location===a.Location)return this.loadResourceList(this.treeRoot,b);var c=this,d=new l;a.children=a.Children=null;this.model.getChildren(a,function(e){c.getNavHandler();c.myTree.refresh.bind(c.myTree)(a,e,b);d.resolve(e)});return d},showItem:function(a,b){var c=new l;if(!a||!this.model||!this.myTree||!this.myTree.showRoot&&a.Location===this.treeRoot.Location)return c.reject();
var d=this.getRow(a);if(d)c.resolve(d._item||a);else return a.Parents&&0<a.Parents.length?(a.Parents[0].Parents=a.Parents.slice(1),this.expandItem(a.Parents[0],b).then(function(b){var c=this.getRow(a);return!c?this.changedItem(b,!0).then(function(){var b=this.getRow(a);return b?b._item:(new l).reject()}.bind(this)):c._item||a}.bind(this))):void 0===b||b?this.reroot(a):c.reject();return c},expandItem:function(a,b){var c=new l;this.showItem(a,b).then(function(a){this.myTree.isExpanded(a)?c.resolve(a):
this.myTree.expand(this.model.getId(a),function(){c.resolve(a)})}.bind(this),c.reject);return c},reveal:function(a,b){return this.showItem(a,b).then(function(a){var b=this.getNavHandler();b&&(b.cursorOn(a,!0),b.setSelection(a));return a}.bind(this))},reroot:function(a){return(new l).reject()},isExpanded:function(a){a=this.model.getId(a);return this.renderer.tableTree.isExpanded(a)},getNameNode:function(a){if(a=this.model.getId(a))return h.node(a+"NameLink")},scopeUp:function(){},scopeDown:function(a){},
loadResourceList:function(a,b,d){a&&"object"===typeof a&&(a=a.ChildrenLocation||a.ContentLocation);a=c.makeRelative(a);if(!b&&a===this._lastPath)return(new l).resolve(this.treeRoot);this._lastPath=a;var e=this;return b||a!==this.treeRoot.Path?this.load(this.fileClient.loadWorkspace(a),f["Loading "]+a).then(function(b){e.treeRoot.Path=a;"function"===typeof d&&d();e.dispatchEvent({type:"rootChanged",root:e.treeRoot});return(new l).resolve(e.treeRoot)},function(a){e.treeRoot.Path=null;e.dispatchEvent({type:"rootChanged",
root:e.treeRoot});return(new l).reject(a)}):(new l).resolve(e.treeRoot)},load:function(a,b,c){var d=h.node(this.parentId),e=h.node("progress");e||(e=document.createElement("div"),e.id="progress",h.empty(d),d.appendChild(e));h.empty(e);var f=setTimeout(function(){h.empty(e);e.appendChild(document.createTextNode(b))},500),g=this;return l.when(a,function(a){clearTimeout(f);if(!g.destroyed){g.treeRoot={};for(var b in a)g.treeRoot[b]=a[b];g.model=g.createModel();g.dragAndDrop&&(g._hookedDrag?g._makeDropTarget(g.treeRoot,
d,!0):(a=(a=d&&("draggable"in d||"ondragstart"in d&&"ondrop"in d))&&!(!window.File||!window.FileList||!window.FileReader),g._hookedDrag=!0,a?g._makeDropTarget(g.treeRoot,d,!0):(g.dragAndDrop=null,window.console.log("Local file drag and drop is not supported in this browser."))));var e=new l;g.createTree(g.parentId,g.model,{onComplete:function(a){e.resolve(a)},navHandlerFactory:g.navHandlerFactory,setFocus:"undefined"===typeof g.setFocus?!0:g.setFocus,selectionPolicy:g.renderer.selectionPolicy,onCollapse:function(a){if(g.getNavHandler())g.getNavHandler().onCollapse(a)}});
return e.then(function(){if("function"===typeof c)try{c()}catch(a){g.registry&&g.registry.getService("orion.page.message").setErrorMessage(a)}if("function"===typeof g.onchange)g.onchange(g.treeRoot);return g.treeRoot})}},function(a){clearTimeout(f);g.registry&&g.registry.getService("orion.page.message").setProgressResult(a);return(new l).reject(a)})},onchange:function(a){}});m.prototype.constructor=m;return{FileExplorer:m,FileModel:g}});
define("orion/webui/dialogs/DirectoryPrompterDialog","i18n!orion/widgets/nls/messages orion/webui/littlelib orion/webui/dialog orion/fileUtils orion/selection orion/explorers/navigationUtils orion/explorers/explorer orion/explorers/explorer-table".split(" "),function(f,l,h,d,c,k,e,b){function a(a,b){this.explorer=b;this._init(a)}function g(a){this._init(a)}a.prototype=new e.SelectionRenderer;a.prototype.constructor=a;a.prototype.getLabelColumnIndex=function(){return 0};a.prototype.getCellElement=
function(a,b,c){a=document.createElement("td");c.appendChild(a);var d=document.createElement("span");d.id=c.id+"navSpan";a.appendChild(d);d.className="mainNavColumn singleNavColumn";this.getExpandImage(c,d);d.appendChild(document.createTextNode(b.Name))};g.prototype=new h.Dialog;g.prototype.TEMPLATE='\x3cdiv id\x3d"message" style\x3d"width: 25em; padding-bottom: 5px;"\x3e\x3c/div\x3e\x3cdiv id\x3d"directoryTree" class\x3d"explorerTreeClass" style\x3d"width:25em; min-height: 25em; max-height:30em; height: auto; overflow-y: auto;"\x3e\x3c/div\x3e';
g.prototype._init=function(a){this.title=a.title||f["Choose a Folder"];this.modal=!0;this.buttons=[{text:f.OK,isDefault:!0,callback:this.done.bind(this)}];this.customFocus=!0;this._fileClient=a.fileClient;this._serviceRegistry=a.serviceRegistry;this._message=a.message||"";this._func=a.func;this._initialize()};g.prototype._bindToDom=function(a){this.loadFolderList("/");this._message?this.$message.appendChild(document.createTextNode(this._message)):this.$message.style.display="none";this.$directoryTree.focus()};
g.prototype.loadFolderList=function(e){e=d.makeRelative(e);this.selection=new c.Selection(this._serviceRegistry,"orion.directoryPrompter.selection");this.explorer=new b.FileExplorer({treeRoot:{children:[]},selection:this.selection,serviceRegistry:this._serviceRegistry,fileClient:this._fileClient,parentId:"directoryTree",excludeFiles:!0,rendererFactory:function(b){return new a({checkbox:!1,singleSelection:!0,treeTableClass:"directoryPrompter"},b)}});this.explorer.loadResourceList(e,!0,null)};g.prototype.done=
function(){this.selection.getSelection(function(a){this.hide();this._func(a)}.bind(this))};g.prototype.constructor=g;return{DirectoryPrompterDialog:g}});
define("orion/git/widgets/CloneGitRepositoryDialog",["i18n!git/nls/gitmessages","orion/webui/dialogs/DirectoryPrompterDialog","orion/webui/dialog","orion/URITemplate","require"],function(f,l,h,d,c){function k(b){this._init(b)}var e=new d("edit/edit.html#{,resource,params*}");k.prototype=new h.Dialog;k.prototype.TEMPLATE='\x3cspan id\x3d"basicPane"\x3e\x3cdiv style\x3d"padding: 8px"\x3e\x3clabel for\x3d"gitUrl"\x3e${Repository URL:}\x3c/label\x3e\x3cinput id\x3d"gitUrl" style\x3d"width: 50em" value\x3d""/\x3e\x3c/div\x3e\x3cdiv style\x3d"padding: 8px; text-align: right;"\x3e\x3ca id\x3d"advancedLink" href\x3d"javascript:"\x3e${Choose target location}\x3c/a\x3e\x3ca id\x3d"advancedLinkHide" href\x3d"javascript:" style\x3d"display: none"\x3e${Default target location}\x3c/a\x3e\x3c/div\x3e\x3c/span\x3e\x3cspan id\x3d"advancedPane" style\x3d"display: none;"\x3e\x3cdiv style\x3d"padding: 8px"\x3e\x3cinput id\x3d"isNewProject" type\x3d"radio" name\x3d"isNewProject" checked value\x3d"new"/\x3e\x3clabel for\x3d"gitName" style\x3d"padding: 0 8px"\x3e${New folder:}\x3c/label\x3e\x3cinput id\x3d"gitName" value\x3d""\x3e\x3c/div\x3e\x3cdiv style\x3d"padding: 8px"\x3e\x3cinput id\x3d"isExistingProject" type\x3d"radio" name\x3d"isNewProject" value\x3d"existing"/\x3e\x3clabel for\x3d"gitPath" style\x3d"padding: 0 8px"\x3e${Existing directory:}\x3c/label\x3e\x3cinput id\x3d"gitPath" type\x3d"hidden" value\x3d""\x3e\x3cspan id\x3d"shownGitPath" style\x3d"padding-right: 24px"\x3e\x3c/span\x3e\x3ca id\x3d"changeGitPath" href\x3d"javascript:"\x3e${Change...}\x3c/a\x3e\x3c/div\x3e\x3c/span\x3e';k.prototype._init=
function(b){var a=this;this.title=b.title?b.title:f["Clone Git Repository"];this.modal=!0;this.messages=f;this.advancedShown=!1;this.alwaysShowAdvanced=b.alwaysShowAdvanced;this.advancedOnly=b.advancedOnly;this.url=b.url;this.serviceRegistry=b.serviceRegistry;this.fileClient=b.fileClient;this.func=b.func;this.buttons=[];this.buttons.push({callback:function(){a.destroy();a._execute()},text:"OK"});this._initialize()};k.prototype._bindToDom=function(b){var a=this;this.url&&(this.$gitUrl.value=this.url);
this.advancedOnly&&(this.$basicPane.style.display="none",this.$advancedPane.style.display="",setTimeout(function(){a.$gitName.focus()},400));this.$changeGitPath.addEventListener("click",function(b){a._openDirectoryPickerDialog()});this.$isExistingProject.addEventListener("click",function(b){a._checkNewExisting()});this.$isNewProject.addEventListener("click",function(b){a._checkNewExisting()});this.$gitName.addEventListener("focus",function(b){a._showNewProject()});this.$advancedLink.addEventListener("click",
function(b){a._showAdvanced()});this.$advancedLinkHide.addEventListener("click",function(b){a._hideAdvanced()});this.alwaysShowAdvanced&&this._showAdvanced()};k.prototype._execute=function(){this.func&&this.func(this.advancedOnly?void 0:this.$gitUrl.value,this.advancedShown&&this.$isNewProject.checked?void 0:this.$gitPath.value,this.advancedShown&&!this.$isNewProject.checked?void 0:this.$gitName.value)};k.prototype._showAdvanced=function(){this.advancedShown=!0;this.$advancedPane.style.display="";
this.$advancedLink.style.display="none";this.$advancedLinkHide.style.display=""};k.prototype._hideAdvanced=function(){this.advancedShown=!1;this.$advancedPane.style.display="none";this.$advancedLink.style.display="";this.$advancedLinkHide.style.display="none"};k.prototype._checkNewExisting=function(){this.$isExistingProject.checked?this._openDirectoryPickerDialog():this.$gitName.focus()};k.prototype._showNewProject=function(){this.$isNewProject.checked=!0};k.prototype._openDirectoryPickerDialog=function(){function b(a){var b=
document.createElement("a");b.href=c.toUrl(e.expand({resource:a.ChildrenLocation}));b.textContent=a.Name;return b}var a=this;this.$isExistingProject.checked=!0;var d=new l.DirectoryPrompterDialog({title:f["Choose a Folder"],serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:function(c){if(c&&c.Location){for(a.$gitPath.value=c.Location;a.$shownGitPath.hasChildNodes();)a.$shownGitPath.removeChild(a.$shownGitPath.lastChild);for(a.$shownGitPath.appendChild(b(c));c.parent&&"/"!==c.parent.Location;)a.$shownGitPath.insertBefore(document.createTextNode("/"),
a.$shownGitPath.firstChild),a.$shownGitPath.insertBefore(b(c.parent),a.$shownGitPath.firstChild),c=c.parent}}});this._addChildDialog(d);d.show()};k.prototype.constructor=k;return{CloneGitRepositoryDialog:k}});
define("orion/git/widgets/OpenCommitDialog","require i18n!git/nls/gitmessages orion/i18nUtil orion/Deferred orion/webui/dialog orion/URITemplate orion/webui/littlelib".split(" "),function(f,l,h,d,c,k,e){function b(a){this._init(a)}var a=new k("git/git-commit.html#{,resource,params*}?page\x3d1\x26pageSize\x3d1");b.prototype=new c.Dialog;b.prototype.TEMPLATE='\x3cdiv\x3e\x3clabel for\x3d"resourceName"\x3e${Type the commit name (sha1):}\x3c/label\x3e\x3c/div\x3e\x3cdiv\x3e\x3cinput type\x3d"text" id\x3d"resourceName"\x3e\x3c/div\x3e\x3cdiv id\x3d"results" style\x3d"max-height:400px; height:auto; overflow-y:auto;"\x3e\x3c/div\x3e';
b.prototype._init=function(a){this.title=a.title||l["Find Commit"];this.modal=!0;this.messages=l;this.SEARCH_DELAY=500;this.timeoutId=null;this.time=0;this.serviceRegistry=a.serviceRegistry;if(!this.serviceRegistry)throw Error("Missing required argument: serviceRegistry");this.repositories=a.repositories;if(!this.repositories)throw Error("Missing required argument: repositories");this.commitName=a.commitName;this._initialize()};b.prototype._bindToDom=function(a){var b=this;this.$resourceName.addEventListener("input",
function(a){b.time=+new Date;b.timeoutId&&clearTimeout(b.timeoutId);b.timeoutId=setTimeout(b._checkSearch.bind(b),0)},!1);this.$resourceName.addEventListener("keydown",function(a){if(a.keyCode===e.KEY.ENTER){var c=e.$("a",b.$results);c&&(e.stop(a),window.open(c.href),b.hide())}},!1);this.$resourceName.value=this.commitName};b.prototype._checkSearch=function(){clearTimeout(this.timeoutId);var a=(new Date).getTime();a-this.time>this.SEARCH_DELAY?(this.time=a,this._doSearch()):this.timeoutId=setTimeout(this._checkSearch.bind(this),
50)};b.prototype._findCommitLocation=function(a,b,c){var e=this;c||(c=new d);0<a.length?this.serviceRegistry.getService("orion.page.progress").progress(e.serviceRegistry.getService("orion.git.provider").doGitLog("/gitapi/commit/"+b+a[0].ContentLocation+"?page\x3d1\x26pageSize\x3d1"),"Getting commit details "+b).then(function(a){c.resolve(a.Children[0])},function(d){e._findCommitLocation(a.slice(1),b,c)}):c.reject();return c};b.prototype._doSearch=function(){var a=this,b=this.$resourceName&&this.$resourceName.value;
if(b){var c=document.createElement("div");c.appendChild(document.createTextNode(l["Searching..."]));e.empty(this.$results);this.$results.appendChild(c);this.serviceRegistry.getService("orion.page.message").setProgressMessage(l["Looking for the commit"]);this._findCommitLocation(this.repositories,b).then(function(b){e.empty(a.$results);a._displayCommit(b,a.$results);a.serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(b){b=document.createElement("div");b.appendChild(document.createTextNode("No commits found"));
e.empty(a.$results);a.$results.appendChild(b);a.serviceRegistry.getService("orion.page.message").setProgressMessage("")})}};b.prototype._displayCommit=function(b,c){var d=this,k=document.createElement("div");k.style.padding="10px";k.style.maxWidth="480px";e.empty(c);c.appendChild(k);var t=b.Message.split(/(\r?\n|$)/)[0],q=document.createElement("a");q.className="navlinkonpage";q.href=f.toUrl(a.expand({resource:b.Location}));q.textContent=t;k.appendChild(q);q.addEventListener("mouseup",function(a){0===
a.button&&(!a.ctrlKey&&!a.metaKey)&&d.hide()},!1);q.addEventListener("keyup",function(a){a.keyCode===e.KEY.ENTER&&d.hide()},!1);t=document.createElement("div");t.style.paddingTop="15px";k.appendChild(t);b.AuthorImage&&(k=new Image,k.src=b.AuthorImage,k.name=b.AuthorName,k.className="git-author-icon",t.appendChild(k));k=document.createElement("div");k.textContent=h.formatMessage(l[" authored by ${0} {${1}) on ${2}"],b.AuthorName,b.AuthorEmail,(new Date(b.Time)).toLocaleString());t.appendChild(k);k=
document.createElement("div");k.textContent=h.formatMessage(l["committed by 0 (1)"],b.CommitterName,b.CommitterEmail);t.appendChild(k);k=document.createElement("div");k.style.paddingTop="15px";k.textContent=l["commit:"]+b.Name;t.appendChild(k);b.Parents&&0<b.Parents.length&&(c=document.createElement("div"),c.textContent=l["parent:"],k=document.createElement("a"),k.className="navlinkonpage",k.href=f.toUrl(a.expand({resource:b.Parents[0].Location})),k.textContent=b.Parents[0].Name,c.appendChild(k),
k.addEventListener("mouseup",function(a){0===a.button&&(!a.ctrlKey&&!a.metaKey)&&d.hide()},!1),k.addEventListener("keyup",function(a){a.keyCode===e.KEY.ENTER&&d.hide()},!1),t.appendChild(c))};b.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};b.prototype.constructor=b;return{OpenCommitDialog:b}});
define("orion/git/widgets/CommitDialog",["i18n!git/nls/gitmessages","orion/webui/dialog","orion/git/gitConfigPreference"],function(f,l,h){function d(c){this._init(c)}d.prototype=new l.Dialog;d.prototype.TEMPLATE='\x3cdiv style\x3d"display: none; padding-top: 10px; padding-bottom: 10px;" id\x3d"commitInfoBar"\x3e\x3cstrong id\x3d"commitInfo"\x3e\x3c/strong\x3e\x3c/div\x3e\x3cdiv style\x3d"padding:4px"\x3e\x3cdiv style\x3d"vertical-align:top"\x3e\x3clabel style\x3d"display:block; float:left" id\x3d"commitMessageLabel" for\x3d"commitMessage"\x3e${Message:}\x3c/label\x3e\x3ctextarea id\x3d"commitMessage" rows\x3d"5" style\x3d"width: 30em"\x3e\x3c/textarea\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv style\x3d"padding:4px"\x3e\x3clabel id\x3d"amendLabel" for\x3d"amend"\x3e${Amend:}\x3c/label\x3e\x3cinput id\x3d"amend" type\x3d"checkbox"\x3e\x3c/div\x3e\x3cdiv style\x3d"padding:4px"\x3e\x3clabel id\x3d"changeIdLabel" for\x3d"changeId"\x3e${ChangeId:}\x3c/label\x3e\x3cinput id\x3d"changeId" type\x3d"checkbox"\x3e\x3c/div\x3e\x3cdiv style\x3d"padding:4px"\x3e\x3clabel id\x3d"committerNameLabel" for\x3d"committerName"\x3e${Committer Name:}\x3c/label\x3e\x3cinput id\x3d"committerName" style\x3d"width: 30em" value\x3d""\x3e\x3c/div\x3e\x3cdiv style\x3d"padding:4px"\x3e\x3clabel id\x3d"committerEmailLabel" for\x3d"committerEmail"\x3e${Committer Email:}\x3c/label\x3e\x3cinput id\x3d"committerEmail" style\x3d"width: 30em" value\x3d""\x3e\x3c/div\x3e\x3cdiv style\x3d"padding:4px"\x3e\x3clabel id\x3d"authorNameLabel" for\x3d"authorName"\x3e${Author Name:}\x3c/label\x3e\x3cinput id\x3d"authorName" style\x3d"width: 30em" value\x3d""\x3e\x3c/div\x3e\x3cdiv style\x3d"padding:4px"\x3e\x3clabel id\x3d"authorEmailLabel" for\x3d"authorEmail"\x3e${Author Email:}\x3c/label\x3e\x3cinput id\x3d"authorEmail" style\x3d"width: 30em" value\x3d""\x3e\x3c/div\x3e\x3cdiv style\x3d"padding:4px"\x3e\x3clabel id\x3d"persistLabel" for\x3d"persist"\x3e${Remember my committer name and email:}\x3c/label\x3e\x3cinput id\x3d"persist" type\x3d"checkbox"\x3e\x3c/div\x3e';
d.prototype._init=function(c){var d=this;this.title=f["Commit Changes"];this.modal=!0;this.messages=f;this.options=c;this.buttons=[];this.buttons.push({callback:function(){d._execute()},text:"OK",id:"commitChangesButton"});this._initialize()};d.prototype._bindToDom=function(c){var d=this;this.options.body.Message&&(this.$commitMessage.value=this.options.body.Message);this.$commitMessage.addEventListener("keyup",function(c){d._validate()});this.options.body.Amend&&(this.$amend.checked=!0);this.options.body.ChangeId&&
(this.$changeId.checked=!0);this.options.body.CommitterName&&(this.$committerName.value=this.options.body.CommitterName);this.$committerName.addEventListener("keyup",function(c){d._validate()});this.options.body.CommitterEmail&&(this.$committerEmail.value=this.options.body.CommitterEmail);this.$committerEmail.addEventListener("keyup",function(c){d._validate()});this.options.body.AuthorName&&(this.$authorName.value=this.options.body.AuthorName);this.$authorName.addEventListener("keyup",function(c){d._validate()});
this.options.body.AuthorEmail&&(this.$authorEmail.value=this.options.body.AuthorEmail);this.$authorEmail.addEventListener("keyup",function(c){d._validate()});this._validate()};d.prototype._validate=function(){this.$commitMessage.value?this.$committerName.value?this.$committerEmail.value?this.$authorName.value?this.$authorEmail.value?(this.$commitInfoBar.style.display="none",this.$commitChangesButton.classList.remove(this.DISABLED)):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),
this.$commitInfo.textContent=f["The author mail is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=f["The author name is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=f["The committer mail is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=
f["The committer name is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=f["The commit message is required."])};d.prototype._execute=function(){if(!this.$commitChangesButton.classList.contains(this.DISABLED)){if(this.options.func){var c={};c.Message=this.$commitMessage.value;c.Amend=this.$amend.checked?!0:!1;c.ChangeId=this.$changeId.checked?!0:!1;c.CommitterName=this.$committerName.value;c.CommitterEmail=
this.$committerEmail.value;c.AuthorName=this.$authorName.value;c.AuthorEmail=this.$authorEmail.value;c.persist=this.$persist.checked?!0:!1;this.options.func(c)}this.hide()}};d.prototype.constructor=d;return{CommitDialog:d}});
define("orion/git/widgets/ApplyPatchDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(f,l){function h(d){this._init(d)}h.prototype=new l.Dialog;h.prototype.TEMPLATE='\x3cdiv style\x3d"padding:4px"\x3e\x3cinput type\x3d"radio" name\x3d"radio" value\x3d"urlRadio" id\x3d"urlRadio" checked/\x3e'+f["URL:"]+'\x3cinput type\x3d"text" name\x3d"url" id\x3d"url"/\x3e\x3c/div\x3e\x3cdiv style\x3d"padding:4px"\x3e\x3cinput type\x3d"radio" name\x3d"radio" value\x3d"fileRadio" id\x3d"fileRadio"/\x3e'+
f["File:"]+'\x3cinput type\x3d"file" name\x3d"selectedFile" id\x3d"selectedFile" class\x3d"uploadChooser" /\x3e\x3c/div\x3e';h.prototype._init=function(d){var c=this;this.title=f["Apply Patch"];this.modal=!0;this.messages=f;this.options=d;this.buttons=[];this.buttons.push({callback:function(){c._applyPatch()},text:f.OK});this._initialize()};h.prototype._bindToDom=function(d){this.$selectedFile.onchange=function(c){this.$urlRadio.checked=!1;this.$fileRadio.checked="fileRadio"}.bind(this);this.$url.onchange=
function(c){this.$urlRadio.checked="urlRadio";this.$fileRadio.checked=!1}.bind(this)};h.prototype._applyPatch=function(d){d=new FormData;d.append("uploadedfile",this.$selectedFile.files[0]);d.append("url",this.$url.value);d.append("radio",this.$fileRadio.checked?"fileRadio":"urlRadio");this.req=new XMLHttpRequest;this.req.open("post",this.options.diffLocation);this.req.setRequestHeader("Orion-Version","1");this.req.onreadystatechange=this.handleReadyState.bind(this);this.req.send(d)};h.prototype.handleReadyState=
function(d){4===this.req.readyState&&(200===this.req.status?this.options.deferred&&this.options.deferred.resolve(this.req.responseText):this.options.deferred&&this.options.deferred.reject(this.req.responseText),this.hide())};h.prototype.constructor=h;return{ApplyPatchDialog:h}});
define("orion/git/logic/gitCommit","i18n!git/nls/gitmessages orion/commandRegistry orion/Deferred orion/git/widgets/CommitDialog orion/git/logic/gitCommon orion/i18nUtil orion/webui/littlelib".split(" "),function(f,l,h,d,c,k,e){var b=c.handleProgressServiceResponse;return function(a){var c=a.serviceRegistry,m=new l.CommandEventListener("change",function(a,b){var d=b.status,e=b.messageTextArea;if(a.target.checked){var h=c.getService("orion.page.message"),d=c.getService("orion.page.progress").progress(c.getService("orion.git.provider").doGitLog(d.CommitLocation+
"?page\x3d1\x26pageSize\x3d1"),f["Fetching previous commit message"]);h.createProgressMonitor(d,f["Fetching previous commit message"],d.then(function(a){e.value=a.Children[0].Message}),function(a){e.value=""})}else e.value=""}),n=function(a,b,d){var e=c.getService("orion.git.provider"),f=new h;e.addCloneConfigurationProperty(d,a,b).then(function(){f.resolve()},function(c){409===c.status?e.getGitCloneConfig(d).then(function(c){if(c.Children)for(var d=0;d<c.Children.length;d++)if(c.Children[d].Key===
a){e.editCloneConfigurationProperty(c.Children[d].Location,b).then(function(){f.resolve()},function(a){f.reject(a)});break}},function(a){f.reject(a)}):f.reject(c)});return f},r=function(a){var b={Severity:"Error",HTML:!1};try{var d=JSON.parse(a.responseText);401===a.status?(b.HTML=!0,b.Message="\x3cspan\x3e",b.Message+=k.formatMessage(f["Authentication required for: ${0}. ${1} and re-try the request."],d.label,'\x3ca target\x3d"_blank" href\x3d"'+d.SignInLocation+'"\x3e'+f.Login+"\x3c/a\x3e")+"\x3c/span\x3e"):
b.Message=d.DetailedMessage?d.DetailedMessage:d.Message?d.Message:f["Problem while performing the action"]}catch(e){b.Message=f["Problem while performing the action"]}c.getService("orion.page.message").setProgressResult(b)};return{perform:function(a){var e=new h,k=a.items.status||a.handler.status,l=k.Clone.ConfigLocation,m=function(a){a.persist&&n("user.name",a.CommitterName,l).then(function(){n("user.email",a.CommitterEmail,l).then(function(){},function(a){b(a,{},c);e.reject(a)})},function(a){b(a,
{},c);e.reject(a)});var d=c.getService("orion.page.message"),h=c.getService("orion.page.progress").progress(c.getService("orion.git.provider").commitAll(k.Clone.HeadLocation,null,JSON.stringify(a)),f["Committing changes"]);d.createProgressMonitor(h,f["Committing changes"]);h.then(function(a){e.resolve()},function(a){r(a);e.reject(a)})},u=function(a,b){for(var c=0;c<b.length;c++)"user.name"===b[c].Key?(a.CommitterName=b[c].Value,a.AuthorName=b[c].Value):"user.email"===b[c].Key&&(a.CommitterEmail=b[c].Value,
a.AuthorEmail=b[c].Value);a.Message&&a.CommitterName&&a.CommitterEmail?m(a):(new d.CommitDialog({body:a,func:m})).show()},w={};w.Message=a.userData.name;w.Amend=a.userData.amend;w.ChangeId=a.userData.changeId;var D=k.Clone.Config;if(w.Amend&&!w.Message){a=c.getService("orion.page.message");var y=c.getService("orion.page.progress").progress(c.getService("orion.git.provider").doGitLog(k.CommitLocation+"?page\x3d1\x26pageSize\x3d1"),f["Committing changes"]);a.createProgressMonitor(y,f["Committing changes"]);
y.then(function(a){w.Message=a.Children[0].Message;u(w,D)},function(a){u(w,D)})}else u(w,D);return e},createParameters:function(a){return new l.ParametersDescription([new l.CommandParameter("name","text",f["Commit message:"],"",4),new l.CommandParameter("amend","boolean",a?f.SmartAmend:f["Amend:"],!1,null,m),new l.CommandParameter("changeId","boolean",a?f.SmartChangeId:f["ChangeId:"],!1)],{hasOptionalParameters:!0,getParameterElement:a?function(a,b){return e.$("#"+a.name+"parameterCollector",b.parentNode.parentNode)}:
null,getSubmitName:a?function(a){a=a.items;Array.isArray(a)||(a=[a]);return k.formatMessage(f.SmartCountCommit,a.length)}:null})},displayErrorOnStatus:r,amendEventListener:m,setGitCloneConfig:n}}});
define("orion/git/gitCommands","i18n!git/nls/gitmessages require orion/Deferred orion/i18nUtil orion/webui/littlelib orion/commands orion/commandRegistry orion/git/util orion/compare/compareUtils orion/git/gitPreferenceStorage orion/git/gitConfigPreference orion/git/widgets/ConfirmPushDialog orion/git/widgets/RemotePrompterDialog orion/git/widgets/ReviewRequestDialog orion/git/widgets/CloneGitRepositoryDialog orion/git/widgets/GitCredentialsDialog orion/git/widgets/OpenCommitDialog orion/git/widgets/CommitDialog orion/git/widgets/ApplyPatchDialog orion/URL-shim orion/PageLinks orion/URITemplate orion/git/logic/gitPush orion/git/logic/gitCommit orion/objects".split(" "),function(f,
l,h,d,c,k,e,b,a,g,m,n,r,t,q,p,s,v,u,w,D,y,E,A,B){var x={};(function(){function n(a){var b;try{b=JSON.parse(a.responseText)}catch(c){b={Message:f["Problem while performing the action"]}}b.HttpCode=a.status;return b}var r=!1,v=new y("git/git-repository.html#{,resource,params*}"),w=new y("git/git-log.html#{,resource,params*}?page\x3d1"),I=new y("git/git-log.html#{,resource,params*}"),H=new y("git/git-commit.html#{,resource,params*}?page\x3d1\x26pageSize\x3d1"),K=new y("edit/edit.html#{,resource,params*}");
x.updateNavTools=function(a,b,d,e,f,g,h){var k=c.node(e);if(k)b.destroy(k);else throw"could not find toolbar "+e;b.renderCommands(e,k,g,d,"button");if(h&&(e=c.node(h)))b.destroy(e),b.renderCommands(h,e,g,d,"button");if(f&&(g=c.node(f)))b.destroy(f),b.renderCommands(f,g,null,d,"button");r||(r=!0,a.getService("orion.page.selection").addEventListener("selectionChanged",function(a){var e=c.node(f);e&&(b.destroy(e),b.renderCommands(f,e,a.selections,d,"button"))}))};x.handleKnownHostsError=function(a,c,
e,g){if(confirm(d.formatMessage(f["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],c.KeyType,c.Host,c.HostFingerprint))){var h=b.parseSshGitUrl(c.Url);c={host:c.Host,keyType:c.KeyType,hostKey:c.HostKey,port:h.port};a.getService("orion.net.ssh").addKnownHost(c).then(function(b){e.knownHosts=b;"undefined"!==typeof e.failedOperation&&a.getService("orion.page.progress").removeOperation(e.failedOperation);g(e)})}};x.handleSshAuthenticationError=function(a,b,
c,d,e){b=b?b.Url:void 0;var f=function(){(new p.GitCredentialsDialog({title:e,serviceRegistry:a,func:d,errordata:c.errordata,failedOperation:c.failedOperation})).show()};c.gitSshUsername&&""!==c.gitSshUsername||c.gitSshPassword&&""!==c.gitSshPassword||c.gitPrivateKey&&""!==c.gitPrivateKey?f():(new g(a)).get(b).then(function(b){""!==b.gitPrivateKey||""!==b.gitSshUsername||""!==b.gitSshPassword?("undefined"!==typeof c.failedOperation&&a.getService("orion.page.progress").removeOperation(c.failedOperation),
d({knownHosts:c.knownHosts,gitSshUsername:b.gitSshUsername,gitSshPassword:b.gitSshPassword,gitPrivateKey:b.gitPrivateKey,gitPassphrase:b.gitPassphrase})):f()},f)};x.getDefaultSshOptions=function(a,c,d){var e=new h;a=a.getService("orion.net.ssh");var f=d&&!d.optionsRequested?d.valueFor("sshuser"):"",g=d&&!d.optionsRequested?d.valueFor("sshpassword"):"",k;void 0!==c.GitUrl?k=c.GitUrl:void 0!==c.errorData?k=c.errorData.Url:void 0!==c.toRef?k=c.toRef.RemoteLocation[0].GitUrl:void 0!==c.RemoteLocation&&
(k=c.RemoteLocation[0].GitUrl);if(!k)return e.resolve({knownHosts:"",gitSshUsername:f,gitSshPassword:g,gitPrivateKey:"",gitPassphrase:""}),e;c=b.parseSshGitUrl(k);a.getKnownHostCredentials(c.host,c.port).then(function(a){e.resolve({knownHosts:a,gitSshUsername:f,gitSshPassword:g,gitPrivateKey:"",gitPassphrase:""})});return e};x.handleProgressServiceResponse=function(a,b,c,d,e,f){a&&void 0!==a.status&&(a=n(a));if(!a||void 0===a.HttpCode)d&&d(a);else switch(a.HttpCode){case 401:a.JsonData&&(b.errordata=
a.JsonData);a.failedOperation&&(b.failedOperation=a.failedOperation);x.handleSshAuthenticationError(c,a.JsonData,b,e,f);break;case 400:if(a.JsonData&&a.JsonData.HostKey){a.failedOperation&&(b.failedOperation=a.failedOperation);x.handleKnownHostsError(c,a.JsonData,b,e);break}else if(a.JsonData&&a.JsonData.Host){a.JsonData&&(b.errordata=a.JsonData);a.failedOperation&&(b.failedOperation=a.failedOperation);x.handleSshAuthenticationError(c,a.JsonData,b,e,f);break}default:b=[],b.Severity="Error",b.HTML=
!1,b.Message=a.DetailedMessage?a.DetailedMessage:a.Message,c.getService("orion.page.message").setProgressResult(b),d&&d(a)}};x.gatherSshCredentials=function(a,c,e,k){var l=new h,m;void 0!==c.items.RemoteLocation?m=c.items.RemoteLocation[0].GitUrl:void 0!==c.items.GitUrl?m=c.items.GitUrl:void 0!==c.items.errorData?m=c.items.errorData.Url:void 0!==c.items.toRef&&(m=c.items.toRef.RemoteLocation[0].GitUrl);k=a.getService("orion.net.ssh");var n=b.parseSshGitUrl(m),q=function(b){a.getService("orion.net.ssh").getKnownHostCredentials(n.host,
n.port).then(function(a){c.sshObject=b;l.resolve({knownHosts:a,gitSshUsername:b.gitSshUsername,gitSshPassword:b.gitSshPassword,gitPrivateKey:b.gitPrivateKey,gitPassphrase:b.gitPassphrase})})},s=c.errorData;if(s&&s.HostKey){if(confirm(d.formatMessage(f["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],s.KeyType,s.Host,s.HostFingerprint))){var r=b.parseSshGitUrl(s.Url);k.addKnownHost({host:s.Host,keyType:s.KeyType,hostKey:s.HostKey,port:r.port}).then(function(){c.sshObject&&
(""!==c.sshObject.gitSshUsername||""!==c.sshObject.gitSshPassword||""!==c.sshObject.gitPrivateKey)?q({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""}):(new g(a)).get(m).then(function(a){q(a)},function(){q({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})})})}return l}var t=function(){if(!c.parameters&&!c.optionsRequested)q({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""});else if(c.parameters&&!c.optionsRequested){var b=c.parameters&&
c.parameters.valueFor("sshuser")?c.parameters.valueFor("sshuser"):c.errorData.User,d=c.parameters?c.parameters.valueFor("sshpassword"):"",f=c.parameters&&c.parameters.valueFor("saveCredentials")?c.parameters.valueFor("saveCredentials"):!1,h=new g(a);f?h.put(m,{gitSshUsername:b,gitSshPassword:d}).then(function(){q({gitSshUsername:b,gitSshPassword:d,gitPrivateKey:"",gitPassphrase:""})}):q({gitSshUsername:b,gitSshPassword:d,gitPrivateKey:"",gitPassphrase:""})}else(new p.GitCredentialsDialog({title:e,
serviceRegistry:a,func:q,errordata:s})).show()};c.sshObject&&(""!==c.sshObject.gitSshUsername||""!==c.sshObject.gitSshPassword||""!==c.sshObject.gitPrivateKey)?t():(new g(a)).get(m).then(function(a){""!==a.gitPrivateKey||""!==a.gitSshUsername||""!==a.gitSshPassword?q(a):t()},t);return l};x.handleGitServiceResponse=function(a,b,c,d){a&&void 0!==a.status&&(a=n(a));if(!a||!a.HttpCode)c&&c(a);else switch(a.HttpCode){case 401:var e=new g(b);e.isEnabled().then(function(b){b&&void 0!==a.JsonData.Url?e.remove(a.JsonData.Url).then(function(){d(a)}):
d(a)});break;case 400:if(a.JsonData&&a.JsonData.HostKey){d(a);break}default:var h=[];h.Severity="Error";h.HTML=!1;h.Message="REJECTED_NONFASTFORWARD"===(a.DetailedMessage?a.DetailedMessage:a.Message)?f.REJECTED_NONFASTFORWARD:a.DetailedMessage?a.DetailedMessage:a.Message;b.getService("orion.page.message").setProgressResult(h);c&&c(a)}};x.createFileCommands=function(b,c,m,n){function q(a){var c={Severity:"Error",HTML:!1};try{var e=JSON.parse(a.responseText);401===a.status?(c.HTML=!0,c.Message="\x3cspan\x3e",
c.Message+=d.formatMessage(f["Authentication required for: ${0}. ${1} and re-try the request."],e.label,'\x3ca target\x3d"_blank" href\x3d"'+e.SignInLocation+'"\x3e'+f.Login+"\x3c/a\x3e")+"\x3c/span\x3e"):c.Message=e.DetailedMessage?e.DetailedMessage:e.Message?e.Message:f["Problem while performing the action"]}catch(g){c.Message=f["Problem while performing the action"]}b.getService("orion.page.message").setProgressResult(c)}var s=function(a){a&&a.handler.changedItem?a.handler.changedItem():m.changedItem()},
p=new e.ParametersDescription([new e.CommandParameter("name","text",f["Local Branch Name:"])]),p=new k.Command({name:f.Checkout,tooltip:f["Checkout the current tag, creating a local branch based on its contents."],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutTag",parameters:p,callback:function(a){var c=a.items,e=function(a,c,e){b.getService("orion.page.progress").showWhile(b.getService("orion.git.provider").checkoutTag(a,c,e),d.formatMessage(f["Checking out tag ${0}"],
e)).then(function(){m.changedItem()},q)},g=c.Repository?c.Repository.Location:c.CloneLocation;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&e(g,c.Name,a.parameters.valueFor("name"))},visibleWhen:function(a){return"Tag"===a.Type||"Commit"===a.Type}});c.addCommand(p);p=new k.Command({name:f.Checkout,tooltip:f["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(a){var c=a.items,e=b.getService("orion.git.provider"),g=b.getService("orion.page.message"),h=b.getService("orion.page.progress");g.setProgressMessage(c.Name?d.formatMessage(f["Checking out branch ${0}..."],c.Name):f["Checking out branch..."]);"Branch"===c.Type?h.progress(e.checkoutBranch(c.CloneLocation,c.Name),"Checking out branch "+c.Name).then(function(){g.setProgressResult(f["Branch checked out."]);
m.changedItem(c.parent)},function(a){q(a)}):h.progress(e.addBranch(c.Repository?c.Repository.BranchLocation:c.parent.parent.repository.BranchLocation,null,c.Name),"Adding branch "+c.Name).then(function(a){h.progress(e.checkoutBranch(a.CloneLocation,a.Name),"Checking out branch "+c.Name).then(function(){g.setProgressResult(f["Branch checked out."]);m.changedItem(c.Repository?c.Repository.BranchLocation:c.parent.parent.parent)},function(a){q(a)})},function(a){q(a)})},visibleWhen:function(a){return"Branch"===
a.Type||"RemoteTrackingBranch"===a.Type}});c.addCommand(p);p=new e.ParametersDescription([new e.CommandParameter("name","text","Name:")]);p=new k.Command({name:f["New Branch"],tooltip:f["Add a new local branch to the repository"],id:"eclipse.addBranch",parameters:p,callback:function(a){var c=a.items,d=b.getService("orion.page.progress"),e=function(a,e){d.progress(b.getService("orion.git.provider").addBranch(a,e),"Adding branch "+e).then(function(){m.changedItem(c)},q)},f;f="Clone"===c.Type?c.BranchLocation:
c.Location;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&e(f,a.parameters.valueFor("name"))},visibleWhen:function(a){return a.GroupNode&&"Branches"===a.Name||"Clone"===a.Type&&"artifacts"===m.parentId}});c.addCommand(p);p=new k.Command({name:f.Delete,tooltip:f["Delete the local branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeBranch",callback:function(a){var c=a.items;a=b.getService("orion.page.progress");confirm(d.formatMessage(f["Are you sure you want to delete branch ${0}?"],
c.Name))&&a.progress(b.getService("orion.git.provider").removeBranch(c.Location),"Removing branch "+c.Name).then(function(){m.changedItem?m.changedItem(c.parent):m.displayBranches&&m.displayBranches(c.ParentLocation,null)},q)},visibleWhen:function(a){return"Branch"===a.Type&&!a.Current}});c.addCommand(p);p=new k.Command({name:f.Delete,tooltip:f["Delete the remote tracking branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(a){var c=a.items,
e=b.getService("orion.page.progress");confirm(d.formatMessage(f["You're going to delete remote branch ${0} and push the change."],c.Name)+"\n\n"+f["Are you sure?"])&&x.getDefaultSshOptions(b,c).then(function(a){var d=arguments.callee,g=b.getService("orion.git.provider"),h=b.getService("orion.page.message"),g=e.progress(g.doPush(c.Location,"",!1,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),f["Removing remote branch: "]+c.Name);h.createProgressMonitor(g,f["Removing remote branch: "]+
c.Name);g.then(function(e){x.handleProgressServiceResponse(e,a,b,function(a){"Ok"==a.Result.Severity&&m.changedItem(c.parent)},d,f["Delete Remote Branch"])},function(e,g){x.handleProgressServiceResponse(e,a,b,function(){},d,f["Removing remote branch: "]+c.Name)})})},visibleWhen:function(a){return"RemoteTrackingBranch"===a.Type}});c.addCommand(p);p=new e.ParametersDescription([new e.CommandParameter("name","text","Name:"),new e.CommandParameter("url","url","Url:")]);p=new k.Command({name:f["New Remote"],
tooltip:f["Add a new remote to the repository"],id:"eclipse.addRemote",parameters:p,callback:function(a){var c=a.items,d=b.getService("orion.page.progress"),e=function(a,e,f){d.progress(b.getService("orion.git.provider").addRemote(a,e,f),"Adding remote "+a).then(function(){m.changedItem(c)},q)},f;f="Clone"===c.Type?c.RemoteLocation:c.Location;a.parameters.valueFor("name")&&a.parameters.valueFor("url")&&e(f,a.parameters.valueFor("name"),a.parameters.valueFor("url"))},visibleWhen:function(a){return a.GroupNode&&
"Remotes"===a.Name||"Clone"===a.Type&&"artifacts"===m.parentId}});c.addCommand(p);p=new k.Command({name:f.Delete,tooltip:f["Delete the remote from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemote",callback:function(a){var c=a.items;confirm(d.formatMessage(f["Are you sure you want to delete remote ${0}?"],c.Name))&&b.getService("orion.page.progress").progress(b.getService("orion.git.provider").removeRemote(c.Location),"Removing remote "+c.Name).then(function(){m.changedItem(c.parent)},
q)},visibleWhen:function(a){return"Remote"===a.Type}});c.addCommand(p);p=new k.Command({name:f.Pull,tooltip:f["Pull from the repository"],imageClass:"git-sprite-pull",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pull",callback:function(a){var c=a.items,d=c.Location,e=c.Name;x.getDefaultSshOptions(b,c).then(function(a){var g=arguments.callee,h=b.getService("orion.git.provider"),k=b.getService("orion.page.message"),h=b.getService("orion.page.progress").progress(h.doPull(d,!1,a.gitSshUsername,
a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),f["Pulling: "]+e);k.createProgressMonitor(h,f["Pulling: "]+e);var l;h.then(function(d){x.handleProgressServiceResponse(d,a,b,function(a){"Clone"===c.Type&&m.changedItem(c)},g,"Pull Git Repository")},function(d,e){l&&(d.failedOperation=l);x.handleProgressServiceResponse(d,a,b,function(){m.changedItem(c)},g,f["Pull Git Repository"])},function(a){l=a.Location})})},visibleWhen:function(a){return"Clone"===a.Type}});c.addCommand(p);p=new k.Command({name:f["Git Log"],
tooltip:f["Open the log for the branch"],id:"eclipse.openGitLog",hrefCallback:function(a){return l.toUrl(w.expand({resource:a.items.CommitLocation}))},visibleWhen:function(a){return"Branch"===a.Type||"RemoteTrackingBranch"===a.Type}});c.addCommand(p);p=new k.Command({name:f["Git Log"],tooltip:f["Open the log for the repository"],id:"eclipse.openGitLogAll",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(a){return l.toUrl(w.expand({resource:a.items.CommitLocation}))},
visibleWhen:function(a){return!a.CommitLocation||!a.StatusLocation?!1:!0}});c.addCommand(p);p=new k.Command({name:f.ShowInEditor,tooltip:f.ShowInEditorTooltip,id:"eclipse.openCloneContent",hrefCallback:function(a){return l.toUrl(K.expand({resource:a.items.ContentLocation}))},visibleWhen:function(a){return!a.ContentLocation?!1:!0}});c.addCommand(p);p=new k.Command({name:f["Compare With Each Other"],id:"eclipse.compareGitCommits",hrefCallback:function(c){c=c.items;return b.getService("orion.page.progress").progress(b.getService("orion.git.provider").getDiff(c[1].DiffLocation,
c[0].Name),"Generating Diff for "+c[0].Name+" and "+c[1].Name).then(function(b){return a.generateCompareHref(b.Location,{readonly:!0})})},visibleWhen:function(a){return m.isDirectory?!1:Array.isArray(a)&&2===a.length&&"Commit"===a[0].Type&&"Commit"===a[1].Type?!0:!1}});c.addCommand(p);p=new k.Command({name:f["Compare With Working Tree"],imageClass:"git-sprite-compare",spriteClass:"gitCommandSprite",id:"eclipse.compareWithWorkingTree",hrefCallback:function(b){return a.generateCompareHref(b.items.DiffLocation,
{})},visibleWhen:function(a){return"Commit"===a.Type&&null!==a.ContentLocation&&!m.isDirectory}});c.addCommand(p);p=new k.Command({name:f.Open,id:"eclipse.openGitCommit",imageClass:"git-sprite-open",spriteClass:"gitCommandSprite",hrefCallback:function(a){return l.toUrl(K.expand({resource:a.items.ContentLocation}))},visibleWhen:function(a){return"Commit"===a.Type&&null!=a.ContentLocation&&!m.isDirectory}});c.addCommand(p);var r=function(a,d,k){var l=new h;if(k&&!k(k))return l.reject(),l;k=a.items;
var m=!1;k.LocalBranch&&k.RemoteBranch&&(m=k.noAuth,k=k.RemoteBranch);var n=k.Location,p=k.Name,s=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,d.errorData.failedOperation=a.failedOperation,c.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,d.errorData.failedOperation=a.failedOperation,c.collectParameters(d)):(new g(b)).isEnabled().then(function(b){d.parameters=b?a.JsonData.User?new e.ParametersDescription([new e.CommandParameter("sshpassword","password",
f["Password:"]),new e.CommandParameter("saveCredentials","boolean",f["Don't prompt me again:"])],{hasOptionalParameters:!0}):new e.ParametersDescription([new e.CommandParameter("sshuser","text",f["User Name:"]),new e.CommandParameter("sshpassword","password",f["Password:"]),new e.CommandParameter("saveCredentials","boolean",f["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new e.ParametersDescription([new e.CommandParameter("sshpassword","password",f["Password:"])],{hasOptionalParameters:!0}):
new e.ParametersDescription([new e.CommandParameter("sshuser","text",f["User Name:"]),new e.CommandParameter("sshpassword","password",f["Password:"])],{hasOptionalParameters:!0});d.errorData=a.JsonData;d.errorData.failedOperation=a.failedOperation;c.collectParameters(d)})},r=function(){a.parameters&&a.parameters.optionsRequested?(a.parameters=null,a.optionsRequested=!0,c.collectParameters(a)):(a.errorData&&a.errorData.failedOperation&&b.getService("orion.page.progress").removeOperation(a.errorData.failedOperation),
x.gatherSshCredentials(b,a,null).then(function(c){var e=b.getService("orion.git.provider"),g=b.getService("orion.page.message");c=b.getService("orion.page.progress").progress(e.doFetch(n,d,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase),f["Fetching remote: "]+p);g.createProgressMonitor(c,f["Fetching remote: "]+p);c.then(function(c){x.handleGitServiceResponse(c,b,function(){l.resolve()},function(b){s(b,a)})},function(c){var d=c.status||c.HttpCode;m&&(400===d||401===
d)?l.reject():x.handleGitServiceResponse(c,b,function(){l.resolve()},function(b){s(b,a)})})},l.reject))};if(a.items.GitUrl)r();else{var Q=b.getService("orion.git.provider"),t=b.getService("orion.page.progress");t.progress(Q.getGitRemote(n),"Getting remote details "+p).then(function(b){t.progress(Q.getGitClone(b.CloneLocation),"Getting git repository information "+b.Name).then(function(b){a.items.GitUrl=b.Children[0].GitUrl;r()},q)},q)}return l},p=function(a){a.LocalBranch&&a.RemoteBranch&&(a=a.RemoteBranch);
return"RemoteTrackingBranch"===a.Type||"Remote"===a.Type||"Commit"===a.Type&&a.toRef&&"RemoteTrackingBranch"===a.toRef.Type?!0:!1},O=new k.Command({name:f.Fetch,tooltip:f["Fetch from the remote"],imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(a){return r(a,!1).then(function(){s(a)})},visibleWhen:p});c.addCommand(O);p=new k.Command({name:f["Force Fetch"],imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",tooltip:f["Fetch from the remote branch into your remote tracking branch overriding its current content"],
id:"eclipse.orion.git.fetchForce",callback:function(a){r(a,!0,f["You're going to override content of the remote tracking branch. This can cause the branch to lose commits."]+"\n\n"+f["Are you sure?"]).then(function(){s(a)})},visibleWhen:p});c.addCommand(p);p=new k.Command({name:f.Merge,tooltip:f["Merge the content from the branch to your active branch"],imageClass:"git-sprite-merge",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",callback:function(a){var c=a.items;a=b.getService("orion.git.provider");
var e=b.getService("orion.page.progress"),g=b.getService("orion.page.message");e.progress(a.doMerge(c.HeadLocation,c.Name,!1),"Merging "+c.Name).then(function(a){var b={};if("FAST_FORWARD"===a.Result||"ALREADY_UP_TO_DATE"===a.Result)b.Severity="Ok",b.HTML=!1,b.Message=a.Result;else if(a.Result){b.Severity="Warning";b.HTML=!0;b.Message="\x3cspan\x3e"+a.Result;if(a.FailingPaths){var e="",h=!0,k;for(k in a.FailingPaths)h||(e+=", "),h=!1,e+=k;h||(b.Severity="Error",b.Message+=". "+d.formatMessage(f["Failing paths: ${0}"],
e))}b.Message+="\x3c/span\x3e"}else a.error&&(b.Severity="Error",a.error.responseText&&JSON.parse(a.error.responseText)?(a=JSON.parse(a.error.responseText),b.Message=a.DetailedMessage?a.DetailedMessage:a.Message):b.Message=a.error.message,b.HTML=!0,b.Message="\x3cspan\x3e"+b.Message+"\x3c/span\x3e");g.setProgressResult(b);m.changedItem(c)},function(a,d){var e={Severity:"Error",HTML:!0};e.Message="\x3cspan\x3e"+JSON.stringify(d.xhr.responseText).DetailedMessage+"\x3c/span\x3e";b.getService("orion.page.message").setProgressResult(e);
m.changedItem(c)})},visibleWhen:function(a){return"RemoteTrackingBranch"===a.Type||"Branch"===a.Type&&!a.Current||"Commit"===a.Type&&a.toRef&&"RemoteTrackingBranch"===a.toRef.Type?!0:!1}});c.addCommand(p);p=new k.Command({name:f["Merge Squash"],tooltip:f["Squash the content of the branch to the index"],imageClass:"git-sprite-merge-squash",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.mergeSquash",callback:function(a){var c=a.items;a=b.getService("orion.git.provider");var d=b.getService("orion.page.progress"),
e=b.getService("orion.page.message");d.progress(a.doMerge(c.HeadLocation,c.Name,!0),"Merging "+c.Name).then(function(a){var b=[];"FAST_FORWARD_SQUASHED"===a.Result||"ALREADY_UP_TO_DATE"===a.Result?(b.Severity="Ok",b.HTML=!1,b.Message=a.Result):a.Result?(b.Severity="Warning",b.HTML=!0,b.Message="\x3cspan\x3e"+a.Result+"\x3c/span\x3e"):a.error&&(b.Severity="Error",a.error.responseText&&JSON.parse(a.error.responseText)?(a=JSON.parse(a.error.responseText),b.Message=a.DetailedMessage?a.DetailedMessage:
a.Message):b.Message=a.error.message,b.HTML=!0,b.Message="\x3cspan\x3e"+b.Message+"\x3c/span\x3e");e.setProgressResult(b);m.changedItem(c)},function(a,d){var e=[];e.Severity="Error";e.HTML=!0;e.Message="\x3cspan\x3e"+JSON.stringify(d.xhr.responseText).DetailedMessage+".\x3c/span\x3e";b.getService("orion.page.message").setProgressResult(e);m.changedItem(c)})},visibleWhen:function(a){return"RemoteTrackingBranch"===a.Type||"Branch"===a.Type&&!a.Current||"Commit"===a.Type&&a.toRef&&"RemoteTrackingBranch"===
a.toRef.Type?!0:!1}});c.addCommand(p);var u=function(a){var c=new h;a=a.items;a.LocalBranch&&a.RemoteBranch&&(a=a.RemoteBranch);var d=b.getService("orion.page.message"),e=b.getService("orion.page.progress").progress(b.getService("orion.git.provider").doRebase(a.HeadLocation,a.Name,"BEGIN"),a.Name?f["Rebase on top of "]+a.Name:f.Rebase);d.createProgressMonitor(e,a.Name?f["Rebase on top of "]+a.Name:f.Rebase);e.then(function(a){var d={};switch(a.Result){case "OK":case "FAST_FORWARD":case "UP_TO_DATE":d.Severity=
"Ok";break;case "FAILED_WRONG_REPOSITORY_STATE":case "FAILED_UNMERGED_PATHS":case "FAILED_PENDING_CHANGES":case "UNCOMMITTED_CHANGES":d.Severity="Error";break;default:d.Severity="Warning"}if("Ok"===d.Severity)d.HTML=!1,d.Message=a.Result,c.resolve(a);else{d.HTML=!0;var e=f["Rebase"+a.Result];d.Message="\x3cspan\x3e"+a.Result+(e?e:"")+"\x3c/span\x3e";c.reject(a)}b.getService("orion.page.message").setProgressResult(d)},function(a){q(a);c.reject()});return c},p=new k.Command({name:f.Rebase,tooltip:f["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(a){u(a).then(function(){s(a)},function(){s()})},visibleWhen:function(a){this.tooltip=f["Rebase your commits by removing them from the active branch, "]+f["starting the active branch again based on the latest state of '"]+a.Name+"' "+f["and applying each commit again to the updated active branch."];return"RemoteTrackingBranch"===
a.Type||"Branch"===a.Type&&!a.Current}});c.addCommand(p);n={serviceRegistry:b,commandService:c,explorer:m,toolbarId:n};var y=E(B.mixin(n,{tags:!0,force:!1})).perform,Q=E(B.mixin(n,{tags:!1,force:!1})).perform,N=E(B.mixin(n,{tags:!0,force:!0})).perform,V=E(B.mixin(n,{tags:!1,force:!0})).perform,W=E(B.mixin(n,{tags:!1,force:!1,gerrit:!0})).perform;n=function(a){a.LocalBranch&&a.RemoteBranch&&(a=a.LocalBranch);return a.toRef?""===a.RepositoryPath&&"Branch"===a.toRef.Type&&a.toRef.Current&&a.toRef.RemoteLocation:
"Branch"===a.Type&&a.Current&&a.RemoteLocation};p=new k.Command({name:f.Sync,tooltip:f.SyncTooltip,extraClass:"primaryButton",id:"eclipse.orion.git.sync",callback:function(a){return r(a).then(function(){return u(a).then(function(b){return y(a).then(function(){s(a)})},function(){s()})})},visibleWhen:n});c.addCommand(p);p=new k.Command({name:f["Push All"],tooltip:f["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(a){y(a).then(function(){s(a)})},visibleWhen:n});c.addCommand(p);p=new k.Command({name:f["Push Branch"],tooltip:f["Push commits without tags from your local branch into the remote branch"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushBranch",callback:function(a){Q(a).then(function(){s(a)})},visibleWhen:n});c.addCommand(p);p=new k.Command({name:f["Push for Review"],tooltip:f["Push commits to Gerrit Code Review"],imageClass:"git-sprite-push",
spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushToGerrit",callback:function(a){W(a).then(function(){s(a)})},visibleWhen:function(a){a.LocalBranch&&a.RemoteBranch&&(a=a.LocalBranch);return a.toRef?""===a.RepositoryPath&&"Branch"===a.toRef.Type&&a.toRef.Current&&a.toRef.RemoteLocation&&a.toRef.RemoteLocation[0].IsGerrit:"Branch"===a.Type&&a.Current&&a.RemoteLocation&&a.RemoteLocation[0].IsGerrit}});c.addCommand(p);p=new k.Command({name:f["Force Push All"],tooltip:f["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(a){N(a).then(function(){s(a)})},visibleWhen:n});c.addCommand(p);n=new k.Command({name:f["Force Push Branch"],tooltip:f["Push commits without tags from your local branch into the remote branch overriding its current content"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushForceBranch",callback:function(a){V(a).then(function(){s(a)})},visibleWhen:n});
c.addCommand(n);n=new k.Command({name:f["\x3c Previous Page"],tooltip:f["Show previous page of git log"],id:"eclipse.orion.git.previousLogPage",hrefCallback:function(a){return l.toUrl(I.expand({resource:a.items.PreviousLocation}))},visibleWhen:function(a){return"RemoteTrackingBranch"===a.Type||a.toRef&&"Branch"===a.toRef.Type||null!==a.RepositoryPath?void 0!==a.PreviousLocation:!1}});c.addCommand(n);n=new k.Command({name:f["Next Page \x3e"],tooltip:f["Show next page of git log"],id:"eclipse.orion.git.nextLogPage",
hrefCallback:function(a){return l.toUrl(I.expand({resource:a.items.NextLocation}))},visibleWhen:function(a){return"RemoteTrackingBranch"===a.Type||a.toRef&&"Branch"===a.toRef.Type||null!==a.RepositoryPath?void 0!==a.NextLocation:!1}});c.addCommand(n);n=new k.Command({name:f["\x3c Previous Page"],tooltip:f["Show previous page of git tags"],id:"eclipse.orion.git.previousTagPage",hrefCallback:function(a){return l.toUrl(v.expand({resource:a.items.PreviousLocation}))},visibleWhen:function(a){return"Tag"===
a.Type?void 0!==a.PreviousLocation:!1}});c.addCommand(n);n=new k.Command({name:f["Next Page \x3e"],tooltip:f["Show next page of git tags"],id:"eclipse.orion.git.nextTagPage",hrefCallback:function(a){return l.toUrl(v.expand({resource:a.items.NextLocation}))},visibleWhen:function(a){return"Tag"===a.Type?void 0!==a.NextLocation:!1}});c.addCommand(n);var T=function(a,c,e,g,h){var k=a.items;if(confirm(d.formatMessage(h,e))){a=b.getService("orion.git.provider");var l=b.getService("orion.page.message");
c=b.getService("orion.page.progress").progress(a.resetIndex(c,e,g),"Resetting git index for "+e);l.createProgressMonitor(c,f["Resetting index..."]);c.then(function(a){m.changedItem(k);l.setProgressResult({Severity:"Info",HTML:!1,Message:"Ok"})},function(a){var b={Severity:"Error",HTML:!1};b.Message=a.message;l.setProgressResult(b)})}};n=new k.Command({name:f.Reset,tooltip:f["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(a){T(a,a.items.IndexLocation,a.items.Name,"HARD",f.GitResetIndexConfirm)},visibleWhen:function(a){return"RemoteTrackingBranch"===a.Type}});c.addCommand(n);n=new k.Command({name:f.Undo,tooltip:f.UndoTooltip,id:"eclipse.orion.git.undoCommit",callback:function(a){T(a,a.items.parent.remoteBranch.IndexLocation,"HEAD^","SOFT",f.UndoConfirm)},visibleWhen:function(a){return"Commit"===a.Type&&a.parent&&"Outgoing"===a.parent.Type&&
a.parent.children&&a.parent.children[0].Name===a.Name}});c.addCommand(n);n=new e.ParametersDescription([new e.CommandParameter("name","text",f["Name:"])]);n=new k.Command({name:f.Tag,tooltip:f["Create a tag for the commit"],imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",parameters:n,callback:function(a){var c=a.items,d=function(a,d){b.getService("orion.page.progress").progress(b.getService("orion.git.provider").doAddTag(a,d),"Adding tag "+d).then(function(){m.changedItem(c)},
q)},e=c.Location;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&d(e,a.parameters.valueFor("name"))},visibleWhen:function(a){return"Commit"===a.Type}});c.addCommand(n);n=new k.Command({name:f.Delete,tooltip:f["Delete the tag from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeTag",callback:function(a){var c=a.items;confirm(d.formatMessage(f["Are you sure you want to delete tag ${0}?"],c.Name))&&b.getService("orion.page.progress").progress(b.getService("orion.git.provider").doRemoveTag(c.Location),
"Removing tag "+c.Name).then(function(){m.changedItem(c.parent)},q)},visibleWhen:function(a){return"Tag"===a.Type}});c.addCommand(n);n=new e.ParametersDescription([new e.CommandParameter("reviewer","text",f["Reviewer name"])],{hasOptionalParameters:!0});n=new k.Command({name:f["Ask for review"],tooltip:f["Ask for review tooltip"],imageClass:"core-sprite-tag",id:"eclipse.orion.git.askForReviewCommand",parameters:n,callback:function(a){var c=b.getService("orion.page.progress"),d=function(a){var b=document.createElement("a");
b.href=a;"ssh:"===b.protocol&&(b=a.indexOf("@"),-1!==b&&(a="ssh://"+a.substr(b+1)));return a},e=function(e){var f=a.items,g=f.Location.replace(f.Name,"HEAD"),h=f.AuthorName,k=f.Name,l=f.Message;c.progress(b.getService("orion.git.provider").getGitClone(f.CloneLocation),"Getting repository details "+f.Name).then(function(a){window.location.href.split("#");var m=D.getOrionHome();a=d(a.Children[0].GitUrl);m=m+"/git/reviewRequest.html#"+a+"_"+f.Name;c.progress(b.getService("orion.git.provider").sendCommitReviewRequest(k,
g,e,m,h,l),"Sending review request for "+k).then(function(a){var c={Severity:"Ok",HTML:!1};c.Message=a.Result;b.getService("orion.page.message").setProgressResult(c)},q)})};if(a.parameters.valueFor("reviewer")&&!a.parameters.optionsRequested)e(a.parameters.valueFor("reviewer"));else{var g=a.items;c.progress(b.getService("orion.git.provider").getGitClone(g.CloneLocation),"Getting git details "+g.Name).then(function(a){window.location.href.split("#");var b=D.getOrionHome();a=d(a.Children[0].GitUrl);
(new t.ReviewRequestDialog({title:f["Contribution Review Request"],url:b+"/git/reviewRequest.html#"+a+"_"+g.Name,func:e})).show()},q)}},visibleWhen:function(a){return"Commit"===a.Type}});c.addCommand(n);n=new k.Command({name:f["Cherry-Pick"],tooltip:f["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(a){a=a.items;var c=b.getService("orion.page.progress"),e=b.getService("orion.git.provider"),
g=a.Location.replace(a.Name,"HEAD");c.progress(e.doCherryPick(g,a.Name),"Cherry picking "+a.Name).then(function(a){var c={};if("OK"===a.Result)c.Severity="Ok",a.HeadUpdated?(c.HTML=!1,c.Message=a.Result):(c.HTML=!0,c.Message="\x3cspan\x3e"+f["Nothing changed."]+"\x3c/span\x3e");else if("CONFLICTING"===a.Result)c.Severity="Warning",c.HTML=!0,c.Message="\x3cspan\x3e"+a.Result+f[". Some conflicts occurred"]+"\x3c/span\x3e";else if("FAILED"===a.Result){c.Severity="Error";c.HTML=!0;c.Message="\x3cspan\x3e"+
a.Result;if(a.FailingPaths){var e="",g=!0,h;for(h in a.FailingPaths)g||(e+=", "),g=!1,e+=h;g||(c.Message+=". "+d.formatMessage(f["Failing paths: ${0}"],e))}c.Message+="\x3c/span\x3e"}else c.Severity="Warning",c.HTML=!1,c.Message=a.Result;b.getService("orion.page.message").setProgressResult(c)},q)},visibleWhen:function(a){return"Commit"===a.Type}});c.addCommand(n);n=new k.Command({name:f.Revert,tooltip:f["Revert changes introduced by the commit into your active branch"],id:"eclipse.orion.git.revert",
imageClass:"git-sprite-reset",spriteClass:"gitCommandSprite",callback:function(a){a=a.items;var c=b.getService("orion.page.progress"),d=b.getService("orion.git.provider"),e=a.Location.replace(a.Name,"HEAD");c.progress(d.doRevert(e,a.Name),"Reverting "+a.Name).then(function(a){var c=[];"OK"===a.Result?(c.Severity="Ok",c.HTML=!1,c.Message=a.Result):"FAILURE"===a.Result?(c.Severity="Warning",c.HTML=!0,c.Message="\x3cspan\x3e"+a.Result+f[". Could not revert into active branch"]+"\x3c/span\x3e"):(c.Severity=
"Warning",c.HTML=!1,c.Message=a.Result);b.getService("orion.page.message").setProgressResult(c)},q)},visibleWhen:function(a){return"Commit"===a.Type}});c.addCommand(n)};x.createGitClonesCommands=function(a,b,c,n,p,r){function t(b){var c={Severity:"Error",HTML:!1};try{var d=JSON.parse(b.responseText);c.Message=d.DetailedMessage?d.DetailedMessage:d.Message?d.Message:f["Problem while performing the action"]}catch(e){c.Message=f["Problem while performing the action"]}a.getService("orion.page.message").setProgressResult(c)}
function w(a){Array.isArray(a)&&(a=1<a.length?{}:a[0]);return a}n=new e.ParametersDescription([new e.CommandParameter("key","text",f["Key:"]),new e.CommandParameter("value","text",f["Value:"])]);n=new k.Command({name:f["New Configuration Entry"],tooltip:"Add a new entry to the repository configuration",id:"eclipse.orion.git.addConfigEntryCommand",parameters:n,callback:function(b){var d=b.items,e=a.getService("orion.git.provider"),f=a.getService("orion.page.progress");b.parameters.valueFor("key")&&
b.parameters.valueFor("value")&&f.progress(e.addCloneConfigurationProperty(d.ConfigLocation,b.parameters.valueFor("key"),b.parameters.valueFor("value")),"Setting configuration propetry: "+b.parameters.valueFor("key")).then(function(a){c.changedItem(d)},t)}});b.addCommand(n);n=new e.ParametersDescription([],null,function(a){a=a.items;var b;a&&(b=a.Value);return[new e.CommandParameter("value","text",f["Value:"],b)]});n=new k.Command({name:f.Edit,tooltip:f["Edit the configuration entry"],imageClass:"core-sprite-edit",
id:"eclipse.orion.git.editConfigEntryCommand",parameters:n,callback:function(b){var d=b.items,e=a.getService("orion.git.provider"),f=a.getService("orion.page.progress");b.parameters.valueFor("value")&&f.progress(e.editCloneConfigurationProperty(d.Location,b.parameters.valueFor("value")),"Editing configuration property "+d.Key).then(function(a){c.changedItem(d)},t)},visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});b.addCommand(n);n=new k.Command({name:f.Delete,tooltip:f["Delete the configuration entry"],
imageClass:"core-sprite-delete",id:"eclipse.orion.git.deleteConfigEntryCommand",callback:function(b){var e=b.items;b=a.getService("orion.git.provider");var g=a.getService("orion.page.progress");confirm(d.formatMessage(f["Are you sure you want to delete ${0}?"],e.Key))&&g.progress(b.deleteCloneConfigurationProperty(e.Location),"Deleting configuration property "+e.Key).then(function(a){c.changedItem(e)},t)},visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});b.addCommand(n);n=new e.ParametersDescription([new e.CommandParameter("url",
"url",f["Repository URL:"])],{hasOptionalParameters:!0});p=new k.Command({name:f["Clone Repository"],tooltip:f["Clone an existing Git repository to a folder"],id:"eclipse.createGitProject",callback:function(b){var d=b.items,e=a.getService("orion.git.provider"),g=a.getService("orion.page.progress"),h=function(b,h,k){d.GitUrl=b;x.getDefaultSshOptions(a,d).then(function(n){var p=arguments.callee,q=new m(a);a.getService("orion.page.message").setProgressMessage("Your project is being set up. This may take a minute...");
q.getConfig().then(function(m){g.progress(e.cloneGitRepository(k,b,h,c.defaultPath,n.gitSshUsername,n.gitSshPassword,n.knownHosts,n.gitPrivateKey,n.gitPassphrase,m,!0),"Cloning repository "+k).then(function(b,c){x.handleProgressServiceResponse(b,n,a,function(a){e.getGitClone(a.Location).then(function(a){var b="",c;for(c in d.projectDescription)b+=c+"\x3d"+d.projectDescription[c]+"\n";r.write(a.Children[0].ContentLocation+".git/.projectInfo",b).then(function(){var b=l.toUrl(K.expand({resource:a.Children[0].ContentLocation}));
window.location=b})})},p,f["Clone Git Repository"])},function(b,c){x.handleProgressServiceResponse(b,n,a,function(){},p,f["Clone Git Repository"])})})})};d.url&&d.projectDescription.name&&(a.getService("orion.page.message").setProgressMessage("Looking for project "+d.projectDescription.name),r.loadWorkspace().then(function(a){for(var b=0;b<a.Children.length;++b){var c=a.Children[b];if(c.Name===d.projectDescription.name){c.Git?e.getGitClone(c.Git.CloneLocation).then(function(a){a.Children[0].GitUrl===
d.url?window.location=l.toUrl(K.expand({resource:a.Children[0].ContentLocation})):console.info("Folder project is used")}):console.info("Folder project is used");return}}h(d.url,null,d.projectDescription.name)}))},visibleWhen:function(a){return!0}});b.addCommand(p);n=new k.Command({name:f["Clone Repository"],tooltip:f["Clone an existing Git repository to a folder"],id:"eclipse.cloneGitRepository",parameters:n,callback:function(b){var d=b.items,e=a.getService("orion.git.provider"),g=a.getService("orion.page.progress"),
h=function(b,h,k){d.GitUrl=b;x.getDefaultSshOptions(a,d).then(function(d){var l=arguments.callee;(new m(a)).getConfig().then(function(m){m=g.progress(e.cloneGitRepository(k,b,h,c.defaultPath,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,d.gitPassphrase,m),"Cloning repository "+k);a.getService("orion.page.message").createProgressMonitor(m,f["Cloning repository: "]+b);m.then(function(b,e){x.handleProgressServiceResponse(b,d,a,function(a){c.changedItem&&c.changedItem()},l,f["Clone Git Repository"])},
function(b,c){x.handleProgressServiceResponse(b,d,a,function(){},l,f["Clone Git Repository"])})})})};b.parameters.valueFor("url")&&!b.parameters.optionsRequested?h(b.parameters.valueFor("url")):(new q.CloneGitRepositoryDialog({serviceRegistry:a,fileClient:r,url:b.parameters.valueFor("url"),alwaysShowAdvanced:b.parameters.optionsRequested,func:h})).show()},visibleWhen:function(a){return!0}});b.addCommand(n);n=new k.Command({name:f["Clone Repository"],tooltip:f["Clone an existing Git repository to a folder"],
id:"eclipse.cloneGitRepositoryReviewReq",callback:function(b){var d=b.items,e=a.getService("orion.git.provider"),g=a.getService("orion.page.progress");(new q.CloneGitRepositoryDialog({serviceRegistry:a,fileClient:r,url:b.userData,alwaysShowAdvanced:!1,func:function(b,h,k){d.GitUrl=b;x.getDefaultSshOptions(a,d).then(function(d){var l=arguments.callee;(new m(a)).getConfig().then(function(m){m=g.progress(e.cloneGitRepository(k,b,h,c.defaultPath,d.gitSshUsername,d.gitSshPassword,d.knownHosts,d.gitPrivateKey,
d.gitPassphrase,m),"Cloning git repository "+k);a.getService("orion.page.message").createProgressMonitor(m,f["Cloning repository: "]+b);m.then(function(b,e){x.handleProgressServiceResponse(b,d,a,function(a){c.changedItem&&c.changedItem()},l,f["Clone Git Repository"])},function(b,c){x.handleProgressServiceResponse(b,d,a,function(){},l,f["Clone Git Repository"])})})})}})).show()},visibleWhen:function(a){return!0}});b.addCommand(n);n=new k.Command({name:f["Add Remote"],tooltip:f["Add a new remote to the repository"],
id:"eclipse.addRemoteReviewRequestCommand",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",callback:function(d){d.parameters&&d.parameters.valueFor("remoteName")&&(d.remoteName=d.parameters.valueFor("remoteName"));var h=function(c,d){c.JsonData.HostKey?(d.parameters=null,d.errorData=c.JsonData,b.collectParameters(d)):d.optionsRequested?(d.errorData=c.JsonData,b.collectParameters(d)):(new g(a)).isEnabled().then(function(a){d.parameters=a?c.JsonData.User?new e.ParametersDescription([new e.CommandParameter("sshpassword",
"password",f["Password:"]),new e.CommandParameter("saveCredentials","boolean",f["Don't prompt me again:"])],{hasOptionalParameters:!0}):new e.ParametersDescription([new e.CommandParameter("sshuser","text",f["User Name:"]),new e.CommandParameter("sshpassword","password",f["Password:"]),new e.CommandParameter("saveCredentials","boolean",f["Don't prompt me again:"])],{hasOptionalParameters:!0}):c.JsonData.User?new e.ParametersDescription([new e.CommandParameter("sshpassword","password",f["Password:"])],
{hasOptionalParameters:!0}):new e.ParametersDescription([new e.CommandParameter("sshuser","text",f["User Name:"]),new e.CommandParameter("sshpassword","password",f["Password:"])],{hasOptionalParameters:!0});d.errorData=c.JsonData;b.collectParameters(d)})};if(d.parameters&&d.parameters.optionsRequested)d.parameters=null,d.optionsRequested=!0,b.collectParameters(d);else{var k=function(b,e,g){var k=a.getService("orion.page.progress");k.progress(a.getService("orion.git.provider").addRemote(b,e,d.userData),
"Adding git remote "+e).then(function(){x.gatherSshCredentials(a,d).then(function(b){a.getService("orion.git.provider").getGitRemote(g.RemoteLocation).then(function(l){for(var m,n=0;n<l.Children.length;n++)l.Children[n].Name===e&&(m=l.Children[n]);var p=a.getService("orion.git.provider");l=a.getService("orion.page.message");n=k.progress(p.doFetch(m.Location,!1,b.gitSshUsername,b.gitSshPassword,b.knownHosts,b.gitPrivateKey,b.gitPassphrase),"Fetching remote "+e);l.createProgressMonitor(n,f["Fetching remote: "]+
m.Location);n.then(function(b,f){x.handleGitServiceResponse(b,a,function(){k.progress(p.getGitRemote(m.Location),"Getting remote details "+e).then(function(a){c.changedItem(g)},t)},function(a){h(a,d)})},function(b,e){x.handleGitServiceResponse(b,a,function(){c.changedItem(g)},function(a){h(a,d)})})})})},t)};d.remoteName?k(d.items.RemoteLocation,d.remoteName,d.items):(d.parameters=new e.ParametersDescription([new e.CommandParameter("remoteName","text",f["Remote Name:"])],{hasOptionalParameters:!1}),
b.collectParameters(d))}},visibleWhen:function(a){return!0}});b.addCommand(n);n=new e.ParametersDescription([new e.CommandParameter("folderName","text",f["New folder:"])],{hasOptionalParameters:!0});n=new k.Command({name:f["Init Repository"],tooltip:f["Create a new Git repository in a new folder"],id:"eclipse.initGitRepository",parameters:n,callback:function(b){var d=b.items,e=a.getService("orion.git.provider"),g=a.getService("orion.page.progress"),h=function(b,h,k){d.GitUrl=b;x.getDefaultSshOptions(a,
d).then(function(d){var l=arguments.callee;(new m(a)).getConfig().then(function(m){m=g.progress(e.cloneGitRepository(k,b,h,c.defaultPath,null,null,null,null,null,m),f["Initializing repository: "]+k);a.getService("orion.page.message").createProgressMonitor(m,f["Initializing repository: "]+k);m.then(function(b,e){x.handleProgressServiceResponse(b,d,a,function(a){c.changedItem&&c.changedItem()},l,f["Init Git Repository"])},function(b,c){x.handleProgressServiceResponse(b,d,a,function(){},l,f["Init Git Repository"])})})})};
b.parameters.valueFor("folderName")&&!b.parameters.optionsRequested?h(null,null,b.parameters.valueFor("folderName")):(new q.CloneGitRepositoryDialog({serviceRegistry:a,title:f["Init Git Repository"],fileClient:r,advancedOnly:!0,func:h})).show()},visibleWhen:function(a){return!0}});b.addCommand(n);n=new k.Command({name:f.Delete,tooltip:f["Delete the repository"],imageClass:"core-sprite-delete",id:"eclipse.git.deleteClone",visibleWhen:function(a){return"Clone"===a.Type},callback:function(b){var e=b.items;
b=a.getService("orion.git.provider");var g=a.getService("orion.page.progress");if(Array.isArray(e)){if(confirm(d.formatMessage(f["Are you sure you want do delete ${0} repositories?"],e.length)))for(var h=0,k=0;k<e.length;k++)g.progress(b.removeGitRepository(e[k].Location),"Removing repository "+e.Name).then(function(a){h++;h>=e.length&&c.changedItem&&c.changedItem()},t)}else confirm(d.formatMessage(f["Are you sure you want to delete ${0}?"],e.Name))&&g.progress(b.removeGitRepository(e.Location),"Removing repository "+
e.Name).then(function(a){c.changedItem&&(window.location=l.toUrl(v.expand({})),c.changedItem())},t)}});b.addCommand(n);n=new k.Command({name:f["Apply Patch"],tooltip:f["Apply a patch on the selected repository"],id:"eclipse.orion.git.applyPatch",imageClass:"git-sprite-apply-patch",spriteClass:"gitCommandSprite",callback:function(b){b=w(b.items);var c=new h;(new u.ApplyPatchDialog({title:f["Apply Patch"],diffLocation:b.DiffLocation||b.repository.DiffLocation,deferred:c})).show();var d=a.getService("orion.page.message");
c.then(function(a){var b;try{var c=JSON.parse(a);if(c.JsonData&&c.JsonData.modifiedFieles){b="Patch applied, files modified: ";a=!0;for(var e=0;e<c.JsonData.modifiedFieles.length;e++)a||(b+=", "),b+=c.JsonData.modifiedFieles[e],a=!1;c=[];c.Severity="Info";c.HTML=!1;c.Message=b;d.setProgressResult(c);return}}catch(f){}d.setMessage("Patch applied")},function(a){var b=JSON.parse(a);a="Apply patch failed.";b.DetailedMessage?a=a+" "+b.DetailedMessage:b.Message&&(a+=" ",a+=b.Message);b=[];b.Severity="Error";
b.HTML=!1;b.Message=a;d.setProgressResult(b)})},visibleWhen:function(a){return"Clone"===a.Type||a.repository}});b.addCommand(n);n=new e.ParametersDescription([new e.CommandParameter("commitName","text",f["Commit name:"])],{hasOptionalParameters:!0});n=new k.Command({name:f["Open Commit"],tooltip:f["Open the commit with the given name"],id:"eclipse.orion.git.openCommitCommand",imageClass:"git-sprite-apply-patch",spriteClass:"gitCommandSprite",parameters:n,callback:function(b){var c=a.getService("orion.page.progress"),
d=function(e,g,k){null==k&&(k=new h);0<e.length?c.progress(a.getService("orion.git.provider").doGitLog("/gitapi/commit/"+b.parameters.valueFor("commitName")+e[0].ContentLocation+"?page\x3d1\x26pageSize\x3d1",null,null,f["Looking for the commit"]),"Looking for commit "+b.parameters.valueFor("commitName")).then(function(a){k.resolve(a.Children[0].Location)},function(a){d(e.slice(1),g,k)}):k.reject();return k},e=function(c){b.parameters.optionsRequested?(new s.OpenCommitDialog({repositories:c,serviceRegistry:a,
commitName:b.parameters.valueFor("commitName")})).show():(a.getService("orion.page.message").setProgressMessage(f["Looking for the commit"]),d(c,b.parameters.valueFor("commitName")).then(function(b){b&&(b=l.toUrl(H.expand({resource:b})),window.open(b));a.getService("orion.page.message").setProgressMessage("")},function(){var b=[];b.Severity="warning";b.HTML=!1;b.Message=f["No commits found"];a.getService("orion.page.message").setProgressResult(b)}))};if("Clone"===b.items.Type){var g=[b.items];e(g)}else b.items.CloneLocation?
c.progress(a.getService("orion.git.provider").getGitClone(b.items.CloneLocation),"Getting git repository details").then(function(a){e(a.Children)}):(g=b.items,e(g))},visibleWhen:function(a){return"Clone"===a.Type||a.CloneLocation||1<a.length&&"Clone"===a[0].Type}});b.addCommand(n)};x.createGitStatusCommands=function(a,c,e,g){function h(a){Array.isArray(a)||(a=[a]);return a}function l(b,c){var d=a.getService("orion.page.message"),g=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").doRebase(b,
"",c),"Rebasing git repository");d.createProgressMonitor(g,c);g.then(function(b){if("OK"===b.Result||"ABORTED"===b.Result||"FAST_FORWARD"===b.Result||"UP_TO_DATE"===b.Result){var c=[];c.Severity="Ok";c.HTML=!1;c.Message=b.Result;a.getService("orion.page.message").setProgressResult(c);e.changedItem({})}"STOPPED"===b.Result?(c=[],c.Severity="Warning",c.HTML=!1,c.Message=b.Result+f[". Repository still contains conflicts."],a.getService("orion.page.message").setProgressResult(c),e.changedItem({})):"FAILED_UNMERGED_PATHS"===
b.Result&&(c=[],c.Severity="Error",c.HTML=!1,c.Message=b.Result+f[". Repository contains unmerged paths. Resolve conflicts first."],a.getService("orion.page.message").setProgressResult(c))},p)}var m=A({serviceRegistry:a,commandService:c}),n=m.perform,p=m.displayErrorOnStatus,m=new k.Command({name:f.Stage,tooltip:f["Stage the change"],imageClass:g?"core-sprite-check":"git-sprite-stage",spriteClass:g?"commandSprite":"gitCommandSprite",id:"eclipse.orion.git.stageCommand",callback:function(b){var c=h(b.items),
d=a.getService("orion.page.message"),k=a.getService("orion.page.progress");if(1===c.length)k=k.progress(a.getService("orion.git.provider").stage(c[0].indexURI),f["Staging changes"]),d.createProgressMonitor(k,f["Staging changes"]),k.then(function(a){g?b.handler.changedItem(c):e.changedItem(c)},p);else{for(var l=[],m=0;m<c.length;m++)l[m]=c[m].name;k=k.progress(a.getService("orion.git.provider").stageMultipleFiles(b.userData.Clone.IndexLocation,l),f["Staging changes"]);d.createProgressMonitor(k,"Staging changes");
k.then(function(a){g?b.handler.changedItem(c):e.changedItem(c)},p)}},visibleWhen:function(a){a=h(a);if(0===a.length)return!1;for(var c=0;c<a.length;c++)if(!b.isChange(a[c])||b.isStaged(a[c]))return!1;return!0}});c.addCommand(m);var q=function(b){var c=h(b.items),d=a.getService("orion.page.message"),e=a.getService("orion.page.progress");if(1===c.length)b=e.progress(a.getService("orion.git.provider").unstage(c[0].indexURI,c[0].name),"Unstaging changes");else{for(var g=[],k=0;k<c.length;k++)g[k]=c[k].name;
b=e.progress(a.getService("orion.git.provider").unstage(b.userData.Clone.IndexLocation,g),"Unstaging changes")}d.createProgressMonitor(b,f["Staging changes"]);return b.then(function(){return c})},m=new k.Command({name:f.Unstage,tooltip:f["Unstage the change"],imageClass:g?"core-sprite-check_on":"git-sprite-unstage",spriteClass:g?"commandSprite":"gitCommandSprite",id:"eclipse.orion.git.unstageCommand",callback:function(a){q(a).then(function(b){g?a.handler.changedItem(b):e.changedItem(b)},p)},visibleWhen:function(a){a=
h(a);if(0===a.length)return!1;for(var c=0;c<a.length;c++)if(!b.isChange(a[c])||!b.isStaged(a[c]))return!1;return!0}});c.addCommand(m);m=new k.Command({name:g?f.SmartCommit:f.Commit,tooltip:g?"":f.Commit,id:"eclipse.orion.git.commitCommand",callback:function(a){n(a).then(function(){e.changedItem()})},visibleWhen:function(a){return!0}});c.addCommand(m);m=new k.Command({name:f.Reset,tooltip:f["Reset the branch, discarding all staged and unstaged changes"],imageClass:"core-sprite-refresh",id:"eclipse.orion.git.resetCommand",
callback:function(b){var c=b.items;a.getService("orion.page.dialog").confirm(f["All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered."]+"\n"+f["Are you sure you want to continue?"],function(b){if(b){b=a.getService("orion.page.message");var d=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").unstageAll(c.IndexLocation,"HARD"),f["Resetting local changes"]);b.createProgressMonitor(d,f["Resetting local changes"]);d.then(function(a){e.changedItem(c)},
p)}})},visibleWhen:function(a){return"Status"!==a.Type?!1:b.hasStagedChanges(a)||b.hasUnstagedChanges(a)}});c.addCommand(m);m=new k.Command({name:f.Checkout,tooltip:f["Checkout all the selected files, discarding all changes"],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.checkoutCommand",callback:function(b){var c=h(b.items);a.getService("orion.page.dialog").confirm(f["Your changes to the selected files will be discarded and cannot be recovered."]+"\n"+f["Are you sure you want to continue?"],
function(d){if(d){d=a.getService("orion.page.message");for(var g=a.getService("orion.page.progress"),h=[],k=0;k<c.length;k++)h[k]=c[k].name;g=g.progress(a.getService("orion.git.provider").checkoutPath(b.userData.Clone.Location,h),f["Resetting local changes"]);d.createProgressMonitor(g,f["Resetting local changes"]);g.then(function(a){e.changedItem(c)},p)}})},visibleWhen:function(a){a=h(a);if(0===a.length)return!1;for(var c=0;c<a.length;c++)if(!b.isChange(a[c])||b.isStaged(a[c]))return!1;return!0}});
c.addCommand(m);var s=new k.Command({name:f.Discard,tooltip:f["Checkout all the selected files, discarding all changes"],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.checkoutStagedCommand",callback:function(b){a.getService("orion.page.dialog").confirm(f["Your changes to the selected files will be discarded and cannot be recovered."]+"\n"+f["Are you sure you want to continue?"],function(c){c&&q(b).then(function(c){for(var d=a.getService("orion.page.message"),
h=a.getService("orion.page.progress"),k=[],l=0;l<c.length;l++)k[l]=c[l].name;h=h.progress(a.getService("orion.git.provider").checkoutPath(b.userData.Clone.Location,k),f["Resetting local changes"]);d.createProgressMonitor(h,f["Resetting local changes"]);return h.then(function(a){g?b.handler.changedItem(c):e.changedItem(c)},p)})})},visibleWhen:function(a){a=h(a);s.name=d.formatMessage(f.Discard,a.length);return!0}});c.addCommand(s);m=new k.Command({name:f["Show Patch"],tooltip:f["Show workspace changes as a patch"],
id:"eclipse.orion.git.showPatchCommand",hrefCallback:function(a){var b=h(a.items);a=a.userData.Clone.DiffLocation+"?parts\x3ddiff";for(var c=0;c<b.length;c++)a+="\x26Path\x3d",a+=b[c].name;return a},visibleWhen:function(a){a=h(a);if(0===a.length)return!1;for(var c=0;c<a.length;c++)if(b.isStaged(a[c]))return!1;return!0}});c.addCommand(m);m=new k.Command({name:f["Show Patch"],tooltip:f["Show checked changes as a patch"],id:"eclipse.orion.git.showStagedPatchCommand",hrefCallback:function(a){var b=h(a.items);
a=a.userData.Clone.DiffLocation.replace("/Default/","/Cached/")+"?parts\x3ddiff";for(var c=0;c<b.length;c++)a+="\x26Path\x3d",a+=b[c].name;return a},visibleWhen:function(a){return 0!==h(a).length}});c.addCommand(m);m=new k.Command({name:f.Continue,tooltip:f["Contibue Rebase"],id:"eclipse.orion.git.rebaseContinueCommand",callback:function(a){return l(a.items.Clone.HeadLocation,"CONTINUE")},visibleWhen:function(a){return a.RepositoryState&&-1!==a.RepositoryState.indexOf("REBASING")}});c.addCommand(m);
m=new k.Command({name:f["Skip Patch"],tooltip:f["Skip Patch"],id:"eclipse.orion.git.rebaseSkipPatchCommand",callback:function(a){return l(a.items.Clone.HeadLocation,"SKIP")},visibleWhen:function(a){return a.RepositoryState&&-1!==a.RepositoryState.indexOf("REBASING")}});c.addCommand(m);m=new k.Command({name:f.Abort,tooltip:f["Abort Rebase"],id:"eclipse.orion.git.rebaseAbortCommand",callback:function(a){return l(a.items.Clone.HeadLocation,"ABORT")},visibleWhen:function(a){return a.RepositoryState&&
-1!==a.RepositoryState.indexOf("REBASING")}});c.addCommand(m)};x.createSharedCommands=function(a,b,c,d,e,g){var h=function(){c.changedItem()};e={serviceRegistry:a,commandService:b};d=E({serviceRegistry:a,commandService:b,explorer:c,toolbarId:d,tags:!0,confirmDialogCloseCallback:h,remotePrompterDialogCloseCallback:h,sshCredentialsDialogCloseCallback:h,sshSlideoutCloseCallback:h});e=A(e);g=e.createParameters(!1);var l=e.perform,m=e.displayErrorOnStatus,n=d.perform;d=new k.Command({name:f["Commit and Push"],
tooltip:f["Commit and Push"],id:"eclipse.orion.git.commitAndPushCommand",parameters:g,callback:function(b){l(b).then(function(){a.getService("orion.git.provider").getGitBranch(b.items.status.Clone.BranchLocation).then(function(a){a=a.Children;for(var c,d=0;d<a.length;d++)if(a[d].Current){c=a[d];break}b.command=void 0;b.targetBranch=void 0;b.parameters=void 0;b.items=c;n(b).then(function(){h()})},function(a){m(a)})},function(a){m(a);h()})},visibleWhen:function(a){return!0}});b.addCommand(d)}})();return x});
define("orion/git/gitLogExplorer","require i18n!git/nls/gitmessages orion/git/widgets/gitCommitList orion/section orion/Deferred orion/URITemplate orion/globalCommands orion/git/gitCommands orion/i18nUtil orion/PageUtil orion/webui/littlelib".split(" "),function(f,l,h,d,c,k,e,b,a,g,m){var n={},r=new k("git/git-repository.html#{,resource,params*}");n.GitLogExplorer=function(){function k(a){a=a||{};this.registry=a.registry;this.fileClient=a.fileClient;this.gitClient=a.gitClient;this.commandService=
a.commandService;this.statusService=a.statusService;this.progressService=a.progressService;this.preferencesService=a.preferencesService;this.selection=a.selection;this.checkbox=a.checkbox;this.minimal=a.minimal;this.parentId=a.parentId;this.pageTitleId=a.pageTitleId;this.toolbarId=a.toolbarId;this.selectionToolsId=a.selectionToolsId;this.pageNavId=a.pageNavId;this.actionScopeId=a.actionScopeId}k.prototype.getCloneFileUri=function(){var a,b=g.matchResourceParameters().resource.split("gitapi/commit/");
if(2===b.length&&(b=b[1].split("/"),1<b.length)){a="";for(var c=0;c<b.length-1;c++)a+="/"+b[c];a+="/"+b[b.length-1].split("?")[0]}return a};k.prototype.initTitleBar=function(d){var g=new c,h=d.toRef&&"Branch"===d.toRef.Type,k;d.toRef&&"RemoteTrackingBranch"===d.toRef.Type||h?(h=d.ContentLocation+d.RepositoryPath,k=d.toRef.Name):h=this.getCloneFileUri();var m=this;h?this.progressService.progress(this.fileClient.read(h,!0),"Getting metadata of "+h).then(function(c){this.isDirectory=this.commitNavigator.isDirectory=
c.Directory;var h={Parents:[]};h.Name=c.ETag?a.formatMessage(l["Log (0) - 1"],k,c.Name):a.formatMessage(l["Log (0)"],k);h.Parents[0]={};h.Parents[0].Name=d.Clone.Name;h.Parents[0].Location=d.Clone.Location;h.Parents[0].ChildrenLocation=d.Clone.Location;h.Parents[1]={};h.Parents[1].Name=l.Repo;e.setPageTarget({task:l["Git Log"],target:d,breadcrumbTarget:h,makeBreadcrumbLink:function(a,b){a.href=f.toUrl(r.expand({resource:b||"".Location}))},serviceRegistry:m.registry,commandService:m.commandService});
b.updateNavTools(m.registry,m.commandService,m,"pageActions","selectionTools",d);g.resolve()}.bind(this),function(a){g.reject(a)}):g.resolve();return g};k.prototype.redisplay=function(){var a=g.matchResourceParameters();this.display(a.resource)};k.prototype.changedItem=function(a,b){this.redisplay()};k.prototype.handleError=function(a){var b={Severity:"Error",HTML:!1};try{var c=JSON.parse(a.responseText);b.Message=c.DetailedMessage?c.DetailedMessage:c.Message}catch(d){b.Message=a.DetailedMessage||
a.Message||a.message}this.statusService.setProgressResult(b)};k.prototype.display=function(a){var c=m.node("table");m.empty(c);var c=new d.Section(c,{id:"commitSection",title:l.Commits,slideout:!0,content:'\x3cdiv class\x3d"mainPadding" id\x3d"logNode"\x3e\x3c/div\x3e',canHide:!0,preferenceService:this.preferencesService}),e=this;(this.commitNavigator=new h.GitCommitListExplorer({serviceRegistry:this.registry,commandRegistry:this.commandService,fileClient:this.fileClient,gitClient:this.gitClient,
progressService:this.progressService,statusService:this.statusService,selection:this.selection,actionScopeId:this.actionScopeId,parentId:"logNode",location:a,section:c,legacyLog:!0,handleError:this.handleError,root:{Type:"CommitRoot"}})).display().then(function(a){e.initTitleBar(a);b.updateNavTools(e.registry,e.commandService,e,e.toolbarId,e.selectionToolsId,a,e.pageNavId)})};return k}();return n});
define("orion/links",[],function(){function f(f){this._init(f)}f.prototype={_init:function(f){this._registry=f.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.textlink",this)},_replaceLink:function(f,h,d,c,k){var e=f.search(d);0<e&&(h.appendChild(document.createTextNode(f.substring(0,e))),f=f.substring(e));d=f.replace(d,"");var e=f.substring(0,f.length-d.length),b=e.split(" ",c);if(b.length===c){f=document.createElement("a");for(var a=0;a<c;a++)k=k.replace("%"+
(a+1),b[a]);f.setAttribute("href",k);f.textContent=e;h.appendChild(f);f=d}return f},addLinks:function(f,h){var d=h||document.createElement("div"),c=this._registry.getServiceReferences("orion.core.linkScanner");if(0<c.length)for(var k=c[0],c=RegExp(k.getProperty("pattern"),"i"),e=k.getProperty("words"),k=k.getProperty("anchor"),b=f.search(c);0<=b;)f=this._replaceLink(f,d,c,e,k),b=f.search(c);0<f.length&&d.appendChild(document.createTextNode(f));return d}};f.prototype.constructor=f;return{TextLinkService:f}});
define("git/git-log","i18n!git/nls/gitmessages require orion/browserCompatibility orion/bootstrap orion/status orion/progress orion/commandRegistry orion/dialogs orion/selection orion/fileClient orion/operationsClient orion/searchClient orion/globalCommands orion/git/gitClient orion/ssh/sshTools orion/git/gitLogExplorer orion/git/gitCommands orion/links orion/PageUtil".split(" "),function(f,l,h,d,c,k,e,b,a,g,m,n,r,t,q,p,s,v,u){d.startup().then(function(d){var h=d.serviceRegistry;d=d.preferences;var l=
new m.OperationsClient(h),E=new c.StatusReportingService(h,l,"statusPane","notifications","notificationArea");new b.DialogService(h);var A=new a.Selection(h);new q.SshService(h);var B=new e.CommandRegistry({selection:A}),l=new k.ProgressService(h,l,B),x=new v.TextLinkService({serviceRegistry:h}),G=new t.GitService(h),z=new g.FileClient(h),F=new n.Searcher({serviceRegistry:h,fileService:z,commandService:B}),C=new p.GitLogExplorer({registry:h,fileClient:z,gitClient:G,statusService:E,progressService:l,
preferencesService:d,commandService:B,linkService:x,selection:A,parentId:"table",pageTitleId:"pageTitle",toolbarId:"pageActions",selectionToolsId:"selectionTools",pageNavId:"pageNavigationActions",actionScopeId:"itemLevelCommands"});r.setPageCommandExclusions(["eclipse.git.remote","eclipse.git.log"]);r.generateBanner("orion-gitlog",h,B,d,F,C);s.createFileCommands(h,B,C,"pageActions","selectionTools");B.addCommandGroup("itemLevelCommands","eclipse.gitGroup.nav",200,f.More);B.addCommandGroup("pageActions",
"eclipse.gitGroup.page",100);B.addCommandGroup("selectionTools","eclipse.selectionGroup",500,"More");B.registerCommandContribution("itemLevelCommands","eclipse.openGitCommit",1);B.registerCommandContribution("itemLevelCommands","eclipse.compareWithWorkingTree",2);B.registerCommandContribution("selectionTools","eclipse.compareGitCommits",1,"eclipse.selectionGroup");B.addCommandGroup("pageActions","eclipse.gitPushGroup",100,"Push",null,null,null,"Push",null,"eclipse.orion.git.push");B.registerCommandContribution("pageActions",
"eclipse.orion.git.push",100,"eclipse.gitPushGroup");B.registerCommandContribution("pageActions","eclipse.orion.git.pushForce",200,"eclipse.gitPushGroup");B.registerCommandContribution("pageActions","eclipse.orion.git.pushBranch",300,"eclipse.gitPushGroup");B.registerCommandContribution("pageActions","eclipse.orion.git.pushForceBranch",400,"eclipse.gitPushGroup");B.registerCommandContribution("pageActions","eclipse.orion.git.pushToGerrit",500,"eclipse.gitPushGroup");B.addCommandGroup("pageActions",
"eclipse.gitFetchGroup",100,"Fetch",null,null,null,"Fetch",null,"eclipse.orion.git.fetch");B.registerCommandContribution("pageActions","eclipse.orion.git.fetch",100,"eclipse.gitFetchGroup");B.registerCommandContribution("pageActions","eclipse.orion.git.fetchForce",100,"eclipse.gitFetchGroup");B.registerCommandContribution("pageActions","eclipse.orion.git.merge",100,"eclipse.gitGroup.page");B.registerCommandContribution("itemLevelCommands","eclipse.orion.git.addTag",3);B.registerCommandContribution("itemLevelCommands",
"eclipse.orion.git.cherryPick",3);B.registerCommandContribution("itemLevelCommands","eclipse.orion.git.revert",3);B.registerCommandContribution("pageNavigationActions","eclipse.orion.git.previousLogPage",1);B.registerCommandContribution("pageNavigationActions","eclipse.orion.git.nextLogPage",2);h=u.matchResourceParameters();C.display(h.resource);window.addEventListener("hashchange",function(){var a=u.matchResourceParameters();C.display(a.resource)},!1)})});
//@ sourceMappingURL=git-log.js.map