/**
 * @license 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
 */

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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).
 *
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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). 
 * 
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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). 
 *
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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).
 *
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/**
 * @license 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
 */

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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). 
 * 
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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).
 *
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/******************************************************************************* 
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 *******************************************************************************/

/*******************************************************************************
 * @license 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
 ******************************************************************************/

/*******************************************************************************
 * @license 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
 ******************************************************************************/

/*******************************************************************************
 * @license 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license 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
 ******************************************************************************/

/*******************************************************************************
 * @license 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
 ******************************************************************************/

/*******************************************************************************
 * @license 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
 ******************************************************************************/

/******************************************************************************* 
 * @license
 * 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
 ******************************************************************************/

/******************************************************************************* 
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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
 ******************************************************************************/

/*******************************************************************************
 * @license
 * 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 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) 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, 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) 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, 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) 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) 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) 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) 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).

 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) 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) 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) 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, 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, 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
 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, 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, 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
*/
(function(){function e(c,d,b,f,a,g){d[c]&&(b.push(c),(d[c]===!0||d[c]===1)&&f.push(a+c+"/"+g))}function j(c,d,b,f,a){d=f+d+"/"+a;require._fileExists(c.toUrl(d+".js"))&&b.push(d)}function i(c,d,b){for(var f in d)d.hasOwnProperty(f)&&(!c.hasOwnProperty(f)||b)?c[f]=d[f]:typeof d[f]==="object"&&i(c[f],d[f],b)}var d=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(c){var h=c.config?c.config():{};return{version:"2.0.1+",load:function(b,f,a,g){g=g||{};if(g.locale)h.locale=g.locale;
var k=d.exec(b),c=k[1],n=k[4],p=k[5],o=n.split("-"),u=[],t={},w,v="";if(k[5])c=k[1],b=c+p;else{p=k[4];n=h.locale;if(!n)n=h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();o=n.split("-")}if(g.isBuild){u.push(b);j(f,"root",u,c,p);for(w=0;w<o.length;w++)g=o[w],v+=(v?"-":"")+g,j(f,v,u,c,p);f(u,function(){a()})}else f([b],function(g){var b=[],k;e("root",g,b,u,c,p);for(w=0;w<o.length;w++)k=o[w],v+=(v?"-":"")+k,e(v,g,b,u,c,p);f(u,function(){var k,
d,e;for(k=b.length-1;k>-1&&b[k];k--){e=b[k];d=g[e];if(d===!0||d===1)d=f(c+e+"/"+p);i(t,d)}a(t)})})}}})})();
define("orion/i18n",[],function(){return{load:function(e,j,i,d){var d=d||{},c=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,h=c.exec(e);if(h){if(!j.defined||j.defined(e))try{i(j(e));return}catch(b){}if(d.isBuild||d.isTest)i({});else if(j.specified&&!j.specified("orion/bootstrap"))i({});else{var f=h[1],a=h[3]?h[2]:"",g=h[3]||h[2];j(["orion/bootstrap"],function(b){b.startup().then(function(b){var k=b.serviceRegistry,b=k.getServiceReferences("orion.i18n.message");if(a)b.some(function(a){return e===a.getProperty("name")?
(k.getService(a).getMessageBundle().then(function(a){i(a)},function(){i({})}),!0):!1})||i({});else{var p={},o;b.forEach(function(b){var k=b.getProperty("name");if((h=c.exec(k))&&f===h[1]&&g===(h[3]||h[2]))if(a=h[3]?h[2]:""){if((b=d.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&b.toLowerCase().indexOf(a.toLowerCase())===0)p[a]=!0,(!j.specified||!j.specified(k))&&define(k,["orion/i18n!"+k],function(a){return a})}else o=b});!j.specified||!j.specified(e)?o?
k.getService(o).getMessageBundle().then(function(a){Object.keys(p).forEach(function(g){typeof a[g]==="undefined"&&(a[g]=p[g])});define(e,[],a);i(a)},function(){define(e,[],p);i(p)}):(define(e,[],p),i(p)):i(p)}})})}}else i(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","Amend last commit":"Amend last commit"," Amend":" Amend","Rebase in progress. Choose action:":"Rebase in progress. Choose action:","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","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...",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"," - 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","Getting current branch":"Getting current branch","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","Getting confituration":"Getting confituration","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',"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:","ChangeId:":"ChangeId:","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...","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 the current tag, 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 ",". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing":". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing",". Repository state is invalid (i.e. already during rebasing)":". Repository state is invalid (i.e. already during rebasing)",". Repository contains unmerged paths":". Repository contains unmerged paths",". Repository contains pending changes. Please commit or stash them":". Repository contains pending changes. Please commit or stash them",
"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","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.",
"< Previous Page":"< 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 >":"Next Page >","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",
Continue:"Continue","Contibue Rebase":"Contibue Rebase","Skip Patch":"Skip Patch",Abort:"Abort","Abort Rebase":"Abort Rebase","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.","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:","Filter items":"Filter items","Filter remote branches":"Filter remote branches","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."});
define("git/nls/gitmessages",["orion/i18n!git/nls/gitmessages","git/nls/root/gitmessages"],function(e,j){var i={root:j};Object.keys(e).forEach(function(d){typeof i[d]==="undefined"&&(i[d]=e[d])});return i});
(function(){function e(){for(var c=navigator.userAgent,d={browser:!1,version:!1},b=[{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}],f=0;f<b.length;f++){var a=b[f],g=c.match(a.regExp);if(g){d.browser=
!0;d.version=g[1]>=a.minVersion;d.name=a.name;break}}return d}function j(){try{return"localStorage"in window&&window.localStorage!==null}catch(c){return!1}}function i(c){alert(c);throw Error("unsupported browser");}var d=e();if(d.browser)d.version||i("Sorry, your browser version is not supported.\n\nTo use Orion, please upgrade to the latest version of "+d.name+".\n");else if(j()&&!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 j()||i("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:e,supportsLocalStorage:j,throwBrowserAlert:i}})();define("orion/browserCompatibility",function(){});
(function(e,j){typeof define==="function"&&define.amd?define("orion/Deferred",j):typeof exports==="object"?module.exports=j():(e.orion=e.orion||{},e.orion.Deferred=j())})(this,function(){function e(){for(var b;b=c.shift();)b();h=!1}function j(b){c.push(b);h||(h=!0,setTimeout(e,0))}function i(b){return function(){b.apply(void 0,arguments)}}function d(){function b(){for(var a;a=e.shift();){var g=a.deferred,b=l==="fulfilled"?"resolve":"reject";if(typeof a[b]==="function")try{var f=(0,a[b])(k),d=f&&(typeof f===
"object"||typeof f==="function")&&f.then;if(typeof d==="function")if(f===g.promise)g.reject(new TypeError);else{var h=f.cancel;typeof h==="function"?g._protected(c).parentCancel=h.bind(f):delete g._protected(c).parentCancel;d.call(f,i(g.resolve),i(g.reject),i(g.progress))}else g.resolve(f)}catch(p){g.reject(p)}else g[b](k)}}function f(a){delete o.parentCancel;l="rejected";k=a;e.length&&j(b)}function a(g){function c(a){return function(g){i||(i=!0,a(g))}}var i=!1;delete o.parentCancel;try{var v=g&&
(typeof g==="object"||typeof g==="function")&&g.then;if(typeof v==="function")if(g===h)f(new TypeError);else{l="assumed";var y=g&&g.cancel;if(typeof y!=="function"){var C=new d,g=C.promise;try{v(C.resolve,C.reject,C.progress)}catch(z){C.reject(z)}y=g.cancel;v=g.then}k=g;v.call(g,c(a),c(f));o.parentCancel=y.bind(g)}else l="fulfilled",k=g,e.length&&j(b)}catch(s){c(f)(s)}}function g(){var a=o.parentCancel;if(a)delete o.parentCancel,a();else if(!l)a=Error("Cancel"),a.name="Cancel",f(a)}var k,l,e=[],h=
this,o={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==c)throw Error("protected");return o}});this.resolve=function(g){l||a(g);return h};this.reject=function(a){l||f(a);return h};this.progress=function(a){l||e.forEach(function(g){if(g.progress)try{g.progress(a)}catch(b){}});return h.promise};this.cancel=function(){o.parentCancel?setTimeout(g,0):g();return h};this.then=function(a,g,f){a={resolve:a,reject:g,progress:f,deferred:new d};e.push(a);a.deferred._protected(c).parentCancel=
h.promise.cancel.bind(h);(l==="fulfilled"||l==="rejected")&&j(b);return a.deferred.promise};this.promise={then:h.then,cancel:h.cancel}}var c=[],h=!1;d.all=function(b,f){function a(a,g){e||(c[a]=g,--k===0&&h.resolve(c))}function g(g,b){if(!e){if(f)try{a(g,f(b));return}catch(k){b=k}h.reject(b)}}var k=b.length,c=[],e=!1,h=new d;h.then(void 0,function(){e=!0;b.forEach(function(a){a.cancel&&a.cancel()})});k===0?h.resolve(c):b.forEach(function(b,f){b.then(a.bind(void 0,f),g.bind(void 0,f))});return h.promise};
d.when=function(b,f,a,g){var k;if(!(b&&typeof b.then==="function"))k=new d,k.resolve(b),b=k.promise;return b.then(f,a,g)};return d});
define("orion/EventTarget",[],function(){function e(){this._namedListeners={}}e.prototype={dispatchEvent:function(e){if(!e.type)throw Error("unspecified type");var i=this._namedListeners[e.type];i&&i.forEach(function(d){try{typeof d==="function"?d(e):d.handleEvent(e)}catch(c){typeof console!=="undefined"&&console.log(c)}});return!e.defaultPrevented},addEventListener:function(e,i){if(typeof i==="function"||i.handleEvent)this._namedListeners[e]=this._namedListeners[e]||[],this._namedListeners[e].push(i)},
removeEventListener:function(e,i){var d=this._namedListeners[e];if(d)for(var c=0;c<d.length;c++)if(d[c]===i){d.length===1?delete this._namedListeners[e]:d.splice(c,1);break}}};e.prototype.constructor=e;e.attach=function(j){var i=new e;j.dispatchEvent=i.dispatchEvent.bind(i);j.addEventListener=i.addEventListener.bind(i);j.removeEventListener=i.removeEventListener.bind(i)};return e});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(e,j){function i(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 k;try{if(!a())throw Error("Service was unregistered");var c=b[g].apply(b,Array.prototype.slice.call(arguments));if(c&&typeof c.then==="function")return c;
else k=new e,k.resolve(c)}catch(d){k=new e,k.reject(d)}return k.promise}}for(var k in b)typeof b[k]==="function"&&(this[k]=g(k))}function h(b,a){this.type=b;this.serviceReference=a}function b(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new j;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 k=g.reference;b._serviceEventTarget.dispatchEvent(new h("unregistering",
k));b._entries[a]=null;k.getProperty("objectClass").forEach(function(a){for(var g=b._namedReferences[a],c=0;c<g.length;c++)if(g[c]===k){g.length===1?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 h("modified",g.reference))}}}i.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]}};i.prototype.constructor=i;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;b.prototype={getService:function(b){var a;if(typeof b==="string")(b=this._namedReferences[b])&&b.some(function(g){a=this._entries[g.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(g){g&&a.push(g.reference)});return a},registerService:function(b,a,g){if(typeof a==="undefined"||a===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var k=this._entries.length,l=new i(k,b,g),e=this._namedReferences;b.forEach(function(a){e[a]=e[a]||[];e[a].push(l)});b=new c(a,this._internalRegistry.isRegistered.bind(null,k));this._entries.push({reference:l,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new h("registered",
l));return new d(k,l,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};b.prototype.constructor=b;return{ServiceRegistry:b}});
define("orion/xhr",["orion/Deferred"],function(e){function j(e,d,c,h){var b=typeof c.response!=="undefined"?c.response:c.responseText,f;try{f=c.status}catch(a){f=0}e={args:d,response:b,responseText:typeof b==="string"?b:null,status:f,url:e,xhr:c};if(typeof h!=="undefined")e.error=h;return e}return function(i,d,c){var c=c||{},h=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,b=new e,f=c.headers||{},a=c.log||!1,g;typeof f["X-Requested-With"]==="undefined"&&(f["X-Requested-With"]="XMLHttpRequest");
if(typeof c.data!=="undefined"&&(i==="POST"||i==="PUT"))g=c.data;var k=!1,l=!1;b.promise.then(void 0,function(a){k=!0;!l&&a instanceof Error&&a.name==="Cancel"&&h.abort()});h.onabort=function(){l=!0;if(!k){var a=Error("Cancel");a.name="Cancel";b.reject(a)}};h.onload=function(){var g=j(d,c,h);200<=h.status&&h.status<400?b.resolve(g):(b.reject(g),a&&typeof console!=="undefined"&&console.log(Error(h.statusText)))};h.onerror=function(){var g=j(d,c,h);b.reject(g);a&&typeof console!=="undefined"&&console.log(Error(h.statusText))};
h.onprogress=function(a){a.xhr=h;b.progress(a)};try{h.open(i,d,!0);if(typeof c.responseType==="string")h.responseType=c.responseType;if(typeof c.timeout==="number")if(typeof h.timeout==="number")h.timeout=c.timeout,h.addEventListener("timeout",function(){b.reject(j(d,c,h,"Timeout exceeded"))});else{var n=setTimeout(function(){b.reject(j(d,c,h,"Timeout exceeded"))},c.timeout);b.promise.then(clearTimeout.bind(null,n),clearTimeout.bind(null,n))}Object.keys(f).forEach(function(a){h.setRequestHeader(a,
f[a])});h.send(g||null)}catch(p){b.reject(j(d,c,h,p))}return b.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(e,j,i){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(f,c){if(b===0)return null;var d=localStorage.getItem(a+f);if(d===null)return null;d=JSON.parse(d);return c||b===-1||d._expires&&d._expires>(new Date).getTime()?(delete d._expires,d):null},set:function(f,c){if(b!==0){if(b!==-1)c._expires=(new Date).getTime()+
1E3*b;if(Object.keys(c).length===0)localStorage.removeItem(a+f);else{var d=JSON.stringify(c);localStorage.setItem(a+f,d);delete c._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function h(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");if(b.length>0)this._service=a.getService(b[0])}return!!this._service}}function b(a){this._location=
a;this._currentPromise=null;this._cache=new c("/orion/preferences/default",3600)}function f(){this._cache=new c("/orion/preferences/local",-1)}function a(a,k){this._userProvider=new h(a);this._localProvider=new f;k=k||"defaults.pref";k.indexOf("://")===-1&&(k=e.toUrl(k));this._defaultsProvider=new b(k);this._serviceRegistration=a.registerService("orion.core.preference",this)}d.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var f=this._stores[b];this._dirty.indexOf(f)!==-1&&
a.push(this._providers[b].put(this._name,f));if(this._pendingDeletes[b]&&this._pendingDeletes[b].length>0){for(f=0;f<this._pendingDeletes[b].length;f++)a.push(this._providers[b].remove(this._name,this._pendingDeletes[b][f]));delete this._pendingDeletes[b]}}this._dirty=[];return j.all(a)},_scheduleFlush:function(a){a&&this._dirty.indexOf(a)===-1&&this._dirty.push(a);if(!this._flushPending)this._flushPending=!0,window.setTimeout(function(){if(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],f;for(f in b)b.hasOwnProperty(f)&&typeof this._cached[f]==="undefined"&&(this._cached[f]=b[f])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(this._stores.length!==0){var f=this._stores[0];if(f[a]!==b)f[a]=b,this._cached=null,this._scheduleFlush(f)}},remove:function(a){for(var b=0;b<
this._stores.length;++b){var f=this._stores[b];if(f.hasOwnProperty(a))return delete f[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,f=[],c=0;c<this._providers.length;++c)f.push(this._providers[c].get(this._name,
a).then(function(a){return function(g){b._stores[a]=g}}(c)));return j.all(f).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};h.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var f=new j,c=null;b?this._cache.remove(a):c=this._cache.get(a);if(c!==null)f.resolve(c);else{this._currentPromises[a]=f;var d=this;this._service.get(a).then(function(b){d._cache.set(a,b);delete d._currentPromises[a];f.resolve(b)},function(b){b.status===
404?(b={},d._cache.set(a,b),delete d._currentPromises[a],f.resolve(b)):(delete d._currentPromises[a],f.resolve(d._cache.get(a,!0)||{}))})}return f},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)},remove:function(a,b){var f=this._cache.get(a);delete f[b];this._cache.set(a,f);return this._service.remove(a,b)}};b.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;var f=new j,c=null;b?this._cache.remove(a):c=this._cache.get(a);if(c!==null)f.resolve(c);
else{this._currentPromise=f;var d=this;i("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;f.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(d._cache.set(a,{}),d._currentPromise=null,f.resolve({})):(d._currentPromise=null,b=d._cache.get(a,!0),b!==null?f.resolve(b[a]||{}):f.resolve({}))})}return f},put:function(){var a=new j;a.resolve();return a},remove:function(a,b){var f=
this._cache.get(a);delete f[b];this.put(a,f)}};f.prototype={get:function(a){var b=new j,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var f=new j;this._cache.set(a,b);f.resolve();return f},remove:function(a,b){var f=this._cache.get(a);delete f[b];this.put(a,f)}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(b,f,c){if(!f||typeof f!=="number"||f>7||f<1)c=f,f=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",
c,!1);if((a.USER_SCOPE&f)!==0)return"/orion/preferences/user"+b;else if((a.LOCAL_SCOPE&f)!==0)return"/orion/preferences/local"+b;return"/orion/preferences/default"+b},getPreferences:function(b,f){if(!f||typeof f!=="number"||f>7||f<1)f=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var c=[];a.USER_SCOPE&f&&this._userProvider.available()&&c.push(this._userProvider);a.LOCAL_SCOPE&f&&c.push(this._localProvider);a.DEFAULT_SCOPE&f&&c.push(this._defaultsProvider);var e=new d(b,c);return e.sync().then(function(){return e})},
getSetting:function(a,b,f){for(var c,d=0;d<a.length;d++)if(a[d].label===b)for(var e=0;e<a[d].data.length;e++)if(a[d].data[e].label===f){c=a[d].data[e].value;break}return c}};return{PreferencesService:a}});
(function(){function e(a){if(typeof a!=="string")throw new TypeError;}function j(a){return a?a.split("&"):[]}function i(a){return a.length===0?"":a.join("&")}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+="="+encodeURIComponent(a[1]));return b}function h(a,b){var g="",f=[],c=0;return{next:function(){if(g!==a.query)g=a.query,f=j(g);if(c<f.length){var k=d(f[c++]);
switch(b){case "keys":return k[0];case "values":return k[1];case "keys+values":return[k[0],k[1]];default:throw new TypeError;}}throw r;}}}function b(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function f(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 k(b,c){if(typeof b!==
"string")throw new TypeError;var b=g(b),k=o.exec(b);if(!k)return null;var d={};d.scheme=k[1]||"";if(d.scheme&&!t.test(d.scheme))return null;var e=k[2];if(e&&(e=u.exec(e),d.userinfo=e[1],d.host=e[2],d.port=e[3],d.port&&!w.test(d.port)))return null;d.path=k[3];d.query=k[4];d.fragment=k[5];if(!d.scheme&&c&&(d.scheme=c.scheme,!d.host&&c.host))d.userinfo=c.userinfo,d.host=c.host,d.port=c.port,d.pathRelative=!0;if(d.pathRelative)if(d.path){if(d.path[0]!=="/")k=/^(.*\/)[^\/]*$/.exec(c.path)[1]||"/",d.path=
k+d.path}else d.path=c.path;if(d.scheme)d.scheme=d.scheme.toLowerCase();if(d.port)d.port=f(d.port);if(d.host&&d.path)d.path=a(d.path);return d}function l(a,g){var f;if(g){g=g.href||g;f=k(g);if(!f||!f.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:f})}f=k(a,f);if(!f)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:f,writable:!0});var c=new b(this);Object.defineProperty(this,"query",{get:function(){return this._url?
c:null},enumerable:!0})}try{var n;if(typeof window.URL==="function"&&window.URL.length!==0&&(n=new window.URL("http://www.w3.org?q")).protocol==="http:"&&n.query)return}catch(p){}var o=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,u=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,t=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,w=/^\d*$/,v=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,y=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,C=/^([^?#\s]*)$/,z=/^([^\s]*)$/,s=/^\S*$/,m=/([^:]*):?(.*)/,r=typeof StopIteration!==
"undefined"?StopIteration:Error("Stop Iteration"),q={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(b.prototype,{get:{value:function(a){e(a);var b;j(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){e(a);e(b);var g=j(this._url.query);g.some(function(f,k){var e=d(f);if(e[0]===a)return e[1]=b,g[k]=c(e),!0})||g.push(c([a,b]));this._url.query=i(g)},enumerable:!0},has:{value:function(a){e(a);
return j(this._url.query).some(function(b){if(d(b)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){e(a);var b=j(this._url.query),g=b.filter(function(b){return d(b)[0]!==a});return g.length!==b.length?(this._url.query=i(g),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,b){if(typeof a!=="function")throw new TypeError;var g=h(this._url,"keys+values");try{for(;;){var f=g.next();a.call(b,f[1],f[0],this)}}catch(c){if(c!==r)throw c;
}},enumerable:!0},keys:{value:function(){return h(this._url,"keys")},enumerable:!0},values:{value:function(){return h(this._url,"values")},enumerable:!0},items:{value:function(){return h(this._url,"keys+values")}},size:{get:function(){return j(this._url.query).length},enumerable:!0},getAll:{value:function(a){e(a);var b=[];j(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){e(a);e(b);var g=j(this._url.query);g.push(c([a,b]));this._url.query=
i(g)},enumerable:!0}});Object.defineProperties(l.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){e(a);this._input=a;this._url=k(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){e(a);if(this._url&&(a=a.slice(-1)===":"?a.substring(0,a.length-1):a,a===""||t.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){e(a);if(this._url)this._url.userinfo=a}},username:{get:function(){if(!this._url)return"";var a=m.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){e(a);if(this._url){var b=
m.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=m.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){e(a);if(this._url){var b=[m.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){e(a);if(this._url&&(a=y.exec(a)))this._url.host=a[1],this._url.port=f(a[2])},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){e(a);if(this._url&&v.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===q[this.protocol]&&(a="");return a},set:function(a){e(a);if(this._url&&w.exec(a))this._url.port=f(a)},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(b){e(b);
if(this._url&&C.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){e(a);if(this._url&&(a&&a[0]==="?"&&(a=a.substring(1)),z.exec(a)))this._url.query=a},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){e(a);if(this._url&&(a&&a[0]==="#"&&(a=a.substring(1)),s.exec(a)))this._url.fragment=a},enumerable:!0}});
if((n=window.URL||window.webkitURL)&&n.createObjectURL)Object.defineProperty(l,"createObjectURL",{value:n.createObjectURL.bind(n),enumerable:!1}),Object.defineProperty(l,"revokeObjectURL",{value:n.revokeObjectURL.bind(n),enumerable:!1});window.URL=l})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(e,j){function i(a,b){var g=Object.keys(a),f=Object.keys(b);if(g.length!==f.length)return!1;g.sort();f.sort();for(var c=0,k=g.length;c<k;c++){var d=g[c];if(d!==f[c])return!1;var e=a[d],d=b[d];if(e!==d&&JSON.stringify(e)!==JSON.stringify(d))return!1}return!0}function d(a){if(a.indexOf("://")===-1)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,f){a[g]=f;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 h(a,b){if(b&&b instanceof XMLHttpRequest){var g,f;try{g=b.status,f=b.statusText}catch(c){g=0,f=""}return{status:g||0,statusText:f}}return b}function b(a){var b=a?JSON.parse(JSON.stringify(a,
h)):a;if(a instanceof Error)b.__isError=!0,b.message=b.message||a.message,b.name=b.name||a.name;return b}function f(a,b){this.type=a;this.plugin=b}function a(a,b){this.__objectId=a;this.__methods=b}function g(g,c,k){function d(a){G&&k.postMessage(a,G)}function h(b){if(!G)return(new e).reject(Error("plugin not connected"));b.id=String(S++);var g=new e;H[b.id]=g;g.then(null,function(a){A==="active"&&a instanceof Error&&a.name==="Cancel"&&d({requestId:b.id,method:"cancel",params:a.message?[a.message]:
[]})});var f=Object.prototype.toString;b.params.forEach(function(c,k){if(f.call(c)==="[object Object]"&&!(c instanceof a)){var d,e;for(d in c)f.call(c[d])==="[object Function]"&&(e=e||[],e.push(d));if(e){var l=Q++;P[l]=c;d=function(){delete P[l]};g.then(d,d);b.params[k]=new a(l,e)}}});k.postMessage(b,G);return g.promise}function t(a,b){a||a===0?d({id:a,result:null,error:b}):console.log(b)}function w(a,g,f,c){c.forEach(function(a,b){if(a&&typeof a.__objectId!=="undefined"){var g={};a.__methods.forEach(function(b){g[b]=
function(){return h({objectId:a.__objectId,method:b,params:Array.prototype.slice.call(arguments)})}});c[b]=g}});var k=typeof a===void 0?null:{id:a,result:null,error:null};try{var e=f.apply(g,c);if(k)e&&typeof e.then==="function"?(M[a]=e,e.then(function(b){delete M[a];k.result=b;d(k)},function(g){if(M[a])delete M[a],k.error=b(g),d(k)},function(){d({responseId:a,method:"progress",params:Array.prototype.slice.call(arguments)})})):(k.result=e,d(k))}catch(l){if(k)k.error=b(l),d(k)}}function v(a){try{if(a.method){var b=
a.method,g=a.params||[];if("serviceId"in a){var f=J[a.serviceId];f||t(a.id,"service not found");b in f?w(a.id,f,f[b],g):t(a.id,"method not found")}else if("objectId"in a){var c=P[a.objectId];c||t(a.id,"object not found");b in c?w(a.id,c,c[b],g):t(a.id,"method not found")}else if("requestId"in a){var d=M[a.requestId];d&&b==="cancel"&&d.cancel&&d.cancel.apply(d,g)}else if("responseId"in a){var e=H[a.responseId];e&&b==="progress"&&e.progress&&e.progress.apply(e,g)}else if("plugin"===a.method){var l=
a.params[0];N({headers:l.headers,services:l.services}).then(function(){E&&E.resolve(m)})}else if("timeout"===a.method)E&&E.reject(a.error);else throw Error("Bad method: "+a.method);}else{var h=H[String(a.id)];delete H[String(a.id)];if(a.error){var n=k.handleServiceError(m,a.error);h.reject(n)}else h.resolve(a.result)}}catch(i){console.log("Plugin._messageHandler "+i)}}function y(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 A==="active"?h(g):m.start({"transient":!0}).then(function(){return h(g)})}}),g.addEventListener&&g.removeEventListener)){var f=new j,c=Q++;P[c]={handleEvent:f.dispatchEvent.bind(f)};var k=new a(c,["handleEvent"]),d=g.addEventListener;g.addEventListener=function(a,b){f._namedListeners[a]||d(a,k);f.addEventListener(a,b)};var e=g.removeEventListener;g.removeEventListener=function(a,b){f.removeEventListener(a,b);f._namedListeners[a]||e(a,k)}}return g}function C(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 z(a){var b=y(a),g=C(a),g=k.registerService(a.names||a.type,b,g);I[a.serviceId]={registration:g,proxy:b}}function s(){k.persist(g,{created:r,headers:q,services:D,autostart:x,lastModified:B})}var m=this,c=c||{},r=c.created||(new Date).getTime(),q=c.headers||{},D=c.services||[],x=c.autostart,B=c.lastModified||0,A="installed",F,E,G,L,I={},S=0,Q=0,M={},H={},P={},J={},N;this._persist=s;this._resolve=function(){A=
"resolved";k.dispatchEvent(new f("resolved",m))};this._getAutostart=function(){return x};this._getCreated=function(){return r};this.getLocation=function(){return g};this.getHeaders=function(){return JSON.parse(JSON.stringify(q))};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 B};this.getServiceReferences=function(){var a=[];Object.keys(I).forEach(function(b){a.push(I[b].registration.getReference())});
return a};this.setParent=function(a){return L!==a?(L=a,m.stop({"transient":!0}).then(function(){if("started"===x)return m.start({"transient":!0});else if("lazy"===x)return m.start({lazy:!0,"transient":!0})})):(new e).resolve()};this.getState=function(){return A};this.start=function(a){if(A==="uninstalled")return(new e).reject(Error("Plugin is uninstalled"));if(F)return F.promise.then(this.start.bind(this,a));if(A==="active")return(new e).resolve();if(!a||!a.transient){var b=a&&a.lazy?"lazy":"started";
b!==x&&(x=b,s())}b=k.getState();if(b!=="starting"&&b!=="active")return a.transient?(new e).reject(Error("start transient error")):(new e).resolve();if(A==="installed")try{this._resolve()}catch(c){return(new e).reject(c)}A==="resolved"&&D.forEach(function(a){z(a)});if(a&&a.lazy)return A!=="starting"&&(A="starting",k.dispatchEvent(new f("lazy activation",m))),(new e).resolve();var d=new e;F=d;A="starting";k.dispatchEvent(new f("starting",m));E=new e;G=k.connect(g,v,L);E.then(function(){E=null;A="active";
k.dispatchEvent(new f("started",m));F=null;d.resolve()},function(){E=null;A="stopping";k.dispatchEvent(new f("stopping",m));Object.keys(I).forEach(function(a){I[a].registration.unregister();delete I[a]});k.disconnect(G);G=null;A="resolved";F=null;k.dispatchEvent(new f("stopped",m));d.reject(Error("plugin activation error"))});return d.promise};this.stop=function(a){if(A==="uninstalled")return(new e).reject(Error("Plugin is uninstalled"));if(F)return F.promise.then(this.stop.bind(this,a));if((!a||
!a.transient)&&"stopped"!==x)x="stopped",s();if(A!=="active"&&A!=="starting")return(new e).resolve();F=a=new e;A="stopping";k.dispatchEvent(new f("stopping",m));Object.keys(I).forEach(function(a){I[a].registration.unregister();delete I[a]});G&&(k.disconnect(G),G=null);A="resolved";F=null;k.dispatchEvent(new f("stopped",m));a.resolve();return a.promise};N=function(a){if(A==="uninstalled")return(new e).reject(Error("Plugin is uninstalled"));if(!a)return B===0&&(B=(new Date).getTime(),s()),k.loadManifest(g).then(N);
var b=q,c=D,d=x;q=a.headers||{};D=a.services||{};x=a.autostart||x;a.lastModified?B=a.lastModified:(B=(new Date).getTime(),s());if(i(q,b)&&i(D,c)&&x===d)return(new e).resolve();if(A==="active"||A==="starting"){var h=[];Object.keys(D).forEach(function(a){var b=D[a];h.push(a);var g=I[a];if(g){if(i(b.methods,Object.keys(g.proxy))){var a=C(b),f=g.registration.getReference(),c={};f.getPropertyKeys().forEach(function(a){c[a]=f.getProperty(a)});i(a,c)||g.registration.setProperties(a);return}g.registration.unregister();
delete I[a]}z(b)});Object.keys(I).forEach(function(a){h.indexOf(a)===-1&&(I[a].registration.unregister(),delete I[a])})}A==="active"&&(k.disconnect(G),E=new e,G=k.connect(g,v,L),E.then(function(){E=null},function(){E=null;A="stopping";k.dispatchEvent(new f("stopping"),m);Object.keys(I).forEach(function(a){I[a].registration.unregister();delete I[a]});k.disconnect(G);G=null;A="resolved";k.dispatchEvent(new f("stopped",m))}));return(new e).resolve()};this.update=function(a){return N(a).then(function(){k.dispatchEvent(new f("updated",
m))})};this.uninstall=function(){if(A==="uninstalled")return(new e).reject(Error("Plugin is uninstalled"));if(A==="active"||A==="starting"||A==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));k.removePlugin(this);A="uninstalled";k.dispatchEvent(new f("uninstalled",m));return(new e).resolve()}}var k=/^http[s]?/i;return{Plugin:g,PluginRegistry:function(a,b){function h(a){var b=a.source;v.some(function(g){if(b===g.target){try{var f;if(typeof g.useStructuredClone===
"undefined"){var c=typeof a.data!=="string";f=c?a.data:JSON.parse(a.data);g.useStructuredClone=c}else f=g.useStructuredClone?a.data:JSON.parse(a.data);g.handler(f)}catch(k){}return!0}})}var b=b||{},i=b.storage||localStorage;i.getItem||(i=c(i));var u="installed",t,w=[],v=[],y=new j,C={},z={registerService:a.registerService.bind(a),connect:function(a,b,g,f){function c(a){a=Error(a);a.name="timeout";b({method:"timeout",error:a})}var k={handler:b,url:a},d=setTimeout(c.bind(null,"Load timeout for: "+a),
f||15E3),e=document.createElement("iframe");e.name=a+"_"+(new Date).getTime();e.src=a;e.onload=function(){clearTimeout(d);d=setTimeout(c.bind(null,"Plugin handshake timeout for: "+a),5E3)};e.sandbox="allow-scripts allow-same-origin";e.style.width=e.style.height="100%";e.frameBorder=0;(g||t).appendChild(e);k.target=e.contentWindow;k.close=function(){clearTimeout(d);if(e){var a=e.parentNode;a&&a.removeChild(e);e=null}};v.push(k);return k},disconnect:function(a){for(var b=0;b<v.length;b++)if(a===v[b]){v.splice(b,
1);try{a.close()}catch(g){}break}},removePlugin:function(a){for(var b=0;b<w.length;b++)if(a===w[b]){w.splice(b,1);break}i.removeItem("plugin."+a.getLocation())},persist:function(a,b){i.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{y.dispatchEvent(a)}catch(b){console&&console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new e,g=z.connect(a,function(a){g&&
a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],z.disconnect(g),g=null,b.resolve(a)):"timeout"===a.method&&(z.disconnect(g),g=null,b.reject(a.error)))});return b.promise},getState:function(){return u},handleServiceError:function(a,b){if(b&&b.status===401){var g=a.getHeaders(),f=a.getName()||a.getLocation(),c=document.createElement("span");c.appendChild(document.createTextNode("Authentication required for: "+f+"."));if(g.login)c.appendChild(document.createTextNode(" ")),f=document.createElement("a"),
f.target="_blank",f.textContent="Login",f.href=g.login,k.test(f.href)?(c.appendChild(f),c.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+g.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(c)}}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=z.getState;this.init=function(){if(!(u==="starting"||u==="active"||u==="stopping")){addEventListener("message",h,!1);for(var a=[],f=0,c=i.length;f<c;f++)a.push(i.key(f));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(i.getItem(a));a.created&&w.push(new g(b,a,z))}});w.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});if(b.parent)t=b.parent;else{t=document.createElement("div");
if(!b.visible)t.style.display="none",t.style.visibility="hidden";document.body.appendChild(t)}b.plugins&&Object.keys(b.plugins).forEach(function(a){a=d(a);if(!this.getPlugin(a)){var f=b.plugins[a];typeof f!=="object"&&(f={});f.autostart=f.autostart||b.defaultAutostart||"lazy";w.push(new g(a,f,z))}}.bind(this));u="starting"}};this.start=function(){u!=="starting"&&this.init();if(u!=="starting")return(new e).reject("Cannot start framework. Framework is already "+u+".");var a=[],b=(new Date).getTime();
w.forEach(function(g){var f=g._getAutostart();g.getLastModified()===0?a.push(g.update().then(function(){if("started"===f)return g.start({"transient":!0});if("lazy"===f)return g.start({lazy:!0,"transient":!0});g._resolve()})):"started"===f?a.push(g.start({"transient":!0})):"lazy"===f?(a.push(g.start({lazy:!0,"transient":!0})),b>g.getLastModified()+864E5&&g.update()):g._resolve()});return e.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){u="active"})};this.stop=function(){if(u!==
"starting"&&u!=="active")return(new e).reject("Cannot stop registry. Registry is already "+u+".");u="stopping";var a=[];w.forEach(function(b){a.push(b.stop({"transient":!0}))});return e.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){if(!b.parent){var a=t.parentNode;a&&a.removeChild(t)}t=null;removeEventListener("message",h);u="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new e).reject("Cannot uninstall registry")};
this.installPlugin=function(a,b){var a=d(a),c=this.getPlugin(a);if(c)return(new e).resolve(c);if(C[a])return C[a];if(b)return c=new g(a,b,z),w.push(c),c._persist(),z.dispatchEvent(new f("installed",c)),(new e).resolve(c);var k=z.loadManifest(a).then(function(b){c=new g(a,b,z);w.push(c);c._persist();delete C[a];z.dispatchEvent(new f("installed",c));return c},function(b){delete C[a];throw b;});return C[a]=k};this.getPlugins=function(){return w.slice()};this.getPlugin=function(a){var b=null,a=d(a);w.some(function(g){if(a===
g.getLocation())return b=g,!0});return b};this.addEventListener=y.addEventListener.bind(y);this.removeEventListener=y.removeEventListener.bind(y);this.resolvePlugins=function(){var a=!0;w.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function e(d,c){function e(b){var g=b.getProperty("service.id"),c=this.addingService(b);c&&(f[g]=b,a[g]=c)}function b(b){var g=b.getProperty("service.id"),c=a[g];delete f[g];delete a[g];this.removedService(b,c)}this.serviceRegistry=d;var f={},a={},g=j,k,l;this.close=function(){if(g!==i)throw"Already closed";g=j;d.removeEventListener("registered",k);d.removeEventListener("unregistering",l);l=k=null;var a=this;this.getServiceReferences().forEach(function(g){b.call(a,
g)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var a=Object.keys(f);return!a.length?null:a.map(function(a){return f[a]})};this.open=function(){if(g!==j)throw"Already open";g=i;var a=this;k=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(c)!==-1&&(e.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};l=function(g){g.serviceReference.getProperty("objectClass").indexOf(c)!==
-1&&b.call(a,g.serviceReference)};d.addEventListener("registered",k);d.addEventListener("unregistering",l);d.getServiceReferences(c).forEach(function(b){e.call(a,b);if(typeof a.onServiceAdded==="function")return a.onServiceAdded(b,d.getService(b))});if(typeof this.onOpen==="function")this.onOpen()}}var j=0,i=1;e.prototype={addingService:function(d){return this.serviceRegistry.getService(d)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return e});
define("orion/objects",[],function(){function e(e){for(var i=1;i<arguments.length;i++){var d=arguments[i],c;for(c in d)Object.prototype.hasOwnProperty.call(d,c)&&(e[c]=d[c])}return e}return{clone:function(j){if(Array.isArray(j))return Array.prototype.slice.call(j);var i=Object.create(Object.getPrototypeOf(j));e(i,j);return i},mixin:e,toArray:function(e){return Array.isArray(e)?e:[e]}}});
define("orion/config",["orion/Deferred","orion/serviceTracker","orion/objects"],function(e,j,i){var d,c,h,b,f,a="pid";d=function(b,g,f){function c(a,b,f){b.forEach(function(c,k){try{var d=a[k].getProperty("__plugin__"),e=d&&g.getPlugin(d);(!d||e&&e.getState()==="active")&&b[k].updated(f)}catch(h){typeof console!=="undefined"&&console.log(h)}})}j.call(this,b,"orion.cm.managedservice");var d={},h={},i=function(g){var c=[];g.plugin.getServiceReferences().forEach(function(g){if(g.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var d=g.getProperty(a),g=b.getService(g);d&&g&&(d=(d=f._find(d))&&d.getProperties(),c.push(g.updated(d)))}});return e.all(c)};this.addingService=function(g){var f=g.getProperty(a),c=b.getService(g);if(!f||!c)return null;d[f]||(d[f]=[]);h[f]||(h[f]=[]);d[f].push(g);h[f].push(c);return c};this.onServiceAdded=function(b,g){var k=b.getProperty(a),k=f._find(k);c([b],[g],k&&k.getProperties())};this.onOpen=function(){g.addEventListener("started",i)};this.onClose=function(){g.removeEventListener("started",
i)};this.notifyUpdated=function(a){var b=a.getPid();c(d[b]||[],h[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();c(d[a]||[],h[a]||[],null)};this.removedService=function(b,g){var f=b.getProperty(a),c=d[f],k=h[f];c.length>1?c.splice(c.indexOf(b),1):delete d[f];k.length>1?k.splice(k.indexOf(g),1):delete h[f]}};c=function(){function a(g,f,c){this.store=new h(this,c);this.configAdmin=new b(this,this.store);this.tracker=new d(g,f,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={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var g="/cm/configurations";
h=function(){function b(c,k){this.factory=c;this.prefsService=k;this.configs=Object.create(null);this.pref=null;var d=this;this.initPromise=this.prefsService.getPreferences(g).then(function(b){d.pref=b;b.keys().forEach(function(g){if(!d.configs[g]){var c=b.get(g);typeof c==="object"&&c!==null&&Object.keys(c).length>0&&(c[a]=g,d.configs[g]=new f(d.factory,d,c))}})})}b.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var b=this._find(a);
b||(b=new f(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,b=[];this.pref.keys().forEach(function(g){(g=a._find(g))&&g.getProperties()!==null&&b.push(g)});return b},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,b){this.pref.put(a,b.getProperties(!0)||{})}};return b}();f=function(){function b(g,f){f=i.clone(f);delete f[a];g.properties=f}function g(f,c,d){this.factory=f;this.store=c;if(d!==null&&typeof d==="object")this.pid=d[a],b(this,
d);else if(typeof d==="string")this.pid=d,this.properties=null;else throw Error("Invalid pid/properties "+d);}g.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(b){this._checkRemoved();var g=null;if(this.properties&&(g=i.clone(this.properties),!b))g[a]=this.pid;return g},remove:function(){this._checkRemoved();this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=
!0},update:function(a){this._checkRemoved();b(this,a);this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return g}();return{ConfigurationAdminFactory:c}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(e,j,i,d,c,h){var b;return{startup:function(){if(b)return b;b=new j;var f=new i.ServiceRegistry,a=new d.PreferencesService(f);return a.getPreferences("/plugins").then(function(g){var d={plugins:{}};g.keys().forEach(function(a){var b=e.toUrl(a);d.plugins[b]=g[a]});var l=new c.PluginRegistry(f,d);return l.start().then(function(){if(f.getServiceReferences("orion.core.preference.provider").length>
0)return a.getPreferences("/plugins",a.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=e.toUrl(a);l.getPlugin(a)||b.push(l.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return j.all(b,function(a){console.log(a)})})}).then(function(){return(new h.ConfigurationAdminFactory(f,l,a)).getConfigurationAdmin().then(f.registerService.bind(f,"orion.cm.configadmin"))}).then(function(){var a=f.getService("orion.core.auth");
if(a){var b=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)})}),g=localStorage.getItem("lastLogin");if(!g||g<(new Date).getTime()-9E5)return b}}).then(function(){var g={serviceRegistry:f,preferences:a,pluginRegistry:l};b.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 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.":"I20140226-2325","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","Saved searches":"Saved searches","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 (* = any string, ? = 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(e,j){var i={root:j};Object.keys(e).forEach(function(d){typeof i[d]==="undefined"&&(i[d]=e[d])});return i});
define("orion/util",[],function(){var e=navigator.userAgent,j=e.indexOf("MSIE")!==-1||e.indexOf("Trident")!==-1?document.documentMode:void 0,i=parseFloat(e.split("Firefox/")[1]||e.split("Minefield/")[1])||void 0,d=e.indexOf("Opera")!==-1?parseFloat(e.split("Version/")[1]):void 0,c=parseFloat(e.split("Chrome/")[1])||void 0,h=e.indexOf("Safari")!==-1&&!c,b=parseFloat(e.split("WebKit/")[1])||void 0,f=e.indexOf("Android")!==-1,a=e.indexOf("iPad")!==-1,e=e.indexOf("iPhone")!==-1,g=a||e,k=navigator.platform.indexOf("Mac")!==
-1,l=navigator.platform.indexOf("Win")!==-1,n=navigator.platform.indexOf("Linux")!==-1,p="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:j,isFirefox:i,isOpera:d,isChrome:c,isSafari:h,isWebkit:b,isAndroid:f,isIPad:a,isIPhone:e,isIOS:g,isMac:k,isWindows:l,
isLinux:n,isTouch:p,platformDelimiter:l?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(e){function j(a,b){b||(b=document);return b.querySelectorAll(a)}function i(a){var b=a.tabIndex;b===0&&e.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(i(a)>=0)return a;if(a.hasChildNodes())for(var b=0;b<a.childNodes.length;b++){var f=d(a.childNodes[b]);if(f)return f}return null}function c(a){if(i(a)>=
0)return a;if(a.hasChildNodes())for(var b=a.childNodes.length-1;b>=0;b--){var f=c(a.childNodes[b]);if(f)return f}return null}function h(a,g){if(a.nodeType===3){var f=b.exec(a.nodeValue);f&&f.length>1&&g(a,f)}if(a.hasChildNodes())for(f=0;f<a.childNodes.length;f++)h(a.childNodes[f],g)}var b=/\$\{([^\}]+)\}/,f=null;return{$:function(a,b){b||(b=document);return b.querySelector(a)},$$:j,$$array:function(a,b){return Array.prototype.slice.call(j(a,b))},node:function(a){var b=a;typeof a==="string"&&(b=document.getElementById(a));
return b},contains:function(a,b){if(!a||!b)return!1;if(a===b)return!0;var f=a.compareDocumentPosition(b);return Boolean(f&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){if(window.document.all)a.keyCode=0;a.preventDefault&&(a.preventDefault(),a.stopPropagation())},
processTextNodes:function(a,b){h(a,function(a,f){a.parentNode.replaceChild(document.createTextNode(b[f[1]]||f[1]),a)})},processDOMNodes:function(a,b){h(a,function(a,f){var c=b[f[1]];if(c){var d=document.createRange(),e=f.index;d.setStart(a,e);d.setEnd(a,e+f[0].length);d.deleteContents();d.insertNode(c)}})},addAutoDismiss:function(a,b){function c(a){f.forEach(function(b){var g=!1,f=b.excludeNodes.some(function(b){return document.body.contains(b)?(g=!0,b.contains(a.target)):!1});if(g&&!f)try{b.dismiss(a)}catch(c){typeof console!==
"undefined"&&console&&console.error(c&&c.message)}});f=f.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}f===null&&(f=[],document.addEventListener("click",c,!0),e.isIOS&&document.addEventListener("touchend",function(a){function b(){a.target.removeEventListener("click",b)}a.touches.length===0&&a.target.addEventListener("click",b)},!1));f.push({excludeNodes:a,dismiss:b})},setFramesEnabled:function(a){for(var b=document.getElementsByTagName("iframe"),f=
0;f<b.length;f++)b[f].parentNode.style.pointerEvents=a?"":"none"},removeAutoDismiss:function(a){f=f.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(e){var j,i,d=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],c=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,h=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,b=typeof location!=="undefined"&&location.href,f=b&&location.protocol&&location.protocol.replace(/\:/,""),a=b&&location.hostname,g=b&&(location.port||void 0),k=[],l=e.config&&e.config()||{};j={version:"2.0.5",strip:function(a){if(a){var a=a.replace(c,""),b=a.match(h);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:l.createXhr||function(){var a,b,g;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(b=0;b<3;b+=1){g=d[b];try{a=new ActiveXObject(g)}catch(f){}if(a){d=[g];break}}return a},parseName:function(a){var b,
g,f=!1,c=a.indexOf(".");b=a.indexOf("./")===0||a.indexOf("../")===0;c!==-1&&(!b||c>1)?(b=a.substring(0,c),g=a.substring(c+1,a.length)):b=a;a=g||b;c=a.indexOf("!");c!==-1&&(f=a.substring(c+1)==="strip",a=a.substring(0,c),g?g=a:b=a);return{moduleName:b,ext:g,strip:f}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,g,f){var c,d;c=j.xdRegExp.exec(a);if(!c)return!0;a=c[2];c=c[3];c=c.split(":");d=c[1];c=c[0];return(!a||a===b)&&(!c||c.toLowerCase()===g.toLowerCase())&&(!d&&!c||d===f)},finishLoad:function(a,
b,g,f){g=b?j.strip(g):g;l.isBuild&&(k[a]=g);f(g)},load:function(c,d,k,e){if(e.isBuild&&!e.inlineText)k();else{l.isBuild=e.isBuild;var h=j.parseName(c),e=h.moduleName+(h.ext?"."+h.ext:""),i=d.toUrl(e),v=l.useXhr||j.useXhr;!b||v(i,f,a,g)?j.get(i,function(a){j.finishLoad(c,h.strip,a,k)},function(a){k.error&&k.error(a)}):d([e],function(a){j.finishLoad(h.moduleName+"."+h.ext,h.strip,a,k)})}},write:function(a,b,g){if(k.hasOwnProperty(b)){var f=j.jsEscape(k[b]);g.asModule(a+"!"+b,"define(function () { return '"+
f+"';});\n")}},writeFile:function(a,b,g,f,c){var b=j.parseName(b),d=b.ext?"."+b.ext:"",k=b.moduleName+d,e=g.toUrl(b.moduleName+d)+".js";j.load(k,g,function(){var b=function(a){return f(e,a)};b.asModule=function(a,b){return f.asModule(a,e,b)};j.write(a,k,b,c)},c)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)i=require.nodeRequire("fs"),j.get=function(a,b){var g=i.readFileSync(a,"utf8");g.indexOf("\ufeff")===0&&(g=g.substring(1));b(g)};else if(l.env===
"xhr"||!l.env&&j.createXhr())j.get=function(a,b,g,f){var c=j.createXhr(),d;c.open("GET",a,!0);if(f)for(d in f)f.hasOwnProperty(d)&&c.setRequestHeader(d.toLowerCase(),f[d]);if(l.onXhr)l.onXhr(c,a);c.onreadystatechange=function(){var f;if(c.readyState===4)f=c.status,f>399&&f<600?(f=Error(a+" HTTP status: "+f),f.xhr=c,g(f)):b(c.responseText)};c.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")j.get=function(a,b){var g,f,c=new java.io.File(a),d=java.lang.System.getProperty("line.separator"),
c=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(c),"utf-8")),k="";try{g=new java.lang.StringBuffer;(f=c.readLine())&&f.length()&&f.charAt(0)===65279&&(f=f.substring(1));for(f!==null&&g.append(f);(f=c.readLine())!==null;)g.append(d),g.append(f);k=String(g.toString())}finally{c.close()}b(k)};return j});define("text!orion/banner/slideout.html",[],function(){return'<div id="slideContainer" class="slideParameters slideContainer">\n\t<span id="pageCommandParameters" class="layoutLeft parameters"></span>\n\t<span id="pageCommandDismiss" class="layoutRight parametersDismiss"></span>\n</div>'});
define("orion/commonHTMLFragments",["require","orion/webui/littlelib","text!orion/banner/slideout.html"],function(e,j,i){return{slideoutHTMLFragment:function(d){var c=document.createElement("div");c.innerHTML=i;var e=j.$("#slideContainer",c);e.id=d+e.id;e=j.$("#pageCommandParameters",c);e.id=d+e.id;e=j.$("#pageCommandDismiss",c);e.id=d+e.id;return c.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(e){function j(d,c,e,b,f,a){this.type=a||"keydown";this.keyCode=typeof d==="string"&&this.type==="keydown"?d.toUpperCase().charCodeAt(0):d;this.mod1=c!==void 0&&c!==null?c:!1;this.mod2=e!==void 0&&e!==null?e:!1;this.mod3=b!==void 0&&b!==null?b:!1;this.mod4=f!==void 0&&f!==null?f:!1}function i(d){this.keys=d}j.prototype={getKeys:function(){return[this]},match:function(d,c){if(c!==void 0){if(c!==0)return!1}else if(d instanceof Array){if(d.length>1)return!1;
d=d[0]}return d.type!==this.type?!1:this.keyCode===d.keyCode||this.keyCode===String.fromCharCode(e.isOpera?d.which:d.charCode!==void 0?d.charCode:d.keyCode)?this.mod1!==(e.isMac?d.metaKey:d.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==d.shiftKey?!1:this.mod3!==d.altKey?!1:e.isMac&&this.mod4!==d.ctrlKey?!1:!0:!1},equals:function(d){return!d?!1:this.keyCode!==d.keyCode?!1:this.mod1!==d.mod1?!1:this.mod2!==d.mod2?!1:this.mod3!==d.mod3?!1:this.mod4!==d.mod4?!1:this.type!==d.type?!1:!0}};i.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(d,c){var e=this.keys;if(c!==void 0)return c>e.length?!1:e[c].match(d)?c===e.length-1?!0:c+1:!1;else{d instanceof Array||(d=[d]);if(d.length>e.length)return!1;var b;for(b=0;b<d.length;b++)if(!e[b].match(d[b]))return!1;return b===e.length?!0:b}},equals:function(d){if(!d.keys)return!1;if(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:j,KeyStroke:j,
KeySequence:i}});
define("orion/webui/dropdown",["require","orion/webui/littlelib","orion/EventTarget"],function(e,j,i){function d(c){i.attach(this);this._init(c)}d.prototype={_init:function(c){this._dropdownNode=j.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 d=this._dropdownNode.parentNode;d&&document!==d;){if(d.classList&&
d.classList.contains("dropdownMenu")){this._parentDropdown=d.dropdown;break}d=d.parentNode}this._triggerNode=c.triggerNode?c.triggerNode:j.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";if(!c.skipTriggerEventListeners){var b=this;this._triggerNode.addEventListener("click",function(f){b.toggle(f)&&j.stop(f)},!1);this._triggerNode.tagName.toLowerCase()==="span"&&this._triggerNode.addEventListener("keydown",function(f){if(f.keyCode===
j.KEY.ENTER||f.keyCode===j.KEY.SPACE)b.toggle(),j.stop(f)},!1)}this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},addTriggerNode:function(c){var d=this;c.addEventListener("click",function(b){d.toggle(b)&&j.stop(b)},!1)},toggle:function(c){return this.isVisible()?this.close():this.open(c)},isVisible:function(){return this._isVisible},open:function(c){var d=!1;if(!this.isVisible()){this.dispatchEvent({type:"triggered",dropdown:this,event:c});j.setFramesEnabled(!1);this._populate&&
(this.empty(),this._populate(this._dropdownNode));var b=this.getItems();if(b.length>0){if(!this._hookedAutoDismiss)this._boundAutoDismiss?j.removeAutoDismiss(this._boundAutoDismiss):this._boundAutoDismiss=this._autoDismiss.bind(this),d=j.$$array(".dropdownSubMenu",this._dropdownNode),j.addAutoDismiss([this._triggerNode].concat(d),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);b[0].focus();d=!0;this._parentDropdown&&this._parentDropdown.submenuOpen(this)}}return d},_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(){this._dropdownNode.style.left="";this._dropdownNode.style.top="";if(this._positioningNode)this._dropdownNode.style.left=this._positioningNode.offsetLeft+
"px";else{var c=j.bounds(this._dropdownNode),d=j.bounds(document.body);if(c.left+c.width>d.left+d.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-c.width+"px";else{var b=j.bounds(this._boundingNode(this._triggerNode)),f=j.bounds(this._triggerNode);this._dropdownNode.style.left=f.left-b.left-c.width+f.width+"px"}c=c.top+c.height-(d.top+d.height);if(0<c)this._dropdownNode.style.top=Math.floor(this._dropdownNode.style.top-c)+"px"}},_boundingNode:function(c){var d=
window.getComputedStyle(c,null);return d===null?c:d.getPropertyValue("position")==="absolute"||!c.parentNode||c===document.body?c:this._boundingNode(c.parentNode)},close:function(c){var d=!1;if(this.isVisible())this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),j.setFramesEnabled(!0),c&&this._triggerNode.focus(),this._isVisible=!1,d=!0;return d},getItems:function(){var c=
[],d=this;j.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(b){b.parentNode.parentNode===d._dropdownNode&&c.push(b)});c.forEach(function(b){if(!b._hasDropdownMouseover)b.addEventListener("mouseover",function(f){b.dropdown?b.dropdown.open(f):(d._closeSelectedSubmenu(),j.stop(f))}),b._hasDropdownMouseover=!0});return c},empty:function(){var c=this;j.$$array("li",this._dropdownNode).forEach(function(d){d.parentNode===c._dropdownNode&&d.parentNode.removeChild(d)});
this._hookedAutoDismiss=!1},_dropdownKeyDown:function(c){if(c.keyCode===j.KEY.UP||c.keyCode===j.KEY.DOWN||c.keyCode===j.KEY.RIGHT||c.keyCode===j.KEY.ENTER||c.keyCode===j.KEY.LEFT){var d=this.getItems(),b=document.activeElement;if(d.length&&d.length>0&&b){var f=d.indexOf(b);f<0&&(f=d.indexOf(b.parentNode));f>=0&&(c.keyCode===j.KEY.UP&&f>0?(f--,d[f].focus()):c.keyCode===j.KEY.DOWN&&f<d.length-1?(f++,d[f].focus()):c.keyCode===j.KEY.ENTER||c.keyCode===j.KEY.RIGHT?b.classList.contains("dropdownTrigger")&&
b.dropdown&&b.dropdown.open():c.keyCode===j.KEY.LEFT&&b.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),j.stop(c))}}else c.keyCode===j.KEY.ESCAPE&&(this.close(!0),j.stop(c))},submenuOpen:function(c){if(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&&j.removeAutoDismiss(this._boundAutoDismiss)}};
d.prototype.constructor=d;return{Dropdown:d}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<\!--span class="dropdownArrowDown core-sprite-openarrow"></span--\></button><ul class="dropdownMenu"></ul>'});define("text!orion/webui/dropdowntriggerbuttonwitharrow.html",[],function(){return'<button class="dropdownTrigger dropdownDefaultButton">${ButtonText}<span class="dropdownArrowDown core-sprite-openarrow"></span></button><ul class="dropdownMenu"></ul>'});
define("text!orion/webui/submenutriggerbutton.html",[],function(){return'<li class="dropdownSubMenu"><span class="dropdownTrigger dropdownMenuItem" role="menuitem" tabindex="0"><span class="dropdownCommandName">${ButtonText}</span><span class="dropdownArrowRight core-sprite-closedarrow"></span></span><ul class="dropdownMenu"></ul></li>'});define("text!orion/webui/checkedmenuitem.html",[],function(){return'<li><label class="dropdownMenuItem"><input class="checkedMenuItem" role="menuitem" type="checkbox" />${ItemText}</label></li>'});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(e,j){function i(d){this._init(d)}i.prototype={_init:function(d){this._node=j.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=d.hideDelay===void 0?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(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(b){b.target===c._node&&(c.show(),j.stop(b))},!1);else if(this._trigger==="mouseover"){this._showDelay=d.showDelay===void 0?500:d.showDelay;d=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(b){j.contains(c._node,b.target)&&(c.show(),j.stop(b))},!1);this._leaveHandler=function(b){j.contains(c._node,b.target)&&c.hide()};for(var e=0;e<d.length;e++)this._node.addEventListener(d[e],
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),this._tipTextContent.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);
document.body.appendChild(this._tip);var d=this;j.addAutoDismiss([this._tip,this._node],function(){d.hide()});if(this._trigger==="mouseover")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(){if(d._timeout)window.clearTimeout(d._timeout),d._timeout=null;d._tip.addEventListener("mouseout",function(c){j.contains(d._tip,c.target)&&(d.hide(),j.stop(c))},
!1)},!1)}return this._tip},_positionTip:function(d,c){this._makeTipNode();d==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var e=this._node,b;for(b=j.bounds(e);e&&!b.width&&!b.height;e=e.parentNode)b=j.bounds(e);var e=j.bounds(this._tipInner),f;switch(d){case "above":f=b.top-e.height-this._tailSize-1;b=b.left-this._tailSize;break;case "below":f=b.top+b.height+this._tailSize+1;b=b.left-this._tailSize;break;case "left":f=b.top-this._tailSize/2;b=b.left-e.width-
this._tailSize-1;break;default:f=b.top-this._tailSize/2,b=b.left+b.width+this._tailSize+1}var a=j.bounds(document.documentElement);if(f+e.height>a.height)if(c)f=a.height-e.height-1;else return!1;if(b+e.width>a.width)if(c)b=a.width-e.width-1;else return!1;if(b<0)if(c)b=4;else return!1;if(f<0)if(c)f=4;else return!1;if(this._tail&&this._tail.previousPosition!==d)this._tip.removeChild(this._tail),this._tail=null;if(!this._tail){this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+
d);d==="above"||d==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner);if(d==="left")this._tail.style.left=e.width+"px";this._tail.previousPosition=d}this._tip.style.top=f+"px";this._tip.style.left=b+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){if(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){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(d===void 0)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(){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(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)}}};i.prototype.constructor=i;return{Tooltip:i}});
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(e,j,i,d,c,h,b,f){function a(a){var b=a.invocation;if(b){var g=a.command;if(g.hrefCallback)return a=g.hrefCallback.call(b.handler||window,b),a.then?a.then(function(a){window.open(a)}):window.open(a),!0;else if(b.commandRegistry)return b.commandRegistry._invoke(b),
!0;else if(g.onClick||g.callback)return window.setTimeout(function(){(g.onClick||g.callback).call(b.handler||window,b)},0),!0}return!1}function g(b,g){for(var f in g)if(g[f]&&g[f].keyBinding&&g[f].command&&g[f].keyBinding.match(b)){var c=g[f],d=c.keyBinding;if((!d.domScope||j.contains(j.node(d.domScope),b.target))&&a(c)){j.stop(b);break}}}function k(){var a={};if(v){var b,g,f;g=Object.keys(y);for(b=0;b<g.length;b++)f=g[b],a[f]=y[f];var c=v();g=Object.keys(c);for(b=0;b<g.length;b++)f=g[b],a[f]=c[f]}else a=
y;return a}function l(a){g(a,k())}function n(a,b){a=a||window.event;if(function(a){if(e.isMac){if(a.metaKey&&!a.altKey)return!a.shiftKey&&!a.ctrlKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.ctrlKey)return!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return a["char"].length>0;else if(a.charCode||a.keyCode)switch(a=
a.charCode||a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return a>=32&&a<112||a>123}return!1}(a)){if(a.target.contentEditable==="true")return;var g=a.target.nodeName.toLowerCase();if(g==="input")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(g==="textarea")return}b?b(a):l(a)}function p(){this._init()}
function o(a,b,g){b.classList.add("commandImage");var f;a.imageClass?a.addImageClassToElement?b.classList.add(a.imageClass):(f=document.createElement("span"),b.appendChild(f),f.classList.add(a.spriteClass),f.classList.add(a.imageClass)):(f=new Image,f.alt=a.name,f.name=g,f.id=g,f.src=a.image,b.appendChild(f));return f}function u(a,b){var g=document.createElement("span");g.classList.add("dropdownKeyBinding");g.appendChild(document.createTextNode(b));a.appendChild(g)}function t(a,b,g,f,c){this.commandRegistry=
c;this.handler=a;this.items=b;this.userData=g;this.command=f;if(f.parameters)this.parameters=f.parameters.makeCopy();this.id=f.id}function w(a){this._init(a)}var v=null,y={};p.prototype={setProxy:function(a){this.proxy=a},setKeyBindings:function(a){this.bindings=a},_init:function(){var a=this;document.addEventListener("keydown",function(b){return n(b,function(b){var g=a.proxy,f=a.bindings;if(f&&g)for(var c=0;c<f.length;c++)f[c].match(b)&&(g.processKey({type:b.type,keyCode:b.keyCode,altKey:b.altKey,
ctrlKey:b.ctrlKey,metaKey:b.metaKey,shiftKey:b.shiftKey}),j.stop(b))})})}};window.document.addEventListener("keydown",n,!1);t.prototype={collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var b=new t(this.handler,this.items,this.userData,this.command,this.commandRegistry);b.domNode=this.domNode;b.domParent=this.domParent;if(a)b.parameters=a.makeCopy();else if(this.parameters)b.parameters=this.parameters.makeCopy();return b}};
t.prototype.constructor=t;w.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.selectionClass=
a.selectionClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters;this.isEditor=a.isEditor},populateChoicesMenu:function(a,b,g,f,c){var g=this.getChoices(b,g,f),d=g.some(function(a){return a.checked});g.forEach(function(g){if(g.name){var f=document.createElement("li");a.appendChild(f);var k=document.createElement("span");k.tabIndex=0;k.role="menuitem";k.classList.add("dropdownMenuItem");if(d){var e=document.createElement("span");e.classList.add("check");
e.appendChild(document.createTextNode(g.checked?"\u25cf":""));k.appendChild(e)}e=document.createTextNode(g.name);k.appendChild(e);f.appendChild(k);k.choice=g;k.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);k.addEventListener("keydown",function(a){(a.keyCode===j.KEY.ENTER||a.keyCode===j.KEY.SPACE)&&a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1)}else c._generateMenuSeparator(a)})},getChoices:function(a,b,g){return this.choiceCallback?
this.choiceCallback.call(b,a,g):null},makeChoiceCallback:function(a,b){return function(g){a.callback&&a.callback.call(a,b,g)}},hasImage:function(){return this.imageClass||this.image!=="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC"}};w.prototype.constructor=w;return{Command:w,CommandInvocation:t,createDropdownMenu:function(a,b,g,f,k,e,l,h,n){a=j.node(a);if(!a)throw"no parent node was specified";
var p=document.createRange();p.selectNode(a);p=n?p.createContextualFragment(c):p.createContextualFragment(d);j.processTextNodes(p,{ButtonText:b});a.appendChild(p);var a=a.lastChild,t;n?(n=a.previousSibling,t=n.lastChild):n=a.previousSibling;f?n.classList.add(f):(n.classList.add("orionButton"),n.classList.add("commandButton"));if(k){if(!e)n.textContent="",n.setAttribute("aria-label",b);o({spriteClass:"commandSprite",imageClass:k},n,b);n.classList.add("orionButton")}n.dropdown=new i.Dropdown({dropdown:a,
populate:g,selectionClass:l,skipTriggerEventListeners:!!t,positioningNode:h});a.dropdown=n.dropdown;return{menuButton:n,menu:a,dropdown:n.dropdown,dropdownArrow:t}},createCheckedMenuItem:function(a,g,f,c){a=j.node(a);if(!a)throw"no parent node was specified";var d=document.createRange();d.selectNode(a);d=d.createContextualFragment(b);j.processTextNodes(d,{ItemText:g});a.appendChild(d);a=j.$(".checkedMenuItem",a.lastChild);a.checked=f;a.addEventListener("change",c,!1);return a},createCommandItem:function(a,
b,g,c,d,k,e){var l,k=k||!b.name&&b.hasImage();if(b.hrefCallback)l=document.createElement("a"),l.id=c,k&&b.hasImage()?o(b,l,c):(l.className="commandLink",l.appendChild(document.createTextNode(b.name))),e=b.hrefCallback.call(g.handler,g),e.then?e.then(function(a){l.href=a}):l.href=e?e:"#";else{l=document.createElement("button");l.className="orionButton";k?b.hasImage()?(o(b,l,c),b.name&&l.setAttribute("aria-label",b.name)):(l.classList.add("commandButton"),l.classList.add("commandMissingImageButton"),
l.appendChild(document.createTextNode(b.name))):(l.classList.add("commandButton"),c=document.createTextNode(b.name),l.appendChild(c));var h=e||b.callback;if(h)b.onClick=h,l.addEventListener("click",function(){h.call(g.handler,g)},!1)}a.nodeName.toLowerCase()==="ul"?(e=document.createElement("li"),a.appendChild(e),a=e):l.classList.add("commandMargins");a.appendChild(l);if(b.tooltip)l.commandTooltip=new f.Tooltip({node:l,text:b.tooltip,position:["above","below","right","left"]});d&&(y[b.id]={keyBinding:d,
command:b,invocation:g});return l},createCommandMenuItem:function(a,b,g,c,d,k){var e,l=a.dropdown;if(b.hrefCallback){e=document.createElement("a");var h=document.createElement("span");h.appendChild(document.createTextNode(b.name));h.classList.add("dropdownCommandName");e.appendChild(h);d=b.hrefCallback.call(g.handler,g);d.then?d.then(function(a){e.href=a}):e.href=d?d:"#";e.addEventListener("keydown",function(a){(a.keyCode===j.KEY.ENTER||a.keyCode===j.KEY.SPACE)&&e.click()},!1)}else{e=document.createElement("span");
e.tabIndex=0;h=document.createElement("span");h.appendChild(document.createTextNode(b.name));h.classList.add("dropdownCommandName");e.appendChild(h);var i=d||b.callback;if(i)b.onClick=i,e.addEventListener("click",function(){l.close(!0);i.call(g.handler,g)},!1),e.addEventListener("keydown",function(a){if(a.keyCode===j.KEY.ENTER||a.keyCode===j.KEY.SPACE)a.preventDefault(),e.click()},!1)}e.className="dropdownMenuItem";e.role="menuitem";if(b.tooltip)e.commandTooltip=new f.Tooltip({node:e,text:b.tooltip,
position:["above","below","right","left"]});k&&u(e,k);k=document.createElement("li");a.appendChild(k);k.appendChild(e);c&&(y[b.id]={keyBinding:c,command:b,invocation:g});return e},executeBinding:a,setKeyBindingProvider:function(a){v=a},localKeyBindings:y,CommandsProxy:p,getKeyBindings:k,processKey:l,NO_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC",_testMethodProcessKey:g}});
define("orion/explorers/navigationUtils",[],function(){function e(e,d){if(!j&&e)e.push({domNode:d}),d.tabIndex=-1,d.style.outline="none"}var j=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(i,d,c){i&&(i=i.getGridNavHolder(d,!0))&&e(i,c)},generateNavGrid:e,removeNavGrid:function(e,d){if(e)for(var c=0;c<e.length;c++)if(e[c].domNode===d){e.splice(c,1);break}}}});
define("orion/PageUtil",[],function(){var e=/^http[s]?/i;return{hash:function(){var e=window.location.href.split("#")[1];return e?"#"+e:""},matchResourceParameters:function(e){var e=e||window.location.toString(),i={resource:""},d=e.indexOf("#");if(d!==-1&&(e=e.substring(d+1),e.length!==0)){e=e.split(",");i.resource=decodeURIComponent(e[0]);for(d=1;d<e.length;d++){var c=/([^=]*)(=?)(.*)/.exec(e[d]),h=decodeURIComponent(c[1]||""),c=decodeURIComponent(c[3]||"");h!==""&&h!=="resource"&&(i[h]=c)}}return i},
validateURLScheme:function(j,i){var d=j;if(j.indexOf("://")===-1){var c=document.createElement("a");c.href=j;d=c.href}c=!1;return(c=i?i.some(function(c){return RegExp("^"+c+":","i").test(d)}):e.test(d))?j:(console.log("Illegal URL Scheme: '"+j+"'"),"")}}});
define("orion/uiUtils",["orion/webui/littlelib"],function(e){function j(d){var c="",h=navigator.platform.indexOf("Mac")!==-1;h?(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(d.type==="keypress")return c+d.keyCode;for(var b in e.KEY)if(typeof(e.KEY[b]==="number")&&e.KEY[b]===d.keyCode){if(h)switch(e.KEY[b]){case e.KEY.BKSPC:b="\u232b";break;case e.KEY.TAB:b=
"\u21e5";break;case e.KEY.ENTER:b="\u23ce";break;case e.KEY.ESCAPE:b="\u238b";break;case e.KEY.SPACE:b="\u2423";break;case e.KEY.PAGEUP:b="\u21de";break;case e.KEY.PAGEDOWN:b="\u21df";break;case e.KEY.END:b="\u21f2";break;case e.KEY.HOME:b="\u21f1";break;case e.KEY.DEL:b="\u2326"}switch(e.KEY[b]){case e.KEY.DOWN:b="\u2193";break;case e.KEY.UP:b="\u2191";break;case e.KEY.RIGHT:b="\u2192";break;case e.KEY.LEFT:b="\u2190"}return c+b}var f;switch(d.keyCode){case 59:f=d.mod2?":":";";break;case 61:f=d.mod2?
"+":"=";break;case 188:f=d.mod2?"<":",";break;case 190:f=d.mod2?">":".";break;case 191:f=d.mod2?"?":"/";break;case 192:f=d.mod2?"~":"`";break;case 219:f=d.mod2?"{":"[";break;case 220:f=d.mod2?"|":"\\";break;case 221:f=d.mod2?"}":"]";break;case 222:f=d.mod2?'"':"'"}return f?c+f:d.keyCode>=112&&d.keyCode<=123?c+"F"+(d.keyCode-111):c+String.fromCharCode(d.keyCode)}function i(d){var c=window.navigator.platform.indexOf("Mac")!==-1;return c&&d.metaKey||!c&&d.ctrlKey}return{getUserKeyString:function(d){for(var c=
"",d=d.getKeys(),e=0;e<d.length;e++)e!==0&&(c+=" "),c+=j(d[e]);return c},getUserText:function(d){var c=d.id,h=d.refNode,b=d.hideRefNode,f=d.initialText,a=d.onComplete,g=d.onEditDestroy,k=d.selectTo,l=d.isInitialValid,d=d.insertAsChild,i=!1,j=function(d){return function(k){if(!i){var j=e.node(c),p=j.value;if(j)if(d&&k.keyCode===e.KEY.ESCAPE){if(b)h.style.display="inline";i=!0;j.parentNode.removeChild(j);g&&g()}else if(!(d&&k.keyCode!==e.KEY.ENTER)){if(p.length===0||!l&&p===f){if(b)h.style.display=
"inline"}else if(a(p),b&&h.parentNode)h.style.display="inline";i=!0;j.parentNode&&j.parentNode.removeChild(j);g&&g()}}}},o=document.createElement("input");o.id=c;o.value=f||"";d?h.appendChild(o):h.parentNode.insertBefore(o,h.nextSibling);o.classList.add("userEditBoxPrompt");if(b)h.style.display="none";o.addEventListener("keydown",j(!0),!1);o.addEventListener("blur",j(!1),!1);window.setTimeout(function(){o.focus();if(f){var a=e.node(c),b=k?f.indexOf(k):-1;if(b>0)if(a.createTextRange)a=a.createTextRange(),
a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",b),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,b);else{if(a.selectionStart!==void 0)a.selectionStart=0,a.selectionEnd=b}else a.select()}},0)},openInNewWindow:i,followLink:function(d,c){c&&i(c)?window.open(d):window.location=d},createButton:function(d,c){var h=document.createElement("button");h.className="orionButton commandButton commandMargins";h.addEventListener("click",function(b){c();e.stop(b)},!1);d&&h.appendChild(document.createTextNode(d));
return h},createDropdownButton:function(){},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(e,j,i,d,c,h,b,f,a,g){function k(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function l(a,b){this.token=a;this.parameterName=b}function n(a,b,g){this.event=a;this.handler=b;this.capture=g||!1}function p(a,b,g,f,c,d){this.name=a;this.type=b;this.label=g;this.value=f;this.lines=c||1;this.eventListeners=Array.isArray(d)?d:d?[d]:[]}function o(a,b,g){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=g;this.clientCollect=b&&b.clientCollect}k.prototype={_init:function(a){this._selectionService=
a.selection;var b=this;e.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 g=this._urlBindings[b].urlBinding.match(a);if(g){var f=this._urlBindings[b],c=f.command,d=f.invocation;if(d&&d.parameters&&c.callback){d.parameters.setValue(g.parameterName,g.parameterValue);var k=this;window.setTimeout(function(){k._invoke(d)},0);break}}}},findCommand:function(a){return this._commandList[a]},
runCommand:function(a,b,g,f){b?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback&&this._invoke(new e.CommandInvocation(g,b,null,a,this),f):(b=this._urlBindings[a])&&b.command&&b.command.callback&&this._invoke(b.invocation,f)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,g){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,
b,g))},confirm:function(a,b,g,f,c,d){var k=!1;if(this._parameterCollector&&!c){var e=this;this._parameterCollector.close();if(this._parameterCollector.open(a,function(a,c){var d=document.createElement("span");d.classList.add("parameterPrompt");d.textContent=b;a.appendChild(d);d=document.createElement("button");d.addEventListener("click",function(){k=!0;e._parameterCollector.close()},!1);c.appendChild(d);d.appendChild(document.createTextNode(g));d.className="dismissButton";var l=document.createElement("button");
l.addEventListener("click",function(){k=!1;e._parameterCollector.close()},!1);c.appendChild(l);l.appendChild(document.createTextNode(f));l.className="dismissButton";return d},function(){d(k)}))return}k=window.confirm(b);d(k)},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,g){if(a)if(this._parameterCollector&&
a.parameters&&a.parameters.hasParameters()&&(g||a.parameters.shouldCollectParameters())){var f=!1;a.parameters.updateParameters(a);if(a.parameters.shouldCollectParameters()&&(f=this._parameterCollector.collectParameters(a),!f)){var c=new b.Tooltip({node:a.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),f=c.contentContainer();f.classList.add("parameterPopup");var d=window.document.activeElement,k=this._parameterCollector.getFillFunction(a,
function(){d&&d.focus();c.destroy()})(f);c.show();window.setTimeout(function(){k.focus();k.select()},0);f=!0}f||a.command.callback.call(a.handler||window,a)}else 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){this._collectAndInvoke(a,!0)},showKeyBindings:function(a){function b(a){return function(){e.executeBinding(a)}}var g={},f,c,k=[],l;for(l in this._activeBindings)(c=
this._activeBindings[l])&&c.keyBinding&&c.command&&(c.command.name||c.command.tooltip)&&k.push(c);k.sort(function(a,b){return(a.command.name||a.command.tooltip).localeCompare(b.command.name||b.command.tooltip)});for(l=0;l<k.length;l++)c=k[l],c.keyBinding.scopeName?(g[c.keyBinding.scopeName]||(g[c.keyBinding.scopeName]=[]),g[c.keyBinding.scopeName].push(c)):(f=d.getUserKeyString(c.keyBinding),a.createItem(f,c.command.name||c.command.tooltip,b(c)));for(var h in g)g[h].length&&g[h].length>0&&(a.createHeader(h),
g[h].forEach(function(g){f=d.getUserKeyString(g.keyBinding);a.createItem(f,g.command.name||g.command.tooltip,b(g))}))},addCommand:function(a){this._commandList[a.id]=a;var b=this._pendingBindings[a.id];if(b){var g=this;b.forEach(function(b){g._addBinding(a,b.type,b.binding,b.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,b,g,f,c,d,k,e,l,h){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];c&&(a=this._createEntryForPath(a,
c));if(a[b]){if(f)a[b].title=f;if(g)a[b].position=g;if(k)a[b].imageClass=k;if(e)a[b].tooltip=e;if(l)a[b].selectionClass=l;h===!0?a[b].pretendDefaultActionId=!0:a[b].defaultActionId=h;a[b].emptyGroupMessage=d}else a[b]={title:f,position:g,emptyGroupMessage:d,imageClass:k,tooltip:e,selectionClass:l,defaultActionId:h===!0?null:h,pretendDefaultActionId:h===!0,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){b&&b.split("/").forEach(function(b){if(b.length>1){if(!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,g,f,c,d,k){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];f&&(a=this._createEntryForPath(a,f));a[b]={position:g};d&&((g=this._commandList[b])?this._addBinding(g,"key",d,
c):this._addPendingBinding(b,"key",d,c));k&&((g=this._commandList[b])?this._addBinding(g,"url",k,c):this._addPendingBinding(b,"url",k,c));a.sortedContributions=null},unregisterCommandContribution:function(a,b,g){if(this._contributionsByScopeId[a]){delete this._commandList[b];delete this._activeBindings[b];delete this._urlBindings[b];delete this._pendingBindings[b];var f=this._contributionsByScopeId[a];g&&g.split("/").forEach(function(a){if(a.length>1&&f[a])f=f[a].children});delete f[b];f.sortedContributions=
null}},_addBinding:function(a,b,g,f){if(!a.id)throw Error("No command id: "+a);b==="key"?this._activeBindings[a.id]={command:a,keyBinding:g,bindingOnly:f}:b==="url"&&(this._urlBindings[a.id]={command:a,urlBinding:g,bindingOnly:f})},_addPendingBinding:function(a,b,g,f){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:b,binding:g,bindingOnly:f})},_checkForTrailingSeparator:function(a,b,g){var f;if(b==="tool"||b==="button")if((f=a.childNodes.length>0?a.childNodes[a.childNodes.length-
1]:null)&&f.classList.contains("commandSeparator"))return g?(a.removeChild(f),!1):!0;if(b==="menu"&&(a=c.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(f=a[a.length-1],g)f.parentNode.parentNode.removeChild(f.parentNode);else return!0;return!1},renderCommands:function(a,b,g,f,d,k,e){if(typeof a!=="string")throw"a scope id for rendering must be specified";b=c.node(b);if(!b)throw"no parent";var l=this._contributionsByScopeId[a];if(!g&&l){var g=l.localSelectionService||
this._selectionService,h=this;g&&g.getSelections(function(g){h.renderCommands(a,b,g,f,d,k)})}else l&&(this._render(l,b,g,f,d||"button",k,e),this._checkForTrailingSeparator(b,d,!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,g,f,c,k,l,h){var i=a.sortedContributions;if(!i){var i=[],n=!1,p;for(p in a)if(Object.prototype.hasOwnProperty.call(a,
p)){var o=a[p];if(o&&typeof o.position==="number")o.id=p,i.push(o),n=!0}if(n)i.sort(function(a,b){return a.position-b.position}),a.sortedContributions=i}var D=0,x=this;i.forEach(function(a){var i;if(!a.imageClass)a.imageClass=null;if(a.children&&Object.getOwnPropertyNames(a.children).length>0){var n=a.children;if(k==="tool"||k==="button")if(a.title){var p;if(a.defaultActionId)(n=x._commandList[a.defaultActionId])&&(n.visibleWhen?n.visibleWhen(f):1)?(p=new e.CommandInvocation(c,f,l,n,x),p.domParent=
g):a.pretendDefaultActionId=!0;n=x._createDropdownMenu(g,a.title,null,null,a.imageClass,a.tooltip,a.selectionClass,null,p,a.pretendDefaultActionId);h&&j.generateNavGrid(h,n.menuButton);if(n)if(x._render(a.children,n.menu,f,c,"menu",l,h),x._checkForTrailingSeparator(n.menu,"menu",!0),n.menu.childNodes.length===0)if(a.emptyGroupMessage){if(!n.menuButton.emptyGroupTooltip)n.menuButton.emptyGroupTooltip=new b.Tooltip({node:n.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right",
"above","left"]})}else h&&j.removeNavGrid(h,n.menuButton),a=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},a(n.menu),a(n.menuButton),a(n.destroyButton);else n.menuButton.style.visibility="visible"}else{var o;g.childNodes.length>0&&!x._checkForTrailingSeparator(g,k)&&(o=x.generateSeparatorImage(g));x._render(n,g,f,c,k,l,h);g.childNodes.length>0&&g.childNodes[g.childNodes.length-1]!==o&&(o=x.generateSeparatorImage(g))}else if(a.title){if(a=x._createDropdownMenu(g,a.title,!0,null,null,a.imageClass))x._render(n,
a.menu,f,c,"menu",l,h),x._checkForTrailingSeparator(a.menu,"menu",!0),a.menu.childNodes.length===0&&a.destroyButton&&g.removeChild(a.destroyButton)}else g.childNodes.length>0&&x._generateMenuSeparator(g),x._render(n,g,f,c,k,l,h),x._generateMenuSeparator(g)}else{var m=x._commandList[a.id],n=m?!0:!1;p=a=null;if(m){i=new e.CommandInvocation(c,f,l,m,x);i.domParent=g;o=n&&(m.visibleWhen?m.visibleWhen(f):!0);if(x._activeBindings[m.id]&&x._activeBindings[m.id].keyBinding)a=x._activeBindings[m.id],a.invocation=
o?i:null,a.bindingOnly&&(n=!1);if(x._urlBindings[m.id]&&x._urlBindings[m.id].urlBinding)p=x._urlBindings[m.id],p.invocation=o?i:null,p.bindingOnly&&(n=!1);n=n&&o}if(n)m.choiceCallback?(k==="tool"||k==="button"?(a=g,n=!1,g.nodeName.toLowerCase()==="ul"&&(a=document.createElement("li"),g.appendChild(a))):(a=g,n=!0),x._createDropdownMenu(a,m.name,n,function(a){m.populateChoicesMenu(a,f,c,l,x)}.bind(m),m.imageClass,m.tooltip||m.title,m.selectionClass,m.positioningNode)):(i.handler=i.handler||this,i.domParent=
g,n=function(){x._invoke(i)},k==="menu"?(p=null,a&&a.keyBinding&&(p=d.getUserKeyString(a.keyBinding)),a=e.createCommandMenuItem(g,m,i,null,n,p)):(a=k+m.id+D,a=e.createCommandItem(g,m,i,a,null,k==="tool",n)),j.generateNavGrid(h,a),i.domNode=a,D++)}})},_createDropdownMenu:function(a,f,d,k,l,i,n,j,p,o){a=c.node(a);if(!a||!c.contains(document.body,a))return null;var q,D,x=a;if(d)i=document.createRange(),i.selectNode(a),i=i.createContextualFragment(g),c.processTextNodes(i,{ButtonText:f}),a.appendChild(i),
D=a.lastChild,l=D.lastChild,f=l.previousSibling,f.dropdown=new h.Dropdown({dropdown:l,populate:k,parentDropdown:a.dropdown}),l.dropdown=f.dropdown;else{a.nodeName.toLowerCase()==="ul"&&(x=document.createElement("li"),a.appendChild(x),D=x);a=null;l&&(a="dropdownButtonWithIcon",i=i||f);var i=l?i||f:i,B=e.createDropdownMenu(x,f,k,a,l,!1,n,j,p||o);q=B.dropdownArrow;f=B.menuButton;if(q){if(p)p.domNode=B.menuButton;var A=this;f.onclick=function(a){var b=c.bounds(q);a.clientX>=b.left&&B.dropdown?B.dropdown.toggle(a):
A._invoke(p)};if(B.dropdown)f.onkeydown=function(a){c.KEY.DOWN===a.keyCode&&(B.dropdown.toggle(a),c.stop(a))}}var l=B.menu,F;(k=p&&p.command&&(p.command.tooltip||p.command.name))?F=p.command.tooltip||p.command.name:k&&(F=i);if(F)f.commandTooltip=new b.Tooltip({node:f,text:F,position:["above","below","right","left"]})}return{menuButton:f,menu:l,dropdown:f.dropdown,destroyButton:D,dropdownArrow:q}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");
b.classList.add("dropdownSeparator");var g=document.createElement("span");g.classList.add("dropdownSeparator");b.appendChild(g);a.appendChild(b)}},generateSeparatorImage:function(a){var b;b=a.nodeName.toLowerCase()==="ul"?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}};k.prototype.constructor=k;l.prototype={match:function(a){a=i.matchResourceParameters(a);return typeof a[this.token]!==
"undefined"?(this.parameterValue=a[this.token],this):null}};l.prototype.constructor=l;n.prototype.constructor=n;p.prototype={optionsRequested:function(){return this.optionsRequested}};p.prototype.constructor=p;o.prototype={_storeParameters:function(a){this.parameterTable=null;if(a){var b=this.parameterTable={};a.forEach(function(a){b[a.name]=a})}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==
null},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 g=this.parameterTable[a];if(g)g.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 p(b.name,b.type,b.label,
b.value,b.lines,b.eventListeners);a.push(b)});var b=new o(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};o.prototype.constructor=o;return{CommandRegistry:k,URLBinding:l,ParametersDescription:o,CommandParameter:p,CommandEventListener:n}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(e,j,i){function d(c,d){this._activeContainer=null;this._getElementsFunction=c;this._toolbarLayoutFunction=d}d.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&i.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&i.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},open:function(c,d,b){typeof c==="string"&&(c=i.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=b;var f=d(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!f)return!1;this._activeElements.focusNode=f;c=i.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(c.length===0){d=this._activeElements.dismissArea||
this._activeElements.parameterArea;c=document.createElement("button");c.id="closebox";c.className="imageSprite core-sprite-close dismissButton";c.title=e.Close;d.appendChild(c);var a=this;c.addEventListener("click",function(){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(f)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){f.focus();f.select&&f.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(c,d){i.$$array("input",d).forEach(function(b){b.type==="checkbox"?c.parameters.setValue(b.parameterName,b.checked):b.type!=="button"&&c.parameters.setValue(b.parameterName,b.value.trim())});i.$$array("textArea",d).forEach(function(b){c.parameters.setValue(b.parameterName,b.value.trim())});c.command.callback&&c.command.callback.call(c.handler,c)},collectParameters:function(c){return c.parameters?
(c.domNode&&c.domNode.classList.add("commandMarker"),this.open(c.domNode||c.domParent,this.getFillFunction(c))):!1},getFillFunction:function(c,d){var b=this;return function(f,a){var g=null,k=function(){d&&d();b.close()},l=function(a){a.keyCode===i.KEY.ENTER&&b._collectAndCall(c,f);if(a.keyCode===i.KEY.ESCAPE||a.keyCode===i.KEY.ENTER)k(),i.stop(a)};c.parameters.forEach(function(a){var b=null;if(a.label)b=document.createElement("label"),b.classList.add("parameterInput"),b.setAttribute("for",a.name+
"parameterCollector"),b.textContent=a.label,f.appendChild(b);var d=a.name+"parameterCollector",e,b=b||f;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)e=document.createElement("textarea"),e.rows=a.lines,e.type="textarea",e.id=d,b.appendChild(e),l=function(a){a.keyCode===i.KEY.ESCAPE&&(k(),i.stop(a))};else if(a.type==="boolean"){if(e=document.createElement("input"),e.type="checkbox",e.id=d,b.appendChild(e),a.value)e.checked=!0}else if(e=document.createElement("input"),e.type=a.type,e.id=
d,b.appendChild(e),a.value)e.value=a.value;e.classList.add("parameterInput");e.setAttribute("speech","speech");e.setAttribute("x-webkit-speech","x-webkit-speech");e.parameterName=a.name;g||(g=e);a.eventListeners.length>0&&a.eventListeners.forEach(function(a){e.addEventListener(a.event,function(b){return a.handler(b,c)},a.capture)});e.addEventListener("keydown",l,!1)});var n=a;n||(n=document.createElement("span"),n.classList.add("layoutRight"),n.classList.add("parametersDismiss"),f.appendChild(n));
var j=function(a,b){var g=document.createElement("button");b.appendChild(g);a&&g.appendChild(document.createTextNode(a));g.classList.add("dismissButton");return g};if(c.parameters.hasOptionalParameters())c.parameters.optionsRequested=!1,j(e.More,n).addEventListener("click",function(){c.parameters.optionsRequested=!0;b._collectAndCall(c,f);k()},!1);j(e.Submit,n).addEventListener("click",function(){b._collectAndCall(c,f);k()},!1);n=j(null,n);n.id="closebox";n.classList.add("imageSprite");n.classList.add("core-sprite-close");
n.title=e.Close;n.addEventListener("click",function(){k()},!1);return g}}};d.prototype.constructor=d;return{CommandParameterCollector:d}});define("orion/regex",[],function(){return{escape:function(e){return e.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(e){return(e=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(e))?{pattern:e[1],flags:e[2]}:null}}});
define("orion/contentTypes",[],function(){function e(a,b){function f(a,b,g,c){var g=b.filename.indexOf(g)>=0,d;d=c.toLowerCase();d=b.extension.indexOf(d)!==-1;if(g||d){if(!(d=!a))g&&(c=c.toLowerCase(),g=a.extension.indexOf(c)!==-1),d=g;if(d)return b}return a}if(typeof a!=="string")return null;for(var c=a&&a.split(".").pop(),d=null,e=0;e<b.length;e++){var h=b[e];f(d,h,a,c)===h&&(d=h)}return d}function j(a){return a===null||typeof a==="undefined"?[]:Array.isArray(a)?a:[a]}function i(a){return j(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:i(a.extension),filename:j(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 h(g){if(g&&g.registerService){this.serviceRegistry=g;for(var d=g.getServiceReferences(f).concat(g.getServiceReferences(a)),e=[],h=0;h<d.length;h++)for(var i=j(d[h].getProperty("contentTypes")),o=0;o<i.length;o++)e.push(i[o]);
this.map=c(e);g.registerService(b,this)}else if(Array.isArray(g))this.serviceRegistry=null,this.map=c(g);else throw Error("Invalid parameter");}var b="orion.core.contentTypeRegistry",f="orion.core.contenttype",a="orion.file.contenttype";h.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),b=[],f;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&b.push(a[f]);return b},getContentTypesMap:function(){return this.map},getFileContentType:function(a){return e(a.Name,this.getContentTypes())},
getFilenameContentType:function(a){return e(a,this.getContentTypes())},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,b){a=typeof a==="string"?this.getContentType(a):a;b=typeof b==="string"?this.getContentType(b):b;if(!a||!b)return!1;if(a.id===b.id)return!0;else for(var f=a,c={};f&&(f=this.getContentType(f["extends"]));){if(f.id===b.id)return!0;if(c[f.id])throw Error("Cycle: "+f.id);c[f.id]=!0}return!1},isSomeExtensionOf:function(a,b){for(var f=0;f<b.length;f++)if(this.isExtensionOf(a,
b[f]))return!0;return!1}};return{ContentTypeRegistry:h,getFilenameContentType:e}});
define("orion/URITemplate",[],function(){function e(a){this._text=a}function j(a){return a.replace("%25","%")}function i(a,b){if(b==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(b==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(g,j);if(b==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function d(a,b,g){for(var f=
[],c=0;c<a.length;c++)typeof a[c]!=="undefined"&&f.push(i(a[c],b));return f.join(g)}function c(a,b,g,f){for(var c=Object.keys(a),d=[],e=0;e<c.length;e++)typeof a[c[e]]!=="undefined"&&d.push(i(c[e],b)+g+i(a[c[e]],b));return d.join(f)}function h(b){if(b.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=f[b[0]])?b=b.substring(1):this._operator=f.NUL;for(var g=[],c=b.split(","),d=0;d<c.length;d++){var e=c[d].match(a);if(e===null)throw Error("Bad VarSpec: "+b);g.push({name:e[1],
explode:!!e[2],prefix:e[3]?parseInt(e[3],10):-1})}this._varSpecList=g}function b(a){for(var b=[],g=0,f=a.indexOf("{",g);f!==-1;){b.push(new e(a.substring(g,f)));g=a.indexOf("}",f+1);if(g===-1)throw Error("Invalid template: "+a);b.push(new h(a.substring(f+1,g)));g+=1;f=a.indexOf("{",g)}b.push(new e(a.substring(g)));this._templateComponents=b}var f={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:"&",named:!0,ifemp:"=",allow:"U"},"&":{first:"&",sep:"&",named:!0,ifemp:"=",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;e.prototype={expand:function(){return encodeURI(this._text)}};
h.prototype={expand:function(a){for(var b=[],g=0;g<this._varSpecList.length;g++){var f=this._varSpecList[g],e=f.name,h=a[e],j=typeof h;if(j!=="undefined"&&h!==null){var w=b.length===0?this._operator.first:this._operator.sep;if(j==="string")this._operator.named&&(w+=i(e,"U+R"),w+=h.length===0?this._operator.ifemp:"="),f.prefix!==-1&&f.prefix<h.length&&(h=h.substring(0,f.prefix)),w+=i(h,this._operator.allow);else if(Array.isArray(h)){if(h.length===0)continue;f.explode?w+=d(h,this._operator.allow,this._operator.sep):
(f=d(h,this._operator.allow,","),this._operator.named&&(w+=i(e,"U+R"),w+=f.length===0?this._operator.ifemp:"="),w+=f)}else if(j==="object"){if(Object.keys(h).length===0)continue;f.explode?w+=c(h,this._operator.allow,"=",this._operator.sep):(f=c(h,this._operator.allow,",",","),this._operator.named&&(w+=i(e,"U+R"),w+=f.length===0?this._operator.ifemp:"="),w+=f)}else throw Error("bad param type: "+e+" : "+j);b.push(w)}}return b.join("")}};b.prototype={expand:function(a){for(var b=[],g=0;g<this._templateComponents.length;g++)b.push(this._templateComponents[g].expand(a));
return b.join("")}};return b});
define("orion/i18nUtil",["require","orion/Deferred"],function(e,j){function i(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 h(a){a?e(["i18n!"+c],function(a){if(a){var b=c;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}f.resolve(a)}):b(Error(c))}function b(a){f.reject(a)}
if(d[c])return d[c];var f=new j;d[c]=f;var a=i(c);if(a)return f.resolve(a),f;try{e([c],h,b)}catch(g){e(["orion/i18n!"+c],h,b)}return f},formatMessage:function(c){var d=arguments;return c.replace(/\$\{([^\}]+)\}/g,function(b,f){return d[(f<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/objects,orion/URL-shim".split(","),function(e,j,i,d,c,h){function b(){return e.toUrl?(new URL(e.toUrl("orion/../"),window.location.href)).href.slice(0,-1):(new URL("/",window.location.href)).href.slice(0,-1)}function f(a){var b={};a.getPropertyKeys().forEach(function(g){g!=="objectClass"&&g!=="service.names"&&g!=="service.id"&&g!=="__plugin__"&&(b[g]=a.getProperty(g))});return b}function a(a){return c.getMessageBundle(a.nls).then(function(b){a.textContent=
a.nameKey?b[a.nameKey]:a.name;return a},function(){a.textContent=a.nameKey||a.name;return a})}function g(g,c){var e=g.getServiceReferences(c||"orion.page.link"),k=i.matchResourceParameters(window.location.href),l={OrionHome:b(),Location:k.resource},h=[];e.forEach(function(b){b=f(b);if(b.uriTemplate&&(b.nls||b.name)){var g=(new d(b.uriTemplate)).expand(l),g=i.validateURLScheme(g);b.href=g;b.nls?h.push(a(b)):(b.textContent=b.name,h.push((new j).resolve(b)))}});return j.all(h)}function k(a){var b=this.categories=
Object.create(null);a.forEach(function(a){b[a.id]=a})}function l(a){this.allPageLinks=a;this.allPageLinks.sort(n)}function n(a,b){var g=a.textContent&&a.textContent.toLowerCase(),f=b.textContent&&b.textContent.toLowerCase();return g<f?-1:g>f?1:0}var p;h.mixin(k.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(a){return this.categories[a]||null}});h.mixin(l.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(a){var b=a.href,a=
a.textContent,g=document.createElement("a");g.href=b;g.target="_self";g.classList.add("targetSelector");g.textContent=a;return g})},getAllLinks:function(){return this.allPageLinks}});return{getCategoriesInfo:function(b){var g;return!p?(g=[],b.getServiceReferences("orion.page.link.category").forEach(function(b){b=f(b);if(b.id&&(b.name||b.nameKey))b.nls?g.push(a(b)):(b.textContent=b.name,g.push((new j).resolve(b)))}),j.all(g).then(function(a){return p=new k(a)})):(new j).resolve(p)},getPageLinksInfo:function(a,
b){return g(a,b).then(function(a){return new l(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(e,j){var i={root:j};Object.keys(e).forEach(function(d){typeof i[d]==="undefined"&&(i[d]=e[d])});return i});
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(e,j,i,d,c,h,b,f,a,g){function k(a){var b={};a.getPropertyKeys().forEach(function(g){b[g]=a.getProperty(g)});return b}var l={},n=a.getOrionHome();l._cloneItemWithoutChildren=function t(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),g;for(g in a)g!=="children"&&g!==
"Children"&&(b[g]=t(a[g]));return b};l._getOpenWithNavCommandExtensions=function(a){function b(a,g){for(var f=a.getServiceReferences("orion.navigate.openWith"),c=[],d=[],e=0;e<f.length;e++){var k=f[e];if(k.getProperty("editor")===g.id){var h=k.getProperty("contentType");h instanceof Array?c=c.concat(h):c.push(h||"*/*");k=k.getProperty("excludedContentTypes");k instanceof Array?d=d.concat(k):k!==null&&typeof k!=="undefined"&&d.push(k)}}0===c.length&&(c=null);0===d.length&&(d=null);return{contentTypes:c,
excludedContentTypes:d}}for(var g=function(){for(var b=a.getServiceReferences("orion.edit.editor"),g=[],f=0;f<b.length;f++){var c=b[f],d=c.getProperty("id");g.push({id:d,"default":c.getProperty("default")||!1,name:c.getProperty("name"),nameKey:c.getProperty("nameKey"),nls:c.getProperty("nls"),uriTemplate:c.getProperty("orionTemplate")||c.getProperty("uriTemplate"),validationProperties:c.getProperty("validationProperties")||[]})}return g}(),f=[],c=0;c<g.length;c++){var d=g[c],e=b(a,d);f.push({properties:{name:d.name||
d.id,nameKey:d.nameKey,id:"eclipse.openWithCommand."+d.id,contentType:e.contentTypes,excludedContentTypes:e.excludedContentTypes,uriTemplate:d.uriTemplate,nls:d.nls,forceSingleItem:!0,isEditor:d["default"]?"default":"editor",validationProperties:d.validationProperties},service:{}})}return f};l._makeValidator=function(a,b,g,f){function d(a,b,g,f){var c=g.match,e,k;if((e=b.indexOf("["))>=0){if((k=b.indexOf("]"))<0)return!1;var h=b.substring(0,e),l;if(!(l=a[h])||!Array.isArray(l))return!1;e=b.substring(e+
1,k);e=parseInt(e,10);if(isNaN(e))return!1;e<0&&(e+=l.length);b=b.substring(k+1);b=h+":"+String(e)+b}if(b.indexOf("|")>=0)return e=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),d(a,e,g,f)?!0:d(a,b,g,f);else if(b.indexOf(":")>=0)return e=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[e]?d(a[e],b,g,f):!1;else{a:{var h=!1,i;if(b.charAt(0)==="!")g=typeof a[b.substring(1)]==="undefined";else if(typeof a[b]!=="undefined"){if(typeof c==="undefined")i=a[b],h=!0;else if(typeof c===
"string"){if(!typeof(a[b]==="string")){g=!1;break a}if(g.variableName){if(c=RegExp(c).exec(a[b]))i=c[0],i=g.variableMatchPosition==="before"?a[b].substring(0,c.index):g.variableMatchPosition==="after"?a[b].substring(c.index+i.length):g.variableMatchPosition==="only"?i:a[b],h=!0}else{g=RegExp(c).test(a[b]);break a}}else a[b]===c&&(i=a[b],h=!0);if(h&&g.variableName&&(f[g.variableName]=i,f.itemCached=a,g.replacements))for(a=0;a<g.replacements.length;a++)i=!1,g.replacements[a].pattern?f[g.variableName]=
f[g.variableName].replace(RegExp(g.replacements[a].pattern),g.replacements[a].replacement||""):i=!0,i&&window.console.log("Invalid replacements specified in validation property.  "+g.replacements[a]);g=h}else g=!1}return g}}function e(b,g,f){if(f.info.validationProperties)for(var k=0;k<f.info.validationProperties.length;k++){var h=f.info.validationProperties[k];if(typeof h.source!=="undefined"){if(!d(b,h.source,h,f))return!1}else return window.console.log("Invalid validationProperties in "+a.id+".  No source property specified."),
!1}var k=!0,l=g?c.getFilenameContentType(b.Name,g):null,l=l||{id:"application/octet-stream"};f.info.excludedContentTypes&&g&&(k=f.info.excludedContentTypes.every(function(a){a=a.replace(/([*?])/g,".$1");return-1!==l.id.search(a)?!1:!0}));k&&f.info.contentType&&g&&(k=f.info.contentType.some(function(a){a=a.replace(/([*?])/g,".$1");return-1!==l.id.search(a)?!0:!1}));return k}return{info:a,validationFunction:function(a){typeof f==="function"&&(a=f.call(this,a));if(a){if(Array.isArray(a)){if((this.info.forceSingleItem||
this.info.uriTemplate)&&a.length!==1)return!1;if(a.length<1)return!1}else a=[a];for(var b=0;b<a.length;b++)if(!e(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={},g;for(g in a)Object.prototype.hasOwnProperty.call(a,g)&&(b[g]=a[g]);if(this.info.validationProperties)for(g=0;g<this.info.validationProperties.length;g++){var f=this.info.validationProperties[g];f.source&&f.variableName&&(this.itemCached===
a&&this[f.variableName]||d(a,f.source,f,this),a[f.variableName]?window.console.log("Variable name "+f.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[f.variableName]=this[f.variableName])}b.OrionHome=n;return(new h(this.info.uriTemplate)).expand(b)}return null}}};var p=g.UnnamedCommand;l._createCommandOptions=function(a,g,f,c,d,e){function k(b,h){var i=l._makeValidator(a,f,c,e);b.visibleWhen=i.validationFunction.bind(i);if(d)if(i.generatesURI.bind(i)())b.hrefCallback=
function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return i.getURI.bind(i)(a)};else{var n=a;b.callback=function(a){var c;if(n.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,c=l._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){c=[];for(var d=0;d<a.items.length;d++)c.push(l._cloneItemWithoutChildren(a.items[d]))}else c=l._cloneItemWithoutChildren(a.items);if(f)var e=f.getService("orion.page.progress");g.run?e?e.progress(g.run(c),"Running command: "+b.name):g.run(c):f&&
(e?e.progress(f.getService(g).run(c),"Running command: "+b.name):f.getService(g).run(c))}}h.resolve(b)}var h=new j;if(a.nls){var i=function(b){var g;b?(g=a.tooltipKey&&b[a.tooltipKey],b=a.nameKey&&b[a.nameKey]||a.name||p,g=g||a.tooltip||""):(b=a.name||a.nameKey||p,g=a.tooltip||a.tooltipKey||"");k({name:b,image:a.image,id:a.id||a.name,tooltip:g,isEditor:a.isEditor,showGlobally:a.showGlobally},h)};b.getMessageBundle(a.nls).then(i,i.bind(this,null))}else k({name:a.name,image:a.image,id:a.id||a.name,
tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},h);return h};l.getOpenWithCommand=function(a,b,g){for(var f,a=g||l.getOpenWithCommands(a),g=0;g<a.length;g++)if(a[g].visibleWhen(b)){var c=a[g].isEditor==="default";if(!f||c)if(f=a[g],c)break}return f};l.getOpenWithCommands=function(a){var b=[],g;for(g in a._commandList){var f=a._commandList[g];f.isEditor&&b.push(f)}return b};var o;l.createAndPlaceFileCommandsExtension=function(a,b,f,c,d,e){return l.createFileCommands(a,null,e?"all":
void 0,!!e,b).then(function(a){d&&0<a.length&&(b.addCommandGroup(f,"eclipse.openWith",1E3,g.OpenWith,d,null,null,null,"dropdownSelection"),b.addCommandGroup(f,"eclipse.fileCommandExtensions",1E3,g.OpenRelated,d));a.forEach(function(a){var g=null;d&&(g=a.isEditor?d+"/eclipse.openWith":d+"/eclipse.fileCommandExtensions");b.registerCommandContribution(f,a.id,c,g)});return{}})};l.createFileCommands=function(a,b,g,f,c){var g=g===void 0?"global":g,f=f===void 0?!0:f,d=[];l._cachedFileCommands||l._createCachedFileCommands(a);
(g==="all"||g==="global")&&l._cachedFileCommands.forEach(function(a){var b=a.properties;(g==="all"||b.forceSingleItem&&b.showGlobally)&&d.push(a)});return j.when(function(){var g=a.getService("orion.core.contentTypeRegistry")||b;return o||j.when(g.getContentTypes(),function(a){return o=a})}(),function(){if(f){if(!l._cachedOpenWithExtensions)l._cachedOpenWithExtensions=l._getOpenWithNavCommandExtensions(a,o);d=d.concat(l._cachedOpenWithExtensions);c._addedOpenWithCommands=f}var b=d.map(function(b){var g=
b.properties,b=b.service,f=c.findCommand(g.id||g.name);return f?(new j).resolve(f):l._createCommandOptions(g,b,a,o,!0).then(function(a){a=new i.Command(a);c.addCommand(a);return a})});return j.all(b,function(a){return{_error:a}}).then(function(a){return a})})};l._createCachedFileCommands=function(a){var b=a.getServiceReferences("orion.navigate.command");l._cachedFileCommands=[];for(var g=0;g<b.length;g++)if(b[g].getProperty("id")!=="orion.navigateFromMetadata"){var f=a.getService(b[g]),c=k(b[g]);
l._cachedFileCommands.push({properties:c,service:f})}};l.getFileCommandIds=function(){var a=[];if(l._cachedFileCommands)l._cachedFileCommands.length&&(a=l._cachedFileCommands.map(function(a){return a.properties.id}));else throw"extensionCommandUtils._cachedFileCommands is not initialized";return a};l.createOpenWithCommands=function(a,b,g){return g&&g._addedOpenWithCommands?(new j).resolve(l.getOpenWithCommands(g)):l.createFileCommands(a,b,"none",!0,g)};return l});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(e,j){function i(d){this._init(d)}i.prototype={_init:function(d){var c=j.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=e.toUrl("edit/edit.html")+"#"+c}else d=document.createElement("span");j.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=e.toUrl("edit/edit.html")+"#"+c.ChildrenLocation},buildSegments:function(d,c){if(this._resource.Parents){var e=this._resource.Parents.slice(0),b,f;e&&(e=e.slice(0),c==="reverse"&&(e=e.reverse().slice(0)),
e.forEach(function(a){if(!a.skip)d?(f=d,d=null):f=a.Name,b=this.buildSegment(f),this.path+=a.Name,this.addSegmentHref(b,a),b.include=!1,this.segments.push(b)}.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=j.node(this._id))?j.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 e=c||document.title;this.crumbs.childNodes.length===0&&(d=document.createElement("span"),d.appendChild(document.createTextNode(e)),
d.classList.add("breadcrumb"),d.classList.add("currentLocation"),this.append(d))},finalSegment:function(d,c){if(!this._resource.skip){var e;e=c?c:this._resource.Name;this._makeFinalHref?(d=this.buildSegment(e),this.addSegmentHref(d,this._resource)):(d=document.createElement("span"),d.appendChild(document.createTextNode(e)));d.classList.add("currentLocation");this.path+=this._resource.Name;this.append(d)}},firstSegment:function(d){if(d)if(this.append(d),this._resource&&this._resource.Parents&&!this._resource.skip)d.classList.add("breadcrumb"),
this.addDivider();else{if(!this._resource.skip)d.href="";d.classList.add("currentLocation")}},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(d){d.include===!0&&(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;if(c)this.addTitle(d,c);else if(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):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(d),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(d,c)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};i.prototype.constructor=i;return{BreadCrumbs:i}});
define("orion/webui/splitter",["require","orion/EventTarget","orion/webui/littlelib"],function(e,j,i){function d(c){j.attach(this);this._init(c)}d.prototype={_init:function(c){this._tracking=null;this._animationDelay=501;this._closeReversely=c.closeReversely;this.$node=i.node(c.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(c.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.node(c.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";
this._vertical=c.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(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=this.$node.getAttribute("data-initial-state")==="closed";if(typeof c.closeByDefault!=="undefined")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";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},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=typeof c==="string"?c==="closed":this._closeByDefault;var c=i.bounds(this.$node.parentNode),d=i.bounds(this.$node),b;if(this._vertical)if(b=localStorage.getItem(this._prefix+"/yPosition")){if(this._splitTop=parseInt(b,10),this._splitTop>c.top+c.height-d.height)this._splitTop=c.top+c.height/
2}else{if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitTop=0}else if(b=localStorage.getItem(this._prefix+"/xPosition")){if(this._splitLeft=parseInt(b,10),this._splitLeft>c.left+c.width-d.width)this._splitLeft=c.left+c.width/2}else if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitLeft=0},_getSplitPosition:function(){var c=i.bounds(this.$node),d=i.bounds(this.$node.parentNode);return this.vertical?c.top-d.top:c.left-d.left},_adjustToSplitPosition:function(c){var d=
i.bounds(this.$node),b=i.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;this.$node.parentNode.style.position==="relative"&&(c=this._splitTop-b.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;this.$node.parentNode.style.position==="relative"&&(c=this._splitLeft-b.left);this.$sideNode.style.width=c+"px";this.$sideNode.style.display="block";this.$node.style.left=c+"px"}this._resize()},_resize:function(c,d,b){var c=c||0,f=i.bounds(this.$node.parentNode),a=i.bounds(this.$node);this._vertical?(b===void 0&&(b=a.top-f.top),b+=a.height,this.$mainNode.style.top=b+"px"):(d===void 0&&(d=a.left-f.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 b=this._splitTop,f=this._splitLeft;if(this._closed){if(this._closed=!1,!this._splitLeft&&!this._splitTop&&typeof this._initialSplit==="number")b=f=this._initialSplit}else if(this._closed=
!0,this._closeReversely){var a=i.bounds(this.$node.parentNode),g=i.bounds(this.$node);this._vertical?b=a.height-g.height:f=a.width-g.width}else b=f=0;this._vertical?(this.$sideNode.style.height=b+"px",this.$node.style.top=b+"px"):(this.$sideNode.style.width=f+"px",this.$node.style.left=f+"px");this._resize(this._animationDelay,f,b);c||this._removeAnimation();d||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var e=this;window.setTimeout(function(){e._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")},_mouseDown:function(c){if(c.target===this._thumb)return i.stop(c),this._thumbDown();if(!this._tracking)this.$node.classList.add("splitTracking"),this.$mainNode.classList.add("panelTracking"),this.$sideNode.classList.add("panelTracking"),this._tracking=this._mouseMove.bind(this),
window.addEventListener("mousemove",this._tracking),i.setFramesEnabled(!1),i.stop(c)},_mouseMove:function(c){if(this._tracking){var d=i.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=c.clientY;if(this._splitTop<d.top+5)this._splitTop=d.top+5;else if(this._splitTop>d.top+d.height-5)this._splitTop=d.top+d.height-5;var b=this._splitTop,b=this._splitTop-d.top;this.$node.style.top=b+"px"}else{this._splitLeft=c.clientX;if(this._splitLeft<d.left+5)this._splitLeft=d.left+5;else if(this._splitLeft>
d.left+d.width-5)this._splitLeft=d.left+d.width-5;b=this._splitLeft;b=this._splitLeft-2*d.left;this.$node.style.left=b+"px"}this._adjustToSplitPosition(!0);i.stop(c)}},_mouseUp:function(c){if(this._tracking)i.setFramesEnabled(!0),window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),i.stop(c)}};d.prototype.constructor=d;return{Splitter:d}});
define("orion/keyAssist",["i18n!orion/nls/messages","orion/webui/littlelib","orion/util"],function(e,j,i){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=e["Filter bindings"];c.appendChild(d);var b=this._keyAssistContents=document.createElement("div");b.classList.add("keyAssistContents");if(i.isIOS||i.isAndroid)b.style.overflowY="auto";c.appendChild(b);var f=this._keyAssistTable=document.createElement("table");f.tabIndex=0;f.classList.add("keyAssistList");b.appendChild(f);document.body.appendChild(c);d.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));f.addEventListener("keydown",
function(a){this._keyDown(a)}.bind(this));d.addEventListener("input",function(){this.filterChanged()}.bind(this));b.addEventListener(i.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===j.KEY.ESCAPE&&this.hide()}.bind(this));j.addAutoDismiss([c],function(){this.hide()}.bind(this))},createContents:function(){j.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(e.Global);this.commandRegistry.showKeyBindings(this)},createItem:function(c,d,b){if(this._filterString){var f=this._filterString.toLowerCase(),a;f!==this._filterString?(f=this._filterString,a=function(a){return a}):a=function(a){return a.toLowerCase()};if(a(d).indexOf(f)===-1&&a(c).indexOf(f)===-1&&a(this._lastHeader).indexOf(f)===-1)return}var g=this._keyAssistTable.insertRow(-1);
g.id="keyAssist-keyBinding-"+this._idCount++;g.setAttribute("role","menuitem");g._execute=b;g.classList.add("keyAssistItem");g.addEventListener("click",function(a){this._selectedRow=g;this.execute();a.preventDefault()}.bind(this));b=g.insertCell(-1);b.classList.add("keyAssistName");b.appendChild(document.createTextNode(d));b=g.insertCell(-1);b.classList.add("keyAssistAccel");b.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),b=document.createElement("h2");b.appendChild(document.createTextNode(c));d.appendChild(b)},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;if(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||(d.compareDocumentPosition(c)&16)!==0;d.style.display="none";c&&document.compareDocumentPosition(this._previousActiveElement)!==1&&this._previousActiveElement.focus();this._previousActiveElement=null}},isVisible:function(){return this._keyAssistDiv.style.display==="block"},removeProvider:function(c){c=this._providers.indexOf(c);c!==-1&&this._providers.splice(c,
1)},select:function(c){var d=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(d.length===0)this._selectedIndex=-1;else{var b=this._selectedIndex;b+=c?1:-1;b%=d.length;b<0&&(b=d.length-1);if(this._selectedIndex!==-1)c=d[this._selectedIndex],c.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=b;if(this._selectedIndex!==-1){this._selectedRow=c=d[this._selectedIndex];c.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",c.id);this._keyAssistTable.focus();
var d=c.getBoundingClientRect(),f=this._keyAssistContents,a=f.getBoundingClientRect();c.offsetTop<f.scrollTop?b===0?f.scrollTop=0:c.scrollIntoView(!0):d.bottom>a.bottom&&c.scrollIntoView(!1)}}},show:function(){if(!this.isVisible())this._previousActiveElement=document.activeElement,this.createContents(),this._keyAssistContents.style.height=Math.floor(this._keyAssistDiv.parentNode.clientHeight*0.75)+"px",this._keyAssistDiv.style.display="block",this._keyAssistInput.value=this._filterString,this._keyAssistInput.focus(),
this._keyAssistInput.select()},_keyDown:function(c){if(c.keyCode===40)this.select(!0);else if(c.keyCode===38)this.select(!1);else if(c.keyCode===13)this.execute();else return;c.preventDefault()},_scrollWheel:function(c){var d=0,d=i.isIE||i.isOpera?-c.wheelDelta:i.isFirefox?c.detail*40:-c.wheelDeltaY,b=this._keyAssistContents,f=b.scrollTop;b.scrollTop+=d;if(f!==b.scrollTop)return c.preventDefault&&c.preventDefault(),!1}};return{KeyAssistPanel:d}});
define("orion/widgets/themes/ThemePreferences",[],function(){function e(e,i){this._preferences=e;this._themeData=i;var d=i.getThemeStorageInfo();this._themeVersion=d.version;var c=e.listenForChangedSettings(d.storage,2,function(d){d.key===c&&this.apply()}.bind(this))}e.prototype={_initialize:function(e,i,d){var c,h;this._themeVersion===void 0||d.get("version")===this._themeVersion?(c=d.get(e.styleset),(h=d.get("selected"))&&(h=JSON.parse(h))):h=c=null;c||(c=i.getStyles(),d.put(e.styleset,JSON.stringify(c)));
if(!h||h[e.selectedKey]===void 0)h=h||{},h[e.selectedKey]=e.defaultTheme,d.put("selected",JSON.stringify(h));d.put("version",this._themeVersion)},apply:function(){this.setTheme()},getTheme:function(e){var i=this._themeData,d=i.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(c){this._initialize(d,i,c);var h=JSON.parse(c.get("selected")),c=JSON.parse(c.get(d.styleset)),b;if(c)for(var f=0;f<c.length;f++)if(c[f].name===h[d.selectedKey]){b=c[f];break}e({style:b,styles:c})}.bind(this))},
setTheme:function(e,i){var d=this._themeData,c=d.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(h){this._initialize(c,d,h);var b=JSON.parse(h.get("selected"));e||(e=b[c.selectedKey]);b[c.selectedKey]=e;h.put("selected",JSON.stringify(b));i?h.put(c.styleset,JSON.stringify(i)):i=JSON.parse(h.get(c.styleset));for(var f=0;f<i.length;f++)if(i[f].name===b[c.selectedKey]){d.processSettings(i[f]);break}h.put("version",this._themeVersion)}.bind(this))},setFontSize:function(e){var i=
this._themeData,d=i.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(c){this._initialize(d,i,c);var h=JSON.parse(c.get("selected")),b=JSON.parse(c.get(d.styleset)),f;if(b)for(var a=0;a<b.length;a++)b[a].fontSize=e,b[a].name===h[d.selectedKey]&&(f=b[a]);c.put(d.styleset,JSON.stringify(b));i.processSettings(f)}.bind(this))}};return{ThemePreferences:e}});
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",
"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 <Angle> 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: "});
define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages","orion/settings/nls/root/messages"],function(e,j){var i={root:j};Object.keys(e).forEach(function(d){typeof i[d]==="undefined"&&(i[d]=e[d])});return i});
define("orion/editor/eventTarget",[],function(){function e(){}e.addMixin=function(j){var i=e.prototype,d;for(d in i)i.hasOwnProperty(d)&&(j[d]=i[d])};e.prototype={addEventListener:function(e,i,d){if(!this._eventTypes)this._eventTypes={};var c=this._eventTypes[e];c||(c=this._eventTypes[e]={level:0,listeners:[]});c.listeners.push({listener:i,useCapture:d})},dispatchEvent:function(e){var i=e.type;this._dispatchEvent("pre"+i,e);this._dispatchEvent(i,e);this._dispatchEvent("post"+i,e)},_dispatchEvent:function(e,
i){var d=this._eventTypes?this._eventTypes[e]:null;if(d){var c=d.listeners;try{if(d.level++,c)for(var h=0,b=c.length;h<b;h++)if(c[h]){var f=c[h].listener;typeof f==="function"?f.call(this,i):f.handleEvent&&typeof f.handleEvent==="function"&&f.handleEvent(i)}}finally{if(d.level--,d.compact&&d.level===0){for(h=c.length-1;h>=0;h--)c[h]||c.splice(h,1);c.length===0&&delete this._eventTypes[e];d.compact=!1}}}},isListening:function(e){return!this._eventTypes?!1:this._eventTypes[e]!==void 0},removeEventListener:function(e,
i,d){if(this._eventTypes){var c=this._eventTypes[e];if(c){for(var h=c.listeners,b=0,f=h.length;b<f;b++){var a=h[b];if(a&&a.listener===i&&a.useCapture===d){c.level!==0?(h[b]=null,c.compact=!0):h.splice(b,1);break}}h.length===0&&delete this._eventTypes[e]}}}};return{EventTarget:e}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(e,j,i){function d(c){c=c||{};this._document=c.document||document}var c={};d.getTheme=function(e){var e=e||"default",b=c[e];b||(b=c[e]=new d);return b};d.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(c,b){var f=this,a=f._themeClass;f._themeClass=c;this._load(c,b,function(){f.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:f.getThemeClass()})})},onThemeChanged:function(c){return this.dispatchEvent(c)},
buildStyleSheet:function(c,b){function f(b,f,d){f&&(a.push("."+c+" ."+b+" {"),a.push("\t"+(d?"background-color":"color")+": "+f+";"),a.push("}"))}var a=[];a.push("");a.push("."+c+" {");b.fontFamily&&a.push("\tfont-family: "+b.fontFamily+";");b.fontSize&&a.push("\tfont-size: "+b.fontSize+";");b.fontSize&&a.push("\tcolor: "+b.text+";");a.push("}");a.push("."+c+".textview {");b.background&&a.push("\tbackground-color: "+b.background+";");a.push("}");f("ruler.annotations",b.annotationRuler,!0);f("ruler.lines",
b.annotationRuler,!0);f("ruler.folding",b.annotationRuler,!0);f("ruler.overview",b.overviewRuler,!0);f("rulerLines",b.lineNumber,!1);f("rulerLines.even",b.lineNumberEven,!1);f("rulerLines.odd",b.lineNumberOdd,!1);f("annotationLine.currentLine",b.currentLine,!0);f("entity-name-tag",b.keyword,!1);f("entity-other-attribute-name",b.attribute,!1);f("string-quoted",b.string,!1);f("meta.annotation.currentLine",b.currentLine,!0);f("keyword",b.keyword,!1);f("string",b.string,!1);f("comment",b.comment,!1);
f("comment.block.documentation",b.comment,!1);f("keyword.other.documentation.markup",b.comment,!1);return a.join("\n")},_createStyle:function(c,b,f,a){var g=this._document,c="orion-theme-"+c,d=g.getElementById(c);if(d){if(a||d.firstChild.data===b)return;d.removeChild(d.firstChild);d.appendChild(g.createTextNode(b))}else a?(d=i.createElement(g,"link"),d.rel="stylesheet",d.type="text/css",d.href=b,d.addEventListener("load",function(){f()})):(d=i.createElement(g,"style"),d.appendChild(g.createTextNode(b))),
d.id=c,(g.getElementsByTagName("head")[0]||g.documentElement).appendChild(d);a||f()},_load:function(c,b,f){if(c)if(typeof b==="string")this._createStyle(c,b,f);else if(b=b.href,b.substring(b.length-4)!==".css"&&(b+=".css"),/^\//.test(b)||/[a-zA-Z0-9]+:\/\//i.test(b)||!e.toUrl)this._createStyle(c,b,f,!0);else{var a=this;e(["text!"+b],function(b){a._createStyle(c,b,f,!1)})}else f()}};j.EventTarget.addMixin(d.prototype);return{TextTheme:d}});
define("orion/widgets/themes/ThemeClass",[],function(){function e(e){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=e;this.classString="."+e+"{ "}e.prototype.className=null;e.prototype.classString=void 0;e.prototype.style=void 0;e.prototype.closeString=" }\n";e.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:e}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(e){function j(){}j.prototype.navbar="white";j.prototype.button="#777777";j.prototype.location="#EFEFEF";j.prototype.selection="#cedce7";j.prototype.sidepanel="#F7F7F7";j.prototype.mainpanel="white";j.prototype.navtext="#bfbfbf";j.prototype.content="#3087B3";j.prototype.search="#444";j.prototype.toolpanel="white";j.prototype.writeNavigationStyle=function(){var i="",d=[],c=new e.ThemeClass("orionPage");
c.style.backgroundColor="#fdfdfd";c.style.width="100%";c.style.height="100%";d.push(c);c=new e.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 e.ThemeClass("a");c.style.textDecoration="none";c.style.color=
this.content;d.push(c);c=new e.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 e.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 e.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 e.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 h in d)i+=d[h].toString();return i};j.prototype.writeLocationStyle=function(){var i="",d=[],c=new e.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 e.ThemeClass("breadcrumb");c.style.fontSize="8pt";c.style.textDecoration="none";c.style.color="#f1f1f2;";c.style.paddingTop="2px";d.push(c);c=new e.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 e.ThemeClass("breadcrumbSeparator");c.style.fontSize=
"8pt";c.style.textDecoration="none";c.style.color=this.separator;c.style.fontWeight="bold";d.push(c);c=new e.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 e.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 e.ThemeClass("navlinkonpage");
c.style.color=this.content;c.style.verticalAlign="middle";d.push(c);if(this.bannerProgress)c=new e.ThemeClass("topRowBanner .progressPane_running"),c.style.borderColor=this.bannerProgress,d.push(c);for(var h in d)i+=d[h].toString();return i};j.prototype.writeButtonStyle=function(){var i="",d=[],c=new e.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 e.ThemeClass("commandButton:over");c.style.backgroundColor="#e6e6e6";c.style.border="1px solid #808080";d.push(c);c=new e.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 e.ThemeClass("commandMenuItem");c.style.border="0";c.style.padding="0";c.style.margin="0";d.push(c);for(var h in d)i+=d[h].toString();return i};j.prototype.writeMainStyle=function(){var i="",d=[],c=new e.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 e.ThemeClass("searchbox:focus");c.style.color="white";c.style.outline=
"none";d.push(c);c=new e.ThemeClass("checkedRow");c.style.cssText="background-color:"+this.selection+" !important;";d.push(c);c=new e.ThemeClass("navbar-item-selected");c.style.background=this.selection;c.style.color=this.content;d.push(c);c=new e.ThemeClass("auxpane");c.style.border="0";c.style.background=this.sidepanel;d.push(c);c=new e.ThemeClass("mainpane");c.style.background=this.mainpanel;c.style.border=0;d.push(c);c=new e.ThemeClass("mainToolbar");c.style.background=this.toolpanel;d.push(c);
for(var h in d)i+=d[h].toString();return i};j.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};j.prototype.getSheet=function(e){e.navbar.value?(this.navbar=e.navbar.value,this.button=e.button.value,this.location=e.location.value,this.selection=e.selection.value,this.sidepanel=e.sidepanel.value,this.mainpanel=e.mainpanel.value,this.navtext=e.navtext.value,this.search=
e.search.value,this.content=e.content.value,this.toolpanel=e.toolpanel.value,this.bannerProgress=e.bannerProgress.value):(this.navbar=e.navbar,this.button=e.button,this.location=e.location,this.selection=e.selection,this.sidepanel=e.sidepanel,this.mainpanel=e.mainpanel,this.navtext=e.navtext,this.search=e.search,this.content=e.content,this.toolpanel=e.toolpanel,this.bannerProgress=e.bannerProgress);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};
return{ThemeSheetWriter:j}});
define("orion/widgets/themes/container/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(e,j,i){function d(){}function c(){this.styles=[];var b=new d;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 d;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 d;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 d;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 d;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 d;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 d;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 d;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 h(){return this.styles}d.prototype.name="Orion";d.prototype.navbar="#404648";d.prototype.button="#EFEFEF";d.prototype.location="#333";d.prototype.breadcrumb="#3087B3";d.prototype.separator=
"#333";d.prototype.selection="FEC";d.prototype.sidepanel="#FBFBFB";d.prototype.mainpanel="white";d.prototype.toolpanel="white";d.prototype.navtext="#bfbfbf";d.prototype.content="#3087B3";d.prototype.search="#444";d.prototype.bannerProgress="white";c.prototype.styles=[];c.prototype.getStyles=h;c.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion2014",selectedKey:"selected",version:"5.0"}};c.prototype.getViewData=function(){var b={top:10,left:10,
width:350,height:350};b.shapes=[{type:"RECTANGLE",name:e["Navigation Bar"],x:10,y:10,width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:e["Navigation Text"],label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:e["Search Box"],x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:e["Tool Panel"],x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",
name:e["Selection Bar"],x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},{type:"RECTANGLE",name:e.Location,x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:e["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:e.Content,label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:e.Content,label:"/",x:78,y:60,family:"content",
fill:"#3087B3",font:"8pt sans-serif",order:9},{type:"TEXT",name:e.Content,label:"Location",x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:e["Main Panel"],x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:e.Button,x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:e["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:e["Section Text"],label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:e["Line Color"],x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:e["Line Color"],x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:e["Line Color"],
x1:20,y1:100,x2:140,y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:e["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:e["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 f=0;f<3;f++)b.shapes.push({type:"TEXT",name:e.Content,label:"org.eclipse.orion.content",x:170,y:127+20*f,fill:"#3087B3",family:"content"});for(f=0;f<3;f++)b.shapes.push({type:"TEXT",name:e.Content,label:"Item",x:25,y:115+20*f,fill:"#3087B3",family:"content"});for(f=0;f<3;f++)b.shapes.push({type:"TRIANGLE",
name:"twisty",x1:160,y1:121+f*20,x2:165,y2:124+f*20,x3:160,y3:127+f*20,family:"navbar",fill:"#333"});b.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return b};c.prototype.processSettings=function(b){var f=new i.ThemeSheetWriter;(new j.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",f.getSheet(b))};return{ThemeData:c,getStyles:h}});
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"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",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 (? = any character, * = any string):":"Type the name of a file to open (? = any character, * = 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 ","</a>":"</a>",">":">","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"});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(e,j){var i={root:j};Object.keys(e).forEach(function(d){typeof i[d]==="undefined"&&(i[d]=e[d])});return i});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(e){function j(i,d,c){this.elements=c;this.taskPanel=document.createElement("div");this.taskPanel.className="UAContainer";this.taskPanel.innerHTML='<header class="UAHeader">Develop software from within the cloud</header>';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);d===!0?(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),e.addAutoDismiss([this.container],this.destroy.bind(this))):i.appendChild(this.taskPanel);this.chosenSwitch=this.createSwitch(null,!0);this.chosenSwitch.firstChild.className="chosenCircle";this.initialize();this.elements.forEach(this.createSwitch.bind(this))}j.prototype.elementNode=null;j.prototype.switchesContainer=null;j.prototype.switches=null;j.prototype.radioButtons=null;j.prototype.chosenSwitch=null;j.prototype.addElement=
function(e){var d=document.createElement("span");d.className="UAContainer-icon";d.innerHTML='<span class="workingSpan"><img src="'+e.image+'" id="'+e.label+'ImageNode" alt="'+e.alt+'" height="64" width="64"></span><span class="UAIcon-label"><span class="UALabel" id="'+e.label+'LabelNode" >'+e.label+"</span></span>";d.onmouseover=function(){document.getElementById(e.label+"ImageNode").src=e.secondaryImage;document.getElementById(e.label+"LabelNode").className="UALabel-live";d.className="UAContainer-icon-live"};
d.onmouseout=function(){document.getElementById(e.label+"ImageNode").src=e.image;document.getElementById(e.label+"LabelNode").className="UALabel";d.className="UAContainer-icon"};var c=this;d.onclick=function(){c.showMedia(e)};this.elementNode.appendChild(d)};j.prototype.clearElements=function(){this.elementNode.innerHTML=""};j.prototype.showMedia=function(e){this.clearElements();this.addElement(e);var d=document.createElement("span");d.className="UAContainer-media";d.innerHTML='<div></div><div></div><span class="mediaSpan"><img src="'+
e.media+'" alt="'+e.alt+'" height="300" width="400"></span>';this.elementNode.appendChild(d);setTimeout(function(){d.style.opacity=1},100);e=document.getElementById(e.label+"switch");this.chosenSwitch.firstChild.className="circle";this.chosenSwitch=e.parentNode;e.className="chosenCircle"};j.prototype.createSwitch=function(e){var d;d=e?e.label+"switch":"indexSwitch";var c=document.createElement("span");c.className="workingSpan";c.innerHTML='<div class="circle" id ="'+d+'"></div>';var h=this;c.onclick=
e?function(){h.showMedia(e)}:function(){h.initialize();h.chosenSwitch.firstChild.className="circle";h.chosenSwitch=c;h.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(c);return this.radioButtons[this.radioButtons.length]=c};j.prototype.initialize=function(){this.clearElements();this.elements.forEach(this.addElement.bind(this))};j.prototype.destroy=function(){document.body.removeChild(this.backdrop);document.body.removeChild(this.container)};return j});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(e,j,i,d){function c(){}var h=null;c.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'<div class="dialog" role="dialog"><div class="dialogTitle"><span id="title" class="dialogTitleText layoutLeft"></span><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" id="closeDialog"></button></div><div id="dialogContent" class="dialogContent layoutBlock"></div><div id="buttons" class="dialogButtons"></div></div>',
_initialize:function(){var b=document.body;this.$frameParent=b;this.$$modalExclusions=this.$$modalExclusions||[];var f=document.createRange();f.selectNode(b);f=f.createContextualFragment(this.CONTAINERTEMPLATE);b.appendChild(f);this.$frame=b.lastChild;this.title&&i.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=i.$("#closeDialog",this.$frame);var a=this;this.$close.addEventListener("click",function(){a.hide()},!1);this.$parent=i.$(".dialogContent",this.$frame);
f=document.createRange();f.selectNode(this.$parent);b=f.createContextualFragment(this.TEMPLATE);this.messages&&i.processTextNodes(b,this.messages);this.$parent.appendChild(b);this.$buttonContainer=i.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(b){b.keyCode===i.KEY.ESCAPE?a.hide():b.keyCode===i.KEY.ENTER&&typeof a._defaultCallback==="function"&&a._defaultCallback()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent);
this.modal&&this._makeModal()},_makeButtons:function(){if(this.$buttonContainer&&Array.isArray(this.buttons)){var b=this;this.buttons.forEach(function(f){var a=d.createButton(f.text,f.callback);if(f.id)a.id=f.id,b["$"+a.id]=a;if(f.isDefault)b._defaultCallback=f.callback,b._defaultButton=a;b.$buttonContainer.appendChild(a)})}},_makeModal:function(){var b=this;this.$frame.addEventListener("blur",function(a){b.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var g=!i.contains(b.$frame,
a.target);if(g)for(var f=0;f<b.$$modalExclusions.length;f++)if(i.contains(b.$$modalExclusions[f],a.target)){g=!1;break}g&&(window.setTimeout(function(){(b.$lastFocusedElement||b.$parent).focus()},0),i.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var f=this.$frameParent.childNodes,a=!1;this._addedBackdrop=[];for(var g=0;g<f.length;g++){for(var c=0;c<this.$$modalExclusions.length;c++)if(i.contains(this.$$modalExclusions[c],
f[g])){a=!0;break}!a&&f[g]!==b.$frame&&f[g].classList&&!f[g].classList.contains("tooltipContainer")&&(c=f[g],c.classList.contains("modalBackdrop")||(c.classList.add("modalBackdrop"),this._addedBackdrop.push(c)))}(f=i.lastTabbable(this.$buttonContainer)||i.lastTabbable(this.$parent))&&f.addEventListener("keydown",function(a){if(a.keyCode===i.KEY.TAB){var g=b._getFirstFocusField();g&&g!==a.target&&g.focus();i.stop(a)}},!1)},_addChildDialog:function(b){this.$$modalExclusions.push(b.$frame||b.$parent)},
_inModalExclusion:function(b){return this.$$modalExclusions.some(function(f){return b.$frame===f||b.$parent===f})},_bindElements:function(b){for(var f=0;f<b.childNodes.length;f++){var a=b.childNodes[f];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},hide:function(b){!b&&h===this&&(h=null);typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,
!0));this.$frame.classList.remove("dialogShowing");i.setFramesEnabled(!0);typeof this._afterHiding==="function"&&this._afterHiding();var f=this;this.keepAlive||window.setTimeout(function(){f.destroy()},0)},show:function(b){if(this.modal)if(h){if(!h._inModalExclusion(this)){this.hide(!0);return}}else h=this;typeof this._beforeShowing==="function"&&this._beforeShowing();i.setFramesEnabled(!1);var f=i.bounds(this.$frame),a=i.bounds(document.documentElement),g;b?(g=i.bounds(b),b=g.top+g.height+4,g=g.left+
4,b+f.height>a.height&&(b=Math.max(0,a.height-f.height-4)),g+f.width>a.width&&(g=Math.max(0,a.width-f.width-4))):(g=Math.max(0,(a.width-f.width)/2),b=Math.max(0,(a.height-f.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=b+"px";this.$frame.style.left=g+"px";this.$frame.classList.add("dialogShowing");typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return i.firstTabbable(this.$parent)||
this._defaultButton||i.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){if(this.$frame)h===this&&(h=null),i.setFramesEnabled(!0),this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(b){b.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".split(","),function(e,j,i,d,c){function h(b){this._displaySignOut=!0;this._init(b)}h.prototype={_init:function(b){this._dropdownNode=i.node(b.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=b.dropdown;this._serviceRegistry=b.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices=
{};this._noSeparator=b.noSeparator;this._dropDownItemClass=b.dropDownItemClass;this._keyAssistClass=b.keyAssistClass;if(b.signOut!==void 0)this._displaySignOut=b.signOut},isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},hasServices:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)>0},length:function(b){var f=0,a;for(a in b)b.hasOwnProperty(a)&&f++;return f},_makeMenuItem:function(b,
f){var a=document.createElement("span");a.role="menuitem";a.tabIndex=0;var g=document.createTextNode(b);a.appendChild(g);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&a.classList.add(this._dropDownItemClass):a.classList.add("dropdownMenuItem");a.addEventListener("click",f,!1);a.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&f()},!1);return a},_renderAuthenticatedService:function(b){var f=this,a=this.authenticatedServices[b].authService;
if(a&&a.logout&&this._displaySignOut){var g=document.createElement("li"),c=this._makeMenuItem(e["Sign Out"],function(){a.logout().then(function(){f.addUserItem(b,a,f.authenticatedServices[b].label);localStorage.removeItem(b);localStorage.removeItem("lastLogin");for(var g=localStorage.length-1;g>=0;g--){var c=localStorage.key(g);c&&c.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(c)}a.getAuthForm(window.location.href).then(function(a){window.location=a})})});g.appendChild(c);this._dropdownNode.appendChild(g)}},
renderServices:function(){function b(b){a[b]||(a[b]=f.createDocumentFragment());return a[b]}var f=document,a=[],g=this._serviceRegistry;d.getPageLinksInfo(g,"orion.page.link.user").then(function(c){this._dropdown?this._dropdown.empty():this._dropdownNode&&i.empty(this._dropdownNode);c.getAllLinks().forEach(function(a){var g,c;if(a.category&&(c=/user\.(\d+)/.exec(a.category)))g=parseInt(c[1],10);if(typeof g!=="number"||isNaN(g))g=1;g=b(g);c=f.createElement("li");var d=f.createElement("a");d.role="menuitem";
typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&d.classList.add(this._dropDownItemClass):d.classList.add("dropdownMenuItem");d.href=a.href;d.textContent=a.textContent;c.appendChild(d);g.appendChild(c);d.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&d.click()},!1)}.bind(this));if(this.keyAssistFunction){var c=document.createElement("li"),d=this._makeMenuItem(e["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass===
"string"?this._keyAssistClass!==""&&d.classList.add(this._keyAssistClass):d.classList.add("key-assist-menuitem");c.appendChild(d);b(0).appendChild(c)}if(c=g.getServiceReferences("orion.page.getstarted")[0])d=c.getProperty("data"),c=document.createElement("li"),d=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,d)),c.appendChild(d),b(0).appendChild(c);var h=this;a.sort(function(a,b){return a-b}).forEach(function(b,g){if(g<a.length-1&&!this._noSeparator){var f=document.createElement("li");
f.classList.add("dropdownSeparator");var c=document.createElement("span");c.classList.add("dropdownSeparator");f.appendChild(c);b.appendChild(f)}h._dropdownNode.appendChild(b)}.bind(this));if(this.isSingleService())for(var j in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(j)&&this._renderAuthenticatedService(j,0)}.bind(this))},getStartedDialog:function(b){new c(null,!0,b)},setKeyAssist:function(b){this.keyAssistFunction=b;this.renderServices()},addUserItem:function(b,f,a,g){g?
(this.unauthenticatedServices[b]&&delete this.unauthenticatedServices[b],this.authenticatedServices[b]={authService:f,label:a,data:g}):(this.authenticatedServices[b]&&delete this.authenticatedServices[b],this.unauthenticatedServices[b]=this.unauthenticatedServices[b]?{authService:f,label:a,pending:this.unauthenticatedServices[b].pending}:{authService:f,label:a});this.renderServices()}};h.prototype.constructor=h;return{UserMenu:h}});
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(e,j){var i={root:j};Object.keys(e).forEach(function(d){typeof i[d]==="undefined"&&(i[d]=e[d])});return i});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(e,j,i,d,c,h){function b(a,b,f){var c="";f&&(c="^");if(c=i.parse("/"+c+a.searchStr+"/"))f=c.pattern,c=c.flags,c.indexOf("i")===-1&&!b.caseSensitive&&(c+="i"),a.regExp={pattern:f,flags:c},a.wildCard=!0}var f={ALL_FILE_TYPE:"*.*"};f.doSearch=function(a,b,c,d){if(a){var i=!0;c==="*"&&(c="");c===""&&(i=d&&d.type!==f.ALL_FILE_TYPE);if(i)c!==""&&f.addRecentSearch(b,
c,d?d.regEx:!1),a=a.createSearchParams(c,!1,!1,d),a=f.generateSearchHref(a),window.location=a}else window.alert(e["Can't search: no search service is available"])};f.generateSearchHelper=function(a,g){var c=a.keyword,d=c,e={};a.fileType&&a.fileType!==f.ALL_FILE_TYPE&&c===""&&(d="*."+a.fileType);if(a.regEx)e.searchStr=c,b(e,a,g);else{var i=c.indexOf("*")>-1,h=c.indexOf("?")>-1;i&&(c=c.split("*").join(".*"));h&&(c=c.split("?").join("."));!i&&!h&&!a.nameSearch?(e.searchStr=a.caseSensitive?c.split("\\").join(""):
c.split("\\").join("").toLowerCase(),e.wildCard=!1):(e.searchStr=a.caseSensitive?c:c.toLowerCase(),b(e,a,g),e.wildCard=!0)}e.searchStrLength=e.searchStr.length;return{params:a,inFileQuery:e,displayedSearchTerm:d}};f.convertSearchParams=function(a){if(a.rows!==void 0)a.rows=parseInt(a.rows,10);if(a.start!==void 0)a.start=parseInt(a.start,10);if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive==="string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";
if(typeof a.nameSearch==="string")a.nameSearch=a.nameSearch.toLowerCase()==="true"};f.copySearchParams=function(a,b){var f={},c;for(c in a)if(a[c]!==void 0&&a[c]!==null&&(b||c!=="replace"))f[c]=a[c];return f};f.generateSearchHref=function(a){var b=j.toUrl("search/search.html"),a=f.copySearchParams(a,!0),c=a.resource;a.resource=void 0;return typeof a.keyword!=="undefined"?(new h(b+"#{,resource,params*}")).expand({resource:c,params:a}):(new h(b+"#{,resource}")).expand({resource:c})};f.generateFindURLBinding=
function(a,b,f,c,d){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof c==="string"?c:void 0,atLine:typeof f==="number"?f:void 0};return d?a:","+(new h("{,params*}")).expand({params:a})};f.convertFindURLBinding=function(a){if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive==="string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.atLine==="string")a.atLine=parseInt(a.atLine,10)};f.replaceRegEx=
function(a,b,f){return a.replace(RegExp(b.pattern,b.flags),f)};f.replaceStringLiteral=function(a,b,c){b=i.parse("/"+b+"/gim");return f.replaceRegEx(a,b,c)};f.searchOnelineLiteral=function(a,b,f){var c;c=0;for(var d=!1,e=[];;)if(c=b.indexOf(a.searchStr,c),c<0)break;else{e.push({startIndex:c,length:a.searchStrLength});d=!0;if(f)break;c+=a.searchStrLength}return d?e:null};f.findRegExp=function(a,b,f,c){if(!b)return null;f=f||"";f+=(f.indexOf("g")===-1?"g":"")+(f.indexOf("m")===-1?"m":"");var d=null;
return(d=RegExp(b,f).exec(a.substring(c)))&&{startIndex:d.index+c,length:d[0].length}};f.searchOnelineRegEx=function(a,b,c){for(var d=0,e=!1,i=[];;)if(d=f.findRegExp(b,a.regExp.pattern,a.regExp.flags,d)){i.push(d);e=!0;if(c)break;d=d.startIndex+d.length}else break;return e?i:null};f.generateNewContents=function(a,b,c,d,e,i){if(d&&b){if(!a)c.contents=[];for(var h=0;h<b.length;h++){for(var j=b[h],t=!1,w=!1,v=[],y,C=0,z=0;z<d.children.length;z++)if(d.children[z].lineNumber-1===h){C=z;for(t=0;t<d.children[z].matches.length;t++)d.children[z+
t].checked!==!1&&v.push(t);w=v.length>0;y=d.children[z].matches;t=!0;break}if(t){if(w){v=f.replaceCheckedMatches(j,e,y,v,i);j=v.replacedStr;for(t=0;t<d.children[C].matches.length;t++)d.children[C+t].newMatches=v.newMatches}else for(t=0;t<d.children[C].matches.length;t++)d.children[C+t].newMatches=d.children[C+t].matches;a?c.contents[h]=j:c.contents.push(j)}else a||c.contents.push(j)}}};f.generateMatchContext=function(a,b,f){var c=[],d=a*2+1,e;b.length<=d?(e=0,a=b.length-1):(e=f-a,e<0?(e=0,a=e+d-1):
(a=f+a,a>b.length-1&&(a=b.length-1,e=a-d+1)));for(d=e;d<=a;d++)c.push({context:b[d],current:d===f});return c};f.splitFile=function(a){for(var b=0,f=0,c=0,d=0,e=[];;){b!==-1&&b<=c&&(b=a.indexOf("\r",c));f!==-1&&f<=c&&(f=a.indexOf("\n",c));if(f===-1&&b===-1){e.push(a.substring(d));break}var i=1;b!==-1&&f!==-1?b+1===f?(i=2,c=f+1):c=(b<f?b:f)+1:c=b!==-1?b+1:f+1;e.push(a.substring(d,c-i));d=c}return e};f.searchWithinFile=function(a,b,c,d,e,i){c=f.splitFile(c);if(e)b.contents=c;if(b){b.children=[];for(var h=
d=0;h<c.length;h++){var j=c[h];if(j&&j.length>0){var t=i?j:j.toLowerCase();if(t=a.wildCard?f.searchOnelineRegEx(a,t):f.searchOnelineLiteral(a,t)){var w,v=h+1;if(e)for(var y=0;y<t.length;y++)w=y+1,w={parent:b,checked:b.checked,type:"detail",matches:t,lineNumber:v,matchNumber:w,name:j,location:b.location+"-"+v+"-"+w},b.children.push(w);else w={parent:b,context:f.generateMatchContext(2,c,h),checked:b.checked,type:"detail",matches:t,lineNumber:v,name:j,location:b.location+"-"+v},b.children.push(w);d+=
t.length}}}b.totalMatches=d}};f.replaceCheckedMatches=function(a,b,f,c,d){for(var e=0,i="",h=[],j=0;j<f.length;j++){e!==f[j].startIndex&&(i+=a.substring(e,f[j].startIndex));if(f[j].length)d=f[j].length;for(var e=!1,w=0;w<c.length;w++)if(c[w]===j){e=!0;break}e?(h.push({startIndex:i.length,length:b.length}),i+=b):(h.push({startIndex:i.length,length:d}),i+=a.substring(f[j].startIndex,f[j].startIndex+d));e=f[j].startIndex+d}e<a.length&&(i+=a.substring(e));return{replacedStr:i,newMatches:h}};f.fullPathNameByMeta=
function(a){var b=a.length,f="";if(b>0)for(b-=1;b>-1;b--)f=f+(f===""?"":"/")+a[b].Name;return f};f.path2FolderName=function(a,b,f){return a.substring(0,a.length-b.length-(f?0:1))};f._storeRecentSearch=function(a,b,f,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b);f&&window.setTimeout(function(){f.dispatchEvent({type:"inputDataListChanged",deleting:c})}.bind(this),20)})};f.addRecentSearch=function(a,b,c){typeof b==="string"&&b&&
a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var e,d=d.get("recentSearch");typeof d==="string"&&(d=JSON.parse(d));if(d){for(e in d)if(d[e].name===b)return;d.length>=20&&d.splice(19,d.length-20+1)}else d=[];d.splice(0,0,{name:b,regEx:c});f._storeRecentSearch(a,d)})};f.removeRecentSearch=function(a,b,c){typeof b==="string"&&b&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var e,d=d.get("recentSearch");typeof d===
"string"&&(d=JSON.parse(d));if(d)for(e in d)if(d[e].name===b){d.splice(e,1);f._storeRecentSearch(a,d,c,!0);break}})};f.getSearches=function(a,b,f){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&f&&f(a)})};f.getMixedSearches=function(a,b,c,d){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var e=a.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));b&&(a=
a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(c){var b=f.parseQueryStr(a.query);e.some(function(a){return b.searchStrTitle===a.name})||e.push({name:b.searchStrTitle,label:a.name})}else e.push({name:null,label:a.name,value:a.query})}));e&&d&&d(e)})};f.getOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");b(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?!0:!1:!1)})};
f.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})};return f});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(e,j,i,d,c,h){function b(b,a,g,c){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=c&&c.searchOnName;this._buildSkeletonOnly=c&&c.buildSkeletonOnly;this._fetchChildrenCallBack=c&&c.fetchChildrenCallBack;this._searchParams=g;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:d.generateSearchHelper(g);this._location=c&&c.location;this._childrenLocation=c&&c.childrenLocation?c.childrenLocation:this._location;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))}b.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._reportResult()}.bind(b),function(a){b._reportResult();b._statusService&&a.name==="Cancel"&&(console.log("Crawling search cancelled. Deferred array length : "+b._deferredArray.length),b._statusService.setProgressResult({Message:e["Search cancelled by user"],Severity:"Warning"}))}.bind(b))}.bind(this))};
b.prototype.searchName=function(b,a){if(b)this._searchParams=b,this.searchHelper=d.generateSearchHelper(b,!0);if(a)this.onSearchNameComplete=a;var g=[];this._cancelled=!1;this._deferredArray=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var c=0;c<this.fileSkeleton.length;c++){var e=this.fileSkeleton[c].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,e,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,e,!0))if(g.push(this.fileSkeleton[c]),
g.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:g.length,docs:g}})}else this.onSearchNameComplete({response:{numFound:0,docs:[]}})};b.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var g=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=[];var c=this;b();g.getContentTypes().then(function(b){c.contentTypesCache=b;c._visitRecursively(c._childrenLocation).then(function(){c._buildingSkeleton=!1;
a();c.searchHelper&&!c._buildSkeletonOnly&&c.searchName()})})};b.prototype._sort=function(b){b.sort(function(a,b){var f,c;if(this._searchParams.sort==="Path asc"){f=a.Location&&a.Location.toLowerCase();f=d.path2FolderName(f,a.Name&&a.Name.toLowerCase(),!0);c=b.Location&&b.Location.toLowerCase();c=d.path2FolderName(c,b.Name&&b.Name.toLowerCase(),!0);if(f<c)return-1;if(f>c)return 1}return this._sortOnNameSingle(a,b)}.bind(this))};b.prototype._reportResult=function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,
docs:this.fileLocations}})};b.prototype._sortOnNameSingle=function(b,a){var g=b.Name&&b.Name.toLowerCase(),c=a.Name&&a.Name.toLowerCase();return g<c?-1:g>c?1:0};b.prototype._onFileType=function(b){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===d.ALL_FILE_TYPE?!0:b.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};b.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 f=0;f<b.length;f++)if(b[f].Directory!==void 0&&b[f].Directory===!1)if(g._searchOnName)a.push(g._buildSingleSkeleton(b[f]));else if(g._buildSkeletonOnly)a.push(g._buildSingleSkeleton(b[f]));else{if(!g._cancelled){var d=c.getFilenameContentType(b[f].Name,g.contentTypesCache);if(d&&(d["extends"]==="text/plain"||d.id==="text/plain")&&g._onFileType(d))d=g._sniffSearch(b[f]),a.push(d),g._deferredArray.push(d)}}else if(b[f].Location)if(g._cancelled)break;
else d=g._visitRecursively(b[f].ChildrenLocation),a.push(d),g._deferredArray.push(d);return h.all(a)})};b.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)};b.prototype._reportSingleHit=function(b){if(!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)};b.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(b){b.cancel()})};b.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:i.formatMessage(e["${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(g){a._hitOnceWithinFile(g)&&a._reportSingleHit(b);a._statusService&&a._statusService.setProgressResult({Message:i.formatMessage(e["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)},e.Cancel)},function(a){a&&a.message&&a.message.toLowerCase()!=="cancel"&&console.error("Error loading file content: "+
a.message)})};b.prototype._buildSingleSkeleton=function(b){this._totalCounter++;this.fileSkeleton.push(b);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();b=new h;b.resolve(this._totalCounter);return b};b.prototype.constructor=b;return{SearchCrawler:b}});
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(e,j,i,d,c,h,b){function f(a){this._init(a)}f.prototype=new b.Dialog;f.prototype.TEMPLATE='<div role="search"><div><label id="fileNameMessage" for="fileName">${Type the name of a file to open (? = any character, * = any string):}</label></div><div><input id="fileName" type="text" class="setting-control" style="width:90%;"/></div><div id="progress" style="padding: 2px 0 0; width: 100%;"><img src="'+
d.toUrl("../../../images/progress_running.gif")+'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="results" style="max-height:250px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';f.prototype._init=function(a){this.title=a.title||e["Find File Named"];this.modal=!0;this.messages=e;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=new i.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;if(a.nameSearch!==void 0)this._nameSearch=a.nameSearch;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(e["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||
typeof this._searchRenderer.makeRenderFunction!=="function")throw Error(e["Missing required argument: searchRenderer"]);this._initialize()};f.prototype._bindToDom=function(a){var b=this;b.$crawlingProgress.style.display="none";this._nameSearch?this.$fileName.setAttribute("placeholder",e["FileName FolderName"]):this.$fileName.setAttribute("placeholder",e.Search);this.$fileName.addEventListener("input",function(){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 f=c.$("a",b.$results);if(f)c.stop(a),(h.isMac?a.metaKey:a.ctrlKey)?window.open(f.href):(window.location.href=f.href,b.hide())}},!1);a.addEventListener("keydown",function(a){var f,d,e;if(a.keyCode===c.KEY.DOWN||a.keyCode===c.KEY.UP)f=c.$$array("a",b.$results),d=document.activeElement,e=f.indexOf(d),a.keyCode===c.KEY.DOWN?e>=0?(d.classList.remove("treeIterationCursor"),f=e<f.length-1?f[e+1]:f[0],f.focus(),
f.classList.add("treeIterationCursor")):f.length>0&&(f=-1<f.length-1?f[0]:f[0],f.focus(),f.classList.add("treeIterationCursor")):e>=0?(d.classList.remove("treeIterationCursor"),d=b.$fileName,f=e>0?f[e-1]:d,f.focus(),e>0&&f.classList.add("treeIterationCursor")):f.length>0&&(f[f.length-1].focus(),f[f.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 j.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(e["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)));if(this._initialText)this.$fileName.value=this._initialText,this.doSearch()};f.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)};f.prototype._detectFolderKeyword=function(a){var b,f=a,c=null;if(this._nameSearch&&(b=/(\S+)\s*(.*)/,(a=b.exec(a))&&a.length===3))a[1]&&
(f=a[1]),a[2]&&(c=a[2]);return{keyword:f,folderKeyword:c}};f.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var b=this._detectFolderKeyword(a),f=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 i=document.createElement("div");i.appendChild(document.createTextNode(this._nameSearch?e["Searching..."]:h.formatMessage(e["Searching for occurrences of"],
a)));c.empty(this.$results);this.$results.appendChild(i);this._searcher.search(f,b.folderKeyword,function(){d===this.currentSearch&&d.apply(null,arguments)}.bind(this))}};f.prototype.decorateResult=function(a){function b(a){a.button===0&&!a.ctrlKey&&!a.metaKey&&f.hide()}for(var f=this,a=c.$$array("a",a),d=0;d<a.length;d++)a[d].addEventListener("click",b,!1)};f.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};f.prototype._afterHiding=function(){this._onHide&&this._onHide()};f.prototype.constructor=
f;return{OpenResourceDialog:f}});define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner">\n\t<\!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\>\n\n\t<div id="staticBanner" class="layoutBlock topRowBanner"> <\!-- primaryNav --\>\n\t\t<div id="centralNavigationArea" style="position:absolute;left:0;top:0;width:39px;height:36px; z-index:1;border-right:1px solid #ddd;"></div>\n\n\t\t<\!-- Static "Home" link. TODO delete this --\>\n\t\t<a id="home" class="layoutLeft "></a>\n\n\t\t<\!-- Left banner component: hamburger --\>\n\t\t<nav id="primaryNav" class="bannerLeftArea" style="z-index:2;" role="navigation">\n\t\t\t\t<button class="centralNavigation commandSprite core-sprite-hamburger" type="button"id="centralNavigation"></button>\n\t\t</nav>\n\n\t\t<\!-- Middle banner component: Breadcrumb bar --\>\n\t\t<div class="clear navigationBreadcrumb bannerMiddleArea" >\n\t\t\t<div id="location" class="currentLocation"></div>\n\t\t</div>\n\n\t\t<\!-- Right banner component: user identity --\>\n\t\t<div class="bannerRightArea" style="z-index:2;">\n\t\t\t<\!-- Global commands support. --\>\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\n\t\t\t<\!-- Search. TODO delete this --\>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search" style="display:none;">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;display:none;"></div>\n\n\t\t\t<\!-- User identity menu and Progress --\>\n\t\t\t<div id="userMenu" class="spacingRight layoutRight" style="color:#ccc;line-height:16px;">\n\t\t\t\t<div style="position: absolute;right: 0px;top:0;width: 39px;height:36px; z-index:-50;border-left: 1px solid #ddd;"></div>\n\n\t\t\t\t<\!-- Progress indicator --\>\n\t\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\n\t\t\t\t<\!-- User identity menu --\>\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger" style="z-index:2;">\n\t\t\t\t</span>\n\t\t\t\t<ul id="userDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<\!-- IDE notification messages go in here --\>\n\t<div id="notificationArea" class="notificationHide">\n\t\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t\t<div class="layoutRight"><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" type="button" id="closeNotifications"></span></div>\n\t</div>\n</header>'});
define("text!orion/banner/footer.html",[],function(){return'<\!--\n<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<div class="logoFooter commandSprite core-sprite-orion-logo"></div>\n\t<div class="footerBlock">${Orion is in Beta. Please try it out but BEWARE your data may be lost.}</div>\n\t<div class="footerRightBlock">\n\t\t<ul>\n\t\t\t<li><a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=5.0" target="_blank">${Report a Bug}</a>\n\t\t\t<li><a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a></li>\n\t\t</ul>\n\t</div>\n</footer>\n--\>'});
define("text!orion/banner/toolbar.html",[],function(){return'<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>\n<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>\n<ul class="layoutLeft commandList pageActions" id="navActions"></ul>\n<div class="layoutLeft" style="padding-left:7px;padding-right:7px;margin-top:2px;" id="filterBox" style="visibility: hidden;"></div>\n<ul class="layoutRight commandList pageActions" id="settingsActions"></ul>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>'});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(e,j){function i(d,c,e){if(d=j.node(d))this._parent=d;else throw Error("Parent node of dropdown menu not found");this.options=e=e||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=e.selectionClass;d=document.createElement("div");d.classList.add("dropDownContainer");d.id=this.navDropDownId;d.style.display="none";this._parent.appendChild(d);this._dropdownMenu=d;if(c=j.node(c))this._triggerNode=
c;else throw"Trigger node of dropdown menu not found";if(this._triggerNode.style.visibility==="hidden")this._triggerNode.style.visibility="visible";if(!e.noClick)this._triggerNode.onclick=this.click.bind(this);this._dropdownMenu.addEventListener("keydown",function(b){b.keyCode===j.KEY.ESCAPE&&this.clearPanel()}.bind(this))}e.mixin(i.prototype,{click:function(){this._dropdownMenu.style.display==="none"?this.updateContent(this.getContentNode(),function(){j.setFramesEnabled(!1);this._dropdownMenu.style.display=
"";this._positionDropdown();this.selectionClass&&this._triggerNode.classList.add(this.selectionClass);this.handle=j.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",j.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=j.bounds(this._dropdownMenu),c=j.bounds(document.body);if(d.left+d.width>c.left+c.width)d=j.bounds(this._boundingNode(this._triggerNode)),c=j.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 c===null?d:c.getPropertyValue("position")==="absolute"||!d.parentNode||d===document.body?d:this._boundingNode(d.parentNode)},isDestroyed:function(){return!this._dropdownMenu.parentNode},isVisible:function(){return this._dropdownMenu.style.display!=="none"&&!this.isDestroyed()},focus:function(){this._dropdownMenu.focus()},destroy:function(){if(this._parent)j.setFramesEnabled(!0),j.empty(this._parent),this._parent=this.select=null}});return i});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",
"Import local file...":"File System","Copy files and folders from your local file system":"Copy files and folders 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:","Copy a file from a URL and optionally unzip it":"Copy 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}?",NoFile:"Use the ${0} menu to create new files and folders. Click a file to start coding."});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(e,j){var i={root:j};Object.keys(e).forEach(function(d){typeof i[d]==="undefined"&&(i[d]=e[d])});return i});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(e,j,i){function d(b,f,a){if(!b[f])throw f+e[" is not supported in this file system"];return b[f].apply(b,a)}function c(b,f,a,g){if(!b.readBlob)throw e["source file service does not support binary read"];if(!a.writeBlob)throw e["target file service does not support binary write"];if(f[f.length-1]!=="/")return d(b,"readBlob",[f]).then(function(b){return d(a,"writeBlob",[g,b])});var k=g.substring(0,
g.length-1),i=decodeURIComponent(k.substring(k.lastIndexOf("/")+1)),k=k.substring(0,k.lastIndexOf("/")+1);return d(a,"createFolder",[k,i]).then(function(){},function(){}).then(function(){return d(b,"fetchChildren",[f]).then(function(f){for(var d=[],e=0;e<f.length;++e){var k=f[e].Location,i=k;f[e].Directory&&(i=k.substring(0,k.length-1));i=decodeURIComponent(i.substring(i.lastIndexOf("/")+1));i=g+encodeURIComponent(i);f[e].Directory&&(i+="/");d[e]=c(b,k,a,i)}return j.all(d)})})}function h(b,f){function a(a){var b=
new j;b.reject(e["No Matching FileService for location:"]+a);return b}var c=b.getServiceReferences("orion.core.file"),d=c;if(f)for(var d=[],h=0;h<c.length;++h)f(c[h])&&d.push(c[h]);for(var n=[],p=[],o=[],u=[],t={fetchChildren:function(){var a=new j;a.resolve(u);return a},createWorkspace:function(){var a=new j;a.reject(e["no file service"]);return a},loadWorkspaces:function(){var a=new j;a.reject(e["no file service"]);return a},loadWorkspace:function(){var a=new j;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:e["File Servers"],Location:"/",Children:u,ChildrenLocation:"/"})},100);return a},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},c=0;c<d.length;++c)u[c]={Directory:!0,Length:0,LocalTimeStamp:0,Location:d[c].getProperty("top"),ChildrenLocation:d[c].getProperty("top"),Name:d[c].getProperty("Name")},h=d[c].getProperty("pattern")||d[c].getProperty("top").replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),h[0]!=="^"&&(h=
"^"+h),n[c]=RegExp(h),p[c]=b.getService(d[c]),o[c]=d[c].getProperty("Name"),d[c].getProperty("NameKey")&&d[c].getProperty("nls")&&i.getMessageBundle(d[c].getProperty("nls")).then(function(a,b){u[a].Name=b[d[a].getProperty("NameKey")];o[a]=b[d[a].getProperty("NameKey")]}.bind(this,c));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return p[0]?0:-1;for(var b=0;b<n.length;++b)if(n[b].test(a))return b;throw e["No Matching FileService for location:"]+a;};this._getService=
function(a){a=this._getServiceIndex(a);return a===-1?t:p[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return a===-1?t.Name:o[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?t.Location:u[a].Location}}h.prototype={getService:function(b){return this._getService(b)},fileServiceName:function(b){return this._getServiceName(b)},fileServiceRootURL:function(b){return this._getServiceRootURL(b)},fetchChildren:function(b){return d(this._getService(b),"fetchChildren",
arguments)},createWorkspace:function(b){return d(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return d(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(b){return d(this._getService(b),"loadWorkspace",arguments)},createProject:function(b,f,a,c){return d(this._getService(b),"createProject",arguments)},createFolder:function(b,f){return d(this._getService(b),"createFolder",arguments)},createFile:function(b,f){return d(this._getService(b),"createFile",
arguments)},deleteFile:function(b){return d(this._getService(b),"deleteFile",arguments)},moveFile:function(b,f,a){var g=this._getService(b),e=this._getService(f);if(g===e)return d(g,"moveFile",arguments);var i=b[b.length-1]==="/",h=f;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var j=b;i&&(j=j.substring(0,j.length-1));h+=j.substring(j.lastIndexOf("/")+1)}i&&h[h.length-1]!=="/"&&(h+="/");return c(g,b,e,h).then(function(){return d(g,"deleteFile",[b])})},copyFile:function(b,f,a){var g=
this._getService(b),e=this._getService(f);if(g===e)return d(g,"copyFile",arguments);var i=b[b.length-1]==="/",h=f;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var j=b;i&&(j=j.substring(0,j.length-1));h+=j.substring(j.lastIndexOf("/")+1)}i&&h[h.length-1]!=="/"&&(h+="/");return c(g,b,e,h)},read:function(b,f){return d(this._getService(b),"read",arguments)},readBlob:function(b){return d(this._getService(b),"readBlob",arguments)},write:function(b,f,a){return d(this._getService(b),"write",
arguments)},remoteImport:function(b,f){return d(this._getService(b),"remoteImport",arguments)},remoteExport:function(b,f){return d(this._getService(b),"remoteExport",arguments)},search:function(b){return d(this._getService(b.resource),"search",arguments)}};h.prototype.constructor=h;return{FileClient:h}});
define("orion/webui/SideMenu","orion/commands,orion/objects,orion/webui/littlelib,orion/PageLinks,orion/PageUtil,orion/URITemplate,orion/URL-shim,orion/util".split(","),function(e,j,i,d,c,h,b,f){function a(a,b){this.parentNode=i.node(a);this.contentNode=i.node(b);if(!this.parentNode)throw Error("Missing parentNode");this.menuitems=Object.create(null);this.categories=this.links=null;this.anchor=document.createElement("ul");this.anchor.classList.add("sideMenuList");this.parentNode.appendChild(this.anchor);
this.anchor.addEventListener("click",this._handleEvent.bind(this));this.anchor.addEventListener("touchstart",this._handleEvent.bind(this));this.anchor.addEventListener("focus",this._handleEvent.bind(this),!0);i.addAutoDismiss([this.anchor],this._expandMenu.bind(this,null))}function g(a){return!a.isRelatedLink}function k(a,b){var f=a.order,c=b.order;if(f<c)return-1;else if(c<f)return 1;return 0}function l(a,b){var f=a.source.order,c=b.source.order,f=typeof f==="number"?f:100,c=typeof c==="number"?
c:100;return f===c?a.textContent.localeCompare(b.textContent):f<c?-1:1}var n=f.isTouch;j.mixin(a.prototype,{LOCAL_STORAGE_NAME:"sideMenuNavigation",OPEN_STATE:"open",CLOSED_STATE:"closed",DEFAULT_STATE:"open",SIDE_MENU_OPEN_WIDTH:"40px",TRANSITION_DURATION_MS:301,addMenuItem:function(a,b,f){var c=this.anchor,a=this.createListItem(a,b);f&&a.classList.add("sideMenuItemActive");c.appendChild(a);this.menuitems[b]=a},setSideMenu:function(){var a=this.getDisplayState(),b=this.parentNode;if(b){if(a===this.CLOSED_STATE){this.setPageContentLeft("0");
if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){b.style.display="none"},this.TRANSITION_DURATION_MS);b.classList.add("animating")}if(a===this.OPEN_STATE){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;b.classList.remove("animating");b.style.display="block";b.style.width=this.SIDE_MENU_OPEN_WIDTH;this.setPageContentLeft(this.SIDE_MENU_OPEN_WIDTH)}}},setPageContentLeft:function(a){var b=this.contentNode;if(b)b.style.left=
a},toggleSideMenu:function(){var a=this.getDisplayState(),b=this.contentNode;b&&b.classList.add("content-fixedHeight-animation");a=a===this.OPEN_STATE?this.CLOSED_STATE:this.OPEN_STATE;a===this.DEFAULT_STATE?localStorage.removeItem(this.LOCAL_STORAGE_NAME):localStorage.setItem(this.LOCAL_STORAGE_NAME,a);this.setSideMenu()},clearMenuItems:function(){this.menuitems=[];i.empty(this.anchor)},getMenuItems:function(){var a=this.menuitems;return Object.keys(a).map(function(b){return a[b]})},getMenuItem:function(a){return this.menuitems[a]},
getDisplayState:function(){var a=localStorage.getItem(this.LOCAL_STORAGE_NAME);if(!a)a=this.DEFAULT_STATE;return a},createListItem:function(a,b){var f=document.createElement("li");f.className=a;f.classList.add("sideMenuItem");f.categoryId=b;return f},setCategories:function(a){this.categories=a;this.links=Object.create(null)},setPageLinks:function(a){this.pageLinks=a;var b=this,f=a.createLinkElements();a.getAllLinks().forEach(function(a,c){var d=f[c];d.source=a;b._getLinksBin(a.category).push(d)});
this._renderLinks()},setRelatedLinks:function(a,b){this.relatedLinks=a;var f=this;Object.keys(this.links).forEach(function(a){var b=f._getLinksBin(a);f.links[a]=b.filter(g)});var c=document.createDocumentFragment();a.forEach(function(a){var b=a.relatedLink,d=f._getLinksBin(b.category),a=e.createCommandMenuItem(c,a.command,a.invocation);a.classList.remove("dropdownMenuItem");a.isRelatedLink=!0;a.source=b;d.push(a)});this._renderLinks(b)},_getLinksBin:function(a){if(a){var b=this.links;b[a]=b[a]||[];
return b[a]}else return[]},_sort:function(){var a=this.links;Object.keys(a).forEach(function(b){a[b].sort(l)})},_renderCategories:function(){var a=this.categories,b=this,f=new URL(window.location.href),g=c.matchResourceParameters();g.OrionHome=d.getOrionHome();var e=!1;this.clearMenuItems();a.getCategoryIDs().map(function(b){return a.getCategory(b)}).sort(k).forEach(function(a){var c=b._getLinksBin(a.id);c.length&&(e?b.addMenuItem(a.imageClass,a.id,!1):(c=c.some(function(a){if(!a.source.uriTemplate)return!1;
a=new h(a.source.uriTemplate);a=new URL(a.expand(g),window.location);return a.protocol===f.protocol&&a.host===f.host&&a.hostname===f.hostname&&a.port===f.port&&a.pathname===f.pathname&&a.search===f.search?e=!0:!1}),b.addMenuItem(a.imageClass,a.id,c)))})},_renderLinks:function(a){a=a||[];this._sort();this._renderCategories();var b=this,f=window.location.href;Object.keys(this.menuitems).forEach(function(c){var d=b.getMenuItem(c);if(d){for(var g=b._getLinksBin(c).slice(),g=g.filter(function(b){var c=
b.source;return a.indexOf(c.id)>=0||!c.default&&!c.force&&b.href===f?!1:!0}),g=g.filter(function(a){a=a.source;return!(g.length>1&&a.default&&!a.force)}),e=g.length-1;e>0;e--)g[e].href===g[e-1].href&&g.splice(e,1);if(g.length){d.appendChild(b._createCategoryElement(c,d,g[0]));var k=document.createElement("ul");k.className="sideMenuSubMenu";g.forEach(function(a){var b=document.createElement("li");b.className="sideMenuSubMenuItem";var f=document.createElement("a");f.href=a;f.className="sideMenuSubMenuItemLink";
var c=document.createElement("span");c.innerHTML=a.innerHTML;c.className="sideMenuSubMenuItemSpan";f.appendChild(c);b.appendChild(f);k.appendChild(b)});d.appendChild(k)}}})},_createCategoryElement:function(a,b,f){var a=this.categories.getCategory(a),c;n?(c=document.createElement("button"),c.type="button"):(c=document.createElement("a"),c.href=f.href);c.className+=a.imageClass;c.classList.add("submenu-trigger");c.tabIndex="0";b.classList.remove(a.imageClass);return c},_handleEvent:function(a){var b=
a.target,a=a.type==="focus";if(b.tagName!=="A"||a)b.classList.contains("submenu-trigger")&&(n||a)&&this._expandMenu(i.$(".sideMenuSubMenu",b.parentNode))},_expandMenu:function(a){this.getMenuItems().forEach(function(b){b=i.$(".sideMenuSubMenu",b);a!==b&&b.classList.remove("expanded")});a&&a.classList.toggle("expanded")}});return a});
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(e,
j,i,d,c,h,b,f,a,g,k,l,n,p,o,u,t,w,v,y,C,z,s,m,r,q,D,x,B,A,F,E,G,L,I){var S,Q,M,H,P,J,N,V;function ea(a,b){if(a.getLabel)return a.getLabel();else{var f=new s;f.resolve(b.properties.name);return f}}function ga(a){n.node("progressPane").setAttribute("aria-label",e["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function fa(a,b){var f=a.getServiceReferences("orion.core.auth");ba=[];var c=S.apply(this,arguments);if(c)for(var d=
0;d<f.length;d++){var g=f[d],e=a.getService(g);ea(e,g).then(function(a){e.getKey().then(function(b){ba.push(b);e.getUser().then(function(f){c.addUserItem(b,e,a,f)},function(f,d){c.addUserItem(b,e,a,d)});window.addEventListener("storage",function(){aa[b]!==localStorage.getItem(b)&&(aa[b]=localStorage.getItem(b),e.getUser().then(function(f){c.addUserItem(b,e,a,f)},function(){c.addUserItem(b,e,a)}))},!1)})})}}function W(a){return a}function X(f,c,d,g,e){function k(a){for(var b={},f=a.getPropertyKeys(),
c,d=0;d<f.length;d++)c=f[d],b[c]=a.getProperty(c);return b}function i(a,b){var f=null;a.some(function(a){return b===a.getProperty("id")?!!(f=a):!1});return f}function h(a){var f=a.command;if(!f.visibleWhen||f.visibleWhen(c))return a.invocation=new b.CommandInvocation(c,c,null,f,g),(new s).resolve(a);else if(typeof e==="function")return p||(p=e()),s.when(p,function(d){if(d&&c===ca&&(!f.visibleWhen||f.visibleWhen(d)))return a.invocation=new b.CommandInvocation(d,d,null,f,g),a});return(new s).resolve()}
function l(a,f,c){return c?(new s).resolve({relatedLink:a,command:c}):f.then(function(f){return{relatedLink:a,command:new b.Command(f)}})}var j=arguments,n,p,G=f&&f.getServiceReferences("orion.page.link.related");if(G&&G.length!==0){var m=this;s.when(function(){if(n)return n;var a=f.getService("orion.core.contentTypeRegistry");a||(a=new t.ContentTypeRegistry(f),a=f.getService("orion.core.contentTypeRegistry"));return a.getContentTypes().then(function(a){return n=a})}(),function(){if(Q.apply(m,j)){var b=
f.getServiceReferences("orion.navigate.command"),c=[];G.forEach(function(d){var e=k(d);if(e.id){var h;if((e.nls&&e.nameKey||e.name)&&e.uriTemplate)h=a._createCommandOptions(e,d,f,n,!0),c.push(l(e,h,null));else if(h=i(b,e.id)){var j=k(h),d={};I.mixin(d,j,e);(e=g.findCommand(e.id))?c.push(l(d,null,e)):(h=a._createCommandOptions(j,h,f,n,!0),c.push(l(d,h,null)))}}});s.all(c,W).then(function(a){a.sort(function(a,b){return a.command.name.localeCompare(b.command.name)});return s.all(a.map(h),W).then(function(b){var f=
[],b=b.filter(function(b,c){if(b)return!0;f.push(a[c]);return!1});M.call(m,g,b,f,d);H.apply(m,j)})})}})}}function ha(a){var b=n.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function Y(a){var b=window.getComputedStyle(a,null);return b===null?a:b.getPropertyValue("position")==="absolute"||!a.parentNode||a===document.body?a:Y(a.parentNode)}function Z(a){var b={},f=null;typeof a==="string"&&(a=n.node(a));a||(a=n.node("pageActions"));for(var c=a;c&&c.classList;){if(c.classList.contains("toolComposite")){f=
c;break}c=c.parentNode}if(a.classList.contains("commandMarker"))b.commandNode=a;if(f&&(b.slideContainer=n.$(".slideParameters",f),b.parameterArea=n.$(".parameters",f),b.dismissArea=n.$(".parametersDismiss",f),b.notifications=n.$("#notificationArea",f),f.parentNode&&(b.toolbarTarget=n.$(".toolbarTarget",f.parentNode),b.toolbarTarget)))a=n.bounds(b.toolbarTarget),c=n.bounds(Y(b.toolbarTarget.parentNode)),b.toolbarTargetY=a.top-c.top,b.toolbar=f;return b}function $(a){if(a=a.slideContainer)if(a.style.left=
"",a.style.top="",a.classList.contains("slideContainerActive")){var b=n.bounds(a),f=n.bounds(a.parentNode);a.style.left=(f.width-b.width)/2+"px";a.style.top="0"}}var h=function(a){var b=document.createElement("a");b.href=a;return b.href}(j.toUrl("auth/NotifyAuthentication.html")),aa={},O=null;S=E.createMenuGenerator||function(a,b){if(n.node("userMenu")){var f=n.node("userDropdown"),c=new o.Dropdown({dropdown:f}),f=new m.UserMenu({dropdownNode:f,dropdown:c,serviceRegistry:a}),c=n.node("userTrigger");
new u.Tooltip({node:c,text:e.Options,position:["below","left"]});var c=document.getElementById("userTrigger"),d=c.className;d+=" imageSprite core-sprite-silhouette";c.className=d;f.setKeyAssist(b);return f}};Q=E.beforeGenerateRelatedLinks||function(){return!0};M=E.addRelatedLinkCommands||function(a,b,f,c){this.sideMenu&&this.sideMenu.setRelatedLinks(b,c)};H=E.afterGenerateRelatedLinks||function(){};P=E.afterSetPageTarget||function(){};J=E.generateNavigationMenu||function(){var a=n.node("sideMenu");
if(a){var b=n.node("centralNavigation");new u.Tooltip({node:b,text:e.CentralNavTooltip,position:["right"]});O=this.sideMenu=new L(a,n.node("pageContent"));b.addEventListener("click",O.toggleSideMenu.bind(O));(a=n.node("sideMenuToggle"))&&a.addEventListener("click",O.toggleSideMenu.bind(O))}};N=E.afterGenerateNavigationMenu||function(){};V=E.afterGenerateBanner||function(){};var ba=[],ca,U=[],K,T=null,R=null,da=new c;return{generateBanner:function(a,c,g,k,h,l,M,G){function m(a){a.registerService("orion.cm.managedservice",
{updated:function(a){for(var a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=n.$$array(".targetSelector"),f=0;f<b.length;f++)b[f].target=a}},{pid:"nav.config"})}(new C.ThemePreferences(k,new z.ThemeData)).apply();var o=n.node(a);if(!o)throw e["could not find banner parent, id was "]+a;var H=document.createRange();H.selectNode(o);H=H.createContextualFragment(D);n.processTextNodes(H,e);o.firstChild?o.insertBefore(H,o.firstChild):o.appendChild(H);o=n.node("home");o.href=
j.toUrl("edit/edit.html");o.setAttribute("aria-label",e["Orion Home"]);n.node("progressPane").src=b.NO_IMAGE;if(o=n.node("pageToolbar"))o.classList.add("toolbarLayout"),o.innerHTML=B+i.slideoutHTMLFragment("mainToolbar");(o=n.node("closeNotifications"))&&o.setAttribute("aria-label",e["Close notification"]);if(F.isFirefox<=17&&(o=n.node("staticBanner")))o.style.width="100%",o.style.MozBoxSizing="border-box";if(o=n.node("footer"))o.innerHTML=x,n.processTextNodes(o,e);g.setParameterCollector(new f.CommandParameterCollector(Z,
$));document.addEventListener("keydown",function(a){a.keyCode===n.KEY.ESCAPE&&(a=c.getService("orion.page.message"))&&a.setProgressMessage("")},!1);J.apply(this,arguments);N.apply(this,arguments);o=r.getCategoriesInfo(c);H=r.getPageLinksInfo(c,"orion.page.link");s.all([o,H]).then(function(a){if(O){var b=a[1];O.setCategories(a[0]);O.setPageLinks(b);O.setSideMenu()}});if(o=n.$(".split")){var H=n.$(".sidePanelLayout"),u=n.$(".mainPanelLayout");if(H&&u)T={side:H,main:u},T.splitter=new p.Splitter({node:o,
sidePanel:H,mainPanel:u,toggle:!0,closeByDefault:G}),o=new b.Command({name:e["Toggle side panel"],tooltip:e["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){T.splitter.toggleSidePanel()}}),g.addCommand(o),g.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new d.KeyBinding("l",F.isMac?!1:!0,!0,!1,F.isMac?!0:!1))}var L=!1,t=function(a,b){if(!L){var f=b.getService("orion.page.progress"),c=new q.OpenResourceDialog({searcher:a,progress:f,searchRenderer:a.defaultRenderer,
onHide:function(){L=!1}});window.setTimeout(function(){L=!0;c.show()},0)}},o=new b.Command({name:e["Find File Named..."],tooltip:e["Choose a file by name and open an editor on it"],id:"orion.openResource",callback:function(){t(h,c)}});g.addCommand(o);g.registerCommandContribution("globalActions","orion.openResource",100,null,!0,new d.KeyBinding("f",!0,!0));o=new b.Command({name:e["Toggle banner and footer"],tooltip:e["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=
n.node("banner"),b=n.node("footer"),f=n.node("sideMenu"),c=n.$(".content-fixedHeight"),d=a.style.visibility==="hidden";d?(a.style.visibility="visible",b.style.visibility="visible",c.classList.remove("content-fixedHeight-maximized"),f&&f.classList.remove("sideMenu-maximized")):(a.style.visibility="hidden",b.style.visibility="hidden",c.classList.add("content-fixedHeight-maximized"),f&&f.classList.add("sideMenu-maximized"));da.dispatchEvent({type:"toggleTrim",maximized:!d});return!0}});g.addCommand(o);
g.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new d.KeyBinding("m",!0,!0));o=new b.Command({name:e["System Configuration Details"],tooltip:e["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return j.toUrl("help/about.html")}});g.addCommand(o);g.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new d.KeyBinding(112,!0,!0));o=new b.Command({name:e["Background Operations"],tooltip:e["Background Operations Tooltip"],
id:"orion.backgroundOperations",hrefCallback:function(){return j.toUrl("operations/list.html")}});g.addCommand(o);g.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new d.KeyBinding("o",!0,!0));R=new v.KeyAssistPanel({commandRegistry:g});o=new b.Command({name:e["Show Keys"],tooltip:e["Show a list of all the keybindings on this page"],id:"orion.keyAssist",callback:function(){R.isVisible()?R.hide():R.show();return!0}});g.addCommand(o);g.registerCommandContribution("globalActions",
"orion.keyAssist",100,null,!0,new d.KeyBinding(191,!1,!0));ha(g);fa(c,o.callback);ga(c);window.addEventListener("hashchange",function(){g.processURL(window.location.href)},!1);window.setTimeout(function(){m(c)},0);V.apply(this,arguments)},getToolbarElements:Z,getMainSplitter:function(){return T},getKeyAssist:function(){return R},getGlobalEventTarget:function(){return da},layoutToolbarElements:$,setPageTarget:function(a){var b,f,c=a.breadcrumbRootName,d=a.serviceRegistry;a.target?(a.searchService&&
a.searchService.setLocationByMetaData(a.target),a.fileService&&!a.breadcrumbTarget&&(f=c?c+" ":"",f+=a.fileService.fileServiceName(a.target.Location),c=null),b=a.name||a.target.Name,ca=a.target,X.call(this,d,a.target,U,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(c=c||a.task||a.name),b=a.name,X.call(this,d,{NoTarget:""},U,a.commandService,a.makeAlternate));(K=a.title)||(K=b?b+" - "+a.task:a.task);window.document.title=K;P.apply(this,arguments);if(b=a.breadCrumbContainer?n.node(a.breadCrumbContainer):
n.node("location")){n.empty(b);var g=d&&new G.FileClient(d),d=a.breadcrumbTarget||a.target,g=g&&d&&d.Location?g.fileServiceRootURL(d.Location):null;new l.BreadCrumbs({container:b,resource:d,rootSegmentName:c,workspaceRootSegmentName:f,workspaceRootURL:g,makeFinalHref:a.makeBreadcrumFinalLink,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){if(K)K.charAt(0)==="*"&&!a&&(K=K.substring(1)),a&&K.charAt(0)!=="*"&&(K="*"+K),window.document.title=K;var b=n.node("dirty");if(b)b.textContent=
a?"*":""},setPageCommandExclusions:function(a){U=a},notifyAuthenticationSite:h}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(e){return{detectValidURL:function(j){for(var i=/\[([^\]]*)\]\(([^\)]+)\)/g,d=i.exec(j),c=[],h=0;d;){if(d.length===3&&d[2].length>0){var b=new URL(d[2]);b.protocol!==":"&&e.validateURLScheme(b.href)&&(d.index>h&&c.push({segmentStr:j.substring(h,d.index)}),c.push({segmentStr:d[1].length>0?d[1]:d[2],urlStr:d[2]}),h=d.index+d[0].length)}d=i.exec(j)}if(h===0)return null;h<j.length-1&&c.push({segmentStr:j.substring(h)});return c},processURLSegments:function(e,
i){i.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;e.appendChild(c)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(e,j,i,d){function c(b,f,a,c,d){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.message",this);this._operationsClient=f;this.notificationContainerDomId=d;this.domId=a;this.progressDomId=c||a;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var h;c.prototype={_init:function(){var b=j.node("closeNotifications");if(b&&
!this._hookedClose){b.style.cursor="pointer";this._hookedClose=!0;var f=j.node(this.notificationContainerDomId);j.addAutoDismiss([f],function(){this._clickToDisMiss&&this.close()}.bind(this));b.addEventListener("click",function(){this.close()}.bind(this));f.addEventListener("click",function(a){a&&a.target&&a.target.nodeName.toLowerCase()==="a"&&(a=j.$$("a",f))&&a.length&&a.length===1&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);var b=j.node("closeNotifications");
this._cancelMsg&&this._cancelFunc&&b?(b.innerHTML="",b.classList.remove("cancelButton"),b.classList.add("dismissButton"),b.classList.add("core-sprite-close"),b.classList.add("imageSprite"),this._cancelFunc(),this._cancelMsg=null):this.setProgressMessage("")},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=i.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(b,f,a){this._init();this.currentMessage=b;var c=j.node(this.domId);
if(typeof a==="boolean"){var d=c.getAttribute("aria-live");c.setAttribute("aria-live",a?"polite":"off");window.setTimeout(function(){b===this.currentMessage&&(j.empty(c),c.appendChild(document.createTextNode(b)),window.setTimeout(function(){c.setAttribute("aria-live",d)},100))}.bind(this),100)}else j.empty(c),c.appendChild(document.createTextNode(b));typeof f==="number"&&window.setTimeout(function(){b===this.currentMessage&&(j.empty(c),c.appendChild(document.createTextNode("")))}.bind(this),f)},setErrorMessage:function(b){this._clickToDisMiss=
!0;this.currentMessage=b;this._init();var f=b.responseText||b.message||b;if(typeof f==="string")try{f=JSON.parse(f)}catch(a){}var b=f.Message||f,c="red";if(f.Severity)switch(f.Severity){case "Warning":c="#FFCC00";break;case "Error":c="red";break;case "Info":case "Ok":c="green"}f=document.createElement("span");f.style.color=c;f.appendChild(document.createTextNode(b));b=j.node(this.domId);j.empty(b);b.appendChild(f)},setProgressMessage:function(b){this._clickToDisMiss=!1;this._init();this.currentMessage=
b;var f=document.createElement("span");f.classList.add("progressIcon");var a=j.node(this.progressDomId);j.empty(a);a.appendChild(f);a.appendChild(document.createTextNode(b));f=j.node(this.notificationContainerDomId);f.classList.remove("notificationHide");if(b&&b.length>0)f.classList.add("progressNormal"),f.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else f.classList.remove("notificationShow"),f.classList.add("notificationHide")},
setCancelFunction:function(b){this._cancelFunc=b},setProgressResult:function(b,f){this._clickToDisMiss=!1;this._cancelMsg=f;this.currentMessage=b;var a=b.responseText||b;if(typeof a==="string")try{a=JSON.parse(a)}catch(c){}this._init();var k=a.Message||a.toString(),i=e.UnknownError,h="core-sprite-information",p="progressNormal",o=document.createElement("span");o.classList.add("imageSprite");o.classList.add("progressIcon");var u=[];if(a.Severity)switch(a.Severity){case "Warning":i=e.UnknownWarning;
h="core-sprite-warning";p="progressWarning";u.push("progressInfo");u.push("progressError");u.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":h="core-sprite-error";p="progressError";u.push("progressWarning");u.push("progressInfo");u.push("progressNormal");this._clickToDisMiss=!0;break;default:p="progressNormal",u.push("progressWarning"),u.push("progressError"),u.push("progressNormal")}u.push("notificationHide");o.classList.add(h);var t=j.node(this.progressDomId),h=j.node(this.notificationContainerDomId);
j.empty(t);t.appendChild(o);k===Object.prototype.toString()&&(k=i);if(a.HTML)a=document.createElement("span"),a.innerHTML=k,t.appendChild(a);else{if(i=d.detectValidURL(k))k=document.createDocumentFragment(),d.processURLSegments(k,i),Array.prototype.forEach.call(j.$$("a",k),function(a){a.target="_blank"});else{if(a.Severity!=="Warning"&&a.Severity!=="Error"&&!f)this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),
5E3);k=document.createTextNode(k)}t.appendChild(k)}if(p&&this.progressDomId!==this.domId){h.classList.add(p);for(p=0;p<u.length;p++)h.classList.remove(u[p])}h.classList.add("notificationShow");if(u=j.node("closeNotifications"))this._cancelMsg?(u.classList.add("cancelButton"),u.classList.remove("dismissButton"),u.classList.remove("core-sprite-close"),u.classList.remove("imageSprite"),u.innerHTML=this._cancelMsg):(u.innerHTML="",u.classList.remove("cancelButton"),u.classList.add("dismissButton"),u.classList.add("core-sprite-close"),
u.classList.add("imageSprite"))},showWhile:function(b,f){var a=this;if(f){a.setProgressMessage(f);var c=function(){f===a.currentMessage&&a.setProgressMessage("")};b.then(c,c)}return b},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(b,f){return new h(this,++this._lastProgressId,b,f)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var b="",f=!0,a;for(a in this._progressMonitors)this._progressMonitors[a].status&&(f||(b+=", "),b+=this._progressMonitors[a].status,
f=!1);this.setProgressMessage(b)}else this.setProgressMessage("")},_beginProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._renderOngoingMonitors()},_doneProgressMonitor:function(b){delete this._progressMonitors[b.progressId];this._progressMonitors.length--;b.status?this.setProgressResult(b.status):this._renderOngoingMonitors()}};c.prototype.constructor=
c;h=function(b,f,a,c){this.statusService=b;this.progressId=f;if(a){this.deferred=a;this.begin(c);var d=this;a.then(function(){d.done.bind(d)()},function(){d.done.bind(d)()})}};h.prototype.begin=function(b){this.status=b;this.statusService._beginProgressMonitor(this)};h.prototype.done=function(b){this.status=b;this.statusService._doneProgressMonitor(this)};h.prototype.worked=function(b){this.status=b;this.statusService._workedProgressMonitor(this)};h.prototype.constructor=h;return{StatusReportingService:c,
ProgressMonitor:h}});
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(e,j){var i={root:j};Object.keys(e).forEach(function(d){typeof i[d]==="undefined"&&(i[d]=e[d])});return i});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(e,j,i,d){function c(){}c.prototype={_initialize:function(c,b,f,a,g){this._tooltip=new d.Tooltip({node:c,hideDelay:g||0,afterShowing:this._afterShowingFunction(b).bind(this),afterHiding:f,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&&i.processTextNodes(c,e);this.$parent.appendChild(c);var k=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===i.KEY.ESCAPE&&k.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(c){for(var b=0;b<c.childNodes.length;b++){var f=c.childNodes[b];f.id&&(this["$"+f.id]=f);this._bindElements(f)}},_afterShowingFunction:function(c){return function(){c&&c.bind(this)();if(!this.customFocus){var b=
i.firstTabbable(this.$parent);b&&b.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(e,j,i,d){var c={};(function(){var h=!1;c.updateNavTools=function(b,f,a,c,d,j){var n=i.node(c);if(n)f.destroy(n);else throw e["could not find toolbar "]+c;f.renderCommands(c,n,j,a,"button");if(d&&(c=i.node(d)))f.destroy(c),f.renderCommands(d,c,null,a,"button");h||(h=!0,b.getService("orion.page.selection").addEventListener("selectionChanged",function(b){var c=i.node(d);
c&&(f.destroy(c),f.renderCommands(d,c,b.selections,a,"button"))}))};c.createOperationsCommands=function(b,f,a){function c(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var k=new d.Command({name:e["Remove Completed"],tooltip:e["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){f.loadOperations.bind(f)()})},visibleWhen:function(){return!0}});b.addCommand(k);
k=new d.Command({name:e.Remove,tooltip:e["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(b){for(var b=Array.isArray(b.items)?b.items:[b.items],c=0;c<b.length;c++){var d=b[c];a.removeOperation.bind(a)(d.Location).then(function(){f.loadOperations.bind(f)()},function(){f.loadOperations.bind(f)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!c(a);for(var b in a)if(c(a[b]))return!1;return!0}});b.addCommand(k);
k=new d.Command({name:e.Cancel,tooltip:e["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=0;b<a.length;b++){var c=a[b];c.deferred&&c.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return c(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!c(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;return!0}});b.addCommand(k)}})();
return c});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(e,j,i,d,c){function h(b){this._options=b}h.prototype=new d.PopupDialog;h.prototype.TEMPLATE='<table style="width: 360px;"><tr><td><h2>Recent operations</h2></td><td style="text-align: right;"><a id="allOperationsLink" class="navlinkonpage">All Operations</a></td></tr></table><div id="operationsExist"><div style="padding-left: 7px" id="myOperationsListEmpty">No operations running on this page.</div><table id="myOperationsList" style="display: none;"></table></div><div style="padding-left: 7px" id="operationsDontExist">No operations running.</div>';h.prototype._init=
function(b){this._myOperations=[];this._operationsDeferreds=[];this._commandService=b.commandRegistry;c.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(b.triggerNode)};h.prototype._bindToDom=function(){this.$allOperationsLink.href=j.toUrl("operations/list.html");this._setOperationsVisibility()};h.prototype.setOperations=function(b,c){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(b)for(var a in b)this._myOperations.push(b[a]),this._operationsDeferreds.push(c[a]);this._renderOperations()};h.prototype.parseProgressResult=function(b){if(!b)return{};b=b.responseText||b;try{b=JSON.parse(b)}catch(c){}var a={Message:b.Message||b,Severity:b.Severity};if(b.DetailedMessage&&b.DetailedMessage!==a.Message)a.DetailedMessage=b.DetailedMessage;return a};h.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};h.prototype._renderOperationsTable=function(b,c,a){i.empty(b);for(var d=0;d<c.length;d++){var k=c[d],h=document.createElement("tr"),j=document.createElement("td");j.style.paddingLeft="5px";j.style.paddingRight="5px";j.textContent=k.Name;h.appendChild(j);var p=document.createElement("div");j.appendChild(p);j=document.createElement("span");j.style.paddingRight="5px";j.classList.add("imageSprite");switch(k.type){case "Warning":j.classList.add("core-sprite-warning");j.setAttribute("aria-label",
e["Operation resulted in a warning."]);break;case "error":j.classList.add("core-sprite-error");j.setAttribute("aria-label",e["Operation resulted in an error."]);break;case "loadstart":case "progress":j.classList.add("core-sprite-start");j.setAttribute("aria-label",e["Operation is running."]);break;case "abort":j.classList.add("core-sprite-stop");j.setAttribute("aria-label",e["Operation is canceled."]);break;case "load":case "loadend":j.classList.add("core-sprite-ok"),j.setAttribute("aria-label","Operation ok.")}p.appendChild(j);
j=document.createElement("span");j.classList.add("operationStatus");j.textContent=k.Name;p.appendChild(j);if(k.error){var o=k.error.Message||k.error;k.error.DetailedMessage&&k.error.DetailedMessage!==""&&(o+=": "+k.error.DetailedMessage);j.textContent=o;j.classList.remove("operationStatus");j.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",p,{operation:k,deferred:a[d]},this,"tool");b.appendChild(h)}this._setOperationsVisibility()};h.prototype._setOperationsVisibility=
function(){this.$myOperationsList.style.display=this._myOperations.length>0?"":"none";this.$myOperationsListEmpty.style.display=this._myOperations.length>0?"none":"";this.$operationsDontExist.style.display=this._myOperations.length>0?"none":"";this.$operationsExist.style.display=this._myOperations.length>0?"":"none"};h.prototype.constructor=h;return{OperationsDialog:h}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(e,j,i,d,c){function h(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()})}}function b(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}h.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=e.Operations,this._progressPane.alt=e.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var i="";for(d in c){var h=c[d];if(h.type&&(h.type==="loadstart"||h.type==="progress")){i="running";break}}switch(i){case "running":this._progressPane.title=e["Operations running"];this._progressPane.alt=e["Operations running"];
this._progressPane.setAttribute("aria-valuetext",e["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=e["Some operations finished with warning"];this._progressPane.alt=e["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",e["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=e["Some operations finished with error"];this._progressPane.alt=
e["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",e["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=e.Operations,this._progressPane.alt=e.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(c,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};
h.prototype.constructon=h;b.prototype={init:function(b){if(!this._progressMonitorClass)this._progressMonitorTool=new h(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(){if(d._operations[e]){var i=d._operations[e];if(a)i.Name=a;d._lastOperation=i;i.type="loadend";if(c)i.progressMonitor=c;d.writeOperation.bind(d)(e,i,b);i.Location||d._removeOperationFromTheList.bind(d)(e)}},
function(i){if(d._operations[e]){var h=d._operations[e];if(a)h.Name=a;if(c)h.progressMonitor=c;d._lastOperation=h;h.type=i.canceled?"abort":"error";h.error=i;d.writeOperation.bind(d)(e,h,b);h.Location||d._removeOperationFromTheList.bind(d)(e)}},function(i){if(a)i.Name=a;if(c)i.progressMonitor=c;d.writeOperation.bind(d)(e,i,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];if(a.type&&a.type!=="loadstart"&&a.type!=="progress")(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(){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)}};b.prototype.constructor=b;return{ProgressService:b}});
define("orion/dialogs",[],function(){function e(e){this._serviceRegistry=e;this._serviceRegistration=e.registerService("orion.page.dialog",this)}e.prototype={confirm:function(e,i){i(window.confirm(e))},openFiles:function(){}};e.prototype.constructor=e;return{DialogService:e}});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(e){function j(i,d){d||(d="orion.page.selection");this._serviceRegistry=i;e.attach(this);this._serviceRegistration=i.registerService(d,this);this._selections=null}j.prototype={getSelection:function(e){var d=this._getSingleSelection();typeof e==="function"&&e(d);return d},getSelections:function(e){var d=Array.isArray(this._selections)?this._selections.slice():[];typeof e==="function"&&e(d);return d},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(e){var d=this._selections;this._selections=Array.isArray(e)?e.length>0?e.slice():null:e?[e]:null;d!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};j.prototype.constructor=j;return{Selection:j}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(e,j){function i(b,c,a){return b[c].apply(b,a)}function d(b){this._location=b}function c(){var b=new j;b.reject(e["No Matching OperationService for location:"]+this._location);return b}function h(b){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=b.getService("orion.core.preference");for(var c=b.getServiceReferences("orion.core.operation"),
a=0;a<c.length;a++){var g=b.getService(c[a]);this._services[a]=g;g=c[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;h.prototype={getOperations:function(){var b=
new j;if(this._operations)return b.resolve(this._operations),b;var c=this;this._preferenceService.getPreferences("/operations").then(function(a){c._operations=a;b.resolve(c._operations)});return b},getOperation:function(b){return i(this._getService(b),"getOperation",arguments)},removeCompletedOperations:function(){for(var b=[],c=this,a=0;a<this._services.length;a++){var d=this._patterns[a],e=new j;b[a]=e.promise;i(this._services[a],"removeCompletedOperations").then(function(a){return function(b){Array.isArray(b)&&
c.getOperations.bind(c)().then(function(c){for(var f=c.keys(),e=0;e<f.length;e++){var k=f[e];d.test(k)&&b.indexOf(k)<0&&c.remove(k)}a.resolve()})}}(e),function(a){return function(b){a.reject(b)}}(e))}return j.all(b)},removeOperation:function(b){var c=this;return i(this._getService(b),"removeOperation",arguments).then(function(){c.getOperations.bind(c)().then(function(a){a.remove(b)})},function(a){return a},function(a){return a})}};h.prototype.constructor=h;return{OperationsClient:h}});
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 All":"Replace All",
"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","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result","Next Page >":"Next Page >","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","My Saved Searches":"My Saved Searches","Save frequently used searches by choosing ${0} shown above.":"Save frequently used searches by choosing ${0} shown above.",
"Save frequently used searches by clicking on the ${0} button above.":"Save frequently used searches by clicking on the ${0} button above.","Files that contain:":"Files that contain:",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","Sort by":"Sort by","File name":"File name","Path name":"Path name",
Save:"Save","Type a name for the search":"Type a name for the search","Save the current search":"Save the current search","Type filter text":"Type filter text","Scope Search":"Scope 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 <td([\\s\\S]*?)</td> with <span$1</span>.":"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 <td([\\s\\S]*?)</td> with <span$1</span>.",
"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 <td([\\s\\S]*?)</td> with <span$1</span>.":"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 <td([\\s\\S]*?)</td> with <span$1</span>."});
define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(e,j){var i={root:j};Object.keys(e).forEach(function(d){typeof i[d]==="undefined"&&(i[d]=e[d])});return i});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(e,j){function i(d){this._init(d)}i.prototype={_init:function(d){var c=d.parent,i=this,c=j.node(c);if(!c)throw e["no parent"];if(!d.model)throw e["no tree model"];if(!d.renderer)throw e["no renderer"];this._parent=c;this._treeModel=d.model;this._onComplete=d.onComplete;this._renderer=d.renderer;this._showRoot=d.showRoot===void 0?!1:d.showRoot;this._indent=d.indent===void 0?16:d.indent;this._onCollapse=d.onCollapse;
this._labelColumnIndex=d.labelColumnIndex===void 0?0:d.labelColumnIndex;this._id=d.id===void 0?"treetable":d.id;this._tableStyle=d.tableStyle;this._tableElement=d.tableElement||"table";this._tableBodyElement=d.tableBodyElement||"tbody";this._tableRowElement=d.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(b){i._showRoot?(b._depth=0,i._generate([b],0)):i._treeModel.getChildren(b,function(b){i.destroyed||i._generate(b,0)})})},destroy:function(){this.destroyed=!0},_generate:function(d,
c){j.empty(this._parent);var e=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(e);var b=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(b);b.id=this._id;this._tableStyle&&b.classList.add(this._tableStyle);this._renderer.initTable(b,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+
"tbody";d.length===0?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(d,c);b.appendChild(this._bodyElement);e.appendChild(b);this._parent.appendChild(e);this._rowsChanged();this._onComplete&&this._onComplete(this)},_generateChildren:function(d,c,e){for(var b=0;b<d.length;b++){var f=document.createElement(this._tableRowElement);f.id=this._treeModel.getId(d[b]);f._depth=c;f._item=d[b];this._renderer.render(d[b],f);f.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*c+"px";this._renderer.rowCallback&&this._renderer.rowCallback(f,d[b]);e?(this._bodyElement.insertBefore(f,e.nextSibling),e&&(e=f)):this._bodyElement.appendChild(f)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(d,c,i){var b=this._treeModel.getId(d),f;if(b===this._id)this._removeChildRows(b),this._generateChildren(c,0),this._rowsChanged();else{var a=j.node(b);a?(a._item=d,
a&&(i||a._expanded)?(this._removeChildRows(b),c?(a._expanded=!0,this._renderer.updateExpandVisuals(a,!0),this._generateChildren(c,a._depth+1,a),this._rowsChanged()):(f=this,this._renderer.updateExpandVisuals(a,"progress"),c=this._treeModel.getChildren(a._item,function(b){if(!f.destroyed&&(f._renderer.updateExpandVisuals(a,!0),!a._expanded))a._expanded=!0,f._generateChildren(b,a._depth+1,a),f._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(e["could not find table row "]+b)}},
getItem:function(d){var c=j.node(d);return c&&c._item?c._item:d},toggle:function(d){var c=j.node(d);c&&(c._expanded?this.collapse(d):this.expand(d))},isExpanded:function(d){d=typeof d==="string"?d:this._treeModel.getId(d);return(d=j.node(d))?d._expanded:!1},expand:function(d,c,e){var d=typeof d==="string"?d:this._treeModel.getId(d),b=j.node(d);if(b)if(b._expanded)c&&c.apply(f,e);else{var f=this;this._renderer.updateExpandVisuals(b,"progress");this._treeModel.getChildren(b._item,function(a){if(!f.destroyed){f._renderer.updateExpandVisuals(b,
!0);if(!b._expanded)b._expanded=!0,f._generateChildren(a,b._depth+1,b),f._rowsChanged();c&&c.apply(f,e)}})}},_removeChildRows:function(d){for(var c=d===this._id,e=!1,b=-1,f=[],a=j.$$array(".treeTableRow",this._parent),g=0;g<a.length;g++){var k=a[g];if(e)break;if(c)k._depth>b?f.push(k):e=!0;else if(k.id===d)c=!0,b=k._depth}for(d=0;d<f.length;d++)c=f[d],c.parentNode.removeChild(c)},collapse:function(d){var d=typeof d==="string"?d:this._treeModel.getId(d),c=j.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}};i.prototype.constructor=i;return{TableTree:i}});
define("orion/treeModelIterator",[],function(){var e={};e.TreeModelIterator=function(){function e(i,d){this.firstLevelChildren=i;this.reset();this._init(d)}e.prototype={_init:function(e){if(e)this.isExpanded=e.isExpanded,this.isExpandable=e.isExpandable,this.forceExpandFunc=e.forceExpandFunc,this.getChildrenFunc=e.getChildrenFunc},topLevel:function(e){return e.parent?e.parent===this.root:!0},_getChildren:function(e){return typeof this.getChildrenFunc==="function"?this.getChildrenFunc(e):e?e.children:
null},_expanded:function(e){if(!e)return!0;var d=this._getChildren(e),d=d&&d.length>0;this.isExpanded&&d&&(d=this.isExpanded(e));return d},_expandable:function(e){return!e?!0:this.isExpandable?this.isExpandable(e):!1},_diveIn:function(e){return this._expanded(e)?(this.setCursor(this._getChildren(e)[0]),this.cursor()):null},_drillToLast:function(e){return this._expanded(e)?(e=this._getChildren(e),this._drillToLast(e[e.length-1])):e},_forward:function(e){if(!this._cursor)return null;var d=this._diveIn(this._cursor);
if(!d){if(e&&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(e){if(!this._cursor)return null;var d=this._findSibling(this._cursor,!1);d&&d!==this._cursor.parent&&(d=this._drillToLast(d));if(e&&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(e,d){for(var c=this.topLevel(e),h=this._getChildren(e.parent),h=c?this.firstLevelChildren:h,b=0;b<h.length;b++)if(h[b]===e)return b===0&&!d?c?null:e.parent:b===h.length-1&&d?c?null:this._findSibling(e.parent,d):d?h[b+1]:h[b-1];return null},_inParentChain:function(e,d){for(var c=e.parent;c;){if(c===d)return!0;c=c.parent}return!1},_getTopLevelParent:function(e){if(this.topLevel(e))return e;for(e=e.parent;e;){if(this.topLevel(e))return e;
e=e.parent}return null},_onCollapse:function(e){return this._expanded(e.parent)?e:this._onCollapse(e.parent)},_scan:function(e,d,c){this.setCursor(d);var h=[];for(h.push(d);;){if(this.iterate(e))h.push(this.cursor());else break;if(c===this.cursor())return h}return null},setCursor:function(e){this._prevCursor=this._cursor;this._cursor=e},setTree:function(e){this.firstLevelChildren=e;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(e,d){var c=this.cursor(),
h=this._scan(!0,e,d);h||(h=this._scan(!1,e,d));this.setCursor(c);return h},iterate:function(e,d){return e?this._forward(d):this._backward(d)},iterateOnTop:function(e,d){var c=this._findSibling(this._getTopLevelParent(this.cursor()),e);c?this.setCursor(c):d&&this.firstLevelChildren.length>0&&this.setCursor(e?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(e){if(!this._cursor)return null;return this._inParentChain(this._cursor,e)?(this.setCursor(e),
this._cursor):null},reset:function(){this.root=this._prevCursor=this._cursor=null;if(this.firstLevelChildren.length>0)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 e}();return e});
define("orion/explorers/explorerNavHandler",["orion/webui/littlelib","orion/treeModelIterator","orion/uiUtils"],function(e,j,i){var d={},c=navigator.userAgent.indexOf("iPad")!==-1,h=window.navigator.platform.indexOf("Mac")!==-1;d.ExplorerNavHandler=function(){function b(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 d=this;this._modelIterator=
new j.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:c.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return d.explorer.renderer.isExpandable(a)}:function(a){return d.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return d.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(c);(!c||c.setFocus!==!1)&&b.focus();c=function(a){if(i.isFormElement(a.target))return!0;if(d.explorer.preventDefaultFunc&&d.explorer.preventDefaultFunc(a,
d._modelIterator.cursor()))return!0;if(a.keyCode===e.KEY.DOWN)return d.onDownArrow(a);else if(a.keyCode===e.KEY.UP)return d.onUpArrow(a);else if(a.keyCode===e.KEY.RIGHT)return d.onRightArrow(a);else if(a.keyCode===e.KEY.LEFT)return d.onLeftArrow(a);else if(a.keyCode===e.KEY.SPACE)return d.onSpace(a);else if(a.keyCode===e.KEY.ENTER)return d.onEnter(a)};b.addEventListener("keydown",c,!1);this._listeners.push({type:"keydown",listener:c});c=function(){if(d.explorer.onFocus)d.explorer.onFocus(!1);else d.toggleCursor(null,
!1)};b.addEventListener("blur",c,!1);this._listeners.push({type:"blur",listener:c});c=function(){if(d.explorer.onFocus)d.explorer.onFocus(!0);else d.toggleCursor(null,!0)};b.addEventListener("focus",c,!1);this._listeners.push({type:"focus",listener:c});this._parentDiv=b}b.prototype={destroy:function(){this._parentDiv.classList.remove("selectionModelContainer");this.removeListeners()},_init:function(b){this._linearGridMove=!1;if(b)this._selectionPolicy=b.selectionPolicy,this.gridClickSelectionPolicy=
b.gridClickSelectionPolicy||"none",this.preventDefaultFunc=b.preventDefaultFunc,this.postDefaultFunc=b.postDefaultFunc},_ctrlKeyOn:function(b){return h?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&&typeof this.explorer.keyEventListeningDiv===
"function"?this.explorer.keyEventListeningDiv(b):e.node(this.explorer._parentId)},isExpandable:function(b){return!b?!1:e.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]);c._selections.length>0?
c.cursorOn(c._selections[0],!0,!1,b):c.cursorOn(null,!1,!1,b);if(!(c._shiftSelectionAnchor&&c._inSelection(c._shiftSelectionAnchor)>=0))c._shiftSelectionAnchor=null})},refreshModel:function(b,a,c,d){this._currentColumn=0;this.topIterationNodes=[];this.model=a;this._navDict=b;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(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){for(var b=this.model.getId(b),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){if(this._selectionPolicy!==
b)this._selectionPolicy=b,this._selectionPolicy==="cursorOnly"&&this._clearSelection(!0)},setSelection:function(b,a,c){if(this._selectionPolicy==="cursorOnly")a&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(b,!0);else if(this._isRowSelectable(b)){!a||this._selectionPolicy==="singleSelection"?(this._clearSelection(!0),this._checkRow(b,!1),this._selections.push(b),this._lastSelection=b):(a=this._inSelection(b),a>=0?(this._checkRow(b,!0),this._selections.splice(a,1)):(this._checkRow(b,
!1),this._selections.push(b),this._lastSelection=b));if(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&&c.length>1||a===0&&c){a!==0&&this.toggleCursor(b,!1);var d=this._currentColumn,e=!0;d+=a;d<0?(this._linearGridMove&&a!==0&&(this._modelIterator.iterate(!1)?b=this.currentModel():e=!1),
d=e?c.length-1:this._currentColumn):d>=c.length&&(this._linearGridMove&&a!==0&&(this._modelIterator.iterate(!0)?b=this.currentModel():e=!1),d=e?0:this._currentColumn);this._currentColumn=d;a!==0&&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))&&b.length>0?b[this._currentColumn]:null},getAriaContainerElement:function(b){for(var a=
this._parentDiv,c;b&&b!==a&&(c=b.getAttribute("role"))!=="grid"&&c!=="tree"&&c!=="treegrid";)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,h;if(b||a){if(h===this._modelIterator.cursor())return;e=this._modelIterator.cursor();h=b;this._modelIterator.setCursor(h)}else e=this._modelIterator.prevCursor(),h=this._modelIterator.cursor();if(e!==h||a)if(this.toggleCursor(e,!1),!a||h){this.moveColumn(null,0);this.toggleCursor(h,!0);if((b=this.getRowDiv())&&
!d){d=b.parentNode;for(a=document.documentElement;d&&d!==a;){var i=window.getComputedStyle(d,null);if(!i)break;i=i.getPropertyValue("overflow-y");if(i==="auto"||i==="scroll")break;d=d.parentNode}d&&(a=!0,b.offsetTop<=d.scrollTop?(a=!1,c===void 0&&(c=!1)):b.offsetTop+b.offsetHeight>=d.scrollTop+d.clientHeight&&(a=!1,c===void 0&&(c=!0)),a||b.scrollIntoView(!c))}if(this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,h)}},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;var b=this.model.getId(b),a=this._navDict.getValue(b);return a&&a.rowDomNode?a.rowDomNode:e.node(b)},iterate:function(b,a,c,d){var e=null;if(this.topIterationNodes&&this.topIterationNodes.length!==0)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)},_setCursorOnItem:function(b,a){this.cursorOn(null,!1,b);if(a){var c=this._inSelection(this._modelIterator.prevCursor()),d=this._inSelection(this._modelIterator.cursor());c>=0&&d>=0?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)}},_checkRow:function(b,a){if(this.explorer.renderer._useCheckboxSelection&&
this._selectionPolicy!=="singleSelection"){var c=this.getRowDiv(b);if(c){var d=e.node(this.explorer.renderer.getCheckBoxId(c.id)),h=a?!d.checked:!0;if(h!==d.checked)this.explorer.renderer.onCheck(c,d,h,!0)}}else this._select(b,a)},_select:function(b){b||(b=this._modelIterator.cursor());var a=this.getRowDiv(b);a&&(this._inSelection(b)<0?a.classList.add("checkedRow"):a.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(this.isDisabled(this.getRowDiv(b)))e.stop(a);else{var d=e.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)));if(a.target!==d&&!(this.gridClickSelectionPolicy==="none"&&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 k=0;k<d.length;k++)this.setSelection(d[k],!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&&c.length>1?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&&typeof this.explorer.scopeUp==="function"&&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(typeof a.onClick==="function")a.onClick();else typeof a.widget.focus==="function"&&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;if(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 b}();d.ExplorerNavDict=function(){function b(b){this._dict={};this._model=b}b.prototype={addRow:function(b,a){this._dict[this._model.getId(b)]={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);if(this._dict[c]){if(!this._dict[c].gridChildren&&
a)this._dict[c].gridChildren=[];return this._dict[c].gridChildren}return null},initGridNavHolder:function(b){if(!b)return null;b=this._model.getId(b);if(this._dict[b])this._dict[b].gridChildren=null}};return b}();return d});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(e,j,i,d,c,h){var b={};b.Explorer=function(){function b(a,c,d,e){this.registry=a;this.renderer=d;this.selection=c;this.commandService=e;if(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,d){a=this.getRow(a);if(c)return a=a.childNodes[c],a.appendChild(document.createElement("br")),d=document.createElement("span"),d.id=b+"placeHolderRow",a.appendChild(d),{tempNode:d,refNode:d};if(a){var e=document.createElement("tr");
e.id=b+"placeHolderRow";c=document.createElement("td");c.id=b+"placeHolderCol";e.appendChild(c);d?(a.parentNode.insertBefore(e,a.nextSibling),a=parseInt(a.firstChild.style.paddingLeft),c.style.paddingLeft=this.myTree.getIndent()+a+"px"):a.appendChild(e);d=i.node(b+"placeHolderRow");a=i.node(b+"placeHolderCol");if(d&&a)return{tempNode:d,refNode:a}}return null},getRow:function(a){if(a=this.model.getId(a))return i.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)for(var a=this._navHandler.getTopLevelNodes(),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(!(a===void 0||a===null))for(var c=a.length,d=0;d<c;d++)b._expandRecursively(a[d])})})}},createTree:function(a,b,e){a=typeof a==="string"?a:a.id||a;this.selection&&
this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var f=a+"innerTree",h=i.node(f);h&&i.empty(h);if(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();this.selectionPolicy==="cursorOnly"&&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){if(!this.getNavHandler())this._navHandler=a&&a.navHandlerFactory&&typeof a.navHandlerFactory.createNavHandler===
"function"?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}();b.createExplorerCommands=function(b,a){function c(b){return typeof b.getItemCount==="function"?b.getItemCount()>0?a?a(b):!0:!1:!1}var d=new h.Command({tooltip:e["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()}}),i=new h.Command({tooltip:e["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(i)};b.ExplorerModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=c;this.idPrefix=d||""}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;for(var a=a.Location.replace(/[\\\/]/g,""),b=this.idPrefix,c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return b}};return b}();b.ExplorerFlatModel=function(){function c(a,b,d){this.rootPath=a;this.fetchItems=b;this.root=d}c.prototype=new b.ExplorerModel;c.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)})}};c.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return c}();b.ExplorerRenderer=function(){function b(a,c){this.explorer=c;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){if(a){this._useCheckboxSelection=a.checkbox===void 0?!1:a.checkbox;this.selectionPolicy=a.singleSelection?
"singleSelection":"";this._cachePrefix=a.cachePrefix;this.getCheckedFunc=a.getCheckedFunc;this.onCheckedFunc=a.onCheckedFunc;this._highlightSelection=!0;this._treeTableClass=a.treeTableClass||"treetable";if(a.highlightSelection===!1)this._highlightSelection=!1;if(!this.actionScopeId)this.actionScopeId=a.actionScopeId;if(!this.commandService)this.commandService=a.commandService}},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(a,b){this.tableTree=b;this.tableNode=
a;i.empty(a);this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){var c=c||"tool",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(){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;if(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(a){e.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,d,e){(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);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&&c.getSelectionPolicy()!=="cursorOnly"&&(a=window.sessionStorage[a+"selection"],typeof a==="string"&&(a=a.length>0?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=i.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"];typeof c==="string"&&(c=c.length>0?JSON.parse(c):null);var d;if(c)for(d=0;d<c.length;d++)if(i.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"/"+this._cachePrefix+"/"+a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(a){return a+
"__expand"},updateExpandVisuals:function(a,b){var c=i.node(this.expandCollapseImageId(a.id));c&&(c.classList.remove(this._expandImageClass),c.classList.remove(this._collapseImageClass),c.classList.remove(this._progressImageClass),c.classList.add(b==="progress"?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(){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 b in h._expanded)if(h._expanded[b]===a.id){h._expanded.splice(b,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(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler());(i.$(".sectionTreeTable",this.tableNode.parentNode)||i.$(".treetable",this.tableNode.parentNode))&&i.$$array(".treeTableRow",this.tableNode).forEach(function(a,b){var c=!(b%2)?"darkSectionTreeTableRow":"lightSectionTreeTableRow",d=c==="darkSectionTreeTableRow"?"lightSectionTreeTableRow":
"darkSectionTreeTableRow";a.classList.add(c);a.classList.remove(d)})},updateCommands:function(){if(this.commandService)for(var a=i.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],d=i.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}();b.SelectionRenderer=function(){function c(a,b){this._init(a);this.explorer=b}c.prototype=new b.ExplorerRenderer;c.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;)e.innerHTML.length>0&&e.classList.add("navColumn"),c.appendChild(e),e=this.getCellHeaderElement(++d);b.appendChild(c);
d>0&&a.appendChild(b)};c.prototype.renderRow=function(a,b){b.verticalAlign="baseline";b.classList.add("treeTableRow");var c=this.explorer.getNavDict();if(c){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),c===0?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)};c.prototype.getCellHeaderElement=function(){};c.prototype.getCellElement=function(){};return c}();b.SimpleFlatModel=function(){function c(a,b,d){this.items=a;this.getKey=d;this.idPrefix=b;this.root={children:a}}c.prototype=new b.ExplorerModel;c.prototype.getRoot=function(a){a(this.root)};c.prototype.getId=function(a){for(var a=
this.getKey(a).replace(/[\\\/]/g,""),b="",c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return this.idPrefix+b};c.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return c}();return b});
define("orion/explorers/navigatorRenderer","i18n!orion/navigate/nls/messages,orion/Deferred,orion/explorers/explorer,orion/explorers/navigationUtils,orion/extensionCommands,orion/objects,orion/URITemplate,orion/webui/littlelib".split(","),function(e,j,i,d,c,h,b,f){function a(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 g(d,e,f,g,i,k,v,y,C){var e=h.clone(e),z;if(e.Directory)z=document.createElement("a"),
z.className="navlinkonpage",z.href=!d?l:(new b(d+"#{,resource,params*}")).expand({resource:e.ChildrenLocation}),e.Name&&z.appendChild(document.createTextNode(e.Name));else{i||(i=c.getOpenWithCommands(f));z=document.createElement("a");z.className="navlink targetSelector";k&&typeof k==="object"&&Object.keys(k).forEach(function(a){z[a]=k[a]});var s=null,m=null;if(s=y?y.holderDom:z)m=document.createElement("span"),m.className="core-sprite-file modelDecorationSprite thumbnail",s.appendChild(m);e.Name&&
z.appendChild(document.createTextNode(e.Name));var r=e.Location;if(v&&typeof v==="object")e.params={},h.mixin(e.params,v);(d=c.getOpenWithCommand(f,e,i))&&(r=d.hrefCallback({items:e}));j.when(g.getFileContentType(e),function(b){if(s){var c=s,d=m;if(b){var f,g=b.imageClass,h=b.image;if(g)f=document.createElement("span"),f.className+=g,f.classList.add("thumbnail");else if(h)f=document.createElement("img"),f.src=h,f.classList.add("thumbnail");f&&c.replaceChild(f,d)}}z.href=r;C&&typeof C.updateFileNode===
"function"&&C.updateFileNode(e,z,a(b))})}return z}function k(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 l=new b("#{,resource,params*}");k.prototype=new i.SelectionRenderer;k.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};k.prototype.tableCallback=function(a){a.setAttribute("aria-label",e.Navigator);a.setAttribute("role","presentation")};k.prototype.rowCallback=
function(a){a.setAttribute("role","treeitem")};k.prototype.emptyCallback=function(a){var b=document.createElement("tr"),c=document.createElement("td");c.colSpan=this.oneColumn?1:3;var d=document.createElement("div");d.classList.add("noFile");d.textContent=e.NoFile;var g=document.createElement("span");g.appendChild(document.createTextNode(e.File));f.processDOMNodes(d,[g]);c.appendChild(d);b.appendChild(c);a.appendChild(b)};k.prototype.getCellHeaderElement=function(a){if(this.oneColumn&&a!==0)return null;
switch(a){case 0:case 1:case 2:document.createElement("th").style.height="8px"}};k.prototype.setTarget=function(a){this.target=a};k.prototype.getFolderImage=function(){if(!this.showFolderImage)return null;var a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};k.prototype.createFolderNode=function(a){var b;this.showFolderLinks?(b=g(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};k.prototype.updateFileNode=function(){};k.prototype.showFolderLinks=!0;k.prototype.getCellElement=function(a,b,e){switch(a){case 0:var 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";var h;if(b.Directory)this.getExpandImage(e,f),h=this.createFolderNode(b),f.appendChild(h),this.explorer._makeDropTarget(b,
h),this.explorer._makeDropTarget(b,e);else{if(!this.openWithCommands)this.openWithCommands=c.getOpenWithCommands(this.commandService);h=g("",b,this.commandService,this.contentTypeService,this.openWithCommands,{target:this.target},null,null,this);f.appendChild(h)}if(h)h.id=e.id+"NameLink",h.nodeType===1&&(d.addNavGrid(this.explorer.getNavDict(),b,h),h.setAttribute("role","link"),h.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,f,b,this.explorer,
"tool",null,!0);return a;case 1:if(this.oneColumn)return null;e=document.createElement("td");if(b.LocalTimeStamp)e.textContent=(new Date(b.LocalTimeStamp)).toLocaleString();return e;case 2:if(this.oneColumn)return null;e=document.createElement("td");if(!b.Directory&&typeof b.Length==="number")b=parseInt(b.Length,10)/1024,e.textContent=Math.ceil(b).toLocaleString()+" KB";e.style.textAlign="right";return e}};k.prototype.constructor=k;return{NavigatorRenderer:k,isImage:a,createLink:g}});
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(e,j,i,d,c,h,b,f,a){function g(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function k(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,h,k,o,u){var t=this.serviceRegistry,w=this.commandRegistry;this.openWithCommands=this.openWithCommands||f.createOpenWithCommands(t,g,w);var v=this;return function(f,t,z,s){a.when(v.openWithCommands,function(a){if(z)i.empty(h),a=document.createElement("div"),a.appendChild(document.createTextNode(e["Search failed."])),h.appendChild(a),typeof o==="function"&&o(h);else{var r=
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];typeof f==="function"&&(b[e]=null,f())}else b[e]=function(){a(c,d)}}}(),q=!1;i.empty(h);if(f&&f.length>0){var D=document.createElement("table");D.setAttribute("role","presentation");for(var x=0;x<f.length;x++){var B=
f[x],v;if(!q&&(q=!0,k))v=D.insertRow(0).insertCell(0),v.textContent=k;v=D.insertRow(-1).insertCell(0);v.colspan=2;u&&u(v);var F={Name:B.name,Directory:B.directory,Location:B.path||B.location},E=null;if(typeof B.LineNumber==="number")E={},E.line=B.LineNumber;if(s&&s.keyword&&!s.nameSearch){var G=c.generateSearchHelper(s),E=E||{};E.find=G.inFileQuery.searchStr;E.regEx=G.inFileQuery.wildCard?!0:void 0}F=b.createLink(j.toUrl("edit/edit.html"),F,w,g,a,{"aria-describedby":(B.folderName?B.folderName:B.path).replace(/[^a-zA-Z0-9_\.:\-]/g,
""),style:{verticalAlign:"middle"}},E);B.LineNumber&&F.appendChild(document.createTextNode(" (Line "+B.LineNumber+")"));v.appendChild(F);r(v,B)}h.appendChild(D);typeof o==="function"&&o(h)}!q&&t&&(a=d.formatMessage(e["No matches found for ${0}"],t),i.empty(h),h.appendChild(document.createTextNode(a)),typeof o==="function"&&o(h))}})}};k.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),i=h?h:g;(b?i.indexOf(b)>=0: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){typeof f==="string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(b){d(e(b),null,null,a)}):typeof f==="string"&&f.indexOf("search")>-1&&!a.nameSearch?(new h.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);i.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var c="",f=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&a.Parents.length>0?f=b.index==="last"?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(f=a);if(f)this.setLocationbyURL(f.Location),c=f.Name,this._childrenLocation=f.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),
c=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation;f=i.node("search");c||(c="");if(f&&f.placeholder){f.value="";var g=d.formatMessage(e["Search ${0}"],c);f.placeholder=g.length>30?g.substring(0,27)+"...":d.formatMessage(e["Search ${0}"],c)}if(f&&f.title)f.title=e["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,keyword:a,replace:d?d.replace:void 0}}};k.prototype.constructor=k;return{Searcher:k}});
define("orion/section","orion/webui/littlelib,orion/selection,orion/commandRegistry,orion/commonHTMLFragments,orion/objects,orion/selection".split(","),function(e,j,i,d,c,h){function b(a,b){var c=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";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 f=b.useAuxStyle?["sectionWrapper",
"sectionWrapperAux","toolComposite"]:["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");a.appendChild(this.domNode);for(var h=0;h<f.length;h++)this.domNode.classList.add(f[h]);this.domNode.id=b.id;if(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)&&c._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(a){a.keyCode===e.KEY.ENTER&&(a.target===c.domNode||a.target===c.titleNode||a.target===c.twistie)&&c._changeExpandedState()},!1);if(b.iconClass){var i=document.createElement("span");i.classList.add("sectionIcon");this.domNode.appendChild(i);f=Array.isArray(b.iconClass)?b.iconClass:[b.iconClass];f.forEach(function(a){i.classList.add(a)})}b.headerClass&&
(f=Array.isArray(b.headerClass)?b.headerClass:[b.headerClass],f.forEach(function(a){this.domNode.classList.add(a)}.bind(this)));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;if(typeof b.getItemCount==="function")f=document.createElement("div"),f.classList.add("layoutLeft"),
f.classList.add("sectionItemCount"),this.domNode.appendChild(f),f.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.visibility="hidden";this._progressNode.textContent="...";this.domNode.appendChild(this._progressNode);f=document.createElement("div");f.id=b.id+
"FilterSearchBox";this.domNode.appendChild(f);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&&(f=d.slideoutHTMLFragment(b.id),h=document.createRange(),h.selectNode(this.domNode),f=h.createContextualFragment(f),this.domNode.appendChild(f));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);this.hidden=b.hidden;if(typeof b.onExpandCollapse==="function")this._onExpandCollapse=b.onExpandCollapse;this._preferenceService=b.preferenceService;this._contentParent.style.display="none";this.domNode.classList.add("sectionWrapperClosed");
if(this._preferenceService){var j=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(j.id);if(a!==void 0)j.hidden=!a;if(!j.hidden)j._contentParent.style.display="block",j.domNode.classList.remove("sectionWrapperClosed");j._updateExpandedState(!j.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block",this.domNode.classList.remove("sectionWrapperClosed");this._updateExpandedState(!this.hidden,!1)}this._commandService=b.commandService;this._lastMonitor=
0;this._loading={}}function f(a){this._section=a;this._id=++a._lastMonitor}b.prototype={setTitle:function(a){this.titleNode.textContent=a},getHeaderElement:function(){return this.domNode},getTitleElement:function(){return this.titleNode},getActionElement:function(){return this._toolActionsNode},setContent:function(a){typeof a==="string"?this._contentParent.innerHTML=a:(this._contentParent.innerHTML="",this._contentParent.appendChild(a))},getContentElement:function(){return this._contentParent},embedExplorer:function(a,
b,d){this._contentParent.innerHTML="";if(!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(!e.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 this.section.actionsNode.style.visibility!=="hidden"},setCommandsVisible:function(a){this.section.actionsNode.style.visibility=
a?"":"hidden";var 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){e.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;if(!this.selection&&!d)this.serviceRegistry||this.registry?(this.selection=new h.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()})}});if(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 f(this)},_setMonitorMessage:function(a,b){this._progressNode.style.visibility="visible";this._loading[a]=b;var c="",d;for(d in this._loading)c!==""&&(c+=
"\n"),c+=this._loading[d];this._progressNode.title=c},_monitorDone:function(a){delete this._loading[a];var a="",b;for(b in this._loading)a!==""&&(a+="\n"),a+=this._loading[b];this._progressNode.title=a;if(a==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){this.hidden?(this._contentParent.style.display="block",this.domNode.classList.remove("sectionWrapperClosed"),this.hidden=!1):(this._contentParent.style.display="none",this.domNode.classList.add("sectionWrapperClosed"),
this.hidden=!0);this._updateExpandedState(!this.hidden,!0)},_updateExpandedState:function(a,b){var c=this.twistie,d=this.id;c&&(c.classList.add(a?this._expandImageClass:this._collapseImageClass),c.classList.remove(a?this._collapseImageClass:this._expandImageClass));this._preferenceService&&b&&this._preferenceService.getPreferences("/window/views").then(function(b){b.put(d,a)});this._onExpandCollapse&&this._onExpandCollapse(a,this)}};b.prototype.constructor=b;f.prototype={begin:function(a){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.status=a;this._section._monitorDone(this.id)}};f.prototype.constructor=f;return{Section:b}});
define("orion/git/util",["orion/URL-shim"],function(){function e(c){for(var e=0;e<d.length;e++)if(c.type===d[e])return!0;return!1}function j(c){for(var d=0;d<i.length;d++)if(c.type===i[d])return!0;return!1}var i=["Missing","Modified","Untracked","Conflicting"],d=["Added","Changed","Removed"];return{statusUILocation:"git/git-status.html",isStaged:e,isUnstaged:j,isChange:function(c){return e(c)||j(c)},hasStagedChanges:function(c){for(var e=0;e<d.length;e++)if(c[d[e]].length>0)return!0;return!1},hasUnstagedChanges:function(c){for(var d=
0;d<i.length;d++)if(c[i[d]].length>0)return!0;return!1},parseSshGitUrl:function(c){try{var d=new URL(c);return{host:d.hostname,port:d.port}}catch(b){try{var e=c.split(":")[0].split("@");return{host:e.length>1?e[1]:e[0],port:22}}catch(a){return{host:"",port:""}}}}}});
define("orion/dynamicContent",["require","orion/commands","orion/webui/littlelib","orion/webui/tooltip"],function(e,j,i,d){function c(a,b){if(a===void 0)throw Error("Missing reqired argument: id");if(b===void 0)throw Error("Missing reqired argument: anchor");this._id=a;this._anchor=b;this._prefix="progressSpinner:"}function h(a,b){if(a===void 0)throw Error("Missing reqired argument: id");if(b===void 0)throw Error("Missing reqired argument: anchor");this._id=a;this._anchor=b;this._prefix="progressDots:"}
function b(a,b){if(!a)throw Error("Missing reqired argument: objects");if(!b)throw Error("Missing reqired argument: populate");this._objects=a;this._populate=b}function f(){}function a(a){if(!a)throw Error("Missing required argument: model");this._model=a;this.use(new f)}c.prototype={start:function(){var a=document.createElement("img");a.id=this._prefix+this._id;a.src=j.NO_IMAGE;a.className="progressPane_running";this._anchor.appendChild(a)},stop:function(){var a=i.node(this._prefix+this._id);a&&
a.parentNode.removeChild(a)},error:function(a){var b=i.node(this._prefix+this._id);b.src=e.toUrl("images/problem.gif");b.className="";new d.Tooltip({node:b,text:a})}};c.prototype.constructor=c;h.prototype={start:function(){var a=document.createElement("img");a.id=this._prefix+this._id;a.style.textDecoration="blink";a.appendChild(document.createTextNode(" ..."));this._anchor.appendChild(a)},stop:function(){var a=i.node(this._prefix+this._id);a&&a.parentNode.removeChild(a)},error:function(a){var b=
i.node(this._prefix+this._id);b.parentNode.removeChild(b);var c=document.createElement("img");c.src=e.toUrl("images/problem.gif");this._anchor.appendChild(c);new d.Tooltip({node:b,text:a})}};h.prototype.constructor=h;b.prototype={getObjects:function(){return this._objects},getDetails:function(a){return this._populate(a)}};b.prototype.constructor=b;f.prototype={progressIndicator:h,setupProperties:{progressIndicators:[]},errorHandler:function(a,b){this.explorer.progressIndicators[a].error(b)}};f.prototype.constructor=
f;a.prototype={render:function(){var a=this;this._initialRender&&this._initialRender();for(var b=function(b){return function(){a._renderAfterItemPopulation(b);a.progressIndicators[b].stop()}},c=function(b){return function(c){if(a._errorHandler)a._errorHandler(b,c);else throw Error(c);}},d=0;d<this._model.getObjects().length;d++)this._renderBeforeItemPopulation(d),this.progressIndicators[d].start(),this._model.getDetails(d).then(b(d),c(d));this._cleanupRender&&this._cleanupRender()},use:function(a){for(var b in a)if(b===
"populateItem")this._populateItem=a.populateItem.bind(a),a.explorer=this;else if(b==="renderBeforeItemPopulation")this._renderBeforeItemPopulation=a.renderBeforeItemPopulation.bind(a),a.explorer=this;else if(b==="renderAfterItemPopulation")this._renderAfterItemPopulation=a.renderAfterItemPopulation.bind(a),a.explorer=this;else if(b==="errorHandler")this._errorHandler=a.errorHandler.bind(a),a.explorer=this;else if(b==="initialRender")this._initialRender=a.initialRender.bind(a),a.explorer=this;else if(b===
"cleanupRender")this._cleanupRender=a.cleanupRender.bind(a),a.explorer=this;else if(b==="progressIndicator")this.progressIndicator=a.progressIndicator,a.explorer=this;else if(b==="setupProperties"){for(var c in a.setupProperties)this[c]=a.setupProperties[c];a.explorer=this}}};a.prototype.constructor=a;return{DynamicContentModel:b,DynamicContentExplorer:a,DynamicContentRenderer:f,ProgressSpinner:c,ProgressDots:h}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(e){return{makeRelative:function(e){if(!e)return e;var i=window.location.protocol+"//"+window.location.host;return e.indexOf(i)===0?e.substring(i.length):e},isAtRoot:function(j){if(!j)return!1;if(j==="/workspace")return!0;var i=new URL(e.toUrl("workspace"),window.location.href);return(new URL(j,window.location.href)).href.indexOf(i.href)===0}}});
define("orion/compare/compareUtils",["orion/URITemplate"],function(e){var j=j||{};j.compareUtils=j.compareUtils||{};j.compareUtils.lookUpMapper=function(e,d,c){for(var h=0,b=0;b<e.length;b++){var f=e[b][d];f===0&&(f=1);if(c>=h&&c<h+f)return{mapperIndex:b,startFrom:h};if(b===e.length-1)break;h+=e[b][d]}return{mapperIndex:e.length-1,startFrom:h}};j.compareUtils.lookUpLineIndex=function(e,d,c){if(c===0)return 0;for(var h=0,b=0;b<c;b++)h+=e[b][d];return h};j.compareUtils.updateMapper=function(e,d,c,h,
b){if(h!==b&&(h>0||b>0)){var f=j.compareUtils.lookUpMapper(e,d,c);if(!(f.mapperIndex<0)){if(h>0)for(var a=c-f.startFrom,c=f.mapperIndex;c<e.length;c++){a=e[c][d]-a;if(h<=a){e[c][d]-=h;break}e[c][d]-=a;h-=a;a=0}b>0&&(e[f.mapperIndex][d]+=b)}}};j.compareUtils.overlapMapper=function(e,d,c,h,b){e=c+e[d]-1;e<c&&(e=c);b<h&&(b=h);return e<h||b<c?!1:!0};j.compareUtils.findFirstDiff=function(e,d,c,h){for(var b=0,f=null,a=0;a<e.length;a++){if(b>h)break;if(j.compareUtils.overlapMapper(e[a],d,b,c,h)&&(f={mapperIndex:a,
startFrom:b},e[a][2]!==0))break;b+=e[a][d]}return f};j.compareUtils.matchMapper=function(e,d,c,h){if(e.length===0)return c;var b=c+Math.round((h-c)/3),f=j.compareUtils.findFirstDiff(e,d,c,h),a=e[f.mapperIndex][d]===0?f.startFrom:f.startFrom+e[f.mapperIndex][d]-1,g=j.compareUtils.lookUpLineIndex(e,1-d,f.mapperIndex),k=f.startFrom-c;return e[f.mapperIndex][2]===0?g-k:b>=f.startFrom&&b<=a?g-Math.round((h-c)/3):b<f.startFrom?g-k:(e[f.mapperIndex][1-d]===0?g:g+e[f.mapperIndex][1-d]-1)-(a-c)};j.compareUtils.getMapperLineCount=
function(e){for(var d=0,c=0;c<e.length;c++)d+=Math.max(e[c][0],e[c][1]);return d};j.compareUtils.getAnnotationIndex=function(e,d){for(var c=0;c<e.length;c++)if(e[c][0]===d)return c;return-1};j.compareUtils.getAnnotationMapperIndex=function(e,d){return e[d][1]};j.compareUtils.getAnnotationIndexByMapper=function(e,d){for(var c=0;c<e.length;c++)if(e[c][1]===d)return{current:c,prev:c-1,next:c+1};return{current:-1,prev:-1,next:-1}};j.compareUtils.isMapperConflict=function(e,d){return d<0?!1:!e[d][3]?!1:
e[d][3]===1};j.compareUtils.mergeDiffBlocks=function(e,d,c,h,b,f){for(var a=0;a<d.length;a++){var g=d[a][0],j=c[d[a][1]];if(j[0]>0){for(var l="",n=0;n<j[0];n++)l=l+h[j[2]-1+n].substring(b)+f;j=e.getLineCount();g>=j&&(g=e.getLineEnd(j-1),n=e.getLineEnd(j-1,!0),g===n?(e.setText(f,g,g),g=j):g=j-1);g=e.getLineStart(g);e.setText(l,g,g)}}};j.compareUtils.generateCompareHref=function(i,d){var c=require.toUrl("compare/compare.html");if(!d.conflict)d.conflict=void 0;if(!d.readonly)d.readonly=void 0;return(new e(c+
"#{,resource,params*}")).expand({resource:i,params:d})};j.compareUtils.generateCompareTreeHref=function(i,d){var c=require.toUrl("compare-tree/compare-tree.html");return(new e(c+"#{,resource,params*}")).expand({resource:i,params:d})};return j.compareUtils});
define("orion/git/gitPreferenceStorage",["orion/Deferred"],function(e){function j(e){this._prefix="/git/credentials";this._preferenceService=e.getService("orion.core.preference")}j.prototype={put:function(i,d){var c={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""};if(d!==void 0){if(d.gitSshUsername!==void 0&&d.gitSshUsername!==null)c.gitSshUsername=d.gitSshUsername;if(d.gitSshPassword!==void 0&&d.gitSshPassword!==null)c.gitSshPassword=d.gitSshPassword;if(d.gitPrivateKey!==void 0&&
d.gitPrivateKey!==null)c.gitPrivateKey=d.gitPrivateKey;if(d.gitPassphrase!==void 0&&d.gitPassphrase!==null)c.gitPassphrase=d.gitPassphrase}var h=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(b){var d=b.get("settings");d===void 0?h.reject():d.enabled?(b.put(i,c),h.resolve()):h.reject()});return h},get:function(i){var d={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""},c=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(e){var b=
e.get("settings");b===void 0?c.reject():b.enabled?(e=e.get(i),e!==void 0?c.resolve(e):c.resolve(d)):c.reject()});return c},isEnabled:function(){var i=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(d){d=d.get("settings");d===void 0?i.resolve(!1):i.resolve(d.enabled)});return i},enable:function(){var i=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(d){d.put("settings",{enabled:!0});i.resolve()});return i},disable:function(){var i=new e;this._preferenceService.getPreferences(this._prefix,
2).then(function(d){d.put("settings",{enabled:!1});i.resolve()});return i},remove:function(i){var d=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(c){c.remove(i);d.resolve()});return d},getRepositories:function(){var i=new e;this._preferenceService.getPreferences(this._prefix,2).then(function(d){for(var c=[],d=d.keys(),e=0;e<d.length;++e)d[e]!=="settings"&&c.push(d[e]);i.resolve(c)});return i}};return j.prototype.constructor=j});
define("orion/git/gitConfigPreference",["orion/Deferred"],function(e){function j(e){this._prefix="/git/config";this._preferenceService=e.getService("orion.core.preference")}j.prototype={getConfig:function(){var i=new e;this._preferenceService.getPreferences(this._prefix).then(function(d){d=d.get("userInfo");i.resolve(d)});return i},setConfig:function(i){var d=new e;this._preferenceService.getPreferences(this._prefix).then(function(c){c.put("userInfo",i);d.resolve()});return d}};return j.prototype.constructor=
j});
define("orion/git/widgets/ConfirmPushDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(e,j){function i(d){this._init(d)}i.prototype=new j.Dialog;i.prototype.TEMPLATE='<div id="header"></div>';i.prototype._init=function(d){var c=this;this.title="Git Push";this.modal=!0;this.messages=e;this.location=d.location;this.dialog2=d.dialog;this.func=d.func;this.buttons=[];this.dialog2&&this.buttons.push({callback:function(){c.destroy();c.dialog2.show()},text:"More"});this.buttons.push({callback:function(){c.destroy();c.func()},
text:"OK"});this._initialize()};i.prototype._bindToDom=function(){var d=this.$header;d.appendChild(document.createTextNode("You are going to push to the following remote: "+this.location));d.appendChild(document.createElement("br"));this.dialog2&&d.appendChild(document.createTextNode(" Click More to push to another remote or OK to push to default."))};i.prototype.constructor=i;return{ConfirmPushDialog:i}});
define("orion/git/widgets/RemotePrompterDialog",["i18n!git/nls/gitmessages","orion/webui/dialog","orion/explorers/explorer","orion/selection"],function(e,j,i,d){function c(b,a){this.explorer=a;this._init(b)}function h(b){this._init(b)}var b=function(){function b(a,c,d,e){this.gitClient=a;this.rootPath=c;this.fetchItems=d;this.root=e?e:null}b.prototype=new i.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)}):a.Type==="Remote"&&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 i.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||a.Type==="Remote"||a.BranchLocation&&a.RemoteLocation)&&this.getExpandImage(c,b);c=a.Name;a.Type==="RemoteTrackingBranch"&&!a.Id&&(c=a.Name+e[" [New branch]"]);b.appendChild(document.createTextNode(c))};
h.prototype=new j.Dialog;h.prototype.TEMPLATE='<div><div id="treeContentPane" style="width:25em; min-height: 25em; max-height: 30em; height: auto; overflow-y: auto; padding: 8px"></div><div id="newBranchPane" style="padding: 8px"><label for="newBranch">${New Branch:}</label><input id="newBranch" value="" disabled=true/></div></div>';h.prototype._init=function(b){var a=this;this.title=b.title||e["Choose a Folder"];this.modal=!0;this.messages=e;this.func=b.func;this.treeRoot=b.treeRoot;this.gitClient=
b.gitClient;this.hideNewBranch=b.hideNewBranch;this.serviceRegistry=b.serviceRegistry;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"})};h.prototype._bindToDom=function(){var b=this;this.$newBranch.addEventListener("input",function(){b._validate()});this.$newBranch.placeholder=e["No remote selected"];if(this.hideNewBranch)this.$newBranchPane.style.display="none"};h.prototype._beforeShowing=
function(){this._initialize();this._loadRemoteChildren()};h.prototype._afterShowing=function(){this.$treeContentPane.focus();this._validate()};h.prototype._loadRemoteChildren=function(){this._createTree(new b(this.gitClient,null,this.gitClient.getGitClone,this.treeRoot))};h.prototype._createTree=function(b){var a=this,g=this.serviceRegistry.getService("orion.remotePrompter.selection");g||(g=new d.Selection(this.serviceRegistry,"orion.remotePrompter.selection"));var h=new c({checkbox:!1,singleSelection:!0,
treeTableClass:"directoryPrompter"});this.explorer=new i.Explorer(this.serviceRegistry,g,h);h.explorer=this.explorer;this.explorer.createTree("treeContentPane",b);g.addEventListener("selectionChanged",function(b){b.selection&&b.selection.Type==="Remote"?(a.$newBranch.disabled=!1,a.$newBranch.placeholder=e["Enter a name..."]):(a.$newBranch.disabled=!0,a.$newBranch.placeholder=e["No remote selected"]);a._validate(b.selection)})};h.prototype._validate=function(b){var a=function(a){a&&a.Type==="RemoteTrackingBranch"?
this.$remoteOk.classList.remove(this.DISABLED):a&&a.Type==="Remote"&&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))};h.prototype._execute=function(){var b=this;this.serviceRegistry.getService("orion.remotePrompter.selection").getSelection(function(a){if(b.func)if(a.Type==="RemoteTrackingBranch")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)}})};h.prototype.constructor=h;return{RemotePrompterDialog:h}});
define("orion/git/widgets/ReviewRequestDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(e,j){function i(d){this._init(d)}i.prototype=new j.Dialog;i.prototype.TEMPLATE='<div><div id="treeContentPane" style="padding: 8px"><label for="reviewReqUrl">${Paste link in email or IM}</label><br><input id="reviewReqUrl" style="width: 50em" value=""/></div><div id="newBranchPane" style="padding: 8px"><label for="reviewerName">${Send the link to the reviewer}</label><br><input id="reviewerName" style="width: 30em"  value=""/></div></div>';
i.prototype._init=function(d){var c=this;this.title=d.title||e["Contribution Review Request"];this.modal=!0;this.messages=e;this.url=d.url;this.func=d.func;this.buttons=[];this.buttons.push({callback:function(){c.destroy();c.func(c.$reviewerName.value)},text:e.Submit});this._initialize()};i.prototype._bindToDom=function(){this.$reviewReqUrl.value=this.url};i.prototype.constructor=i;return{ReviewRequestDialog:i}});
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(e,j,i,d,c,h,b,f,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 k(a){b.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 c=a.modelEventDispatcher?a.modelEventDispatcher:new b;this.modelEventDispatcher=c;var d=this;this._modelListeners={};"copy,copyMultiple,create,delete,deleteMultiple,import,move,moveMultiple".split(",").forEach(function(a){c.addEventListener(a,
d._modelListeners[a]=d.modelHandler[a].bind(d))});this._clickListener=function(a){if(a.target.tagName==="A"){for(a=a.target;a;){if(a._item)break;a=a.parentNode}if(a&&a._item)d.onLinkClick({type:"linkClick",item:a._item})}};(a=i.node(this.parentId))&&a.addEventListener("click",this._clickListener);var e=this.renderer;this.registry&&this.registry.registerService("orion.cm.managedservice",{updated:function(a){a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self";e.setTarget&&
e.setTarget(a)}},{pid:"nav.config"})}g.prototype=new h.ExplorerModel;f.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))if(d.push(b[e]),b[e].parent=a,!b[e].Parents)b[e].Parents=c;b=d}else for(d in b)if(b[d].parent=a,!b[d].Parents)b[d].Parents=c;a.children=b;a.children.sort(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});return b},getChildren:function(a,b){var c=this;if(a.children)b(a.children);else if(a.Directory!==void 0&&a.Directory===!1)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),e["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=this.root.Children.length>0);return a}});g.prototype.constructor=g;var l,n;k.prototype=Object.create(h.Explorer.prototype);f.mixin(k.prototype,{destroy:function(){var a=this;Object.keys(this._modelListeners).forEach(function(b){a.modelEventDispatcher.removeEventListener(b,a._modelListeners[b])});var b=i.node(this.parentId);b&&b.removeEventListener("click",this._clickListener);h.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){var m;m=(a=a.parent)||b.treeRoot,a=m;c[a.Location]=a});return j.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 j.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;if(a.oldValue.Directory&&a.newValue&&b.isExpanded(a.oldValue))c[a.newValue.Location]=a.newValue});return j.all(Object.keys(c).map(function(a){return b.changedItem(c[a],!0)}))},onModelDelete:function(a){var a=a.items||[a],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);else{var e={};a.forEach(function(a){a=a.parent;e[a.Location]=a});return j.all(Object.keys(e).map(function(a){return b.changedItem(e[a],!0)}))}},modelHandler:{copy:function(a){return a.count?void 0:this.onModelCopy(a)},copyMultiple:function(a){return this.onModelCopy(a)},create:function(a){return this.onModelCreate(a)},
"delete":function(a){return a.count?void 0:this.onModelDelete(a)},deleteMultiple:function(a){return this.onModelDelete(a)},"import":function(a){return this.changedItem(a.target,!0)},move:function(a){return a.count?void 0:this.onModelMove(a)},moveMultiple:function(a){return this.onModelMove(a)}},_makeDropTarget:function(b,f,g){if(this.dragAndDrop){var h=this,j=this.dragAndDrop,k=function(a){l=a.target};if(g)this._oldDragStart&&f.removeEventListener("dragstart",this._oldDragStart,!1),this._oldDragStart=
k;f.addEventListener("dragstart",k,!1);k=function(){l=null};if(g)this._oldDragEnd&&f.removeEventListener("dragend",this._oldDragEnd,!1),this._oldDragEnd=k;f.addEventListener("dragend",k,!1);k=function(a){f.classList.remove("dragOver");a.preventDefault();a.stopPropagation()};if(g)this._oldDragLeave&&f.removeEventListener("dragleave",this._oldDragLeave,!1),this._oldDragLeave=k;f.addEventListener("dragleave",k,!1);k=function(b){if(l)n=b.dataTransfer.dropEffect=(a.isMac?b.altKey:b.ctrlKey)?"copy":"move";
else if(!a.isIE&&(b.dataTransfer.effectAllowed==="all"||b.dataTransfer.effectAllowed==="uninitialized"||b.dataTransfer.effectAllowed.indexOf("copy")>=0))b.dataTransfer.dropEffect="copy";f.classList.add("dragOver");i.stop(b)};if(g)this._oldDragEnter&&f.removeEventListener("dragenter",this._oldDragEnter,!1),this._oldDragEnter=k;f.addEventListener("dragenter",k,!1);k=function(b){if(l)n=b.dataTransfer.dropEffect=(a.isMac?b.altKey:b.ctrlKey)?"copy":"move";else if(!a.isIE&&(b.dataTransfer.effectAllowed===
"all"||b.dataTransfer.effectAllowed==="uninitialized"||b.dataTransfer.effectAllowed.indexOf("copy")>=0))b.dataTransfer.dropEffect="copy";i.stop(b)};if(g&&!this._oldDragOver)f.addEventListener("dragover",k,!1),this._oldDragOver=k;var y=null;h.registry&&(y=h.registry.getService("orion.page.progress"));var C=function(a){y?y.setProgressResult(a):window.console.log(a)},z=function(a,f,g,h,i,j){if(!g.Location&&g.fileMetadata)g=g.fileMetadata;f=f||"";if(a.isFile)c.isAtRoot(g.Location)?h.registry&&h.registry.getService("orion.page.message").setProgressResult({Severity:"Error",
Message:e["You cannot copy files directly into the workspace.  Create a folder first."]}):a.file(function(a){i(g,a,h,a.name.indexOf(".zip")===a.name.length-4&&window.confirm(d.formatMessage(e["Unzip ${0}?"],a.name)))});else if(a.isDirectory){var k=a.createReader(),l=function(b){k.readEntries(function(c){for(var d=0;d<c.length;d++)z(c[d],f+a.name+"/",b,h,i,j)})};c.isAtRoot(g.Location)?(y?y.progress(j.createProject(g.ChildrenLocation,a.name),d.formatMessage(e["Creating ${0}"],a.name)):j.createProject(g.ChildrenLocation,
a.name)).then(function(a){h.loadResourceList(h.treeRoot.Path,!0);(y?y.progress(j.read(a.ContentLocation,!0),e["Loading "]+a.name):j.read(a.ContentLocation,!0)).then(function(a){l(a)},C)},C):(y?y.progress(j.createFolder(g.Location,a.name),d.formatMessage(e["Creating ${0}"],a.name)):j.createFolder(g.Location,a.name)).then(function(a){h.modelEventDispatcher.dispatchEvent({type:"create",parent:b,newValue:a});l(a)},C)}},k=function(a){var g;f.classList.remove("dragOver");if(l){g=h.fileClient;for(var k=
l,q;k;){if(k._item){q=k._item;break}k=k.parentNode}if(!q)return;var D=n==="copy",k=D?g.copyFile:g.moveFile;(y?y.showWhile(k.apply(g,[q.Location,b.Location]),d.formatMessage(e[D?"Copying ${0}":"Moving ${0}"],q.Location)):k.apply(g,[q.Location,b.Location])).then(function(a){h.modelEventDispatcher.dispatchEvent({type:D?"copy":"move",oldValue:q,newValue:a,parent:b})},C)}else if(a.dataTransfer.items&&a.dataTransfer.items.length>0)for(g=0;g<a.dataTransfer.items.length;g++)k=null,typeof a.dataTransfer.items[g].getAsEntry===
"function"?k=a.dataTransfer.items[g].getAsEntry():typeof a.dataTransfer.items[g].webkitGetAsEntry==="function"&&(k=a.dataTransfer.items[g].webkitGetAsEntry()),k&&z(k,null,b,h,j,h.fileClient);else if(a.dataTransfer.files&&a.dataTransfer.files.length>0)for(g=0;g<a.dataTransfer.files.length;g++)k=a.dataTransfer.files[g],!k.size&&!k.type?h.registry&&h.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:d.formatMessage(e["Did not drop ${0}.  Folder drop is not supported in this browser."],
k.name)}):c.isAtRoot(b.Location)?h.registry&&h.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:e["You cannot copy files directly into the workspace.  Create a folder first."]}):j(b,k,h,k.name.indexOf(".zip")===k.name.length-4&&window.confirm(d.formatMessage(e["Unzip ${0}?"],k.name)));i.stop(a)};if(g)this._oldDrop&&f.removeEventListener("drop",this._oldDrop,!1),this._oldDrop=k;f.addEventListener("drop",k,!1)}},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 j;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 j;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&&a.Parents.length>0?(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 j).reject()}.bind(this)):c._item||a}.bind(this))):b===void 0||b?this.reroot(a):c.reject();return c},expandItem:function(a,b){var c=new j;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(){return(new j).reject()},isExpanded:function(a){return this.renderer.tableTree.isExpanded(this.model.getId(a))},getNameNode:function(a){if(a=this.model.getId(a))return i.node(a+"NameLink")},scopeUp:function(){},scopeDown:function(){},
loadResourceList:function(a,b,d){a&&typeof a==="object"&&(a=a.ChildrenLocation||a.ContentLocation);a=c.makeRelative(a);if(!b&&a===this._lastPath)return(new j).resolve(this.treeRoot);this._lastPath=a;var f=this;return b||a!==this.treeRoot.Path?this.load(this.fileClient.loadWorkspace(a),e["Loading "]+a).then(function(){f.treeRoot.Path=a;typeof d==="function"&&d();f.dispatchEvent({type:"rootChanged",root:f.treeRoot});return(new j).resolve(f.treeRoot)},function(a){f.treeRoot.Path=null;f.dispatchEvent({type:"rootChanged",
root:f.treeRoot});return(new j).reject(a)}):(new j).resolve(f.treeRoot)},load:function(a,b,c){var d=i.node(this.parentId),e=i.node("progress");if(!e)e=document.createElement("div"),e.id="progress",i.empty(d),d.appendChild(e);i.empty(e);var f=setTimeout(function(){i.empty(e);e.appendChild(document.createTextNode(b))},500),g=this;return j.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();if(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 j;g.createTree(g.parentId,g.model,{onComplete:function(a){e.resolve(a)},navHandlerFactory:g.navHandlerFactory,setFocus:typeof g.setFocus==="undefined"?!0:g.setFocus,selectionPolicy:g.renderer.selectionPolicy,onCollapse:function(a){if(g.getNavHandler())g.getNavHandler().onCollapse(a)}});
return e.then(function(){if(typeof c==="function")try{c()}catch(a){g.registry&&g.registry.getService("orion.page.message").setErrorMessage(a)}if(typeof g.onchange==="function")g.onchange(g.treeRoot);return g.treeRoot})}},function(a){clearTimeout(f);g.registry&&g.registry.getService("orion.page.message").setProgressResult(a);return(new j).reject(a)})},onchange:function(){}});k.prototype.constructor=k;return{FileExplorer:k,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(e,j,i,d,c,h,b,f){function a(a,b){this.explorer=b;this._init(a)}function g(a){this._init(a)}a.prototype=new b.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 i.Dialog;g.prototype.TEMPLATE='<div id="message" style="width: 25em; padding-bottom: 5px;"></div><div id="directoryTree" class="explorerTreeClass" style="width:25em; min-height: 25em; max-height:30em; height: auto; overflow-y: auto;"></div>';
g.prototype._init=function(a){this.title=a.title||e["Choose a Folder"];this.modal=!0;this.buttons=[{text:e.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(){this.loadFolderList("/");this._message?this.$message.appendChild(document.createTextNode(this._message)):this.$message.style.display="none";this.$directoryTree.focus()};
g.prototype.loadFolderList=function(b){b=d.makeRelative(b);this.selection=new c.Selection(this._serviceRegistry,"orion.directoryPrompter.selection");this.explorer=new f.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(b,!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(e,j,i,d,c){function h(b){this._init(b)}var b=new d("edit/edit.html#{,resource,params*}");h.prototype=new i.Dialog;h.prototype.TEMPLATE='<span id="basicPane"><div style="padding: 8px"><label for="gitUrl">${Repository URL:}</label><input id="gitUrl" style="width: 50em" value=""/></div><div style="padding: 8px; text-align: right;"><a id="advancedLink" href="javascript:">${Choose target location}</a><a id="advancedLinkHide" href="javascript:" style="display: none">${Default target location}</a></div></span><span id="advancedPane" style="display: none;"><div style="padding: 8px"><input id="isNewProject" type="radio" name="isNewProject" checked value="new"/><label for="gitName" style="padding: 0 8px">${New folder:}</label><input id="gitName" value=""></div><div style="padding: 8px"><input id="isExistingProject" type="radio" name="isNewProject" value="existing"/><label for="gitPath" style="padding: 0 8px">${Existing directory:}</label><input id="gitPath" type="hidden" value=""><span id="shownGitPath" style="padding-right: 24px"></span><a id="changeGitPath" href="javascript:">${Change...}</a></div></span>';h.prototype._init=
function(b){var a=this;this.title=b.title?b.title:e["Clone Git Repository"];this.modal=!0;this.messages=e;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()};h.prototype._bindToDom=function(){var b=this;if(this.url)this.$gitUrl.value=this.url;
if(this.advancedOnly)this.$basicPane.style.display="none",this.$advancedPane.style.display="",setTimeout(function(){b.$gitName.focus()},400);this.$changeGitPath.addEventListener("click",function(){b._openDirectoryPickerDialog()});this.$isExistingProject.addEventListener("click",function(){b._checkNewExisting()});this.$isNewProject.addEventListener("click",function(){b._checkNewExisting()});this.$gitName.addEventListener("focus",function(){b._showNewProject()});this.$advancedLink.addEventListener("click",
function(){b._showAdvanced()});this.$advancedLinkHide.addEventListener("click",function(){b._hideAdvanced()});this.alwaysShowAdvanced&&this._showAdvanced()};h.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)};h.prototype._showAdvanced=function(){this.advancedShown=!0;this.$advancedPane.style.display="";this.$advancedLink.style.display=
"none";this.$advancedLinkHide.style.display=""};h.prototype._hideAdvanced=function(){this.advancedShown=!1;this.$advancedPane.style.display="none";this.$advancedLink.style.display="";this.$advancedLinkHide.style.display="none"};h.prototype._checkNewExisting=function(){this.$isExistingProject.checked?this._openDirectoryPickerDialog():this.$gitName.focus()};h.prototype._showNewProject=function(){this.$isNewProject.checked=!0};h.prototype._openDirectoryPickerDialog=function(){function d(a){var e=document.createElement("a");
e.href=c.toUrl(b.expand({resource:a.ChildrenLocation}));e.textContent=a.Name;return e}var a=this;this.$isExistingProject.checked=!0;var g=new j.DirectoryPrompterDialog({title:e["Choose a Folder"],serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:function(b){if(b&&b.Location){for(a.$gitPath.value=b.Location;a.$shownGitPath.hasChildNodes();)a.$shownGitPath.removeChild(a.$shownGitPath.lastChild);for(a.$shownGitPath.appendChild(d(b));b.parent&&b.parent.Location!=="/";)a.$shownGitPath.insertBefore(document.createTextNode("/"),
a.$shownGitPath.firstChild),a.$shownGitPath.insertBefore(d(b.parent),a.$shownGitPath.firstChild),b=b.parent}}});this._addChildDialog(g);g.show()};h.prototype.constructor=h;return{CloneGitRepositoryDialog:h}});
define("orion/git/widgets/GitCredentialsDialog",["i18n!git/nls/gitmessages","orion/git/gitPreferenceStorage","orion/webui/dialog","orion/git/util"],function(e,j,i,d){function c(c){this._init(c)}c.prototype=new i.Dialog;c.prototype.TEMPLATE='<div id="gitCredentialsLabel" style="padding: 8px">${Repository URL:}<strong id="url"></strong></div><div id="gitSshUsernameRow" style="padding: 8px"><label id="gitSshUsernameLabel" for="gitSshUsername">${Username:}</label><input id="gitSshUsername" value=""></div><div id="gitSshPasswordRow" style="padding: 8px"><input id="isSshPassword" type="radio" name="isSshPassword" checked value="password"/><label id="gitSshPasswordLabel" for="gitSshPassword" style="padding: 0 8px">${Password:}</label><input type="password" id="gitSshPassword" value="" style="width: 30em"></div><div style="padding: 8px"><div id="gitPrivateKeyRow"><input id="isPrivateKey" type="radio" name="isSshPassword" value="privateKey" style="vertical-align: top"/><label id="gitPrivateKeyLabel" for="gitPrivateKey" style="padding: 0 8px; vertical-align: top">${Private key:}</label><textarea id="gitPrivateKey" value=""></textarea></div><div id="gitPrivateKeyFileRow" style="padding-left: 8em"><label id="gitPrivateKeyFileLabel" for="gitPrivateKeyFile">${Private key file (optional):}</label><br><input id="gitPrivateKeyFile" multiple="false" type="file" size="53" label="Browse..."></div><div id="gitPassphraseRow" style="padding-left: 8em"><label id="gitPassphraseLabel" for="gitPassphrase">${Passphrase (optional):}</label><br><input type="password" id="gitPassphrase" value="" style="width: 30em"></div></div><div id="gitSaveCredentialsRow" style="padding: 8px"><img id="gitSaveCredentialsInfo" src="/images/info.gif""><input id="gitSaveCredentials" type="checkbox" name="gitSaveCredentials"><label id="gitSaveCredentialsLabel" for="gitSaveCredentials">${Don\'t prompt me again:}</label></div>';c.prototype._init=
function(c){var b=this;this.title=c.title||e["Git Credentials"];this.modal=!0;this.messages=e;this.options=c;if(!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;if(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(){b.destroy();
b._execute()},text:"OK",isDefault:!0});this._initialize()};c.prototype._bindToDom=function(){var c=this;if(!this.options.username)this.$gitSshUsernameRow.style.display="none";if(!this.options.password)this.$gitSshPasswordRow.style.display="none";if(!this.options.privatekey)this.$gitPrivateKeyRow.style.display="none",this.$gitPrivateKeyFileRow.style.display="none";if(!this.options.passphrase)this.$gitPassphraseRow.style.display="none";if(this.options.errordata&&this.options.errordata.Url)this.$gitCredentialsLabel.style.display=
"block",this.$url.textContent=this.options.errordata.Url;if(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(){c.$gitSshPassword.focus()},400);(new j(this.options.serviceRegistry)).isEnabled().then(function(b){if(!b)c.$gitSaveCredentials.style.display="none",c.$gitSaveCredentialsLabel.style.display="none",c.$gitSaveCredentialsInfo.style.display=
"none"});this.$gitSshPassword.addEventListener("focus",function(){c.$isSshPassword.checked=!0});this.$gitPrivateKey.addEventListener("focus",function(){c.$isPrivateKey.checked=!0});this.$gitPrivateKeyFile.addEventListener("focus",function(){c.$isPrivateKey.checked=!0});this.$gitPassphrase.addEventListener("focus",function(){c.$isPrivateKey.checked=!0});this.$gitPrivateKeyFile.addEventListener("change",function(b){c.privateKeyFile=b.target.files[0]})};c.prototype._execute=function(){var c=this,b=this.$gitPrivateKey.value,
e=this.$url.textContent,a=function(a){if(c._sshService){var b=d.parseSshGitUrl(e);c._sshService.getKnownHostCredentials(b.host,b.port).then(function(b){if(c.options.func){var d=typeof c.options.failedOperation==="undefined"?c.options.errordata.failedOperation:c.options.failedOperation;d!=="undefined"&&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&&(b=typeof c.options.failedOperation==="undefined"?c.options.errordata.failedOperation:c.options.failedOperation,b!=="undefined"&&c._progressService.removeOperation(b),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(){return function(d){b=d.target.result;d=new j(c.options.serviceRegistry);c.$gitSaveCredentials.checked?d.put(e,{gitPrivateKey:b,gitPassphrase:c.$gitPassphrase.value}).then(function(){a(b)}):a(b)}}(this.privateKeyFile);g.readAsText(this.privateKeyFile)}else b.length>0?(g=new j(c.options.serviceRegistry),c.$gitSaveCredentials.checked?g.put(e,{gitPrivateKey:b,gitPassphrase:c.$gitPassphrase.value}).then(function(){a(b)}):a(b)):(g=new j(c.options.serviceRegistry),c.$gitSaveCredentials.checked?
g.put(e,{gitSshUsername:c.$gitSshUsername.value,gitSshPassword:c.$gitSshPassword.value}).then(function(){a(b)}):a(b))};c.prototype.constructor=c;return{GitCredentialsDialog:c}});
define("orion/git/widgets/OpenCommitDialog","require,i18n!git/nls/gitmessages,orion/i18nUtil,orion/Deferred,orion/webui/dialog,orion/URITemplate,orion/webui/littlelib".split(","),function(e,j,i,d,c,h,b){function f(a){this._init(a)}var a=new h("git/git-commit.html#{,resource,params*}?page=1&pageSize=1");f.prototype=new c.Dialog;f.prototype.TEMPLATE='<div><label for="resourceName">${Type the commit name (sha1):}</label></div><div><input type="text" id="resourceName"></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;"></div>';
f.prototype._init=function(a){this.title=a.title||j["Find Commit"];this.modal=!0;this.messages=j;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()};f.prototype._bindToDom=function(){var a=this;this.$resourceName.addEventListener("input",
function(){a.time=+new Date;a.timeoutId&&clearTimeout(a.timeoutId);a.timeoutId=setTimeout(a._checkSearch.bind(a),0)},!1);this.$resourceName.addEventListener("keydown",function(c){if(c.keyCode===b.KEY.ENTER){var d=b.$("a",a.$results);d&&(b.stop(c),window.open(d.href),a.hide())}},!1);this.$resourceName.value=this.commitName};f.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)};f.prototype._findCommitLocation=function(a,b,c){var e=this;c||(c=new d);a.length>0?this.serviceRegistry.getService("orion.page.progress").progress(e.serviceRegistry.getService("orion.git.provider").doGitLog("/gitapi/commit/"+b+a[0].ContentLocation+"?page=1&pageSize=1"),"Getting commit details "+b).then(function(a){c.resolve(a.Children[0])},function(){e._findCommitLocation(a.slice(1),b,c)}):c.reject();return c};f.prototype._doSearch=function(){var a=this,c=this.$resourceName&&this.$resourceName.value;
if(c){var d=document.createElement("div");d.appendChild(document.createTextNode(j["Searching..."]));b.empty(this.$results);this.$results.appendChild(d);this.serviceRegistry.getService("orion.page.message").setProgressMessage(j["Looking for the commit"]);this._findCommitLocation(this.repositories,c).then(function(c){b.empty(a.$results);a._displayCommit(c,a.$results);a.serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(){var c=document.createElement("div");c.appendChild(document.createTextNode("No commits found"));
b.empty(a.$results);a.$results.appendChild(c);a.serviceRegistry.getService("orion.page.message").setProgressMessage("")})}};f.prototype._displayCommit=function(c,d){var f=this,h=document.createElement("div");h.style.padding="10px";h.style.maxWidth="480px";b.empty(d);d.appendChild(h);var p=c.Message.split(/(\r?\n|$)/)[0],o=document.createElement("a");o.className="navlinkonpage";o.href=e.toUrl(a.expand({resource:c.Location}));o.textContent=p;h.appendChild(o);o.addEventListener("mouseup",function(a){a.button===
0&&!a.ctrlKey&&!a.metaKey&&f.hide()},!1);o.addEventListener("keyup",function(a){a.keyCode===b.KEY.ENTER&&f.hide()},!1);p=document.createElement("div");p.style.paddingTop="15px";h.appendChild(p);if(c.AuthorImage)h=new Image,h.src=c.AuthorImage,h.name=c.AuthorName,h.className="git-author-icon",p.appendChild(h);h=document.createElement("div");h.textContent=i.formatMessage(j[" authored by ${0} {${1}) on ${2}"],c.AuthorName,c.AuthorEmail,(new Date(c.Time)).toLocaleString());p.appendChild(h);h=document.createElement("div");
h.textContent=i.formatMessage(j["committed by 0 (1)"],c.CommitterName,c.CommitterEmail);p.appendChild(h);h=document.createElement("div");h.style.paddingTop="15px";h.textContent=j["commit:"]+c.Name;p.appendChild(h);if(c.Parents&&c.Parents.length>0)d=document.createElement("div"),d.textContent=j["parent:"],h=document.createElement("a"),h.className="navlinkonpage",h.href=e.toUrl(a.expand({resource:c.Parents[0].Location})),h.textContent=c.Parents[0].Name,d.appendChild(h),h.addEventListener("mouseup",
function(a){a.button===0&&!a.ctrlKey&&!a.metaKey&&f.hide()},!1),h.addEventListener("keyup",function(a){a.keyCode===b.KEY.ENTER&&f.hide()},!1),p.appendChild(d)};f.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};f.prototype.constructor=f;return{OpenCommitDialog:f}});
define("orion/git/widgets/CommitDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(e,j){function i(d){this._init(d)}i.prototype=new j.Dialog;i.prototype.TEMPLATE='<div style="display: none; padding-top: 10px; padding-bottom: 10px;" id="commitInfoBar"><strong id="commitInfo"></strong></div><div style="padding:4px"><label id="commitMessageLabel" for="commitMessage">${Message:}</label><input id="commitMessage" style="width: 30em" value=""></div><div style="padding:4px"><label id="amendLabel" for="amend">${Amend:}</label><input id="amend" type="checkbox"></div><div style="padding:4px"><label id="changeIdLabel" for="changeId">${ChangeId:}</label><input id="changeId" type="checkbox"></div><div style="padding:4px"><label id="committerNameLabel" for="committerName">${Committer Name:}</label><input id="committerName" style="width: 30em" value=""></div><div style="padding:4px"><label id="committerEmailLabel" for="committerEmail">${Committer Email:}</label><input id="committerEmail" style="width: 30em" value=""></div><div style="padding:4px"><label id="authorNameLabel" for="authorName">${Author Name:}</label><input id="authorName" style="width: 30em" value=""></div><div style="padding:4px"><label id="authorEmailLabel" for="authorEmail">${Author Email:}</label><input id="authorEmail" style="width: 30em" value=""></div>';i.prototype._init=
function(d){var c=this;this.title=e["Commit Changes"];this.modal=!0;this.messages=e;this.options=d;this.buttons=[];this.buttons.push({callback:function(){c._execute()},text:"OK",id:"commitChangesButton"});this._initialize()};i.prototype._bindToDom=function(){var d=this;if(this.options.body.Message)this.$commitMessage.value=this.options.body.Message;this.$commitMessage.addEventListener("keyup",function(){d._validate()});if(this.options.body.Amend)this.$amend.checked=!0;if(this.options.body.ChangeId)this.$changeId.checked=
!0;if(this.options.body.CommitterName)this.$committerName.value=this.options.body.CommitterName;this.$committerName.addEventListener("keyup",function(){d._validate()});if(this.options.body.CommitterEmail)this.$committerEmail.value=this.options.body.CommitterEmail;this.$committerEmail.addEventListener("keyup",function(){d._validate()});if(this.options.body.AuthorName)this.$authorName.value=this.options.body.AuthorName;this.$authorName.addEventListener("keyup",function(){d._validate()});if(this.options.body.AuthorEmail)this.$authorEmail.value=
this.options.body.AuthorEmail;this.$authorEmail.addEventListener("keyup",function(){d._validate()});this._validate()};i.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=
e["The author mail is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=e["The author name is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=e["The committer mail is required."]):(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=e["The committer name is required."]):
(this.$commitInfoBar.style.display="block",this.$commitChangesButton.classList.add(this.DISABLED),this.$commitInfo.textContent=e["The commit message is required."])};i.prototype._execute=function(){if(!this.$commitChangesButton.classList.contains(this.DISABLED)){if(this.options.func){var d={};d.Message=this.$commitMessage.value;d.Amend=this.$amend.checked?!0:!1;d.ChangeId=this.$changeId.checked?!0:!1;d.CommitterName=this.$committerName.value;d.CommitterEmail=this.$committerEmail.value;d.AuthorName=
this.$authorName.value;d.AuthorEmail=this.$authorEmail.value;this.options.func(d)}this.hide()}};i.prototype.constructor=i;return{CommitDialog:i}});
define("orion/git/widgets/ApplyPatchDialog",["i18n!git/nls/gitmessages","orion/webui/dialog"],function(e,j){function i(d){this._init(d)}i.prototype=new j.Dialog;i.prototype.TEMPLATE='<div style="padding:4px"><input type="radio" name="radio" value="urlRadio" id="urlRadio" checked/>'+e["URL:"]+'<input type="text" name="url" id="url"/></div><div style="padding:4px"><input type="radio" name="radio" value="fileRadio" id="fileRadio"/>'+e["File:"]+'<input type="file" name="selectedFile" id="selectedFile" class="uploadChooser" /></div>';
i.prototype._init=function(d){var c=this;this.title=e["Apply Patch"];this.modal=!0;this.messages=e;this.options=d;this.buttons=[];this.buttons.push({callback:function(){c._applyPatch()},text:e.OK});this._initialize()};i.prototype._bindToDom=function(){this.$selectedFile.onchange=function(){this.$urlRadio.checked=!1;this.$fileRadio.checked="fileRadio"}.bind(this);this.$url.onchange=function(){this.$urlRadio.checked="urlRadio";this.$fileRadio.checked=!1}.bind(this)};i.prototype._applyPatch=function(){var 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)};i.prototype.handleReadyState=function(){this.req.readyState===4&&(this.req.status===200?this.options.deferred&&this.options.deferred.resolve(this.req.responseText):
this.options.deferred&&this.options.deferred.reject(this.req.responseText),this.hide())};i.prototype.constructor=i;return{ApplyPatchDialog:i}});
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".split(","),function(e,
j,i,d,c,h,b,f,a,g,k,l,n,p,o,u,t,w,v,y,C,z){var s={};(function(){function m(a){return j.toUrl(F.expand({resource:a}))}function r(a){var b;try{b=JSON.parse(a.responseText)}catch(c){b={Message:e["Problem while performing the action"]}}b.HttpCode=a.status;return b}var q=!1,D=new z("git/git-repository.html#{,resource,params*}"),x=new z("git/git-log.html#{,resource,params*}?page=1"),B=new z("git/git-log.html#{,resource,params*}"),A=new z("git/git-commit.html#{,resource,params*}?page=1&pageSize=1"),F=new z(f.statusUILocation+
"#{,resource,params*}"),E=new z("edit/edit.html#{,resource,params*}");s.updateNavTools=function(a,b,d,e,f,g,h){var i=c.node(e);if(i)b.destroy(i);else throw"could not find toolbar "+e;b.renderCommands(e,i,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");q||(q=!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"))}))};s.handleKnownHostsError=function(a,b,c,g){if(confirm(d.formatMessage(e["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],b.KeyType,b.Host,b.HostFingerprint))){var h=f.parseSshGitUrl(b.Url),b={host:b.Host,keyType:b.KeyType,hostKey:b.HostKey,port:h.port};a.getService("orion.net.ssh").addKnownHost(b).then(function(b){c.knownHosts=b;typeof c.failedOperation!=="undefined"&&a.getService("orion.page.progress").removeOperation(c.failedOperation);
g(c)})}};s.handleSshAuthenticationError=function(a,b,c,d,e){var b=b?b.Url:void 0,f=function(){(new u.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!==""?(typeof c.failedOperation!=="undefined"&&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)};s.getDefaultSshOptions=function(a,b,c){var d=new i,a=a.getService("orion.net.ssh"),e=c&&!c.optionsRequested?c.valueFor("sshuser"):"",g=c&&!c.optionsRequested?c.valueFor("sshpassword"):"",h;if(b.GitUrl!==void 0)h=b.GitUrl;else if(b.errorData!==void 0)h=b.errorData.Url;else if(b.toRef!==void 0)h=b.toRef.RemoteLocation[0].GitUrl;else if(b.RemoteLocation!==
void 0)h=b.RemoteLocation[0].GitUrl;if(!h)return d.resolve({knownHosts:"",gitSshUsername:e,gitSshPassword:g,gitPrivateKey:"",gitPassphrase:""}),d;b=f.parseSshGitUrl(h);a.getKnownHostCredentials(b.host,b.port).then(function(a){d.resolve({knownHosts:a,gitSshUsername:e,gitSshPassword:g,gitPrivateKey:"",gitPassphrase:""})});return d};s.handleProgressServiceResponse=function(a,b,c,d,e,f){a&&a.status!==void 0&&(a=r(a));if(!a||a.HttpCode===void 0)d&&d(a);else switch(a.HttpCode){case 401:if(a.JsonData)b.errordata=
a.JsonData;if(a.failedOperation)b.failedOperation=a.failedOperation;s.handleSshAuthenticationError(c,a.JsonData,b,e,f);break;case 400:if(a.JsonData&&a.JsonData.HostKey){if(a.failedOperation)b.failedOperation=a.failedOperation;s.handleKnownHostsError(c,a.JsonData,b,e);break}else if(a.JsonData&&a.JsonData.Host){if(a.JsonData)b.errordata=a.JsonData;if(a.failedOperation)b.failedOperation=a.failedOperation;s.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)}};s.gatherSshCredentials=function(a,b,c){var h=new i,j;if(b.items.RemoteLocation!==void 0)j=b.items.RemoteLocation[0].GitUrl;else if(b.items.GitUrl!==void 0)j=b.items.GitUrl;else if(b.items.errorData!==void 0)j=b.items.errorData.Url;else if(b.items.toRef!==void 0)j=b.items.toRef.RemoteLocation[0].GitUrl;var k=a.getService("orion.net.ssh"),m=f.parseSshGitUrl(j),l=function(c){a.getService("orion.net.ssh").getKnownHostCredentials(m.host,
m.port).then(function(a){b.sshObject=c;h.resolve({knownHosts:a,gitSshUsername:c.gitSshUsername,gitSshPassword:c.gitSshPassword,gitPrivateKey:c.gitPrivateKey,gitPassphrase:c.gitPassphrase})})},J=b.errorData;if(J&&J.HostKey){if(confirm(d.formatMessage(e["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],J.KeyType,J.Host,J.HostFingerprint))){var N=f.parseSshGitUrl(J.Url);k.addKnownHost({host:J.Host,keyType:J.KeyType,hostKey:J.HostKey,port:N.port}).then(function(){b.sshObject&&
(b.sshObject.gitSshUsername!==""||b.sshObject.gitSshPassword!==""||b.sshObject.gitPrivateKey!=="")?l({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""}):(new g(a)).get(j).then(function(a){l(a)},function(){l({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})})})}return h}var s=function(){if(!b.parameters&&!b.optionsRequested)l({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""});else if(b.parameters&&!b.optionsRequested){var d=b.parameters&&
b.parameters.valueFor("sshuser")?b.parameters.valueFor("sshuser"):b.errorData.User,e=b.parameters?b.parameters.valueFor("sshpassword"):"",f=b.parameters&&b.parameters.valueFor("saveCredentials")?b.parameters.valueFor("saveCredentials"):!1,h=new g(a);f?h.put(j,{gitSshUsername:d,gitSshPassword:e}).then(function(){l({gitSshUsername:d,gitSshPassword:e,gitPrivateKey:"",gitPassphrase:""})}):l({gitSshUsername:d,gitSshPassword:e,gitPrivateKey:"",gitPassphrase:""})}else(new u.GitCredentialsDialog({title:c,
serviceRegistry:a,func:l,errordata:J})).show()};b.sshObject&&(b.sshObject.gitSshUsername!==""||b.sshObject.gitSshPassword!==""||b.sshObject.gitPrivateKey!=="")?s():(new g(a)).get(j).then(function(a){a.gitPrivateKey!==""||a.gitSshUsername!==""||a.gitSshPassword!==""?l(a):s()},s);return h};s.handleGitServiceResponse=function(a,b,c,d){a&&a.status!==void 0&&(a=r(a));if(!a||!a.HttpCode)c&&c(a);else switch(a.HttpCode){case 401:d(a);break;case 400:if(a.JsonData&&a.JsonData.HostKey){d(a);break}default:d=
[],d.Severity="Error",d.HTML=!1,d.Message=a.DetailedMessage?a.DetailedMessage:a.Message,b.getService("orion.page.message").setProgressResult(d),c&&c(a)}};s.createFileCommands=function(c,f,k){function r(a){var b={Severity:"Error",HTML:!1};try{var f=JSON.parse(a.responseText);a.status===401?(b.HTML=!0,b.Message="<span>",b.Message+=d.formatMessage(e["Authentication required for: ${0}. ${1} and re-try the request."],f.label,'<a target="_blank" href="'+f.SignInLocation+'">'+e.Login+"</a>")+"</span>"):
b.Message=f.DetailedMessage?f.DetailedMessage:f.Message?f.Message:e["Problem while performing the action"]}catch(g){b.Message=e["Problem while performing the action"]}c.getService("orion.page.message").setProgressResult(b)}var q=new b.ParametersDescription([new b.CommandParameter("name","text",e["Local Branch Name:"])]),q=new h.Command({name:e.Checkout,tooltip:e["Checkout the current tag, creating a local branch based on its contents."],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",
id:"eclipse.checkoutTag",parameters:q,callback:function(a){var b=a.items,f=function(a,b,f){c.getService("orion.page.progress").showWhile(c.getService("orion.git.provider").checkoutTag(a,b,f),d.formatMessage(e["Checking out tag ${0}"],f)).then(function(){k.changedItem()},r)},g=b.Repository?b.Repository.Location:b.CloneLocation;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&f(g,b.Name,a.parameters.valueFor("name"))},visibleWhen:function(a){return a.Type==="Tag"}});f.addCommand(q);q=
new h.Command({name:e.Checkout,tooltip:e["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 b=a.items,f=c.getService("orion.git.provider"),g=c.getService("orion.page.message"),h=c.getService("orion.page.progress");g.setProgressMessage(b.Name?d.formatMessage(e["Checking out branch ${0}..."],
b.Name):e["Checking out branch..."]);b.Type==="Branch"?h.progress(f.checkoutBranch(b.CloneLocation,b.Name),"Checking out branch "+b.Name).then(function(){g.setProgressResult(e["Branch checked out."]);k.changedItem(b.parent)},function(a){r(a)}):h.progress(f.addBranch(b.Repository?b.Repository.BranchLocation:b.parent.parent.BranchLocation,null,b.Name),"Adding branch "+b.Name).then(function(a){h.progress(f.checkoutBranch(a.CloneLocation,a.Name),"Checking out branch "+b.Name).then(function(){g.setProgressResult(e["Branch checked out."]);
k.changedItem(b.Repository?b.Repository.BranchLocation:b.parent.parent.parent)},function(a){r(a)})},function(a){r(a)})},visibleWhen:function(a){return a.Type==="Branch"||a.Type==="RemoteTrackingBranch"}});f.addCommand(q);q=new b.ParametersDescription([new b.CommandParameter("name","text","Name:")]);q=new h.Command({name:e["New Branch"],tooltip:e["Add a new local branch to the repository"],id:"eclipse.addBranch",parameters:q,callback:function(a){var b=a.items,d=c.getService("orion.page.progress"),
e=function(a,e){d.progress(c.getService("orion.git.provider").addBranch(a,e),"Adding branch "+e).then(function(){k.changedItem(b)},r)},f;f=b.Type==="Clone"?b.BranchLocation:b.Location;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&e(f,a.parameters.valueFor("name"))},visibleWhen:function(a){return a.GroupNode&&a.Name==="Branches"||a.Type==="Clone"&&k.parentId==="artifacts"}});f.addCommand(q);q=new h.Command({name:e.Delete,tooltip:e["Delete the local branch from the repository"],imageClass:"core-sprite-delete",
id:"eclipse.removeBranch",callback:function(a){var b=a.items,a=c.getService("orion.page.progress");confirm(d.formatMessage(e["Are you sure you want to delete branch ${0}?"],b.Name))&&a.progress(c.getService("orion.git.provider").removeBranch(b.Location),"Removing branch "+b.Name).then(function(){k.changedItem?k.changedItem(b.parent):k.displayBranches&&k.displayBranches(b.ParentLocation,null)},r)},visibleWhen:function(a){return a.Type==="Branch"&&!a.Current}});f.addCommand(q);q=new h.Command({name:e.Delete,
tooltip:e["Delete the remote tracking branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(a){var b=a.items,f=c.getService("orion.page.progress");confirm(d.formatMessage(e["You're going to delete remote branch ${0} and push the change."],b.Name)+"\n\n"+e["Are you sure?"])&&s.getDefaultSshOptions(c,b).then(function(a){var d=arguments.callee,g=c.getService("orion.git.provider"),h=c.getService("orion.page.message"),g=f.progress(g.doPush(b.Location,
"",!1,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),e["Removing remote branch: "]+b.Name);h.createProgressMonitor(g,e["Removing remote branch: "]+b.Name);g.then(function(f){s.handleProgressServiceResponse(f,a,c,function(a){a.Result.Severity=="Ok"&&k.changedItem(b.parent)},d,e["Delete Remote Branch"])},function(f){s.handleProgressServiceResponse(f,a,c,function(){},d,e["Removing remote branch: "]+b.Name)})})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"}});
f.addCommand(q);q=new b.ParametersDescription([new b.CommandParameter("name","text","Name:"),new b.CommandParameter("url","url","Url:")]);q=new h.Command({name:e["New Remote"],tooltip:e["Add a new remote to the repository"],id:"eclipse.addRemote",parameters:q,callback:function(a){var b=a.items,d=c.getService("orion.page.progress"),e=function(a,e,f){d.progress(c.getService("orion.git.provider").addRemote(a,e,f),"Adding remote "+a).then(function(){k.changedItem(b)},r)},f;f=b.Type==="Clone"?b.RemoteLocation:
b.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&&a.Name==="Remotes"||a.Type==="Clone"&&k.parentId==="artifacts"}});f.addCommand(q);q=new h.Command({name:e.Delete,tooltip:e["Delete the remote from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemote",callback:function(a){var b=a.items;confirm(d.formatMessage(e["Are you sure you want to delete remote ${0}?"],
b.Name))&&c.getService("orion.page.progress").progress(c.getService("orion.git.provider").removeRemote(b.Location),"Removing remote "+b.Name).then(function(){k.changedItem(b.parent)},r)},visibleWhen:function(a){return a.Type==="Remote"}});f.addCommand(q);q=new h.Command({name:e.Pull,tooltip:e["Pull from the repository"],imageClass:"git-sprite-pull",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pull",callback:function(a){var b=a.items,d=b.Location,f=b.Name;s.getDefaultSshOptions(c,b).then(function(a){var g=
arguments.callee,h=c.getService("orion.git.provider"),i=c.getService("orion.page.message"),h=c.getService("orion.page.progress").progress(h.doPull(d,!1,a.gitSshUsername,a.gitSshPassword,a.knownHosts,a.gitPrivateKey,a.gitPassphrase),e["Pulling: "]+f);i.createProgressMonitor(h,e["Pulling: "]+f);var j;h.then(function(d){s.handleProgressServiceResponse(d,a,c,function(){b.Type==="Clone"&&k.changedItem(b)},g,"Pull Git Repository")},function(d){if(j)d.failedOperation=j;s.handleProgressServiceResponse(d,
a,c,function(){k.changedItem(b)},g,e["Pull Git Repository"])},function(a){j=a.Location})})},visibleWhen:function(a){return a.Type==="Clone"}});f.addCommand(q);q=new h.Command({name:e["Git Log"],tooltip:e["Open the log for the branch"],id:"eclipse.openGitLog",hrefCallback:function(a){return j.toUrl(x.expand({resource:a.items.CommitLocation}))},visibleWhen:function(a){return a.Type==="Branch"||a.Type==="RemoteTrackingBranch"}});f.addCommand(q);q=new h.Command({name:e["Git Log"],tooltip:e["Open the log for the repository"],
id:"eclipse.openGitLogAll",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(a){return j.toUrl(x.expand({resource:a.items.CommitLocation}))},visibleWhen:function(a){return!a.CommitLocation||!a.StatusLocation?!1:!0}});f.addCommand(q);q=new h.Command({name:e["Git Status"],tooltip:e["Open the status for the repository"],id:"eclipse.openGitStatus",hrefCallback:function(a){return m(a.items.StatusLocation)},visibleWhen:function(a){return!a.StatusLocation?!1:!0}});f.addCommand(q);
q=new h.Command({name:e.ShowInEditor,tooltip:e.ShowInEditorTooltip,id:"eclipse.openCloneContent",hrefCallback:function(a){return j.toUrl(E.expand({resource:a.items.ContentLocation}))},visibleWhen:function(a){return!a.ContentLocation?!1:!0}});f.addCommand(q);q=new h.Command({name:e["Compare With Each Other"],id:"eclipse.compareGitCommits",hrefCallback:function(b){b=b.items;return c.getService("orion.page.progress").progress(c.getService("orion.git.provider").getDiff(b[1].DiffLocation,b[0].Name),"Generating Diff for "+
b[0].Name+" and "+b[1].Name).then(function(b){return a.generateCompareHref(b.Location,{readonly:!0})})},visibleWhen:function(a){return k.isDirectory?!1:Array.isArray(a)&&a.length===2&&a[0].Type==="Commit"&&a[1].Type==="Commit"?!0:!1}});f.addCommand(q);q=new h.Command({name:e["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 a.Type===
"Commit"&&a.ContentLocation!==null&&!k.isDirectory}});f.addCommand(q);q=new h.Command({name:e.Open,id:"eclipse.openGitCommit",imageClass:"git-sprite-open",spriteClass:"gitCommandSprite",hrefCallback:function(a){return j.toUrl(E.expand({resource:a.items.ContentLocation}))},visibleWhen:function(a){return a.Type==="Commit"&&a.ContentLocation!=null&&!k.isDirectory}});f.addCommand(q);q=new h.Command({name:e.Fetch,tooltip:e["Fetch from the remote"],imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",
id:"eclipse.orion.git.fetch",callback:function(a){var d=a.items,h=d.Location,i=d.Name,j=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,d.errorData.failedOperation=a.failedOperation,f.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,d.errorData.failedOperation=a.failedOperation,f.collectParameters(d)):(new g(c)).isEnabled().then(function(c){d.parameters=c?a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"]),
new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0}):
new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0});d.errorData=a.JsonData;d.errorData.failedOperation=a.failedOperation;f.collectParameters(d)})},m=function(){a.parameters&&a.parameters.optionsRequested?(a.parameters=null,a.optionsRequested=!0,f.collectParameters(a)):(a.errorData&&a.errorData.failedOperation&&c.getService("orion.page.progress").removeOperation(a.errorData.failedOperation),
s.gatherSshCredentials(c,a).then(function(b){var f=c.getService("orion.git.provider"),g=c.getService("orion.page.message"),b=c.getService("orion.page.progress").progress(f.doFetch(h,!1,b.gitSshUsername,b.gitSshPassword,b.knownHosts,b.gitPrivateKey,b.gitPassphrase),e["Fetching remote: "]+i);g.createProgressMonitor(b,e["Fetching remote: "]+i);b.then(function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem(d)},function(b){j(b,a)})},function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem(d)},
function(b){j(b,a)})})}))};if(a.items.GitUrl)m();else{var l=c.getService("orion.git.provider"),q=c.getService("orion.page.progress");q.progress(l.getGitRemote(h),"Getting remote details "+i).then(function(b){q.progress(l.getGitClone(b.CloneLocation),"Getting git repository information "+b.Name).then(function(b){a.items.GitUrl=b.Children[0].GitUrl;m()},r)},r)}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Remote"?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?
!0:!1}});f.addCommand(q);q=new h.Command({name:e["Force Fetch"],imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",tooltip:e["Fetch from the remote branch into your remote tracking branch overriding its current content"],id:"eclipse.orion.git.fetchForce",callback:function(a){if(confirm(e["You're going to override content of the remote tracking branch. This can cause the branch to lose commits."]+"\n\n"+e["Are you sure?"])){var d=a.items,h=d.Location,i=d.Name,j=function(a,d){a.JsonData.HostKey?
(d.parameters=null,d.errorData=a.JsonData,d.errorData.failedOperation=a.failedOperation,f.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,f.collectParameters(d)):(new g(c)).isEnabled().then(function(c){d.parameters=c?a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser",
"text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0});
d.errorData=a.JsonData;d.errorData.failedOperation=a.failedOperation;f.collectParameters(d)})},m=function(){a.parameters&&a.parameters.optionsRequested?(a.parameters=null,a.optionsRequested=!0,f.collectParameters(a)):(a.errorData&&a.errorData.failedOperation&&c.getService("orion.page.progress").removeOperation(a.errorData.failedOperation),s.gatherSshCredentials(c,a).then(function(b){var f=c.getService("orion.git.provider"),g=c.getService("orion.page.progress"),m=c.getService("orion.page.message"),
b=g.progress(f.doFetch(h,!0,b.gitSshUsername,b.gitSshPassword,b.knownHosts,b.gitPrivateKey,b.gitPassphrase),e["Fetching remote: "]+i);m.createProgressMonitor(b,e["Fetching remote: "]+i);b.then(function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem(d)},function(b){j(b,a)})},function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem(d)},function(b){j(b,a)})})}))};if(a.items.GitUrl)m();else{var l=c.getService("orion.git.provider");l.getGitRemote(h).then(function(b){l.getGitClone(b.CloneLocation).then(function(b){a.items.GitUrl=
b.Children[0].GitUrl;m()})})}}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Remote"?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});f.addCommand(q);q=new h.Command({name:e.Merge,tooltip:e["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 b=a.items,a=c.getService("orion.git.provider"),f=c.getService("orion.page.progress"),
g=c.getService("orion.page.message");f.progress(a.doMerge(b.HeadLocation,b.Name,!1),"Merging "+b.Name).then(function(a){var c={};if(a.Result==="FAST_FORWARD"||a.Result==="ALREADY_UP_TO_DATE")c.Severity="Ok",c.HTML=!1,c.Message=a.Result;else if(a.Result){var f=b.HeadLocation.replace("commit/HEAD","status");c.Severity="Warning";c.HTML=!0;c.Message="<span>"+a.Result;if(a.FailingPaths){var h="",i=!0,j;for(j in a.FailingPaths)i||(h+=", "),i=!1,h+=j;if(!i)c.Severity="Error",c.Message+=". "+d.formatMessage(e["Failing paths: ${0}"],
h)}c.Message+=d.formatMessage(e[". Go to ${0}."],'<a href="'+m(f)+'">'+e["Git Status page"]+"</a>")+"</span>"}else if(a.error)f=b.HeadLocation.replace("commit/HEAD","status"),c.Severity="Error",a.error.responseText&&JSON.parse(a.error.responseText)?(a=JSON.parse(a.error.responseText),c.Message=a.DetailedMessage?a.DetailedMessage:a.Message):c.Message=a.error.message,c.HTML=!0,c.Message="<span>"+c.Message+d.formatMessage(e[". Go to ${0}."],'<a href="'+m(f)+'">'+e["Git Status page"]+"</a>")+"</span>";
g.setProgressResult(c);k.changedItem(b)},function(a,f){var g=[],h=b.HeadLocation.replace("commit/HEAD","status");g.Severity="Error";g.HTML=!0;g.Message="<span>"+JSON.stringify(f.xhr.responseText).DetailedMessage+d.formatMessage(e[". Go to ${0}."],'<a href="'+m(h)+'">'+e["Git Status page"]+"</a>")+".</span>";c.getService("orion.page.message").setProgressResult(g);k.changedItem(b)})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Branch"&&!a.Current?!0:a.Type==="Commit"&&
a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});f.addCommand(q);q=new h.Command({name:e["Merge Squash"],tooltip:e["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 b=a.items,a=c.getService("orion.git.provider"),f=c.getService("orion.page.progress"),g=c.getService("orion.page.message");f.progress(a.doMerge(b.HeadLocation,b.Name,!0),"Merging "+b.Name).then(function(a){var c=
[];if(a.Result==="FAST_FORWARD_SQUASHED"||a.Result==="ALREADY_UP_TO_DATE")c.Severity="Ok",c.HTML=!1,c.Message=a.Result;else if(a.Result){var f=b.HeadLocation.replace("commit/HEAD","status");c.Severity="Warning";c.HTML=!0;c.Message="<span>"+a.Result+d.formatMessage(e[". Go to ${0}."],'<a href="'+m(f)+'">'+e["Git Status page"]+"</a>")+"</span>"}else if(a.error)f=b.HeadLocation.replace("commit/HEAD","status"),c.Severity="Error",a.error.responseText&&JSON.parse(a.error.responseText)?(a=JSON.parse(a.error.responseText),
c.Message=a.DetailedMessage?a.DetailedMessage:a.Message):c.Message=a.error.message,c.HTML=!0,c.Message="<span>"+c.Message+d.formatMessage(e[". Go to ${0}."],'<a href="'+m(f)+'">'+e["Git Status page"]+"</a>")+"</span>";g.setProgressResult(c);k.changedItem(b)},function(a,f){var g=[],h=b.HeadLocation.replace("commit/HEAD","status");g.Severity="Error";g.HTML=!0;g.Message="<span>"+JSON.stringify(f.xhr.responseText).DetailedMessage+d.formatMessage(e[". Go to ${0}."],'<a href="'+m(h)+'">'+e["Git Status page"]+
"</a>")+".</span>";c.getService("orion.page.message").setProgressResult(g);k.changedItem(b)})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Branch"&&!a.Current?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});f.addCommand(q);q=new h.Command({name:e.Rebase,tooltip:e["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){var b=a.items,a=c.getService("orion.page.message"),f=c.getService("orion.page.progress").progress(c.getService("orion.git.provider").doRebase(b.HeadLocation,b.Name,"BEGIN"),b.Name?e["Rebase on top of "]+b.Name:e.Rebase);a.createProgressMonitor(f,b.Name?e["Rebase on top of "]+b.Name:e.Rebase);f.then(function(a){var f=[],g=b.HeadLocation.replace("commit/HEAD","status");a.Result==="OK"||a.Result===
"FAST_FORWARD"||a.Result==="UP_TO_DATE"?(f.Severity="Ok",f.HTML=!1,f.Message=a.Result):a.Result==="STOPPED"?(f.Severity="Warning",f.HTML=!0,f.Message="<span>"+a.Result+e[". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing"]+d.formatMessage(e[". Go to ${0}."],'<a href="'+m(g)+'">'+e["Git Status page"]+"</a>")+".</span>"):a.Result==="FAILED_WRONG_REPOSITORY_STATE"?(f.Severity="Error",f.HTML=!0,f.Message="<span>"+a.Result+e[". Repository state is invalid (i.e. already during rebasing)"]+
d.formatMessage(". Go to ${0}.",'<a href="'+m(g)+'">'+e["Git Status page"]+"</a>")+".</span>"):a.Result==="FAILED_UNMERGED_PATHS"?(f.Severity="Error",f.HTML=!0,f.Message="<span>"+a.Result+e[". Repository contains unmerged paths"]+d.formatMessage(e[". Go to ${0}."],'<a href="'+m(g)+'">'+e["Git Status page"]+"</a>")+".</span>"):a.Result==="FAILED_PENDING_CHANGES"?(f.Severity="Error",f.HTML=!0,f.Message="<span>"+a.Result+e[". Repository contains pending changes. Please commit or stash them"]+d.formatMessage(e[". Go to ${0}."],
'<a href="'+m(g)+'">Git Status page</a>')+".</span>"):(f.Severity="Warning",f.HTML=!0,f.Message="<span>"+a.Result+d.formatMessage(e[". Go to ${0}."],'<a href="'+m(g)+'">'+e["Git Status page"]+"</a>")+".</span>");c.getService("orion.page.message").setProgressResult(f);k.changedItem(b)},r)},visibleWhen:function(a){this.tooltip=e["Rebase your commits by removing them from the active branch, "]+e["starting the active branch again based on the latest state of '"]+a.Name+"' "+e["and applying each commit again to the updated active branch."];
return a.Type==="RemoteTrackingBranch"||a.Type==="Branch"&&!a.Current}});f.addCommand(q);q=new h.Command({name:e["Push All"],tooltip:e["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){var d=a.targetBranch,h,j=a.items;if(j.toRef)j=j.toRef;j.CloneLocation.split("/");var m=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,d.errorData.failedOperation=
a.failedOperation,f.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,d.errorData.failedOperation=a.failedOperation,f.collectParameters(d)):(new g(c)).isEnabled().then(function(c){d.parameters=c?a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),
new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0});d.errorData=
a.JsonData;d.errorData.failedOperation=a.failedOperation;f.collectParameters(d)})};if(a.parameters&&a.parameters.optionsRequested)a.parameters=null,a.optionsRequested=!0,f.collectParameters(a);else{var r=c.getService("orion.git.provider"),q=c.getService("orion.page.progress");a.errorData&&a.errorData.failedOperation&&q.removeOperation(a.errorData.failedOperation);var o=function(b,d,f,g,h){var i=c.getService("orion.page.message"),b=q.progress(r.doPush(d,f,!0,h,b.gitSshUsername,b.gitSshPassword,b.knownHosts,
b.gitPrivateKey,b.gitPassphrase),e["Pushing remote: "]+g);i.createProgressMonitor(b,e["Pushing remote: "]+g);b.then(function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem()},function(b){m(b,a)})},function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem()},function(b){m(b,a)})})};q.progress(r.getGitClone(j.CloneLocation),"Getting git repository details "+j.Name).then(function(b){var f=b.Children[0].RemoteLocation,g=b.Children[0].ConfigLocation,k=function(a){s.handleProgressServiceResponse(a,
{},c)};s.gatherSshCredentials(c,a).then(function(b){var m=new i;if(j.RemoteLocation.length===1&&j.RemoteLocation[0].Children.length===1)m=q.progress(r.getGitRemote(f),"Getting git remote details "+j.Name);else{var s={};s.Children=j.RemoteLocation;m.resolve(s)}m.then(function(f){d?o(b,d.Location,"HEAD",d.Name,!1):(f=new n.RemotePrompterDialog({title:e["Choose Branch"],serviceRegistry:c,gitClient:r,treeRoot:{Children:f.Children},hideNewBranch:!1,func:function(c,d,e){h=c===null?e:c;var f="branch."+j.Name+
".remote";q.progress(r.addCloneConfigurationProperty(g,f,h.parent.Name),"Adding git configuration property "+j.Name).then(function(){a.targetBranch=h;o(b,h.Location,"HEAD",h.Name,!1)},function(c){c.status===409?r.getGitCloneConfig(g).then(function(c){if(c.Children)for(var d=0;d<c.Children.length;d++)if(c.Children[d].Key===f){q.progress(r.editCloneConfigurationProperty(c.Children[d].Location,h.parent.Name),"Updating configuration property "+h.parent.Name).then(function(){a.targetBranch=h;o(b,h.Location,
"HEAD",h.Name,!1)},k);break}},k):k(c)})}}),j.RemoteLocation.length===1&&j.RemoteLocation[0].Children.length===1&&(f=new l.ConfirmPushDialog({title:e["Choose Branch"],serviceRegistry:c,gitClient:r,dialog:f,location:j.RemoteLocation[0].Children[0].Name,func:function(){a.targetBranch=j.RemoteLocation[0].Children[0];o(b,j.RemoteLocation[0].Children[0].Location,"HEAD",j.Name,!1)}})),f.show())})})})}},visibleWhen:function(a){return a.toRef?a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&
a.toRef.RemoteLocation:a.Type==="Branch"&&a.Current&&a.RemoteLocation}});f.addCommand(q);q=new h.Command({name:e["Push Branch"],tooltip:e["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){var d=a.targetBranch,h,j=a.items;if(j.toRef)j=j.toRef;j.CloneLocation.split("/");var m=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,d.errorData.failedOperation=
a.failedOperation,f.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,d.errorData.failedOperation=a.failedOperation,f.collectParameters(d)):(new g(c)).isEnabled().then(function(c){d.parameters=c?a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),
new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0});d.errorData=
a.JsonData;d.errorData.failedOperation=a.failedOperation;f.collectParameters(d)})};if(a.parameters&&a.parameters.optionsRequested)a.parameters=null,a.optionsRequested=!0,f.collectParameters(a);else{var r=c.getService("orion.git.provider"),q=c.getService("orion.page.progress");a.errorData&&a.errorData.failedOperation&&q.removeOperation(a.errorData.failedOperation);var o=function(b,d,f,g,h){var i=c.getService("orion.page.message"),b=q.progress(r.doPush(d,f,!1,h,b.gitSshUsername,b.gitSshPassword,b.knownHosts,
b.gitPrivateKey,b.gitPassphrase),e["Pushing remote: "]+g);i.createProgressMonitor(b,e["Pushing remote: "]+g);b.then(function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem()},function(b){m(b,a)})},function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem()},function(b){m(b,a)})})};q.progress(r.getGitClone(j.CloneLocation),"Getting git repository details "+j.Name).then(function(b){var f=b.Children[0].RemoteLocation,g=b.Children[0].ConfigLocation,k=function(a){s.handleProgressServiceResponse(a,
{},c)};s.gatherSshCredentials(c,a).then(function(b){var m=new i;if(j.RemoteLocation.length===1&&j.RemoteLocation[0].Children.length===1)m=q.progress(r.getGitRemote(f),"Getting git remote details "+j.Name);else{var s={};s.Children=j.RemoteLocation;m.resolve(s)}m.then(function(f){d?o(b,d.Location,"HEAD",d.Name,!1):(f=new n.RemotePrompterDialog({title:e["Choose Branch"],serviceRegistry:c,gitClient:r,treeRoot:{Children:f.Children},hideNewBranch:!1,func:function(c,d,e){h=c===null?e:c;var f="branch."+j.Name+
".remote";q.progress(r.addCloneConfigurationProperty(g,f,h.parent.Name),"Adding git configuration property "+j.Name).then(function(){a.targetBranch=h;o(b,h.Location,"HEAD",h.Name,!1)},function(c){c.status===409?r.getGitCloneConfig(g).then(function(c){if(c.Children)for(var d=0;d<c.Children.length;d++)if(c.Children[d].Key===f){q.progress(r.editCloneConfigurationProperty(c.Children[d].Location,h.parent.Name),"Updating configuration property "+h.parent.Name).then(function(){a.targetBranch=h;o(b,h.Location,
"HEAD",h.Name,!1)},k);break}},k):k(c)})}}),j.RemoteLocation.length===1&&j.RemoteLocation[0].Children.length===1&&(f=new l.ConfirmPushDialog({title:e["Choose Branch"],serviceRegistry:c,gitClient:r,dialog:f,location:j.RemoteLocation[0].Children[0].Name,func:function(){a.targetBranch=j.RemoteLocation[0].Children[0];o(b,j.RemoteLocation[0].Children[0].Location,"HEAD",j.Name,!1)}})),f.show())})})})}},visibleWhen:function(a){return a.toRef?a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&
a.toRef.RemoteLocation:a.Type==="Branch"&&a.Current&&a.RemoteLocation}});f.addCommand(q);q=new h.Command({name:e["Push for Review"],tooltip:e["Push commits to Gerrit Code Review"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushToGerrit",callback:function(a){var d=a.targetBranch,h=a.items;if(h.toRef)h=h.toRef;h.CloneLocation.split("/");var j=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,d.errorData.failedOperation=a.failedOperation,
f.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,d.errorData.failedOperation=a.failedOperation,f.collectParameters(d)):(new g(c)).isEnabled().then(function(c){d.parameters=c?a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword",
"password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0});d.errorData=a.JsonData;d.errorData.failedOperation=
a.failedOperation;f.collectParameters(d)})};if(a.parameters&&a.parameters.optionsRequested)a.parameters=null,a.optionsRequested=!0,f.collectParameters(a);else{var m=c.getService("orion.git.provider"),r=c.getService("orion.page.progress");a.errorData&&a.errorData.failedOperation&&r.removeOperation(a.errorData.failedOperation);var q=function(b,d,f,g,h){var i=c.getService("orion.page.message"),b=r.progress(m.doPush(d,f,!1,h,b.gitSshUsername,b.gitSshPassword,b.knownHosts,b.gitPrivateKey,b.gitPassphrase),
e["Pushing remote: "]+g);i.createProgressMonitor(b,e["Pushing remote: "]+g);b.then(function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem()},function(b){j(b,a)})},function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem()},function(b){j(b,a)})})};r.progress(m.getGitClone(h.CloneLocation),"Getting git repository details "+h.Name).then(function(b){var f=b.Children[0].RemoteLocation;s.gatherSshCredentials(c,a).then(function(b){var g=new i;if(h.RemoteLocation.length===1&&h.RemoteLocation[0].Children.length===
1)g=r.progress(m.getGitRemote(f),"Getting git remote details "+h.Name);else{var j={};j.Children=h.RemoteLocation;g.resolve(j)}g.then(function(){if(d)q(b,d.Location,"HEAD",d.Name,!1);else{a.targetBranch=h.RemoteLocation[0].Children[0];var f=h.RemoteLocation[0].Children[0].Location.split("/");f[4]=encodeURIComponent(encodeURIComponent("refs/for/master"));var g=f.join("/");a.targetBranch.Location=g;a.targetBranch.Name="refs/for/master";dialog=new l.ConfirmPushDialog({title:e["Choose Branch"],serviceRegistry:c,
gitClient:m,dialog:null,location:"refs/for/master",func:function(){q(b,g,"HEAD","refs/for/master",!1)}});dialog.show()}})})})}},visibleWhen:function(a){return a.toRef?a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&a.toRef.RemoteLocation&&a.toRef.RemoteLocation[0].IsGerrit:a.Type==="Branch"&&a.Current&&a.RemoteLocation&&a.RemoteLocation[0].IsGerrit}});f.addCommand(q);q=new h.Command({name:e["Force Push All"],tooltip:e["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){var d=a.confirmedWarnings,h=a.targetBranch;if(!d)if(confirm(e["You're going to override content of the remote branch. This can cause the remote repository to lose commits."]+"\n\n"+e["Are you sure?"]))d=a.confirmedWarnings=!0;else return;var j,m=a.items;if(m.toRef)m=m.toRef;var r=m.CloneLocation.split("/"),q=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,f.collectParameters(d)):
d.optionsRequested?(d.errorData=a.JsonData,f.collectParameters(d)):(new g(c)).isEnabled().then(function(c){d.parameters=c?a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials",
"boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0});d.errorData=a.JsonData;f.collectParameters(d)})};if(a.parameters&&a.parameters.optionsRequested)a.parameters=null,a.optionsRequested=
!0,f.collectParameters(a);else{var o=c.getService("orion.git.provider"),x=c.getService("orion.page.progress"),p=function(b,d,f,g,h){var i=c.getService("orion.page.message"),b=x.progress(o.doPush(d,f,!0,h,b.gitSshUsername,b.gitSshPassword,b.knownHosts,b.gitPrivateKey,b.gitPassphrase),e["Pushing remote: "]+g);i.createProgressMonitor(b,e["Pushing remote: "]+g);b.then(function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem()},function(b){q(b,a)})},function(b){s.handleGitServiceResponse(b,
c,function(){k.changedItem(m)},function(b){q(b,a)})})};x.progress(o.getGitClone(m.CloneLocation),"Getting git repository details "+m.Name).then(function(b){var d=b.Children[0].RemoteLocation,f=b.Children[0].ConfigLocation;s.gatherSshCredentials(c,a).then(function(b){var g=new i;if(m.RemoteLocation.length===1&&m.RemoteLocation[0].Children.length===1)g=x.progress(o.getGitRemote(d),"Getting remote details "+m.Name);else{var k={};k.Children=m.RemoteLocation;g.resolve(k)}g.then(function(d){h?p(b,h.Location,
"HEAD",h.Name,!0):(d=new n.RemotePrompterDialog({title:e["Choose Branch"],serviceRegistry:c,gitClient:o,treeRoot:{Children:d.Children},hideNewBranch:!1,func:function(c,d,e){j=c===null?e:c;var g="/gitapi/config/branch."+m.Name+".remote/clone/file/"+r[4];x.progress(o.addCloneConfigurationProperty(f,"branch."+m.Name+".remote",j.parent.Name),"Setting git configuration property "+m.Name).then(function(){a.targetBranch=j;p(b,j.Location,"HEAD",j.Name,!0)},function(c){c.status===409&&x.progres(o.editCloneConfigurationProperty(g,
j.parent.Name),"Setting git configuration property "+j.parent.Name).then(function(){a.targetBranch=j;p(b,j.Location,"HEAD",j.Name,!0)})})}}),m.RemoteLocation.length===1&&m.RemoteLocation[0].Children.length===1&&(d=new l.ConfirmPushDialog({title:e["Choose Branch"],serviceRegistry:c,gitClient:o,dialog:d,location:m.RemoteLocation[0].Children[0].Name,func:function(){a.targetBranch=m.RemoteLocation[0].Children[0];p(b,m.RemoteLocation[0].Children[0].Location,"HEAD",m.Location,!0)}})),d.show())})})})}},
visibleWhen:function(a){if(a.toRef)return a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&a.toRef.RemoteLocation}});f.addCommand(q);q=new h.Command({name:e["Force Push Branch"],tooltip:e["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){var d=a.confirmedWarnings,h=a.targetBranch;if(!d)if(confirm(e["You're going to override content of the remote branch. This can cause the remote repository to lose commits."]+
"\n\n"+e["Are you sure?"]))d=a.confirmedWarnings=!0;else return;var j,m=a.items;if(m.toRef)m=m.toRef;var r=m.CloneLocation.split("/"),q=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,f.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,f.collectParameters(d)):(new g(c)).isEnabled().then(function(c){d.parameters=c?a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials",
"boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser",
"text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0});d.errorData=a.JsonData;f.collectParameters(d)})};if(a.parameters&&a.parameters.optionsRequested)a.parameters=null,a.optionsRequested=!0,f.collectParameters(a);else{var o=c.getService("orion.git.provider"),x=c.getService("orion.page.progress"),p=function(b,d,f,g,h){var i=c.getService("orion.page.message"),b=x.progress(o.doPush(d,f,!1,h,b.gitSshUsername,b.gitSshPassword,b.knownHosts,
b.gitPrivateKey,b.gitPassphrase),e["Pushing remote: "]+g);i.createProgressMonitor(b,e["Pushing remote: "]+g);b.then(function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem()},function(b){q(b,a)})},function(b){s.handleGitServiceResponse(b,c,function(){k.changedItem(m)},function(b){q(b,a)})})};x.progress(o.getGitClone(m.CloneLocation),"Getting git repository details "+m.Name).then(function(b){var d=b.Children[0].RemoteLocation,f=b.Children[0].ConfigLocation;s.gatherSshCredentials(c,a).then(function(b){var g=
new i;if(m.RemoteLocation.length===1&&m.RemoteLocation[0].Children.length===1)g=x.progress(o.getGitRemote(d),"Getting remote details "+m.Name);else{var k={};k.Children=m.RemoteLocation;g.resolve(k)}g.then(function(d){h?p(b,h.Location,"HEAD",h.Name,!0):(d=new n.RemotePrompterDialog({title:e["Choose Branch"],serviceRegistry:c,gitClient:o,treeRoot:{Children:d.Children},hideNewBranch:!1,func:function(c,d,e){j=c===null?e:c;var g="/gitapi/config/branch."+m.Name+".remote/clone/file/"+r[4];x.progress(o.addCloneConfigurationProperty(f,
"branch."+m.Name+".remote",j.parent.Name),"Setting git configuration property "+m.Name).then(function(){a.targetBranch=j;p(b,j.Location,"HEAD",j.Name,!0)},function(c){c.status===409&&x.progres(o.editCloneConfigurationProperty(g,j.parent.Name),"Setting git configuration property "+j.parent.Name).then(function(){a.targetBranch=j;p(b,j.Location,"HEAD",j.Name,!0)})})}}),m.RemoteLocation.length===1&&m.RemoteLocation[0].Children.length===1&&(d=new l.ConfirmPushDialog({title:e["Choose Branch"],serviceRegistry:c,
gitClient:o,dialog:d,location:m.RemoteLocation[0].Children[0].Name,func:function(){a.targetBranch=m.RemoteLocation[0].Children[0];p(b,m.RemoteLocation[0].Children[0].Location,"HEAD",m.Location,!0)}})),d.show())})})})}},visibleWhen:function(a){if(a.toRef)return a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&a.toRef.RemoteLocation}});f.addCommand(q);q=new h.Command({name:e["< Previous Page"],tooltip:e["Show previous page of git log"],id:"eclipse.orion.git.previousLogPage",hrefCallback:function(a){return j.toUrl(B.expand({resource:a.items.PreviousLocation}))},
visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"||a.toRef&&a.toRef.Type==="Branch"||a.RepositoryPath!==null?a.PreviousLocation!==void 0:!1}});f.addCommand(q);q=new h.Command({name:e["Next Page >"],tooltip:e["Show next page of git log"],id:"eclipse.orion.git.nextLogPage",hrefCallback:function(a){return j.toUrl(B.expand({resource:a.items.NextLocation}))},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"||a.toRef&&a.toRef.Type==="Branch"||a.RepositoryPath!==null?a.NextLocation!==
void 0:!1}});f.addCommand(q);q=new h.Command({name:e["< Previous Page"],tooltip:e["Show previous page of git tags"],id:"eclipse.orion.git.previousTagPage",hrefCallback:function(a){return j.toUrl(D.expand({resource:a.items.PreviousLocation}))},visibleWhen:function(a){return a.Type==="Tag"?a.PreviousLocation!==void 0:!1}});f.addCommand(q);q=new h.Command({name:e["Next Page >"],tooltip:e["Show next page of git tags"],id:"eclipse.orion.git.nextTagPage",hrefCallback:function(a){return j.toUrl(D.expand({resource:a.items.NextLocation}))},
visibleWhen:function(a){return a.Type==="Tag"?a.NextLocation!==void 0:!1}});f.addCommand(q);q=new h.Command({name:e.Reset,tooltip:e["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){var b=a.items;if(confirm(d.formatMessage(e.GitResetIndexConfirm,b.Name))){var a=c.getService("orion.git.provider"),f=c.getService("orion.page.message"),
a=c.getService("orion.page.progress").progress(a.resetIndex(b.IndexLocation,b.Name),"Resetting git index for "+b.Name);f.createProgressMonitor(a,e["Resetting index..."]);a.then(function(){k.changedItem(b);f.setProgressResult({Severity:"Info",HTML:!1,Message:"Ok"})},function(a){var b={Severity:"Error",HTML:!1};b.Message=a.message;f.setProgressResult(b)})}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"}});f.addCommand(q);q=new b.ParametersDescription([new b.CommandParameter("name",
"text",e["Name:"])]);q=new h.Command({name:e.Tag,tooltip:e["Create a tag for the commit"],imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",parameters:q,callback:function(a){var b=a.items,d=function(a,d){c.getService("orion.page.progress").progress(c.getService("orion.git.provider").doAddTag(a,d),"Adding tag "+d).then(function(){k.changedItem(b)},r)},e=b.Location;a.parameters.valueFor("name")&&!a.parameters.optionsRequested&&d(e,a.parameters.valueFor("name"))},
visibleWhen:function(a){return a.Type==="Commit"}});f.addCommand(q);q=new h.Command({name:e.Delete,tooltip:e["Delete the tag from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeTag",callback:function(a){var b=a.items;confirm(d.formatMessage(e["Are you sure you want to delete tag ${0}?"],b.Name))&&c.getService("orion.page.progress").progress(c.getService("orion.git.provider").doRemoveTag(b.Location),"Removing tag "+b.Name).then(function(){k.changedItem(b.parent)},r)},visibleWhen:function(a){return a.Type===
"Tag"}});f.addCommand(q);q=new b.ParametersDescription([new b.CommandParameter("reviewer","text",e["Reviewer name"])],{hasOptionalParameters:!0});q=new h.Command({name:e["Ask for review"],tooltip:e["Ask for review tooltip"],imageClass:"core-sprite-tag",id:"eclipse.orion.git.askForReviewCommand",parameters:q,callback:function(a){var b=c.getService("orion.page.progress"),d=function(a){var b=document.createElement("a");b.href=a;b.protocol==="ssh:"&&(b=a.indexOf("@"),b!==-1&&(a="ssh://"+a.substr(b+1)));
return a},f=function(e){var f=a.items,g=f.Location.replace(f.Name,"HEAD"),h=f.AuthorName,i=f.Name,j=f.Message;b.progress(c.getService("orion.git.provider").getGitClone(f.CloneLocation),"Getting repository details "+f.Name).then(function(a){window.location.href.split("#");var k=C.getOrionHome(),a=d(a.Children[0].GitUrl),k=k+"/git/reviewRequest.html#"+a+"_"+f.Name;b.progress(c.getService("orion.git.provider").sendCommitReviewRequest(i,g,e,k,h,j),"Sending review request for "+i).then(function(a){var b=
{Severity:"Ok",HTML:!1};b.Message=a.Result;c.getService("orion.page.message").setProgressResult(b)},r)})};if(a.parameters.valueFor("reviewer")&&!a.parameters.optionsRequested)f(a.parameters.valueFor("reviewer"));else{var g=a.items;b.progress(c.getService("orion.git.provider").getGitClone(g.CloneLocation),"Getting git details "+g.Name).then(function(a){window.location.href.split("#");var b=C.getOrionHome(),a=d(a.Children[0].GitUrl);(new p.ReviewRequestDialog({title:e["Contribution Review Request"],
url:b+"/git/reviewRequest.html#"+a+"_"+g.Name,func:f})).show()},r)}},visibleWhen:function(a){return a.Type==="Commit"}});f.addCommand(q);q=new h.Command({name:e["Cherry-Pick"],tooltip:e["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){var b=a.items,a=c.getService("orion.page.progress"),f=c.getService("orion.git.provider"),g=b.Location.replace(b.Name,"HEAD");a.progress(f.doCherryPick(g,
b.Name),"Cherry picking "+b.Name).then(function(a){var f=[],g=b.Location.replace("commit/"+b.Name,"status");if(a.Result==="OK")f.Severity="Ok",a.HeadUpdated?(f.HTML=!1,f.Message=a.Result):(f.HTML=!0,f.Message="<span>"+e["Nothing changed."]+"</span>");else if(a.Result==="CONFLICTING")f.Severity="Warning",f.HTML=!0,g=d.formatMessage(e[". Go to ${0}."],'<a href="'+m(g)+'">'+e["Git Status page"]+"</a>")+"</span>",f.Message="<span>"+a.Result+e[". Some conflicts occurred"]+g;else if(a.Result==="FAILED"){f.Severity=
"Error";f.HTML=!0;f.Message="<span>"+a.Result;if(a.FailingPaths){var h="",i=!0,j;for(j in a.FailingPaths)i||(h+=", "),i=!1,h+=j;i||(f.Message+=". "+d.formatMessage(e["Failing paths: ${0}"],h))}f.Message+=d.formatMessage(e[". Go to ${0}."],'<a href="'+m(g)+'">'+e["Git Status page"]+"</a>")+"</span>"}else f.Severity="Warning",f.HTML=!1,f.Message=a.Result;c.getService("orion.page.message").setProgressResult(f)},r)},visibleWhen:function(a){return a.Type==="Commit"}});f.addCommand(q);q=new h.Command({name:e.Revert,
tooltip:e["Revert changes introduced by the commit into your active branch"],id:"eclipse.orion.git.revert",imageClass:"git-sprite-reset",spriteClass:"gitCommandSprite",callback:function(a){var b=a.items,a=c.getService("orion.page.progress"),f=c.getService("orion.git.provider"),g=b.Location.replace(b.Name,"HEAD");a.progress(f.doRevert(g,b.Name),"Reverting "+b.Name).then(function(a){var f=[],g=b.Location.replace("commit/"+b.Name,"status");a.Result==="OK"?(f.Severity="Ok",f.HTML=!1,f.Message=a.Result):
a.Result==="FAILURE"?(g=d.formatMessage(e[". Go to ${0}."],'<a href="'+m(g)+'">'+e["Git Status page"]+"</a>")+"</span>",f.Severity="Warning",f.HTML=!0,f.Message="<span>"+a.Result+e[". Could not revert into active branch"]+g):(f.Severity="Warning",f.HTML=!1,f.Message=a.Result);c.getService("orion.page.message").setProgressResult(f)},r)},visibleWhen:function(a){return a.Type==="Commit"}});f.addCommand(q)};s.createGitClonesCommands=function(a,c,f,m,l,r){function q(b){var c={Severity:"Error",HTML:!1};
try{var d=JSON.parse(b.responseText);c.Message=d.DetailedMessage?d.DetailedMessage:d.Message?d.Message:e["Problem while performing the action"]}catch(f){c.Message=e["Problem while performing the action"]}a.getService("orion.page.message").setProgressResult(c)}function n(a){Array.isArray(a)&&(a=a.length>1?{}:a[0]);return a}m=new b.ParametersDescription([new b.CommandParameter("key","text",e["Key:"]),new b.CommandParameter("value","text",e["Value:"])]);m=new h.Command({name:e["New Configuration Entry"],
tooltip:"Add a new entry to the repository configuration",id:"eclipse.orion.git.addConfigEntryCommand",parameters:m,callback:function(b){var c=b.items,d=a.getService("orion.git.provider"),e=a.getService("orion.page.progress");b.parameters.valueFor("key")&&b.parameters.valueFor("value")&&e.progress(d.addCloneConfigurationProperty(c.ConfigLocation,b.parameters.valueFor("key"),b.parameters.valueFor("value")),"Setting configuration propetry: "+b.parameters.valueFor("key")).then(function(){f.changedItem(c)},
q)}});c.addCommand(m);m=new b.ParametersDescription([],null,function(a){var a=a.items,c;if(a)c=a.Value;return[new b.CommandParameter("value","text",e["Value:"],c)]});m=new h.Command({name:e.Edit,tooltip:e["Edit the configuration entry"],imageClass:"core-sprite-edit",id:"eclipse.orion.git.editConfigEntryCommand",parameters:m,callback:function(b){var c=b.items,d=a.getService("orion.git.provider"),e=a.getService("orion.page.progress");b.parameters.valueFor("value")&&e.progress(d.editCloneConfigurationProperty(c.Location,
b.parameters.valueFor("value")),"Editing configuration property "+c.Key).then(function(){f.changedItem(c)},q)},visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});c.addCommand(m);m=new h.Command({name:e.Delete,tooltip:e["Delete the configuration entry"],imageClass:"core-sprite-delete",id:"eclipse.orion.git.deleteConfigEntryCommand",callback:function(b){var c=b.items,b=a.getService("orion.git.provider"),g=a.getService("orion.page.progress");confirm(d.formatMessage(e["Are you sure you want to delete ${0}?"],
c.Key))&&g.progress(b.deleteCloneConfigurationProperty(c.Location),"Deleting configuration property "+c.Key).then(function(){f.changedItem(c)},q)},visibleWhen:function(a){return a.Key&&a.Value&&a.Location}});c.addCommand(m);m=new b.ParametersDescription([new b.CommandParameter("url","url",e["Repository URL:"])],{hasOptionalParameters:!0});l=new h.Command({name:e["Clone Repository"],tooltip:e["Clone an existing Git repository to a folder"],id:"eclipse.createGitProject",callback:function(b){var c=b.items,
d=a.getService("orion.git.provider"),g=a.getService("orion.page.progress"),h=function(b,h,i){c.GitUrl=b;s.getDefaultSshOptions(a,c).then(function(m){var l=arguments.callee,q=new k(a);a.getService("orion.page.message").setProgressMessage("Your project is being set up. This may take a minute...");q.getConfig().then(function(k){g.progress(d.cloneGitRepository(i,b,h,f.defaultPath,m.gitSshUsername,m.gitSshPassword,m.knownHosts,m.gitPrivateKey,m.gitPassphrase,k,!0),"Cloning repository "+i).then(function(b){s.handleProgressServiceResponse(b,
m,a,function(a){d.getGitClone(a.Location).then(function(a){var b="",d;for(d in c.projectDescription)b+=d+"="+c.projectDescription[d]+"\n";r.write(a.Children[0].ContentLocation+".git/.projectInfo",b).then(function(){var b=j.toUrl(E.expand({resource:a.Children[0].ContentLocation}));window.location=b})})},l,e["Clone Git Repository"])},function(b){s.handleProgressServiceResponse(b,m,a,function(){},l,e["Clone Git Repository"])})})})};c.url&&c.projectDescription.name&&(a.getService("orion.page.message").setProgressMessage("Looking for project "+
c.projectDescription.name),r.loadWorkspace().then(function(a){for(var b=0;b<a.Children.length;++b){var e=a.Children[b];if(e.Name===c.projectDescription.name){e.Git?d.getGitClone(e.Git.CloneLocation).then(function(a){a.Children[0].GitUrl===c.url?window.location=j.toUrl(E.expand({resource:a.Children[0].ContentLocation})):console.info("Folder project is used")}):console.info("Folder project is used");return}}h(c.url,null,c.projectDescription.name)}))},visibleWhen:function(){return!0}});c.addCommand(l);
m=new h.Command({name:e["Clone Repository"],tooltip:e["Clone an existing Git repository to a folder"],id:"eclipse.cloneGitRepository",parameters:m,callback:function(b){var c=b.items,d=a.getService("orion.git.provider"),g=a.getService("orion.page.progress"),h=function(b,h,i){c.GitUrl=b;s.getDefaultSshOptions(a,c).then(function(c){var j=arguments.callee;(new k(a)).getConfig().then(function(k){k=g.progress(d.cloneGitRepository(i,b,h,f.defaultPath,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,
c.gitPassphrase,k),"Cloning repository "+i);a.getService("orion.page.message").createProgressMonitor(k,e["Cloning repository: "]+b);k.then(function(b){s.handleProgressServiceResponse(b,c,a,function(){f.changedItem&&f.changedItem()},j,e["Clone Git Repository"])},function(b){s.handleProgressServiceResponse(b,c,a,function(){},j,e["Clone Git Repository"])})})})};b.parameters.valueFor("url")&&!b.parameters.optionsRequested?h(b.parameters.valueFor("url")):(new o.CloneGitRepositoryDialog({serviceRegistry:a,
fileClient:r,url:b.parameters.valueFor("url"),alwaysShowAdvanced:b.parameters.optionsRequested,func:h})).show()},visibleWhen:function(){return!0}});c.addCommand(m);m=new h.Command({name:e["Clone Repository"],tooltip:e["Clone an existing Git repository to a folder"],id:"eclipse.cloneGitRepositoryReviewReq",callback:function(b){var c=b.items,d=a.getService("orion.git.provider"),g=a.getService("orion.page.progress");(new o.CloneGitRepositoryDialog({serviceRegistry:a,fileClient:r,url:b.userData,alwaysShowAdvanced:!1,
func:function(b,h,i){c.GitUrl=b;s.getDefaultSshOptions(a,c).then(function(c){var j=arguments.callee;(new k(a)).getConfig().then(function(k){k=g.progress(d.cloneGitRepository(i,b,h,f.defaultPath,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase,k),"Cloning git repository "+i);a.getService("orion.page.message").createProgressMonitor(k,e["Cloning repository: "]+b);k.then(function(b){s.handleProgressServiceResponse(b,c,a,function(){f.changedItem&&f.changedItem()},j,e["Clone Git Repository"])},
function(b){s.handleProgressServiceResponse(b,c,a,function(){},j,e["Clone Git Repository"])})})})}})).show()},visibleWhen:function(){return!0}});c.addCommand(m);m=new h.Command({name:e["Add Remote"],tooltip:e["Add a new remote to the repository"],id:"eclipse.addRemoteReviewRequestCommand",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",callback:function(d){if(d.parameters&&d.parameters.valueFor("remoteName"))d.remoteName=d.parameters.valueFor("remoteName");var h=function(d,f){d.JsonData.HostKey?
(f.parameters=null,f.errorData=d.JsonData,c.collectParameters(f)):f.optionsRequested?(f.errorData=d.JsonData,c.collectParameters(f)):(new g(a)).isEnabled().then(function(a){f.parameters=a?d.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword",
"password",e["Password:"]),new b.CommandParameter("saveCredentials","boolean",e["Don't prompt me again:"])],{hasOptionalParameters:!0}):d.JsonData.User?new b.ParametersDescription([new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0}):new b.ParametersDescription([new b.CommandParameter("sshuser","text",e["User Name:"]),new b.CommandParameter("sshpassword","password",e["Password:"])],{hasOptionalParameters:!0});f.errorData=d.JsonData;c.collectParameters(f)})};
if(d.parameters&&d.parameters.optionsRequested)d.parameters=null,d.optionsRequested=!0,c.collectParameters(d);else{var i=function(b,c,g){var i=a.getService("orion.page.progress");i.progress(a.getService("orion.git.provider").addRemote(b,c,d.userData),"Adding git remote "+c).then(function(){s.gatherSshCredentials(a,d).then(function(b){a.getService("orion.git.provider").getGitRemote(g.RemoteLocation).then(function(j){for(var k,m=0;m<j.Children.length;m++)j.Children[m].Name===c&&(k=j.Children[m]);var l=
a.getService("orion.git.provider"),j=a.getService("orion.page.message"),m=i.progress(l.doFetch(k.Location,!1,b.gitSshUsername,b.gitSshPassword,b.knownHosts,b.gitPrivateKey,b.gitPassphrase),"Fetching remote "+c);j.createProgressMonitor(m,e["Fetching remote: "]+k.Location);m.then(function(b){s.handleGitServiceResponse(b,a,function(){i.progress(l.getGitRemote(k.Location),"Getting remote details "+c).then(function(){f.changedItem(g)},q)},function(a){h(a,d)})},function(b){s.handleGitServiceResponse(b,
a,function(){f.changedItem(g)},function(a){h(a,d)})})})})},q)};d.remoteName?i(d.items.RemoteLocation,d.remoteName,d.items):(d.parameters=new b.ParametersDescription([new b.CommandParameter("remoteName","text",e["Remote Name:"])],{hasOptionalParameters:!1}),c.collectParameters(d))}},visibleWhen:function(){return!0}});c.addCommand(m);m=new b.ParametersDescription([new b.CommandParameter("folderName","text",e["New folder:"])],{hasOptionalParameters:!0});m=new h.Command({name:e["Init Repository"],tooltip:e["Create a new Git repository in a new folder"],
id:"eclipse.initGitRepository",parameters:m,callback:function(b){var c=b.items,d=a.getService("orion.git.provider"),g=a.getService("orion.page.progress"),h=function(b,h,i){c.GitUrl=b;s.getDefaultSshOptions(a,c).then(function(c){var j=arguments.callee;(new k(a)).getConfig().then(function(k){k=g.progress(d.cloneGitRepository(i,b,h,f.defaultPath,null,null,null,null,null,k),e["Initializing repository: "]+i);a.getService("orion.page.message").createProgressMonitor(k,e["Initializing repository: "]+i);k.then(function(b){s.handleProgressServiceResponse(b,
c,a,function(){f.changedItem&&f.changedItem()},j,e["Init Git Repository"])},function(b){s.handleProgressServiceResponse(b,c,a,function(){},j,e["Init Git Repository"])})})})};b.parameters.valueFor("folderName")&&!b.parameters.optionsRequested?h(null,null,b.parameters.valueFor("folderName")):(new o.CloneGitRepositoryDialog({serviceRegistry:a,title:e["Init Git Repository"],fileClient:r,advancedOnly:!0,func:h})).show()},visibleWhen:function(){return!0}});c.addCommand(m);m=new h.Command({name:e.Delete,
tooltip:e["Delete the repository"],imageClass:"core-sprite-delete",id:"eclipse.git.deleteClone",visibleWhen:function(a){return a.Type==="Clone"},callback:function(b){var c=b.items,b=a.getService("orion.git.provider"),g=a.getService("orion.page.progress");if(Array.isArray(c)){if(confirm(d.formatMessage(e["Are you sure you want do delete ${0} repositories?"],c.length)))for(var h=0,i=0;i<c.length;i++)g.progress(b.removeGitRepository(c[i].Location),"Removing repository "+c.Name).then(function(){h++;h>=
c.length&&f.changedItem&&f.changedItem()},q)}else confirm(d.formatMessage(e["Are you sure you want to delete ${0}?"],c.Name))&&g.progress(b.removeGitRepository(c.Location),"Removing repository "+c.Name).then(function(){if(f.changedItem)window.location=j.toUrl(D.expand({})),f.changedItem()},q)}});c.addCommand(m);m=new h.Command({name:e["Apply Patch"],tooltip:e["Apply a patch on the selected repository"],id:"eclipse.orion.git.applyPatch",imageClass:"git-sprite-apply-patch",spriteClass:"gitCommandSprite",
callback:function(b){var b=n(b.items),c=new i;(new v.ApplyPatchDialog({title:e["Apply Patch"],diffLocation:b.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: ";for(var a=!0,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 a.Type==="Clone"}});c.addCommand(m);m=new b.ParametersDescription([new b.CommandParameter("commitName","text",e["Commit name:"])],{hasOptionalParameters:!0});m=new h.Command({name:e["Open Commit"],tooltip:e["Open the commit with the given name"],id:"eclipse.orion.git.openCommitCommand",
imageClass:"git-sprite-apply-patch",spriteClass:"gitCommandSprite",parameters:m,callback:function(b){var c=a.getService("orion.page.progress"),d=function(f,g,h){h==null&&(h=new i);f.length>0?c.progress(a.getService("orion.git.provider").doGitLog("/gitapi/commit/"+b.parameters.valueFor("commitName")+f[0].ContentLocation+"?page=1&pageSize=1",null,null,e["Looking for the commit"]),"Looking for commit "+b.parameters.valueFor("commitName")).then(function(a){h.resolve(a.Children[0].Location)},function(){d(f.slice(1),
g,h)}):h.reject();return h},f=function(c){b.parameters.optionsRequested?(new t.OpenCommitDialog({repositories:c,serviceRegistry:a,commitName:b.parameters.valueFor("commitName")})).show():(a.getService("orion.page.message").setProgressMessage(e["Looking for the commit"]),d(c,b.parameters.valueFor("commitName")).then(function(b){b&&(b=j.toUrl(A.expand({resource:b})),window.open(b));a.getService("orion.page.message").setProgressMessage("")},function(){var b=[];b.Severity="warning";b.HTML=!1;b.Message=
e["No commits found"];a.getService("orion.page.message").setProgressResult(b)}))};if(b.items.Type==="Clone"){var g=[b.items];f(g)}else b.items.CloneLocation?c.progress(a.getService("orion.git.provider").getGitClone(b.items.CloneLocation),"Getting git repository details").then(function(a){f(a.Children)}):(g=b.items,f(g))},visibleWhen:function(a){return a.Type==="Clone"||a.CloneLocation||a.length>1&&a[0].Type==="Clone"}});c.addCommand(m)};s.createGitStatusCommands=function(a,c,d){function g(b){var c=
{Severity:"Error",HTML:!1};try{var d=JSON.parse(b.responseText);c.Message=d.DetailedMessage?d.DetailedMessage:d.Message?d.Message:e["Problem while performing the action"]}catch(f){c.Message=e["Problem while performing the action"]}a.getService("orion.page.message").setProgressResult(c)}function i(a){Array.isArray(a)||(a=[a]);return a}function j(b,c){var f=a.getService("orion.page.message"),h=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").doRebase(b,"",c),"Rebasing git repository");
f.createProgressMonitor(h,c);h.then(function(b){if(b.Result==="OK"||b.Result==="ABORTED"||b.Result==="FAST_FORWARD"||b.Result==="UP_TO_DATE"){var c=[];c.Severity="Ok";c.HTML=!1;c.Message=b.Result;a.getService("orion.page.message").setProgressResult(c);d.changedItem({})}if(b.Result==="STOPPED")c=[],c.Severity="Warning",c.HTML=!1,c.Message=b.Result+e[". Repository still contains conflicts."],a.getService("orion.page.message").setProgressResult(c),d.changedItem({});else if(b.Result==="FAILED_UNMERGED_PATHS")c=
[],c.Severity="Error",c.HTML=!1,c.Message=b.Result+e[". Repository contains unmerged paths. Resolve conflicts first."],a.getService("orion.page.message").setProgressResult(c)},g)}var k=new h.Command({name:e.Stage,tooltip:e["Stage the change"],imageClass:"git-sprite-stage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.stageCommand",callback:function(b){var c=i(b.items),f=a.getService("orion.page.message"),h=a.getService("orion.page.progress");if(c.length===1)b=h.progress(a.getService("orion.git.provider").stage(c[0].indexURI),
e["Staging changes"]),f.createProgressMonitor(b,e["Staging changes"]);else{for(var j=[],k=0;k<c.length;k++)j[k]=c[k].name;b=h.progress(a.getService("orion.git.provider").stageMultipleFiles(b.userData.Clone.IndexLocation,j),e["Staging changes"]);f.createProgressMonitor(b,"Staging changes")}b.then(function(){d.changedItem(c)},g)},visibleWhen:function(a){a=i(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!f.isChange(a[b])||f.isStaged(a[b]))return!1;return!0}});c.addCommand(k);k=new h.Command({name:e.Unstage,
tooltip:e["Unstage the change"],imageClass:"git-sprite-unstage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.unstageCommand",callback:function(b){var c=i(b.items),f=a.getService("orion.page.message"),h=a.getService("orion.page.progress");if(c.length===1)b=h.progress(a.getService("orion.git.provider").unstage(c[0].indexURI,c[0].name),"Unstaging changes");else{for(var j=[],k=0;k<c.length;k++)j[k]=c[k].name;b=h.progress(a.getService("orion.git.provider").unstage(b.userData.Clone.IndexLocation,
j),"Unstaging changes")}f.createProgressMonitor(b,e["Staging changes"]);b.then(function(){d.changedItem(c)},g)},visibleWhen:function(a){a=i(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!f.isChange(a[b])||!f.isStaged(a[b]))return!1;return!0}});c.addCommand(k);k=new b.CommandEventListener("change",function(b,c){var d=b.target,f=c.items.status,g=document.getElementById("nameparameterCollector");d.checked?(d=a.getService("orion.page.message"),f=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").doGitLog(f.CommitLocation+
"?page=1&pageSize=1"),e["Fetching previous commit message"]),d.createProgressMonitor(f,e["Fetching previous commit message"],f.then(function(a){g.value=a.Children[0].Message}),function(){g.value=""})):g.value=""});k=new b.ParametersDescription([new b.CommandParameter("name","text",e["Commit message:"],"",4),new b.CommandParameter("amend","boolean",e["Amend:"],!1,null,k),new b.CommandParameter("changeId","boolean",e["ChangeId:"],!1)],{hasOptionalParameters:!0});k=new h.Command({name:e.Commit,tooltip:e.Commit,
id:"eclipse.orion.git.commitCommand",parameters:k,callback:function(b){var c=b.items.status,f=function(b){var f=a.getService("orion.page.message"),b=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").commitAll(c.Clone.HeadLocation,null,JSON.stringify(b)),e["Committing changes"]);f.createProgressMonitor(b,e["Committing changes"]);b.then(function(){d.changedItem(c)},g)},h=function(a,c){for(var d=0;d<c.length;d++)if(c[d].Key==="user.name")a.CommitterName=c[d].Value,a.AuthorName=
c[d].Value;else if(c[d].Key==="user.email")a.CommitterEmail=c[d].Value,a.AuthorEmail=c[d].Value;a.Message&&a.CommitterName&&a.CommitterEmail&&!b.parameters.optionsRequested?f(a):(new w.CommitDialog({body:a,func:f})).show()},i={};i.Message=b.parameters.valueFor("name");i.Amend=b.parameters.valueFor("amend");i.ChangeId=b.parameters.valueFor("changeId");var j=c.Clone.Config;if(i.Amend&&!i.Message){var k=a.getService("orion.page.message"),m=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").doGitLog(c.CommitLocation+
"?page=1&pageSize=1"),e["Committing changes"]);k.createProgressMonitor(m,e["Committing changes"]);m.then(function(a){i.Message=a.Children[0].Message;h(i,j)},function(){h(i,j)})}else h(i,j)},visibleWhen:function(){return!0}});c.addCommand(k);k=new h.Command({name:e.Reset,tooltip:e["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(e["All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered."]+
"\n"+e["Are you sure you want to continue?"],function(b){if(b){var b=a.getService("orion.page.message"),f=a.getService("orion.page.progress").progress(a.getService("orion.git.provider").unstageAll(c.IndexLocation,"HARD"),e["Resetting local changes"]);b.createProgressMonitor(f,e["Resetting local changes"]);f.then(function(){d.changedItem(c)},g)}})},visibleWhen:function(a){return f.hasStagedChanges(a)||f.hasUnstagedChanges(a)}});c.addCommand(k);k=new h.Command({name:e.Checkout,tooltip:e["Checkout all the selected files, discarding all changes"],
imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.checkoutCommand",callback:function(b){var c=i(b.items);a.getService("orion.page.dialog").confirm(e["Your changes to the selected files will be discarded and cannot be recovered."]+"\n"+e["Are you sure you want to continue?"],function(f){if(f){for(var f=a.getService("orion.page.message"),h=a.getService("orion.page.progress"),i=[],j=0;j<c.length;j++)i[j]=c[j].name;h=h.progress(a.getService("orion.git.provider").checkoutPath(b.userData.Clone.Location,
i),e["Resetting local changes"]);f.createProgressMonitor(h,e["Resetting local changes"]);h.then(function(){d.changedItem(c)},g)}})},visibleWhen:function(a){a=i(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!f.isChange(a[b])||f.isStaged(a[b]))return!1;return!0}});c.addCommand(k);k=new h.Command({name:e["Show Patch"],tooltip:e["Show workspace changes as a patch"],id:"eclipse.orion.git.showPatchCommand",hrefCallback:function(a){for(var b=i(a.items),a=a.userData.Clone.DiffLocation+"?parts=diff",
c=0;c<b.length;c++)a+="&Path=",a+=b[c].name;return a},visibleWhen:function(a){a=i(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(f.isStaged(a[b]))return!1;return!0}});c.addCommand(k);k=new h.Command({name:e.Continue,tooltip:e["Contibue Rebase"],id:"eclipse.orion.git.rebaseContinueCommand",callback:function(a){return j(a.items.Clone.HeadLocation,"CONTINUE")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!==-1}});c.addCommand(k);k=new h.Command({name:e["Skip Patch"],
tooltip:e["Skip Patch"],id:"eclipse.orion.git.rebaseSkipPatchCommand",callback:function(a){return j(a.items.Clone.HeadLocation,"SKIP")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!==-1}});c.addCommand(k);k=new h.Command({name:e.Abort,tooltip:e["Abort Rebase"],id:"eclipse.orion.git.rebaseAbortCommand",callback:function(a){return j(a.items.Clone.HeadLocation,"ABORT")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!==-1}});c.addCommand(k)}})();return s});
define("orion/git/widgets/CommitTooltipDialog","i18n!git/nls/gitmessages,require,orion/URITemplate,orion/webui/littlelib,orion/i18nUtil,orion/webui/popupdialog".split(","),function(e,j,i,d,c,h){function b(a){this._init(a)}var f=new i("git/git-commit.html#{,resource,params*}?page=1&pageSize=1");b.prototype=new h.PopupDialog;b.prototype.TEMPLATE='<div id="parentPane" style="padding:10px; width:520px"></div>';b.prototype._init=function(a){this.commit=a.commit;this._initialize(a.triggerNode,null,null,
"mouseover",1E3)};b.prototype._bindToDom=function(){this._displayCommit(this.commit)};b.prototype._displayCommit=function(a){var b=this.$parentPane,d=a.Message.split(/(\r?\n|$)/)[0],h=document.createElement("a");h.className="navlinkonpage";h.href=j.toUrl(f.expand({resource:a.Location}));h.textContent=d;b.appendChild(h);d=document.createElement("div");d.style.paddingTop="15px";b.appendChild(d);if(a.AuthorImage)b=new Image,b.src=a.AuthorImage,b.name=a.AuthorName,b.className="git-author-icon",d.appendChild(b);
b=document.createElement("div");b.textContent=c.formatMessage(e[" authored by ${0} {${1}) on ${2}"],a.AuthorName,a.AuthorEmail,(new Date(a.Time)).toLocaleString());d.appendChild(b);b=document.createElement("div");b.textContent=c.formatMessage(e["committed by 0 (1)"],a.CommitterName,a.CommitterEmail);d.appendChild(b);b=document.createElement("div");b.style.paddingTop="15px";b.textContent=e["commit:"]+a.Name;d.appendChild(b);if(a.Parents&&a.Parents.length>0)b=document.createElement("div"),b.textContent=
e["parent:"],h=document.createElement("a"),h.className="navlinkonpage",h.href=j.toUrl(f.expand({resource:a.Parents[0].Location})),h.textContent=a.Parents[0].Name,b.appendChild(h),d.appendChild(b);h=a.Tags&&a.Tags.length>0;if(a.Branches&&a.Branches.length>0){b=document.createElement("section");b.style.paddingTop="15px";b.textContent=e["branches: "];d.appendChild(b);var i=document.createElement("div");b.appendChild(i);for(b=0;b<a.Branches.length;++b){var p=document.createElement("span");p.style.paddingLeft=
"10px";p.textContent=a.Branches[b].FullName;i.appendChild(p)}}if(h){b=document.createElement("div");b.style.paddingTop="15px";d.appendChild(b);b=document.createElement("section");d.appendChild(b);d=document.createElement("span");d.textContent=e["tags: "];b.appendChild(d);d=document.createElement("div");b.appendChild(d);for(b=0;b<a.Tags.length;++b)h=document.createElement("span"),h.style.paddingLeft="10px",h.textContent=a.Tags[b].Name,d.appendChild(h)}};b.prototype.constructor=b;return{CommitTooltipDialog:b}});
define("orion/git/gitRepositoryExplorer","i18n!git/nls/gitmessages,require,orion/commandRegistry,orion/section,orion/i18nUtil,orion/webui/littlelib,orion/git/util,orion/URITemplate,orion/PageUtil,orion/dynamicContent,orion/fileUtils,orion/globalCommands,orion/git/gitCommands,orion/Deferred,orion/git/widgets/CommitTooltipDialog".split(","),function(e,j,i,d,c,h,b,f,a,g,k,l,n,p,o){var i={},u=new f("git/git-repository.html#{,resource,params*}"),t=new f("git/git-repository.html#{,resource,params*}?page=1&pageSize=20"),
w=new f(b.statusUILocation+"#{,resource,params*}"),v=new f("git/git-log.html#{,resource,params*}?page=1"),y=new f("git/git-commit.html#{,resource,params*}?page=1&pageSize=1");i.GitRepositoryExplorer=function(){function b(a,c,d,e,f,g,h){this.parentId=f;this.registry=a;this.linkService=d;this.commandService=c;this.selection=e;this.parentId=f;this.pageNavId=g;this.actionScopeId=h;this.checkbox=!1}b.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.registry.getService("orion.page.message").setProgressResult(b);a.status===404&&(this.initTitleBar(),this.displayRepositories())};b.prototype.setDefaultPath=function(a){this.defaultPath=a};b.prototype.changedItem=function(){this.redisplay(!1)};b.prototype.redisplay=function(b){b===void 0&&(b=!0);var c=a.matchResourceParameters();if(c.resource)this.displayRepository(c.resource);else{var c=
k.makeRelative(this.defaultPath),d=j.toUrl("gitapi/clone._"),d=d.substring(0,d.length-2);this.displayRepositories2(c[0]==="/"?d+c:d+"/"+c,b)}};b.prototype.displayRepositories2=function(a,b){var c=this;this.loadingDeferred=new p;b&&this.loadingDeferred.then(function(){c.commandService.processURL(window.location.href)});this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitClone(a),"Getting git repository details").then(function(a){if(a.Children.length===
0)c.initTitleBar({}),c.displayRepositories([],"full");else if(a.Children[0].Type==="Clone")a=a.Children,c.initTitleBar(a),c.displayRepositories(a,"full",!0)},function(a){c.handleError(a)})};b.prototype.displayRepository=function(a){var b=this;this.loadingDeferred=new p;this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitClone(a),"Getting git repository details").then(function(a){var c=h.node(b.pageNavId);c&&(h.empty(c),b.commandService.renderCommands(b.pageNavId,
c,a,b,"button"));if(a.Children)a.Children.length===0?(b.initTitleBar({}),b.displayRepositories([],"full")):a.Children.length&&a.Children.length===1&&a.Children[0].Type==="Clone"?(a=a.Children,b.initTitleBar(a[0]),b.displayRepositories(a),b.displayStatus(a[0]),b.displayCommits(a[0]),b.displayBranches(a[0]),b.displayTags(a[0]),b.displayRemotes(a[0]),b.displayConfig(a[0])):a.Children[0].Type==="Clone"?(a=a.Children,b.initTitleBar(a),b.displayRepositories(a,"full",!0)):a.Children[0].Type==="Branch"?(a=
a.Children,b.registry.getService("orion.page.progress").progress(b.registry.getService("orion.git.provider").getGitClone(a[0].CloneLocation),"Getting git repository details").then(function(a){a=a.Children;b.initTitleBar(a[0],"Branches");b.displayRepositories(a,"mini",!0);b.displayBranches(a[0],"full");b.displayRemoteBranches(a[0],"full")},function(a){b.handleError(a)})):a.Children[0].Type==="Tag"?(a=a.Children,b.registry.getService("orion.page.progress").progress(b.registry.getService("orion.git.provider").getGitClone(a[0].CloneLocation),
"Getting git repository details").then(function(a){a=a.Children;b.initTitleBar(a[0],e.Tags);b.displayRepositories(a,"mini",!0);b.displayTags(a[0],"full")},function(a){b.handleError(a)})):a.Children[0].Type==="Config"&&b.registry.getService("orion.page.progress").progress(b.registry.getService("orion.git.provider").getGitClone(a.CloneLocation),"Getting git repository details").then(function(a){a=a.Children;b.initTitleBar(a[0],e.Configuration);b.displayRepositories(a,"mini",!0);b.displayConfig(a[0],
"full")},function(a){b.handleError(a)})},function(a){b.handleError(a)})};var f=function(a,b,c,d,e){if(a=h.node(c))b.destroy(a);else throw"could not find toolbar "+c;b.renderCommands(d,a,e,null,"button")};b.prototype.initTitleBar=function(a,b){var c={},d="repoPageActions",g;a&&a.Type==="Clone"&&b?(g=a,c.Name=b,c.Parents=[],c.Parents[0]={},c.Parents[0].Name=g.Name,c.Parents[0].Location=g.Location,c.Parents[0].ChildrenLocation=g.Location,c.Parents[1]={},c.Parents[1].Name=e.Repo):a&&a.Type==="Clone"?
(g=a,c.Name=g.Name,c.Parents=[],c.Parents[0]={},c.Parents[0].Name=e.Repo):(c.Name=e.Repo,d="reposPageActions");f(this.registry,this.commandService,"pageActions",d,g||{});l.setPageTarget({task:e.Repo,target:g,breadcrumbTarget:c,makeBreadcrumbLink:function(a,b){a.href=j.toUrl(u.expand({resource:b||""}))},serviceRegistry:this.registry,commandService:this.commandService})};b.prototype.decorateRepository=function(a,b,c){var d=this,c=c||new p;b||(b="full");this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.core.file").loadWorkspace(a.ContentLocation+
"?parts=meta"),"Loading workspace info").then(function(e){try{a.Content={};var f="root / ";if(e.Parents!==null)for(var g=e.Parents.length;g>0;g--)f+=e.Parents[g-1].Name+" / ";f+=e.Name;a.Content.Path=f;b!=="full"?c.resolve():d.registry.getService("orion.page.progress").progress(d.registry.getService("orion.git.provider").getGitStatus(a.StatusLocation),"Getting status for "+a.Name).then(function(b){try{a.Status=b,d.registry.getService("orion.page.progress").progress(d.registry.getService("orion.git.provider").getGitBranch(a.BranchLocation),
"Getting branches for "+a.Name).then(function(b){try{for(var e=b.Children||[],f,b=0;b<e.length;b++)if(e[b].Current){f=e[b];break}!f||f.RemoteLocation[0]===null?c.resolve():f.RemoteLocation.length===1&&f.RemoteLocation[0].Children.length===1&&f.RemoteLocation[0].Children[0].CommitLocation?d.registry.getService("orion.page.progress").progress(d.registry.getService("orion.git.provider").getLog(f.RemoteLocation[0].Children[0].CommitLocation+"?page=1&pageSize=20","HEAD"),"Getting incomming commits "+a.Name).then(function(b){a.CommitsToPush=
b.Children===void 0?0:b.Children.length;c.resolve()},function(){c.reject()}):d.registry.getService("orion.page.progress").progress(d.registry.getService("orion.git.provider").doGitLog(f.CommitLocation+"?page=1&pageSize=20"),"Getting outgoing commits "+a.Name).then(function(b){a.CommitsToPush=b.Children===void 0?0:b.Children.length;c.resolve()},function(){c.reject()})}catch(g){c.reject()}},function(){c.reject()})}catch(e){c.reject()}},function(){c.reject()})}catch(h){c.reject(h)}},function(){c.reject()});
return c};b.prototype._repositorySorter=function(a,b){return a.Name.localeCompare(b.Name)};b.prototype.displayRepositories=function(a,b,c){var f=this;this.registry.getService("orion.page.message");a&&a.sort(f._repositorySorter);var i=new g.DynamicContentModel(a,function(b){return f.decorateRepository.bind(f)(a[b])}),i=new g.DynamicContentExplorer(i);i.use({initialRender:function(){var c=h.node("table");if(c)if(h.empty(c),!a||a.length===0)(new d.Section(c,{id:"repositorySection",title:"Repository",
iconClass:["gitImageSprite","git-sprite-repository"]})).setTitle(b==="full"?e["No Repositories"]:e["Repository Not Found"]),f.loadingDeferred.resolve();else{var g=document.createElement("div");c.appendChild(g);g.innerHTML='<div id="repositoryNode" class="mainPadding"></div>'}},cleanupRender:function(){f.loadingDeferred.resolve()},renderBeforeItemPopulation:function(d){var g=document.createElement("div");g.className="sectionWrapper toolComposite";h.node("repositoryNode").appendChild(g);var i=document.createElement("div");
i.className="sectionAnchor sectionTitle layoutLeft";g.appendChild(i);var k=document.createElement("span");i.appendChild(k);c?(i=document.createElement("a"),i.href=j.toUrl(u.expand({resource:a[d].Location})),i.appendChild(document.createTextNode(a[d].Name)),k.appendChild(i)):k.appendChild(document.createTextNode(a[d].Name));this.explorer.progressIndicators[d]=new this.explorer.progressIndicator(d,k);if(b==="full")k=document.createElement("div"),k.className="layoutRight sectionActions",k.id="repositoryActionsArea",
g.appendChild(k),f.commandService.renderCommands(f.actionScopeId,k,a[d],f,"tool");k=document.createElement("div");k.className="sectionTable sectionTableItem";h.node("repositoryNode").appendChild(k);g=document.createElement("div");g.className="stretch";k.appendChild(g);k=document.createElement("div");g.appendChild(k);k=document.createElement("span");k.textContent=a[d].GitUrl!==null?e["git url:"]+a[d].GitUrl:e["(no remote)"];g.appendChild(k);k=document.createElement("div");g.appendChild(k);k=document.createElement("span");
k.id="location"+d;g.appendChild(k);if(b==="full")k=document.createElement("div"),k.style.paddingTop="10px",g.appendChild(k),k=document.createElement("span"),k.id="repositoryState"+d,k.style.paddingLeft="10px",g.appendChild(k),k=document.createElement("span"),k.id="workspaceState"+d,k.style.paddingLeft="10px",g.appendChild(k),k=document.createElement("span"),k.id="commitsState"+d,k.style.paddingLeft="10px",g.appendChild(k)},renderAfterItemPopulation:function(d){f.renderRepository(a[d],d,a.length,b,
c)}});i.render()};b.prototype.renderRepository=function(a,b,d,f){if(d=h.node("location"+b))if(d.textContent=e["location: "]+a.Content.Path,d=a.Status,f==="full"){var f=d.Untracked.length+d.Conflicting.length+d.Modified.length+d.Missing.length,g=d.Changed.length+d.Added.length+d.Removed.length,f=f>0||g>0?c.formatMessage(e["${0} file(s) to stage and ${1} file(s) to commit."],f,g):e["Nothing to commit."];if(d.RepositoryState!=="SAFE")h.node("repositoryState"+b).textContent=e["Rebase in progress!"];h.node("workspaceState"+
b).textContent=f;a=a.CommitsToPush;h.node("commitsState"+b).textContent=a>0?a+e[" commit(s) to push."]:e["Nothing to push."]}};b.prototype.displayStatus=function(a){var b=a.StatusLocation,c=this,f=h.node("table"),f=new d.Section(f,{id:"workingDirectorySection",title:e["Working Directory"],content:'<div id="workingDirectoryNode" class="mainPadding"></div>'});c.commandService.registerCommandContribution(f.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10);c.commandService.renderCommands(f.actionsNode.id,
f.actionsNode.id,{ViewAllLink:w.expand({resource:a.StatusLocation}),ViewAllLabel:e["See Full Status"],ViewAllTooltip:e["See the status"]},c,"button");var g=f.createProgressMonitor();g.begin("Loading status");this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitBranch(b),"Loading status").then(function(b){g.done();c.renderStatus(a,b)},function(a){g.done(a)})};b.prototype.renderStatus=function(a,b){var d=h.node("workingDirectoryNode");d&&h.empty(d);
var f=document.createElement("div");f.className="sectionTableItem";d.appendChild(f);var g=document.createElement("div");g.style.overflow="hidden";f.appendChild(g);var f=b.Untracked.length+b.Conflicting.length+b.Modified.length+b.Missing.length,d=b.Changed.length+b.Added.length+b.Removed.length,i=e["You have no changes to commit."];if(f>0||d>0)i=e["You have changes to commit in your workspace!"];var j=document.createElement("div");j.style.overflow="vbox stretch details-view";g.appendChild(j);if(b.RepositoryState!==
"SAFE")g=document.createElement("div"),g.textContent=e["Rebase in progress!"],j.appendChild(g);g=document.createElement("div");g.textContent=i;j.appendChild(g);i=document.createElement("div");i.textContent=c.formatMessage(e["${0} file(s) to stage and ${1} file(s) to commit."],f,d);j.appendChild(i)};b.prototype.decorateBranches=function(a,b){var c=this,b=b||new p;a.length>0?this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").doGitLog(a[0].CommitLocation+
"?page=1&pageSize=1"),"Getting branch last commit "+a[0].Name).then(function(d){a[0].Commit=d.Children[0];c.decorateBranches(a.slice(1),b)}):b.resolve();return b};b.prototype.displayBranches=function(a,b){var c=a.BranchLocation,f=this,g=h.node("table"),i=new d.Section(g,{id:"branchSection",title:e.Branches,iconClass:["gitImageSprite","git-sprite-branch"],slideout:!0,content:'<div id="branchNode"></div>',canHide:!0,preferenceService:this.registry.getService("orion.core.preference")}),j=i.createProgressMonitor();
j.begin("Getting branches");this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitBranch(c+(b==="full"?"?commits=1":"?commits=1&page=1&pageSize=5")),"Getting branches "+a.Name).then(function(d){d=d.Children;j.done();f.commandService.destroy(i.actionsNode.id);b!=="full"&&d.length!==0&&(f.commandService.registerCommandContribution(i.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10),f.commandService.renderCommands(i.actionsNode.id,
i.actionsNode.id,{ViewAllLink:u.expand({resource:c}),ViewAllLabel:e["View All"],ViewAllTooltip:e["View all local and remote tracking branches"]},f,"button"));f.commandService.registerCommandContribution(i.actionsNode.id,"eclipse.addBranch",200);f.commandService.renderCommands(i.actionsNode.id,i.actionsNode.id,a,f,"button");var g=document.createElement("div");g.className="mainPadding";for(var k=0;k<d.length;k++)d[k].ParentLocation=c,f.renderBranch(d[k],k,g);h.empty(h.node("branchNode"));h.node("branchNode").appendChild(g)},
function(a){j.done();f.handleError(a)})};b.prototype.renderBranch=function(a,b,d){b=document.createElement("div");b.className="sectionTableItem lightTreeTableRow";d.appendChild(b);d=document.createElement("div");d.style.overflow="hidden";b.appendChild(d);if(a.Current)b=document.createElement("span"),b.className="sectionIcon gitImageSprite git-sprite-branch-active",d.appendChild(b);b=document.createElement("div");b.className="stretch";d.appendChild(b);var f=document.createElement("span");f.className=
a.Current?"activeBranch":"";f.textContent=a.Name;b.appendChild(f);var f=a.Commit.Children[0],g=a.RemoteLocation.length&&a.RemoteLocation.length===1&&a.RemoteLocation[0].Children.length&&a.RemoteLocation[0].Children.length===1?c.formatMessage(e["tracks ${0}, "],a.RemoteLocation[0].Children[0].Name):e["tracks no branch, "],h=document.createElement("div");h.textContent=g+c.formatMessage(e["last modified ${0} by ${1}"],(new Date(f.Time)).toLocaleString(),f.AuthorName);b.appendChild(h);b=document.createElement("div");
b.className="sectionTableItemActions";b.id="branchActionsArea";d.appendChild(b);this.commandService.renderCommands(this.actionScopeId,b,a,this,"tool")};b.prototype.displayRemoteBranches=function(a){var b=a.RemoteLocation,c=this,f=h.node("table"),g=new d.Section(f,{id:"remoteBranchSection",title:"Remote Branches",iconClass:["gitImageSprite","git-sprite-branch"],content:'<div id="remoteBranchNode" class="mainPadding"></div>',canHide:!0,preferenceService:this.registry.getService("orion.core.preference")}),
i=g.createProgressMonitor();i.begin("Getting remote branches");this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitRemote(b),"Getting remote branches "+a.Name).then(function(b){b=b.Children;i.done();b.length===0?g.setTitle(e["No Remote Branches"]):(i=g.createProgressMonitor(),i.begin(e["Rendering branches"]),c.displayRemoteBranches2(g,b,a).then(function(){i.done()},function(){i.done()}))},function(a){i.done(a)})};b.prototype.displayRemoteBranches2=
function(a,b,c,d,f){var g=this,d=d||new p;b.length>0?this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitRemote(b[0].Location),"Getting remote branches "+b[0].Name).then(function(e){for(var e=e.Children,h=0;h<e.length;h++)e[h].Repository=c,g.renderRemoteBranch(e[h],h);g.displayRemoteBranches2(a,b.slice(1),c,d,f||e.length>0,e)},function(a){d.reject(a)}):(f||a.setTitle(e["No Remote Branches"]),d.resolve());return d};b.prototype.renderRemoteBranch=
function(a){var b=document.createElement("div");b.className="sectionTableItem lightTreeTableRow";h.node("remoteBranchNode").appendChild(b);var c=document.createElement("div");c.style.overflow="hidden";b.appendChild(c);b=document.createElement("div");b.className="stretch";c.appendChild(b);var d=document.createElement("span");d.textContent=a.Name;b.appendChild(d);b=document.createElement("div");b.className="sectionTableItemActions";b.id="branchActionsArea";c.appendChild(b);this.commandService.renderCommands(this.actionScopeId,
b,a,this,"tool")};b.prototype.displayCommits=function(a){var b=this,f=h.node("table"),g=new d.Section(f,{id:"commitSection",title:e.Commits,slideout:!0,content:'<div id="commitNode"></div>',canHide:!0,preferenceService:this.registry.getService("orion.core.preference")}),i=g.createProgressMonitor();i.begin(e["Getting current branch"]);var j=document.createElement("div");j.className="mainPadding";this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitBranch(a.BranchLocation),
"Getting current branch "+a.Name).then(function(a){for(var a=a.Children,d,f=0;f<a.length;f++)if(a[f].Current){d=a[f];break}d?(a=d.RemoteLocation.length===1&&d.RemoteLocation[0].Children.length===1,g.setTitle(c.formatMessage(e['Commits for "${0}" branch'],d.Name)),b.commandService.destroy(g.actionsNode.id),b.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10),b.commandService.renderCommands(g.actionsNode.id,g.actionsNode.id,{ViewAllLink:v.expand({resource:d.CommitLocation}),
ViewAllLabel:e["See Full Log"],ViewAllTooltip:e["See the full log"]},b,"button"),a&&(b.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.fetch",100),b.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.merge",100),b.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.rebase",100),b.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.resetIndex",100),b.commandService.renderCommands(g.actionsNode.id,
g.actionsNode.id,d.RemoteLocation[0].Children[0],b,"button")),b.commandService.addCommandGroup(g.actionsNode.id,"eclipse.gitPushGroup",1E3,"Push",null,null,null,"Push",null,"eclipse.orion.git.push"),b.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.push",1100,"eclipse.gitPushGroup"),b.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.pushBranch",1200,"eclipse.gitPushGroup"),b.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.pushToGerrit",
1300,"eclipse.gitPushGroup"),b.commandService.renderCommands(g.actionsNode.id,g.actionsNode.id,d,b,"button"),d.RemoteLocation[0]===null?(i.done(),b.renderNoCommit(j)):(i.worked(c.formatMessage(e['Getting commits for "${0}" branch'],d.Name)),a&&d.RemoteLocation[0].Children[0].CommitLocation?b.registry.getService("orion.git.provider").getLog(d.RemoteLocation[0].Children[0].CommitLocation+"?page=1&pageSize=20","HEAD").then(function(a){i.worked(e["Rendering commits"]);for(var c=a.Children.length,f=0;f<
a.Children.length;f++)b.renderCommit(a.Children[f],!0,f,j);i.worked(e["Getting outgoing commits"]);b.registry.getService("orion.git.provider").getLog(d.CommitLocation+"?page=1&pageSize=20",d.RemoteLocation[0].Children[0].Id).then(function(a){i.worked("Rendering commits");for(var d=0;d<a.Children.length;d++)b.renderCommit(a.Children[d],!1,d+c,j);c+=a.Children.length;c===0&&b.renderNoCommit(j);i.done()},function(a){i.done(a)})},function(a){i.done(a)}):b.registry.getService("orion.git.provider").doGitLog(d.CommitLocation+
"?page=1&pageSize=20").then(function(a){i.worked(e["Rendering commits"]);for(var c=0;c<a.Children.length;c++)b.renderCommit(a.Children[c],!0,c,j);a.Children.length===0&&b.renderNoCommit(j);i.done()},function(a){i.done(a)}))):i.done()});h.empty(h.node("commitNode"));h.node("commitNode").appendChild(j)};b.prototype.renderNoCommit=function(a){var b=document.createElement("div");b.className="sectionTableItem";a.appendChild(b);a=document.createElement("div");a.style.overflow="hidden";b.appendChild(a);
b=document.createElement("div");b.className="stretch";a.appendChild(b);a=document.createElement("div");a.textContent=e["The branch is up to date."];b.appendChild(a);a=document.createElement("div");a.textContent=e["You have no outgoing or incoming commits."];b.appendChild(a)};b.prototype.renderCommit=function(a,b,c,d){c=document.createElement("div");c.className="sectionTableItem lightTreeTableRow";d.appendChild(c);d=document.createElement("div");d.style.overflow="hidden";c.appendChild(d);b=b?"git-sprite-outgoing-commit":
"git-sprite-incoming-commit";c=document.createElement("span");c.className="sectionIcon gitImageSprite "+b;d.appendChild(c);if(a.AuthorImage)b=document.createElement("div"),b.style["float"]="left",c=new Image,c.src=a.AuthorImage,c.name=a.AuthorName,c.className="git-author-icon",b.appendChild(c),d.appendChild(b);b=document.createElement("div");b.className="stretch";d.appendChild(b);c=document.createElement("a");c.className="navlinkonpage";c.href=j.toUrl(y.expand({resource:a.Location}));c.textContent=
a.Message;b.appendChild(c);new o.CommitTooltipDialog({commit:a,triggerNode:c});c=document.createElement("div");b.appendChild(c);c=document.createElement("span");c.textContent=e[" (SHA "]+a.Name+e[") by "]+a.AuthorName+" on "+(new Date(a.Time)).toLocaleString();b.appendChild(c);b=document.createElement("div");b.className="sectionTableItemActions";b.id="branchActionsArea";d.appendChild(b);this.commandService.renderCommands(this.actionScopeId,b,a,this,"tool")};b.prototype.decorateTag=function(a,b){b=
b||new p;this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").doGitLog(a.CommitLocation+"?page=1&pageSize=1"),"Getting tag last commit "+a.Name).then(function(c){a.Commit=c.Children[0];b.resolve()},function(){b.reject()});return b};b.prototype.displayTags=function(b,c){var f=this,i=document.createElement("a"),k=a.matchResourceParameters();i.href=k.resource;var i=i.search?i.search:"?page=1&pageSize=20",k=h.node("table"),l=new d.Section(k,{id:"tagSection",
iconClass:["gitImageSprite","git-sprite-tag"],title:"Tags"+(c==="full"?"":" (5 most recent)"),content:'<div id="tagNode"></div>',canHide:!0,hidden:!0,preferenceService:f.registry.getService("orion.core.preference")}),n=l.createProgressMonitor();n.begin(e["Getting tags"]);var o=document.createElement("div");o.className="mainPadding";this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitBranch(b.TagLocation+(c==="full"?i:"?page=1&pageSize=5")),
"Getting tags "+b.Name).then(function(a){var d=a.Children,a=new g.DynamicContentModel(d,function(a){return f.decorateTag.bind(f)(d[a])}),a=new g.DynamicContentExplorer(a);a.use({initialRender:function(){n.done();var a=h.node("tagNode");a&&(h.empty(a),a.appendChild(o),f.commandService.destroy(l.actionsNode.id),c!=="full"&&d.length!==0&&(f.commandService.registerCommandContribution(l.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10),f.commandService.renderCommands(l.actionsNode.id,
l.actionsNode.id,{ViewAllLink:j.toUrl(t.expand({resource:b.TagLocation})),ViewAllLabel:e["View All"],ViewAllTooltip:e["View all tags"]},f,"button")),d.length===0&&l.setTitle(e["No Tags"]))},renderBeforeItemPopulation:function(a){var b=document.createElement("div");b.className="sectionTableItem lightTreeTableRow";o.appendChild(b);var c=document.createElement("div");c.style.overflow="hidden";b.appendChild(c);b=document.createElement("div");b.className="stretch";c.appendChild(b);var e=document.createElement("span");
e.textContent=d[a].Name;b.appendChild(e);this.explorer.progressIndicators[a]=new this.explorer.progressIndicator(a,e);e=document.createElement("div");e.id="tagDetailsView"+a;b.appendChild(e);b=document.createElement("div");b.className="sectionTableItemActions";b.id="tagActionsArea";c.appendChild(b);f.commandService.renderCommands(f.actionScopeId,b,d[a],f,"tool")},renderAfterItemPopulation:function(a){f.renderTag(d[a],a)}});a.render()},function(a){n.done();f.handleError(a)})};b.prototype.renderTag=
function(a,b){var c=document.createElement("span");c.className="tag-description";h.empty(h.node("tagDetailsView"+b));h.node("tagDetailsView"+b).appendChild(c);var d=a.Commit,f=document.createElement("a");f.className="navlinkonpage";f.href=j.toUrl(y.expand({resource:d.Location}));f.textContent=d.Message;c.appendChild(f);c.appendChild(document.createTextNode(e[" by "]+d.AuthorName+e[" on "]+(new Date(d.Time)).toLocaleString()));new o.CommitTooltipDialog({commit:d,triggerNode:f})};b.prototype.displayRemotes=
function(a){var b=a.RemoteLocation,c=this,f=h.node("table"),g=new d.Section(f,{id:"remoteSection",title:e.Remotes,iconClass:["gitImageSprite","git-sprite-remote"],slideout:!0,content:'<div id="remoteNode" class="mainPadding"></div>',canHide:!0,hidden:!0,preferenceService:this.registry.getService("orion.core.preference")}),i=g.createProgressMonitor();i.begin("Getting remotes");c.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.addRemote",100);c.commandService.renderCommands(g.actionsNode.id,
g.actionsNode.id,a,c,"button");this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitRemote(b),"Getting remotes "+a.Name).then(function(a){a=a.Children;i.worked(e["Rendering remotes"]);if(a.length===0)g.setTitle(e["No Remotes"]);else for(var b=0;b<a.length;b++)c.renderRemote(a[b],b);i.done()},function(a){i.done();c.handleError(a)})};b.prototype.renderRemote=function(a){var b=document.createElement("div");b.className="sectionTableItem lightTreeTableRow";
h.node("remoteNode").appendChild(b);var c=document.createElement("div");c.style.overflow="hidden";b.appendChild(c);b=document.createElement("div");b.className="stretch";c.appendChild(b);var d=document.createElement("div");d.textContent=a.Name;b.appendChild(d);d=document.createElement("div");d.textContent=a.GitUrl;b.appendChild(d);b=document.createElement("div");b.className="sectionTableItemActions";b.id="remoteActionsArea";c.appendChild(b);this.commandService.renderCommands(this.actionScopeId,b,a,
this,"tool")};b.prototype.displayConfig=function(a,b){var c=a.ConfigLocation,f=this,g=h.node("table"),i=new d.Section(g,{id:"configSection",title:e.Configuration+(b==="full"?"":" (user.*)"),slideout:!0,content:'<div id="configNode" class="mainPadding"></div>',canHide:!0,hidden:!0,preferenceService:this.registry.getService("orion.core.preference")}),j=i.createProgressMonitor();j.begin(e["Getting confituration"]);this.registry.getService("orion.page.progress").progress(this.registry.getService("orion.git.provider").getGitCloneConfig(c),
"Getting configuration of "+a.Name).then(function(d){j.worked("Rendering configuration");d=d.Children;b!=="full"&&d.length!==0&&(f.commandService.registerCommandContribution(i.actionsNode.id,"eclipse.orion.git.repositories.viewAllCommand",10),f.commandService.renderCommands(i.actionsNode.id,i.actionsNode.id,{ViewAllLink:u.expand({resource:c}),ViewAllLabel:e["View All"],ViewAllTooltip:e["View all configuration entries"]},f,"button"));b==="full"&&(f.commandService.registerCommandContribution(i.actionsNode.id,
"eclipse.orion.git.addConfigEntryCommand",1E3),f.commandService.renderCommands(i.actionsNode.id,i.actionsNode.id,a,f,"button"));if(d.length===0)i.setTitle("No Configuration");else for(var g=0;g<d.length;g++)(b==="full"||d[g].Key.indexOf("user.")!==-1)&&f.renderConfigEntry(d[g],g);j.done()},function(a){j.done();f.handleError(a)})};b.prototype.renderConfigEntry=function(a){var b=document.createElement("div");b.className="sectionTableItem lightTreeTableRow";h.node("configNode").appendChild(b);var c=
document.createElement("div");c.style.overflow="hidden";b.appendChild(c);b=document.createElement("div");b.className="stretch";c.appendChild(b);var d=document.createElement("span");d.textContent=a.Key;b.appendChild(d);d=document.createElement("span");d.style.paddingLeft="10px";d.textContent=a.Value;b.appendChild(d);b=document.createElement("div");b.className="sectionTableItemActions";b.id="configActionsArea";c.appendChild(b);this.commandService.renderCommands(this.actionScopeId,b,a,this,"tool")};
return b}();return i});
define("orion/operation",["orion/xhr","orion/Deferred"],function(e,j){function i(c,d,b,f){e("GET",c,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=a.response?JSON.parse(a.response):null;d.progress(a);!a.type||a.type==="loadstart"||a.type==="progress"?setTimeout(function(){i(c,d,b,f)},2E3):(a.type==="error"||a.type==="abort"?d.reject(f?f(a):a.Result):d.resolve(b?b(a):a.Result.JsonData),a.Location||e("DELETE",c,{headers:{"Orion-Version":"1"},timeout:15E3}))},function(a){var b=a;if(a.responseText!==
void 0){b=a.responseText;try{b=JSON.parse(a.responseText)}catch(c){}}b.Message!==void 0?(b.HttpCode=b.HttpCode===void 0?a.status:b.HttpCode,b.Severity=b.Severity===void 0?"Error":b.Severity,d.reject(b)):d.reject({Severity:"Error",Message:b,HttpCode:a.status})})}function d(c,d){d.then(null,function(b){b instanceof Error&&b.name==="Cancel"&&e("PUT",c,{headers:{"Orion-Version":"1"},data:JSON.stringify({abort:!0}),timeout:15E3})})}return{handle:function(c,e,b){var f=new j;d(c,f);i(c,f,e,b);return f}}});
define("orion/git/gitClient",["require","orion/xhr","orion/Deferred","orion/operation"],function(e,j,i,d){var c=c||{};c.GitService=function(){function c(b){if(b)this._serviceRegistry=b,this._serviceRegistration=b.registerService("orion.git.provider",this)}c.prototype={checkGitService:function(){},cloneGitRepository:function(b,c,a,d,h,l,n,p,o,u,t){var w=this,v={};if(b)v.Name=b;if(a)v.Path=a;if(c)v.GitUrl=c;v.Location=d;if(h)v.GitSshUsername=h;if(l)v.GitSshPassword=l;if(n)v.GitSshKnownHost=n;if(p)v.GitSshPrivateKey=
p;if(o)v.GitSshPassphrase=o;if(u){if(u.GitMail)v.GitMail=u.GitMail;if(u.GitName)v.GitName=u.GitName}if(t)v.initProject=t;var b=e.toUrl("gitapi/clone/._"),b=b.substring(0,b.length-2),y=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(v)}).then(function(a){w._getGitServiceResponse(y,a)},function(a){w._handleGitServiceResponseError(y,a)});return y},removeGitRepository:function(b){var c=this,a=new i;j("DELETE",
b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},getGitStatus:function(b){var c=this,a=new i;j("GET",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},stage:function(b){var c=
this,a=new i;j("PUT",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},stageMultipleFiles:function(b,c){var a=this,d=new i;j("PUT",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Path:c})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,
b)});return d},unstageAll:function(b,c){var a=this,d=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Reset:c})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},unstage:function(b,c){var a=this,d=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Path:c})}).then(function(b){a._getGitServiceResponse(d,
b)},function(b){a._handleGitServiceResponseError(d,b)});return d},checkoutPath:function(b,c){var a=this,d=new i;j("PUT",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Path:c,RemoveUntracked:"true"})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},commitAll:function(b,c,a){var d=this,e=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},
timeout:15E3,handleAs:"json",data:a}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},getGitClone:function(b){var c=this,a=new i;j("GET",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},getGitCloneConfig:function(b){var c=this,a=new i;j("GET",b,{headers:{"Orion-Version":"1",
"Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},getGitBranch:function(b){var c=this,a=new i;j("GET",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},getGitRemote:function(b){var c=this,
a=new i;j("GET",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},checkoutBranch:function(b,c){var a=this,d=new i;j("PUT",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Branch:c})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,
b)});return d},resetIndex:function(b,c){var a=this,d=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Commit:c,Reset:"HARD"})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},addBranch:function(b,c,a){var d=this,e={};if(c)e.Name=c;if(a)e.Branch=a;var h=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},
timeout:15E3,handleAs:"json",data:JSON.stringify(e)}).then(function(a){d._getGitServiceResponse(h,a)},function(a){d._handleGitServiceResponseError(h,a)});return h},removeBranch:function(b){var c=this,a=new i;j("DELETE",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},addRemote:function(b,c,a){var d=this,e=new i;j("POST",b,{headers:{"Orion-Version":"1",
"Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Remote:c,RemoteURI:a})}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},removeRemote:function(b){var c=this,a=new i;j("DELETE",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});
return a},doGitLog:function(b){var c=this,a=new i;j("GET",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},getDiff:function(b,c){var a=this,d=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({New:c})}).then(function(b){a._getGitServiceResponse(d,
b)},function(b){a._handleGitServiceResponseError(d,b)});return d},doFetch:function(b,c,a,d,e,h,n){var p=this,o=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Fetch:"true",Force:c,GitSshUsername:a,GitSshPassword:d,GitSshKnownHost:e,GitSshPrivateKey:h,GitSshPassphrase:n})}).then(function(a){p._getGitServiceResponse(o,a)},function(a){p._handleGitServiceResponseError(o,a)});return o},doPull:function(b,
c,a,d,e,h,n){var p=this,o=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Pull:"true",Force:c,GitSshUsername:a,GitSshPassword:d,GitSshKnownHost:e,GitSshPrivateKey:h,GitSshPassphrase:n})}).then(function(a){p._getGitServiceResponse(o,a)},function(a){p._handleGitServiceResponseError(o,a)});return o},doMerge:function(b,c,a){var d=this,e=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},
timeout:15E3,handleAs:"json",data:JSON.stringify({Merge:c,Squash:a})}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},doCherryPick:function(b,c){var a=this,d=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({"Cherry-Pick":c})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},doRevert:function(b,
c){var a=this,d=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Revert:c})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},doRebase:function(b,c,a){var d=this,e={};e.Rebase=c;if(a)e.Operation=a;var h=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify(e)}).then(function(a){d._getGitServiceResponse(h,
a)},function(a){d._handleGitServiceResponseError(h,a)});return h},doPush:function(b,c,a,d,e,h,n,p,o){var u=this,t=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({PushSrcRef:c,PushTags:a,Force:d,GitSshUsername:e,GitSshPassword:h,GitSshKnownHost:n,GitSshPrivateKey:p,GitSshPassphrase:o})}).then(function(a){u._getGitServiceResponse(t,a)},function(a){u._handleGitServiceResponseError(t,a)});return t},getLog:function(b,
c){var a=this,d=new i,e=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({New:c})}).then(function(a){e.resolve(a.xhr.getResponseHeader("Location"))},function(b){a._handleGitServiceResponseError(d,b)});e.then(function(b){j("GET",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,
b)})});return d},getDefaultRemoteBranch:function(b){var c=this,a=new i,d=new i;j("GET",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(a){c._getGitServiceResponse(d,a)},function(b){c._handleGitServiceResponseError(a,b)});d.then(function(b){j("GET",b.Children[0].Location,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,
b)},function(b){c._handleGitServiceResponseError(a,b)})});return a},doAddTag:function(b,c){var a=this,d=new i;j("PUT",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Name:c})}).then(function(b){a._getGitServiceResponse(d,b)},function(b){a._handleGitServiceResponseError(d,b)});return d},doRemoveTag:function(b){var c=this,a=new i;j("DELETE",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},
timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},checkoutTag:function(b,c,a){var d=this,e=new i;j("PUT",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Tag:c,Branch:a})}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},addCloneConfigurationProperty:function(b,c,a){var d=
this,e=new i;j("POST",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Key:c,Value:a})}).then(function(a){d._getGitServiceResponse(e,a)},function(a){d._handleGitServiceResponseError(e,a)});return e},editCloneConfigurationProperty:function(b,c){var a=this,d=new i;j("PUT",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json",data:JSON.stringify({Value:c})}).then(function(b){a._getGitServiceResponse(d,
b)},function(b){a._handleGitServiceResponseError(d,b)});return d},deleteCloneConfigurationProperty:function(b){var c=this,a=new i;j("DELETE",b,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},timeout:15E3,handleAs:"json"}).then(function(b){c._getGitServiceResponse(a,b)},function(b){c._handleGitServiceResponseError(a,b)});return a},sendCommitReviewRequest:function(b,c,a,d,e,h){var n=this,p=new i;j("POST",c,{headers:{"Orion-Version":"1","Content-Type":"application/json; charset=UTF-8"},
timeout:15E3,handleAs:"json",data:JSON.stringify({ReviewReqCommit:b,ReviewReqUrl:d,ReviewReqNotifyLogin:a,ReviewReqAuthorName:e,ReviewMessage:h})}).then(function(a){n._getGitServiceResponse(p,a)},function(a){n._handleGitServiceResponseError(p,a)});return p},_getGitServiceResponse:function(b,c){var a=c.response?JSON.parse(c.response):null;if(c.xhr&&c.xhr.status===202){var e=d.handle(a.Location);e.then(b.resolve,function(c){c.failedOperation=a.Location;b.reject(c)},b.progress);b.then(null,function(a){e.reject(a)})}else b.resolve(a)},
_handleGitServiceResponseError:function(b,c){b.reject(c)}};return c}();return c});
define("orion/ssh/sshTools",["orion/Deferred","orion/xhr"],function(e,j){var i=i||{};i.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 b=new e;b.resolve(d);return b}return j("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&&b.name==="Cancel"?"_cancel":b.response?JSON.parse(b.response):null})}}}}d.prototype={KNOWN_HOSTS:"knownHosts",addKnownHost:function(c){var c=c||{},d=new e,b=this,f=c.host,a=c.keyType,g=c.hostKey,i=c.port||22;if(!f||!a||!g||!i)return d.reject(),d;this._authService.getUser().then(function(c){for(var e=localStorage.getItem(c.login+"/"+b.KNOWN_HOSTS),e=e?JSON.parse(e):[],j=0;j<e.length;++j){var o=e[j];if(o.host===f&&o.port===i){d.resolve(o.host+" "+
o.keyType+" "+o.hostKey);return}}o={host:f,port:i,keyType:a,hostKey:g};e.push(o);localStorage.setItem(c.login+"/"+b.KNOWN_HOSTS,JSON.stringify(e));d.resolve(o.host+" "+o.keyType+" "+o.hostKey)},function(a){d.reject(a)});return d},clearKnownHosts:function(){var c=new e,d=this;this._authService.getUser().then(function(b){var e=localStorage.getItem(b.login+"/"+d.KNOWN_HOSTS),e=e?JSON.parse(e):[];localStorage.removeItem(b.login+"/"+d.KNOWN_HOSTS);c.resolve(e)},function(b){c.reject(b)});return c},getKnownHostCredentials:function(c,
d){var b=new e,f=this,d=d||22;if(!c||!d)return b.reject(),b;this._authService.getUser().then(function(a){for(var a=(a=localStorage.getItem(a.login+"/"+f.KNOWN_HOSTS))?JSON.parse(a):[],e=0;e<a.length;++e){var i=a[e];if(i.host===c&&i.port===d){b.resolve(i.host+" "+i.keyType+" "+i.hostKey);return}}b.resolve("")},function(a){b.reject(a)});return b}};return d}();return i});
define("orion/links",[],function(){function e(e){this._init(e)}e.prototype={_init:function(e){this._registry=e.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.textlink",this)},_replaceLink:function(e,i,d,c,h){var b=e.search(d);b>0&&(i.appendChild(document.createTextNode(e.substring(0,b))),e=e.substring(b));var d=e.replace(d,""),b=e.substring(0,e.length-d.length),f=b.split(" ",c);if(f.length===c){for(var e=document.createElement("a"),a=0;a<c;a++)h=h.replace("%"+
(a+1),f[a]);e.setAttribute("href",h);e.textContent=b;i.appendChild(e);e=d}return e},addLinks:function(e,i){var d=i||document.createElement("div"),c=this._registry.getServiceReferences("orion.core.linkScanner");if(c.length>0)for(var h=c[0],c=RegExp(h.getProperty("pattern"),"i"),b=h.getProperty("words"),h=h.getProperty("anchor"),f=e.search(c);f>=0;)e=this._replaceLink(e,d,c,b,h),f=e.search(c);e.length>0&&d.appendChild(document.createTextNode(e));return d}};e.prototype.constructor=e;return{TextLinkService:e}});
var eclipse;
define('built-git-repository.js',"i18n!git/nls/gitmessages,require,orion/browserCompatibility,orion/bootstrap,orion/status,orion/progress,orion/PageUtil,orion/keyBinding,orion/commandRegistry,orion/commands,orion/dialogs,orion/selection,orion/fileClient,orion/operationsClient,orion/searchClient,orion/globalCommands,orion/git/gitRepositoryExplorer,orion/git/gitCommands,orion/git/gitClient,orion/ssh/sshTools,orion/links".split(","),function(e,j,i,d,c,h,b,f,a,g,k,l,n,p,o,u,t,w,v,y,C){d.startup().then(function(d){var i=d.serviceRegistry,
d=d.preferences;new k.DialogService(i);var m=new l.Selection(i);new y.SshService(i);var r=new a.CommandRegistry({selection:m}),m=new p.OperationsClient(i),q=new h.ProgressService(i,m,r);new c.StatusReportingService(i,m,"statusPane","notifications","notificationArea");m=new C.TextLinkService({serviceRegistry:i});new v.GitService(i);var D=new n.FileClient(i),x=new o.Searcher({serviceRegistry:i,commandService:r,fileService:D}),B=new t.GitRepositoryExplorer(i,r,m,null,"artifacts","pageNavigationActions",
"itemLevelCommands");u.generateBanner("orion-repository",i,r,d,x,B);w.createFileCommands(i,r,B,"pageActions","selectionTools");w.createGitClonesCommands(i,r,B,"pageActions","selectionTools",D);r.addCommandGroup("pageActions","eclipse.gitGroup",100);r.addCommandGroup("pageActions","eclipse.gitGroup",200);r.registerCommandContribution("reposPageActions","eclipse.cloneGitRepository",100,"eclipse.gitGroup",!1,null,new a.URLBinding("cloneGitRepository","url"));r.registerCommandContribution("reposPageActions",
"eclipse.createGitProject",300,"eclipse.gitGroup",!0,null,new a.URLBinding("createProjectContext","name"));r.registerCommandContribution("reposPageActions","eclipse.initGitRepository",200,"eclipse.gitGroup");r.registerCommandContribution("repoPageActions","eclipse.orion.git.pull",100,"eclipse.gitGroup");r.registerCommandContribution("repoPageActions","eclipse.orion.git.applyPatch",200,"eclipse.gitGroup");r.registerCommandContribution("repoPageActions","eclipse.git.deleteClone",300,"eclipse.gitGroup");
r.registerCommandContribution("repoPageActions","eclipse.orion.git.openCommitCommand",1E3,"eclipse.gitGroup",!0,new f.KeyBinding("h",!0,!0),new a.URLBinding("openGitCommit","commitName"));r.registerCommandContribution("itemLevelCommands","eclipse.openCloneContent",100);r.registerCommandContribution("itemLevelCommands","eclipse.openGitStatus",100);r.registerCommandContribution("itemLevelCommands","eclipse.openGitLog",100);r.registerCommandContribution("itemLevelCommands","eclipse.orion.git.pull",200);
r.registerCommandContribution("itemLevelCommands","eclipse.removeBranch",1E3);r.registerCommandContribution("itemLevelCommands","eclipse.checkoutTag",200);r.registerCommandContribution("itemLevelCommands","eclipse.removeTag",1E3);r.registerCommandContribution("itemLevelCommands","eclipse.checkoutBranch",200);r.registerCommandContribution("itemLevelCommands","eclipse.orion.git.applyPatch",300);r.registerCommandContribution("itemLevelCommands","eclipse.git.deleteClone",1E3);r.registerCommandContribution("itemLevelCommands",
"eclipse.orion.git.fetch",500);r.registerCommandContribution("itemLevelCommands","eclipse.orion.git.merge",600);r.registerCommandContribution("itemLevelCommands","eclipse.orion.git.mergeSquash",700);r.registerCommandContribution("itemLevelCommands","eclipse.orion.git.rebase",700);r.registerCommandContribution("itemLevelCommands","eclipse.orion.git.resetIndex",800);r.registerCommandContribution("itemLevelCommands","eclipse.removeRemote",1E3);r.registerCommandContribution("itemLevelCommands","eclipse.orion.git.deleteConfigEntryCommand",
1E3);r.registerCommandContribution("itemLevelCommands","eclipse.orion.git.editConfigEntryCommand",200);r.registerCommandContribution("pageNavigationActions","eclipse.orion.git.previousTagPage",1);r.registerCommandContribution("pageNavigationActions","eclipse.orion.git.nextTagPage",2);i=new g.Command({name:e["View All"],id:"eclipse.orion.git.repositories.viewAllCommand",hrefCallback:function(a){return j.toUrl(a.items.ViewAllLink)},visibleWhen:function(a){this.name=a.ViewAllLabel;this.tooltip=a.ViewAllTooltip;
return a.ViewAllLabel&&a.ViewAllTooltip&&a.ViewAllLink}});r.addCommand(i);var A=b.matchResourceParameters();typeof A["createProject.name"]==="undefined"&&r.processURL(window.location.href);q.progress(D.loadWorkspace(),"Loading default workspace").then(function(a){B.setDefaultPath(a.Location);var a={},b;for(b in A)b.indexOf("createProject")!=-1&&(a[b.replace("createProject.","")]=A[b]);r.runCommand("eclipse.createGitProject",{url:A.cloneGit,projectDescription:a},null,null);typeof A["createProject.name"]===
"undefined"&&B.redisplay()});var F=A.resource;window.addEventListener("hashchange",function(){r.closeParameterCollector();var a=b.matchResourceParameters().resource;F!==a&&(F=a,q.progress(D.loadWorkspace(),"Loading default workspace").then(function(a){B.setDefaultPath(a.Location);B.redisplay()}))},!1)})});