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

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


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

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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:  IBM Corporation - initial API and implementation

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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation
 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) 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
*/
(function(){function j(){for(var d=navigator.userAgent,e={browser:!1,version:!1},c=[{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:"Safari",regExp:/version\/(\d+).*?safari/i,minVersion:5}],b=0;b<c.length;b++){var a=c[b],i=d.match(a.regExp);if(i){e.browser=!0;e.version=i[1]>=a.minVersion;e.name=a.name;break}}return e}function g(){try{return"localStorage"in
window&&window.localStorage!==null}catch(d){return!1}}function f(d){alert(d);throw Error("unsupported browser");}var e=j();if(e.browser)e.version||f("Sorry, your browser version is not supported.\n\nTo use Orion, please upgrade to the latest version of "+e.name+".\n");else if(g()&&!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 g()||f("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:j,supportsLocalStorage:g,throwBrowserAlert:f}})();define("orion/browserCompatibility",function(){});
(function(j,g){typeof define==="function"&&define.amd?define("orion/Deferred",g):typeof exports==="object"?module.exports=g():(j.orion=j.orion||{},j.orion.Deferred=g())})(this,function(){function j(){for(var c;c=d.shift();)c();h=!1}function g(c){d.push(c);h||(h=!0,setTimeout(j,0))}function f(c){return function(){c.apply(void 0,arguments)}}function e(){function c(){for(var a;a=m.shift();){var b=a.deferred,c=l==="fulfilled"?"resolve":"reject";if(typeof a[c]==="function")try{var i=(0,a[c])(k),e=i&&(typeof i===
"object"||typeof i==="function")&&i.then;if(typeof e==="function")if(i===b.promise)b.reject(new TypeError);else{var h=i.cancel;typeof h==="function"?b._protected(d).parentCancel=h.bind(i):delete b._protected(d).parentCancel;e.call(i,f(b.resolve),f(b.reject),f(b.progress))}else b.resolve(i)}catch(o){b.reject(o)}else b[c](k)}}function b(a){delete p.parentCancel;l="rejected";k=a;m.length&&g(c)}function a(i){function d(a){return function(b){f||(f=!0,a(b))}}var f=!1;delete p.parentCancel;try{var j=i&&
(typeof i==="object"||typeof i==="function")&&i.then;if(typeof j==="function")if(i===h)b(new TypeError);else{l="assumed";var z=i&&i.cancel;if(typeof z!=="function"){var t=new e,i=t.promise;try{j(t.resolve,t.reject,t.progress)}catch(s){t.reject(s)}z=i.cancel;j=i.then}k=i;j.call(i,d(a),d(b));p.parentCancel=z.bind(i)}else l="fulfilled",k=i,m.length&&g(c)}catch(y){d(b)(y)}}function i(){var a=p.parentCancel;if(a)delete p.parentCancel,a();else if(!l)a=Error("Cancel"),a.name="Cancel",b(a)}var k,l,m=[],h=
this,p={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==d)throw Error("protected");return p}});this.resolve=function(b){l||a(b);return h};this.reject=function(a){l||b(a);return h};this.progress=function(a){l||m.forEach(function(b){if(b.progress)try{b.progress(a)}catch(i){}});return h.promise};this.cancel=function(){p.parentCancel?setTimeout(i,0):i();return h};this.then=function(a,b,i){a={resolve:a,reject:b,progress:i,deferred:new e};m.push(a);a.deferred._protected(d).parentCancel=
h.promise.cancel.bind(h);(l==="fulfilled"||l==="rejected")&&g(c);return a.deferred.promise};this.promise={then:h.then,cancel:h.cancel}}var d=[],h=!1;e.all=function(c,b){function a(a,b){d||(l[a]=b,--k===0&&h.resolve(l))}function i(i,c){if(!d){if(b)try{a(i,b(c));return}catch(k){c=k}h.reject(c)}}var k=c.length,l=[],d=!1,h=new e;h.then(void 0,function(){d=!0;c.forEach(function(a){a.cancel&&a.cancel()})});k===0?h.resolve(l):c.forEach(function(b,c){b.then(a.bind(void 0,c),i.bind(void 0,c))});return h.promise};
e.when=function(c,b,a,i){var k;if(!(c&&typeof c.then==="function"))k=new e,k.resolve(c),c=k.promise;return c.then(b,a,i)};return e});
define("orion/EventTarget",[],function(){function j(){this._namedListeners={}}j.prototype={dispatchEvent:function(g){if(!g.type)throw Error("unspecified type");var f=this._namedListeners[g.type];f&&f.forEach(function(e){try{typeof e==="function"?e(g):e.handleEvent(g)}catch(d){typeof console!=="undefined"&&console.log(d)}});return!g.defaultPrevented},addEventListener:function(g,f){if(typeof f==="function"||f.handleEvent)this._namedListeners[g]=this._namedListeners[g]||[],this._namedListeners[g].push(f)},
removeEventListener:function(g,f){var e=this._namedListeners[g];if(e)for(var d=0;d<e.length;d++)if(e[d]===f){e.length===1?delete this._namedListeners[g]:e.splice(d,1);break}}};j.prototype.constructor=j;j.attach=function(g){var f=new j;g.dispatchEvent=f.dispatchEvent.bind(f);g.addEventListener=f.addEventListener.bind(f);g.removeEventListener=f.removeEventListener.bind(f)};return j});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(j,g){function f(b,a,i){this._properties=i||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function e(b,a,i){this._serviceId=b;this._serviceReference=a;this._internalRegistry=i}function d(b,a){function i(i){return function(){var c;try{if(!a())throw Error("Service was unregistered");var k=b[i].apply(b,Array.prototype.slice.call(arguments));if(k&&typeof k.then==="function")return k;
else c=new j,c.resolve(k)}catch(d){c=new j,c.reject(d)}return c.promise}}for(var c in b)typeof b[c]==="function"&&(this[c]=i(c))}function h(b,a){this.type=b;this.serviceReference=a}function c(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new g;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var i=b._entries[a];if(!i)throw Error("Service has already been unregistered: "+a);var c=i.reference;b._serviceEventTarget.dispatchEvent(new h("unregistering",
c));b._entries[a]=null;c.getProperty("objectClass").forEach(function(a){for(var i=b._namedReferences[a],d=0;d<i.length;d++)if(i[d]===c){i.length===1?delete b._namedReferences[a]:i.splice(d,1);break}})},modifyService:function(a){var i=b._entries[a];if(!i)throw Error("Service not found while trying to send modified event: "+a);b._serviceEventTarget.dispatchEvent(new h("modified",i.reference))}}}f.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]}};f.prototype.constructor=f;e.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)}};e.prototype.constructor=e;c.prototype={getService:function(b){var a;if(typeof b==="string")(b=this._namedReferences[b])&&b.some(function(b){a=this._entries[b.getProperty("service.id")].service;return!!a},this);else if(b=this._entries[b.getProperty("service.id")])a=b.service;return a||null},getServiceReferences:function(b){if(b)return this._namedReferences[b]?this._namedReferences[b]:
[];var a=[];this._entries.forEach(function(b){b&&a.push(b.reference)});return a},registerService:function(b,a,c){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 f(k,b,c),m=this._namedReferences;b.forEach(function(a){m[a]=m[a]||[];m[a].push(l)});b=new d(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 e(k,l,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};c.prototype.constructor=c;return{ServiceRegistry:c}});
define("orion/xhr",["orion/Deferred"],function(j){function g(f,e,d,h){var c=typeof d.response!=="undefined"?d.response:d.responseText,b;try{b=d.status}catch(a){b=0}f={args:e,response:c,responseText:typeof c==="string"?c:null,status:b,url:f,xhr:d};if(typeof h!=="undefined")f.error=h;return f}return function(f,e,d){var d=d||{},h=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,c=new j,b=d.headers||{},a=d.log||!1,i;typeof b["X-Requested-With"]==="undefined"&&(b["X-Requested-With"]="XMLHttpRequest");
if(typeof d.data!=="undefined"&&(f==="POST"||f==="PUT"))i=d.data;var k=!1,l=!1;c.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";c.reject(a)}};h.onload=function(){var b=g(e,d,h);200<=h.status&&h.status<400?c.resolve(b):(c.reject(b),a&&typeof console!=="undefined"&&console.log(Error(h.statusText)))};h.onerror=function(){var b=g(e,d,h);c.reject(b);a&&typeof console!=="undefined"&&console.log(Error(h.statusText))};
h.onprogress=function(a){a.xhr=h;c.progress(a)};try{h.open(f,e,!0);if(typeof d.responseType==="string")h.responseType=d.responseType;if(typeof d.timeout==="number")if(typeof h.timeout==="number")h.timeout=d.timeout,h.addEventListener("timeout",function(){c.reject(g(e,d,h,"Timeout exceeded"))});else{var m=setTimeout(function(){c.reject(g(e,d,h,"Timeout exceeded"))},d.timeout);c.promise.then(clearTimeout.bind(null,m),clearTimeout.bind(null,m))}Object.keys(b).forEach(function(a){h.setRequestHeader(a,
b[a])});h.send(i||null)}catch(o){c.reject(g(e,d,h,o))}return c.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(j,g,f){function e(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function d(a,b){return{get:function(c,d){if(b===0)return null;var e=localStorage.getItem(a+c);if(e===null)return null;e=JSON.parse(e);return d||b===-1||e._expires&&e._expires>(new Date).getTime()?(delete e._expires,e):null},set:function(c,d){if(b!==0){if(b!==-1)d._expires=(new Date).getTime()+
1E3*b;if(Object.keys(d).length===0)localStorage.removeItem(a+c);else{var e=JSON.stringify(d);localStorage.setItem(a+c,e);delete d._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function h(a){this._currentPromises={};this._cache=new d("/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 c(a){this._location=
a;this._currentPromise=null;this._cache=new d("/orion/preferences/default",3600)}function b(){this._cache=new d("/orion/preferences/local",-1)}function a(a,d){this._userProvider=new h(a);this._localProvider=new b;d=d||"defaults.pref";d.indexOf("://")===-1&&(d=j.toUrl(d));this._defaultsProvider=new c(d);this._serviceRegistration=a.registerService("orion.core.preference",this)}e.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var c=this._stores[b];this._dirty.indexOf(c)!==-1&&
a.push(this._providers[b].put(this._name,c));if(this._pendingDeletes[b]&&this._pendingDeletes[b].length>0){for(c=0;c<this._pendingDeletes[b].length;c++)a.push(this._providers[b].remove(this._name,this._pendingDeletes[b][c]));delete this._pendingDeletes[b]}}this._dirty=[];return g.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],c;for(c in b)b.hasOwnProperty(c)&&typeof this._cached[c]==="undefined"&&(this._cached[c]=b[c])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(this._stores.length!==0){var c=this._stores[0];if(c[a]!==b)c[a]=b,this._cached=null,this._scheduleFlush(c)}},remove:function(a){for(var b=0;b<
this._stores.length;++b){var c=this._stores[b];if(c.hasOwnProperty(a))return delete c[a],this._pendingDeletes[b]||(this._pendingDeletes[b]=[]),this._pendingDeletes[b].push(a),this._cached=null,this._scheduleFlush(),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]={},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var b=this,c=[],d=0;d<this._providers.length;++d)c.push(this._providers[d].get(this._name,
a).then(function(a){return function(c){b._stores[a]=c}}(d)));return g.all(c).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 c=new g,d=null;b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);else{this._currentPromises[a]=c;var e=this;this._service.get(a).then(function(b){e._cache.set(a,b);delete e._currentPromises[a];c.resolve(b)},function(b){b.status===
404?(b={},e._cache.set(a,b),delete e._currentPromises[a],c.resolve(b)):(delete e._currentPromises[a],c.resolve(e._cache.get(a,!0)||{}))})}return c},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)},remove:function(a,b){var c=this._cache.get(a);delete c[b];this._cache.set(a,c);return this._service.remove(a,b)}};c.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;var c=new g,d=null;b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);
else{this._currentPromise=c;var e=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);e._cache.set(a,b[a]||{});e._currentPromise=null;c.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(e._cache.set(a,{}),e._currentPromise=null,c.resolve({})):(e._currentPromise=null,b=e._cache.get(a,!0),b!==null?c.resolve(b[a]||{}):c.resolve({}))})}return c},put:function(){var a=new g;a.resolve();return a},remove:function(a,b){var c=
this._cache.get(a);delete c[b];this.put(a,c)}};b.prototype={get:function(a){var b=new g,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var c=new g;this._cache.set(a,b);c.resolve();return c},remove:function(a,b){var c=this._cache.get(a);delete c[b];this.put(a,c)}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(b,c,d){if(!c||typeof c!=="number"||c>7||c<1)d=c,c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",
d,!1);if((a.USER_SCOPE&c)!==0)return"/orion/preferences/user"+b;else if((a.LOCAL_SCOPE&c)!==0)return"/orion/preferences/local"+b;return"/orion/preferences/default"+b},getPreferences:function(b,c){if(!c||typeof c!=="number"||c>7||c<1)c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var d=[];a.USER_SCOPE&c&&this._userProvider.available()&&d.push(this._userProvider);a.LOCAL_SCOPE&c&&d.push(this._localProvider);a.DEFAULT_SCOPE&c&&d.push(this._defaultsProvider);var m=new e(b,d);return m.sync().then(function(){return m})},
getSetting:function(a,b,c){for(var d,e=0;e<a.length;e++)if(a[e].label===b)for(var h=0;h<a[e].data.length;h++)if(a[e].data[h].label===c){d=a[e].data[h].value;break}return d}};return{PreferencesService:a}});
(function(){function j(a){if(typeof a!=="string")throw new TypeError;}function g(a){return a?a.split("&"):[]}function f(a){return a.length===0?"":a.join("&")}function e(a){var b=/([^=]*)(?:=?)(.*)/.exec(a),a=b[1]?decodeURIComponent(b[1]):"",b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function d(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function h(a,b){var c="",d=[],i=0;return{next:function(){if(c!==a.query)c=a.query,d=g(c);if(i<d.length){var l=e(d[i++]);
switch(b){case "keys":return l[0];case "values":return l[1];case "keys+values":return[l[0],l[1]];default:throw new TypeError;}}throw x;}}}function c(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function b(a){var b=[];a.split("/").forEach(function(a){a===".."?b.pop():a!=="."&&b.push(a)});return b.join("/")}function a(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function i(c,d){if(typeof c!=="string")throw new TypeError;var c=a(c),e=o.exec(c);
if(!e)return null;var i={};i.scheme=e[1]||"";if(i.scheme&&!n.test(i.scheme))return null;var l=e[2];if(l&&(l=p.exec(l),i.userinfo=l[1],i.host=l[2],i.port=l[3],i.port&&!q.test(i.port)))return null;i.path=e[3];i.query=e[4];i.fragment=e[5];if(!i.scheme&&d&&(i.scheme=d.scheme,!i.host&&d.host))i.userinfo=d.userinfo,i.host=d.host,i.port=d.port,i.pathRelative=!0;if(i.pathRelative)if(i.path){if(i.path[0]!=="/")e=/^(.*\/)[^\/]*$/.exec(d.path)[1]||"/",i.path=e+i.path}else i.path=d.path;if(i.scheme)i.scheme=
i.scheme.toLowerCase();if(i.port)i.port=/[1-9]\d*$/.exec(i.port)[0];if(i.host&&i.path)i.path=b(i.path);return i}function k(a,b){var d;if(b){b=b.href||b;d=i(b);if(!d||!d.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:d})}d=i(a,d);if(!d)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:d,writable:!0});var e=new c(this);Object.defineProperty(this,"query",{get:function(){return this._url?e:null},enumerable:!0})}
try{var l;if(typeof window.URL==="function"&&window.URL.length!==0&&(l=new window.URL("http://www.w3.org?q")).protocol==="http:"&&l.query)return}catch(m){}var o=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,p=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,n=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,q=/^\d*$/,r=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,w=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,z=/^([^?#\s]*)$/,t=/^([^\s]*)$/,s=/^\S*$/,y=/([^:]*):?(.*)/,x=typeof StopIteration!=="undefined"?
StopIteration:Error("Stop Iteration"),K={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(c.prototype,{get:{value:function(a){j(a);var b;g(this._url.query).some(function(c){c=e(c);if(c[0]===a)return b=c[1],!0});return b},enumerable:!0},set:{value:function(a,b){j(a);j(b);var c=g(this._url.query);c.some(function(i,l){var k=e(i);if(k[0]===a)return k[1]=b,c[l]=d(k),!0})||c.push(d([a,b]));this._url.query=f(c)},enumerable:!0},has:{value:function(a){j(a);
return g(this._url.query).some(function(b){if(e(b)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){j(a);var b=g(this._url.query),c=b.filter(function(b){return e(b)[0]!==a});return c.length!==b.length?(this._url.query=f(c),!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 c=h(this._url,"keys+values");try{for(;;){var d=c.next();a.call(b,d[1],d[0],this)}}catch(i){if(i!==x)throw i;
}},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 g(this._url.query).length},enumerable:!0},getAll:{value:function(a){j(a);var b=[];g(this._url.query).forEach(function(c){c=e(c);c[0]===a&&b.push(c[1])});return b},enumerable:!0},append:{value:function(a,b){j(a);j(b);var c=g(this._url.query);c.push(d([a,b]));this._url.query=
f(c)},enumerable:!0}});Object.defineProperties(k.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){j(a);this._input=a;this._url=i(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){j(a);if(this._url&&(a=a.slice(-1)===":"?a.substring(0,a.length-1):a,n.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){j(a);if(this._url)this._url.userinfo=a}},username:{get:function(){if(!this._url)return"";var a=y.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){j(a);if(this._url){var b=
y.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=y.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){j(a);if(this._url){var b=[y.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){j(a);if(this._url&&(a=w.exec(a)))this._url.host=a[1],this._url.port=/[1-9]\d*$/.exec(a[2])[0]},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){j(a);if(this._url&&r.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===K[this.protocol]&&(a="");return a},set:function(a){j(a);if(this._url&&q.exec(a))this._url.port=/[1-9]\d*$/.exec(a)[0]},enumerable:!0},pathname:{get:function(){return this._url?
this._url.path:""},set:function(a){j(a);if(this._url&&z.exec(a))this._url.host&&a&&a[0]!=="/"&&(a="/"+a),this._url.path=a?b(a):""},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(a){j(a);if(this._url&&(a&&a[0]==="?"&&(a=a.substring(1)),t.exec(a)))this._url.query=a},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){j(a);if(this._url&&(a&&a[0]==="#"&&(a=a.substring(1)),s.exec(a)))this._url.fragment=
a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&(Object.defineProperty(k,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(k,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=k})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(j,g){function f(a,b){var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;c.sort();d.sort();for(var i=0,e=c.length;i<e;i++){var k=c[i];if(k!==d[i])return!1;var h=a[k],k=b[k];if(h!==k&&JSON.stringify(h)!==JSON.stringify(k))return!1}return!0}function e(a){if(a.indexOf("://")===-1)try{return(new URL(a,location.href)).href}catch(b){}return a}function d(a){var b=null,c={key:function(c){return(b=
b||Object.keys(a))[c]},getItem:function(b){return a[b]},setItem:function(c,d){a[c]=d;b=null},removeItem:function(c){delete a[c];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}};Object.defineProperty(c,"length",{get:function(){return(b=b||Object.keys(a)).length}});return c}function h(a,b){if(b&&b instanceof XMLHttpRequest){var c,d;try{c=b.status,d=b.statusText}catch(i){c=0,d=""}return{status:c||0,statusText:d}}return b}function c(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 b(a,b){this.type=a;this.plugin=b}function a(a,b){this.__objectId=a;this.__methods=b}function i(d,i,e){function k(a){C&&e.postMessage(a,C)}function n(b){if(!C)return(new j).reject(Error("plugin not connected"));b.id=String(R++);var c=new j;N[b.id]=c;c.then(null,function(a){v==="active"&&a instanceof Error&&a.name==="Cancel"&&k({requestId:b.id,method:"cancel",params:a.message?[a.message]:
[]})});var d=Object.prototype.toString;b.params.forEach(function(i,e){if(d.call(i)==="[object Object]"&&!(i instanceof a)){var k,l;for(k in i)d.call(i[k])==="[object Function]"&&(l=l||[],l.push(k));if(l){var n=P++;G[n]=i;k=function(){delete G[n]};c.then(k,k);b.params[e]=new a(n,l)}}});e.postMessage(b,C);return c.promise}function h(a,b){a||a===0?k({id:a,result:null,error:b}):console.log(b)}function r(a,b,d,i){i.forEach(function(a,b){if(a&&typeof a.__objectId!=="undefined"){var c={};a.__methods.forEach(function(b){c[b]=
function(){return n({objectId:a.__objectId,method:b,params:Array.prototype.slice.call(arguments)})}});i[b]=c}});var e=typeof a===void 0?null:{id:a,result:null,error:null};try{var l=d.apply(b,i);if(e)l&&typeof l.then==="function"?(H[a]=l,l.then(function(b){delete H[a];e.result=b;k(e)},function(b){if(H[a])delete H[a],e.error=c(b),k(e)},function(){k({responseId:a,method:"progress",params:Array.prototype.slice.call(arguments)})})):(e.result=l,k(e))}catch(m){if(e)e.error=c(m),k(e)}}function w(a){try{if(a.method){var b=
a.method,c=a.params||[];if("serviceId"in a){var d=Q[a.serviceId];d||h(a.id,"service not found");b in d?r(a.id,d,d[b],c):h(a.id,"method not found")}else if("objectId"in a){var i=G[a.objectId];i||h(a.id,"object not found");b in i?r(a.id,i,i[b],c):h(a.id,"method not found")}else if("requestId"in a){var k=H[a.requestId];k&&b==="cancel"&&k.cancel&&k.cancel.apply(k,c)}else if("responseId"in a){var l=N[a.responseId];l&&b==="progress"&&l.progress&&l.progress.apply(l,c)}else if("plugin"===a.method){var n=
a.params[0];M({headers:n.headers,services:n.services}).then(function(){D.resolve(x)})}else if("timeout"===a.method)D&&D.reject(a.error);else throw Error("Bad method: "+a.method);}else{var m=N[String(a.id)];delete N[String(a.id)];if(a.error){var f=e.handleServiceError(x,a.error);m.reject(f)}else m.resolve(a.result)}}catch(g){console.log("Plugin._messageHandler "+g)}}function z(b){var c={};if(b.methods&&(b.methods.forEach(function(a){c[a]=function(){var c={serviceId:b.serviceId,method:a,params:Array.prototype.slice.call(arguments)};
return v==="active"?n(c):x.start({"transient":!0}).then(function(){return n(c)})}}),c.addEventListener&&c.removeEventListener)){var d=new g,i=P++;G[i]={handleEvent:d.dispatchEvent.bind(d)};var e=new a(i,["handleEvent"]),k=c.addEventListener;c.addEventListener=function(a,b){d._namedListeners[a]||k(a,e);d.addEventListener(a,b)};var l=c.removeEventListener;c.removeEventListener=function(a,b){d.removeEventListener(a,b);d._namedListeners[a]||l(a,e)}}return c}function t(a){var b=JSON.parse(JSON.stringify(a.properties));
b.__plugin__=d;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);b.objectClass=a;return b}function s(a){var b=z(a),c=t(a),c=e.registerService(a.names||a.type,b,c);E[a.serviceId]={registration:c,proxy:b}}function y(){e.persist(d,{created:K,headers:I,services:F,autostart:u,lastModified:B})}var x=this,i=i||{},K=i.created||(new Date).getTime(),I=i.headers||{},F=i.services||[],u=i.autostart,B=i.lastModified||0,v="installed",A,D,C,E={},R=0,P=0,H={},N={},G={},Q={},M;this._persist=y;this._resolve=function(){v=
"resolved";e.dispatchEvent(new b("resolved",x))};this._getAutostart=function(){return u};this._getCreated=function(){return K};this.getLocation=function(){return d};this.getHeaders=function(){return JSON.parse(JSON.stringify(I))};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(E).forEach(function(b){a.push(E[b].registration.getReference())});
return a};this.getState=function(){return v};this.start=function(a){if(v==="uninstalled")return(new j).reject(Error("Plugin is uninstalled"));if(A)return A.promise.then(this.start.bind(this,a));if(v==="active")return(new j).resolve();if(!a||!a.transient){var c=a&&a.lazy?"lazy":"started";c!==u&&(u=c,y())}c=e.getState();if(c!=="starting"&&c!=="active")return a.transient?(new j).reject(Error("start transient error")):(new j).resolve();if(v==="installed")try{this._resolve()}catch(i){return(new j).reject(i)}v===
"resolved"&&F.forEach(function(a){s(a)});if(a&&a.lazy)return v!=="starting"&&(v="starting",e.dispatchEvent(new b("lazy activation",x))),(new j).resolve();var k=new j;A=k;v="starting";e.dispatchEvent(new b("starting",x));D=new j;C=e.connect(d,w);D.then(function(){D=null;v="active";e.dispatchEvent(new b("started",x));A=null;k.resolve()},function(){D=null;v="stopping";e.dispatchEvent(new b("stopping",x));Object.keys(E).forEach(function(a){E[a].registration.unregister();delete E[a]});e.disconnect(C);
C=null;v="resolved";A=null;e.dispatchEvent(new b("stopped",x));k.reject(Error("plugin activation error"))});return k.promise};this.stop=function(a){if(v==="uninstalled")return(new j).reject(Error("Plugin is uninstalled"));if(A)return A.promise.then(this.stop.bind(this,a));if((!a||!a.transient)&&"stopped"!==u)u="stopped",y();if(v!=="active"&&v!=="starting")return(new j).resolve();A=a=new j;v="stopping";e.dispatchEvent(new b("stopping",x));Object.keys(E).forEach(function(a){E[a].registration.unregister();
delete E[a]});C&&(e.disconnect(C),C=null);v="resolved";A=null;e.dispatchEvent(new b("stopped",x));a.resolve();return a.promise};M=function(a){if(v==="uninstalled")return(new j).reject(Error("Plugin is uninstalled"));if(!a)return B===0&&(B=(new Date).getTime(),y()),e.loadManifest(d).then(M);var c=I,i=F,k=u;I=a.headers||{};F=a.services||{};u=a.autostart||u;a.lastModified?B=a.lastModified:(B=(new Date).getTime(),y());if(f(I,c)&&f(F,i)&&u===k)return(new j).resolve();if(v==="active"||v==="starting"){var n=
[];Object.keys(F).forEach(function(a){var b=F[a];n.push(a);var c=E[a];if(c){if(f(b.methods,Object.keys(c.proxy))){var a=t(b),d=c.registration.getReference(),i={};d.getPropertyKeys().forEach(function(a){i[a]=d.getProperty(a)});f(a,i)||c.registration.setProperties(a);return}c.registration.unregister();delete E[a]}s(b)});Object.keys(E).forEach(function(a){n.indexOf(a)===-1&&(E[a].registration.unregister(),delete E[a])})}v==="active"&&(e.disconnect(C),D=new j,C=e.connect(d,w),D.then(function(){D=null},
function(){D=null;v="stopping";e.dispatchEvent(new b("stopping"),x);Object.keys(E).forEach(function(a){E[a].registration.unregister();delete E[a]});e.disconnect(C);C=null;v="resolved";e.dispatchEvent(new b("stopped",x))}));return(new j).resolve()};this.update=function(a){return M(a).then(function(){e.dispatchEvent(new b("updated",x))})};this.uninstall=function(){if(v==="uninstalled")return(new j).reject(Error("Plugin is uninstalled"));if(v==="active"||v==="starting"||v==="stopping")return this.stop().then(this.uninstall.bind(this),
this.uninstall.bind(this));e.removePlugin(this);v="uninstalled";e.dispatchEvent(new b("uninstalled",x));return(new j).resolve()}}var k=/^http[s]?/i;return{Plugin:i,PluginRegistry:function(a,c){function h(a){var b=a.source;r.some(function(c){if(b===c.target){try{var d;if(typeof c.useStructuredClone==="undefined"){var i=typeof a.data!=="string";d=i?a.data:JSON.parse(a.data);c.useStructuredClone=i}else d=c.useStructuredClone?a.data:JSON.parse(a.data);c.handler(d)}catch(e){}return!0}})}var c=c||{},f=
c.storage||localStorage;f.getItem||(f=d(f));var n="installed",q=[],r=[],w=new g,z={},t={registerService:a.registerService.bind(a),connect:function(a,b,d){function i(a){a=Error(a);a.name="timeout";b({method:"timeout",error:a})}var e={handler:b,url:a},k=setTimeout(i.bind(null,"Load timeout for: "+a),d||15E3),l=document.createElement("iframe");l.name=a+"_"+(new Date).getTime();if(!c.visible)l.style.display="none",l.style.visibility="hidden";l.src=a;l.onload=function(){clearTimeout(k);setTimeout(i.bind(null,
"Plugin handshake timeout for: "+a),5E3)};l.sandbox="allow-scripts allow-same-origin";document.body.appendChild(l);e.target=l.contentWindow;e.close=function(){l&&(document.body.removeChild(l),l=null)};r.push(e);return e},disconnect:function(a){for(var b=0;b<r.length;b++)if(a===r[b]){r.splice(b,1);try{a.close()}catch(c){}break}},removePlugin:function(a){for(var b=0;b<q.length;b++)if(a===q[b]){q.splice(b,1);break}f.removeItem("plugin."+a.getLocation())},persist:function(a,b){f.setItem("plugin."+a,JSON.stringify(b))},
postMessage:function(a,b){b.target.postMessage(b.useStructuredClone?a:JSON.stringify(a),b.url)},dispatchEvent:function(a){try{w.dispatchEvent(a)}catch(b){console&&console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new j,c=t.connect(a,function(a){c&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],t.disconnect(c),c=null,b.resolve(a)):"timeout"===a.method&&(t.disconnect(c),c=null,b.reject(a.error)))});return b.promise},getState:function(){return n},handleServiceError:function(a,
b){if(b&&b.status===401){var c=a.getHeaders(),d=a.getName()||a.getLocation(),i=document.createElement("span");i.appendChild(document.createTextNode("Authentication required for: "+d+"."));if(c.login)i.appendChild(document.createTextNode(" ")),d=document.createElement("a"),d.target="_blank",d.textContent="Login",d.href=c.login,k.test(d.href)?(i.appendChild(d),i.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+c.login);return{Severity:"Error",HTML:!0,
Message:(new XMLSerializer).serializeToString(i)}}if(b.__isError){var e=b,b=Error(e.message);Object.keys(e).forEach(function(a){b[a]=e[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=t.getState;this.init=function(){if(!(n==="starting"||n==="active"||n==="stopping")){addEventListener("message",h,
!1);for(var a=[],b=0,d=f.length;b<d;b++)a.push(f.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(f.getItem(a));a.created&&q.push(new i(b,a,t))}});q.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});c.plugins&&Object.keys(c.plugins).forEach(function(a){a=e(a);if(!this.getPlugin(a)){var b=c.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||c.defaultAutostart||"lazy";q.push(new i(a,b,t))}}.bind(this));n="starting"}};this.start=function(){n!==
"starting"&&this.init();if(n!=="starting")return(new j).reject("Cannot start framework. Framework is already "+n+".");var a=[],b=(new Date).getTime();q.forEach(function(c){var d=c._getAutostart();c.getLastModified()===0?a.push(c.update().then(function(){if("started"===d)return c.start({"transient":!0});if("lazy"===d)return c.start({lazy:!0,"transient":!0});c._resolve()})):"started"===d?a.push(c.start({"transient":!0})):"lazy"===d?(a.push(c.start({lazy:!0,"transient":!0})),b>c.getLastModified()+864E5&&
c.update()):c._resolve()});return j.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){n="active"})};this.stop=function(){if(n!=="starting"&&n!=="active")return(new j).reject("Cannot stop registry. Registry is already "+n+".");n="stopping";var a=[];q.forEach(function(b){a.push(b.stop({"transient":!0}))});return j.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",h);n="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};
this.uninstall=function(){return(new j).reject("Cannot uninstall registry")};this.installPlugin=function(a,c){var a=e(a),d=this.getPlugin(a);if(d)return(new j).resolve(d);if(z[a])return z[a];if(c)return d=new i(a,c,t),q.push(d),d._persist(),t.dispatchEvent(new b("installed",d)),(new j).resolve(d);var k=t.loadManifest(a).then(function(c){d=new i(a,c,t);q.push(d);d._persist();delete z[a];t.dispatchEvent(new b("installed",d));return d},function(b){delete z[a];throw b;});return z[a]=k};this.getPlugins=
function(){return q.slice()};this.getPlugin=function(a){var b=null,a=e(a);q.some(function(c){if(a===c.getLocation())return b=c,!0});return b};this.addEventListener=w.addEventListener.bind(w);this.removeEventListener=w.removeEventListener.bind(w);this.resolvePlugins=function(){var a=!0;q.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function j(e,d){function h(c){var d=c.getProperty("service.id"),i=this.addingService(c);i&&(b[d]=c,a[d]=i)}function c(c){var d=c.getProperty("service.id"),i=a[d];delete b[d];delete a[d];this.removedService(c,i)}this.serviceRegistry=e;var b={},a={},i=g,k,l;this.close=function(){if(i!==f)throw"Already closed";i=g;e.removeEventListener("registered",k);e.removeEventListener("unregistering",l);l=k=null;var a=this;this.getServiceReferences().forEach(function(b){c.call(a,
b)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var a=Object.keys(b);return!a.length?null:a.map(function(a){return b[a]})};this.open=function(){if(i!==g)throw"Already open";i=f;var a=this;k=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(d)!==-1&&(h.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};l=function(b){b.serviceReference.getProperty("objectClass").indexOf(d)!==
-1&&c.call(a,b.serviceReference)};e.addEventListener("registered",k);e.addEventListener("unregistering",l);e.getServiceReferences(d).forEach(function(b){h.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var g=0,f=1;j.prototype={addingService:function(e){return this.serviceRegistry.getService(e)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return j});
define("orion/objects",[],function(){function j(g){for(var f=1;f<arguments.length;f++){var e=arguments[f],d;for(d in e)Object.prototype.hasOwnProperty.call(e,d)&&(g[d]=e[d])}return g}return{clone:function(g){if(Array.isArray(g))return Array.prototype.slice.call(g);var f=Object.create(Object.getPrototypeOf(g));j(f,g);return f},mixin:j,toArray:function(g){return Array.isArray(g)?g:[g]}}});
define("orion/config",["orion/Deferred","orion/serviceTracker","orion/objects"],function(j,g,f){var e,d,h,c,b,a="pid";e=function(b,c,d){function i(a,b,d){b.forEach(function(i,e){try{var k=a[e].getProperty("__plugin__"),n=k&&c.getPlugin(k);(!k||n&&n.getState()==="active")&&b[e].updated(d)}catch(h){typeof console!=="undefined"&&console.log(h)}})}g.call(this,b,"orion.cm.managedservice");var e={},n={},h=function(c){var i=[];c.plugin.getServiceReferences().forEach(function(c){if(c.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var e=c.getProperty(a),c=b.getService(c);e&&c&&(e=(e=d._find(e))&&e.getProperties(),i.push(c.updated(e)))}});return j.all(i)};this.addingService=function(c){var d=c.getProperty(a),i=b.getService(c);if(!d||!i)return null;e[d]||(e[d]=[]);n[d]||(n[d]=[]);e[d].push(c);n[d].push(i);return i};this.onServiceAdded=function(b,c){var e=b.getProperty(a),e=d._find(e);i([b],[c],e&&e.getProperties())};this.onOpen=function(){c.addEventListener("started",h)};this.onClose=function(){c.removeEventListener("started",
h)};this.notifyUpdated=function(a){var b=a.getPid();i(e[b]||[],n[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();i(e[a]||[],n[a]||[],null)};this.removedService=function(b,c){var d=b.getProperty(a),i=e[d],k=n[d];i.length>1?i.splice(i.indexOf(b),1):delete e[d];k.length>1?k.splice(k.indexOf(c),1):delete n[d]}};d=function(){function a(b,d,i){this.store=new h(this,i);this.configAdmin=new c(this,this.store);this.tracker=new e(b,d,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}();c=function(){function a(b,c){this.factory=b;this.store=c}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 i="/cm/configurations";
h=function(){function c(d,e){this.factory=d;this.prefsService=e;this.configs=Object.create(null);this.pref=null;var k=this;this.initPromise=this.prefsService.getPreferences(i).then(function(c){k.pref=c;c.keys().forEach(function(d){if(!k.configs[d]){var i=c.get(d);typeof i==="object"&&i!==null&&Object.keys(i).length>0&&(i[a]=d,k.configs[d]=new b(k.factory,k,i))}})})}c.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var c=this._find(a);
c||(c=new b(this.factory,this,a),this.configs[a]=c);return c},list:function(){var a=this,b=[];this.pref.keys().forEach(function(c){(c=a._find(c))&&c.getProperties()!==null&&b.push(c)});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 c}();b=function(){function b(c,d){d=f.clone(d);delete d[a];c.properties=d}function c(d,i,e){this.factory=d;this.store=i;if(e!==null&&typeof e==="object")this.pid=e[a],b(this,
e);else if(typeof e==="string")this.pid=e,this.properties=null;else throw Error("Invalid pid/properties "+e);}c.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(b){this._checkRemoved();var c=null;if(this.properties&&(c=f.clone(this.properties),!b))c[a]=this.pid;return c},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 c}();return{ConfigurationAdminFactory:d}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(j,g,f,e,d,h){var c;return{startup:function(){if(c)return c;c=new g;var b=new f.ServiceRegistry,a=new e.PreferencesService(b);return a.getPreferences("/plugins").then(function(i){var e={plugins:{}};i.keys().forEach(function(a){var b=j.toUrl(a);e.plugins[b]=i[a]});var l=new d.PluginRegistry(b,e);return l.start().then(function(){if(b.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=j.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 g.all(b,function(a){console.log(a)})})}).then(function(){return(new h.ConfigurationAdminFactory(b,l,a)).getConfigurationAdmin().then(b.registerService.bind(b,"orion.cm.configadmin"))}).then(function(){var a=b.getService("orion.core.auth");
if(a){var c=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)})}),d=localStorage.getItem("lastLogin");if(!d||d<(new Date).getTime()-9E5)return c}}).then(function(){var d={serviceRegistry:b,preferences:a,pluginRegistry:l};c.resolve(d);return d})})}}});
(function(){function j(d,e,c,b,a,i){e[d]&&(c.push(d),(e[d]===!0||e[d]===1)&&b.push(a+d+"/"+i))}function g(d,e,c,b,a){e=b+e+"/"+a;require._fileExists(d.toUrl(e+".js"))&&c.push(e)}function f(d,e,c){for(var b in e)e.hasOwnProperty(b)&&(!d.hasOwnProperty(b)||c)?d[b]=e[b]:typeof e[b]==="object"&&f(d[b],e[b],c)}var e=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(d){var h=d.config?d.config():{};return{version:"2.0.1+",load:function(c,b,a,d){d=d||{};if(d.locale)h.locale=d.locale;
var k=e.exec(c),l=k[1],m=k[4],o=k[5],p=m.split("-"),n=[],q={},r,w="";if(k[5])l=k[1],c=l+o;else{o=k[4];m=h.locale;if(!m)m=h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();p=m.split("-")}if(d.isBuild){n.push(c);g(b,"root",n,l,o);for(r=0;r<p.length;r++)d=p[r],w+=(w?"-":"")+d,g(b,w,n,l,o);b(n,function(){a()})}else b([c],function(c){var d=[],e;j("root",c,d,n,l,o);for(r=0;r<p.length;r++)e=p[r],w+=(w?"-":"")+e,j(w,c,d,n,l,o);b(n,function(){var e,
i,k;for(e=d.length-1;e>-1&&d[e];e--){k=d[e];i=c[k];if(i===!0||i===1)i=b(l+k+"/"+o);f(q,i)}a(q)})})}}})})();
define("orion/i18n",[],function(){return{load:function(j,g,f,e){var e=e||{},d=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,h=d.exec(j);if(h){if(!g.defined||g.defined(j))try{f(g(j));return}catch(c){}if(e.isBuild||e.isTest)f({});else{var b=h[1],a=h[3]?h[2]:"",i=h[3]||h[2];g(["orion/bootstrap"],function(c){c.startup().then(function(c){var k=c.serviceRegistry,c=k.getServiceReferences("orion.i18n.message");if(a)c.some(function(a){return j===a.getProperty("name")?(k.getService(a).getMessageBundle().then(function(a){f(a)},
function(){f({})}),!0):!1})||f({});else{var o={},p;c.forEach(function(c){var k=c.getProperty("name");if((h=d.exec(k))&&b===h[1]&&i===(h[3]||h[2]))if(a=h[3]?h[2]:""){if((c=e.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&c.toLowerCase().indexOf(a.toLowerCase())===0)o[a]=!0,(!g.specified||!g.specified(k))&&define(k,["orion/i18n!"+k],function(a){return a})}else p=c});!g.specified||!g.specified(j)?p?k.getService(p).getMessageBundle().then(function(a){Object.keys(o).forEach(function(b){typeof a[b]===
"undefined"&&(a[b]=o[b])});define(j,[],a);f(a)},function(){define(j,[],o);f(o)}):(define(j,[],o),f(o)):f(o)}})})}}else f(null)}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor","Filter bindings":"Filter bindings","Orion Editor":"Orion 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.":"I20131030-1703","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.",Raw:"Raw","Open the raw file or folder in the browser":"Open the raw file or folder in the browser",OutlineProgress:"Getting outline for ${0} from ${1}",UnknownError:"An unknown error occurred.",UnknownWarning:"An unknown warning occurred."});
define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(j,g){var f={root:g};Object.keys(j).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=j[e])});return f});
define("orion/util",[],function(){var j=navigator.userAgent,g=j.indexOf("MSIE")!==-1||j.indexOf("Trident")!==-1?document.documentMode:void 0,f=parseFloat(j.split("Firefox/")[1]||j.split("Minefield/")[1])||void 0,e=j.indexOf("Opera")!==-1,d=parseFloat(j.split("Chrome/")[1])||void 0,h=j.indexOf("Safari")!==-1&&!d,c=parseFloat(j.split("WebKit/")[1])||void 0,b=j.indexOf("Android")!==-1,a=j.indexOf("iPad")!==-1,j=j.indexOf("iPhone")!==-1,i=a||j,k=navigator.platform.indexOf("Mac")!==-1,l=navigator.platform.indexOf("Win")!==
-1,m=navigator.platform.indexOf("Linux")!==-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return b[(c<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:g,isFirefox:f,isOpera:e,isChrome:d,isSafari:h,isWebkit:c,isAndroid:b,isIPad:a,isIPhone:j,isIOS:i,isMac:k,isWindows:l,isLinux:m,platformDelimiter:l?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(j){function g(b,a){a||(a=document);return a.querySelectorAll(b)}function f(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var c=f(b.childNodes[a]);if(c)return c}return null}function e(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=b.childNodes.length-1;a>=0;a--){var c=e(b.childNodes[a]);if(c)return c}return null}function d(b,a){if(b.nodeType===3){var c=h.exec(b.nodeValue);c&&c.length>1&&a(b,
c)}if(b.hasChildNodes())for(c=0;c<b.childNodes.length;c++)d(b.childNodes[c],a)}var h=/\$\{([^\}]+)\}/,c=null;return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:g,$$array:function(b,a){return Array.prototype.slice.call(g(b,a))},node:function(b){var a=b;typeof b==="string"&&(a=document.getElementById(b));return a},contains:function(b,a){if(!b||!a)return!1;if(b===a)return!0;var c=b.compareDocumentPosition(a);return Boolean(c&16)},bounds:function(b){b=b.getBoundingClientRect();return{left:b.left+
document.body.scrollLeft,top:b.top+document.body.scrollTop,width:b.width,height:b.height}},empty:function(b){for(;b.hasChildNodes();)b.removeChild(b.firstChild)},firstTabbable:f,lastTabbable:e,stop:function(b){if(window.document.all)b.keyCode=0;b.preventDefault&&(b.preventDefault(),b.stopPropagation())},processTextNodes:function(b,a){d(b,function(b,c){b.parentNode.replaceChild(document.createTextNode(a[c[1]]||c[1]),b)})},processDOMNodes:function(b,a){d(b,function(b,c){var d=a[c[1]];if(d){var e=document.createRange(),
h=c.index;e.setStart(b,h);e.setEnd(b,h+c[0].length);e.deleteContents();e.insertNode(d)}})},addAutoDismiss:function(b,a){function d(a){c.forEach(function(b){var c=!1,d=b.excludeNodes.some(function(b){return document.body.contains(b)?(c=!0,b.contains(a.target)):!1});if(c&&!d)try{b.dismiss()}catch(e){typeof console!=="undefined"&&console&&console.error(e&&e.message)}});c=c.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}c===null&&(c=[],document.addEventListener("click",
d,!0),j.isIOS&&document.addEventListener("touchend",function(a){function b(){a.target.removeEventListener("click",b)}a.touches.length===0&&a.target.addEventListener("click",b)},!1));c.push({excludeNodes:b,dismiss:a})},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(j){var g,f,e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,h=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c=typeof location!=="undefined"&&location.href,b=c&&location.protocol&&location.protocol.replace(/\:/,""),a=c&&location.hostname,i=c&&(location.port||void 0),k=[],l=j.config&&j.config()||{};g={version:"2.0.5",strip:function(a){if(a){var a=a.replace(d,""),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,c;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(b=0;b<3;b+=1){c=e[b];try{a=new ActiveXObject(c)}catch(d){}if(a){e=[c];break}}return a},parseName:function(a){var b,
c,d=!1,e=a.indexOf(".");b=a.indexOf("./")===0||a.indexOf("../")===0;e!==-1&&(!b||e>1)?(b=a.substring(0,e),c=a.substring(e+1,a.length)):b=a;a=c||b;e=a.indexOf("!");e!==-1&&(d=a.substring(e+1)==="strip",a=a.substring(0,e),c?c=a:b=a);return{moduleName:b,ext:c,strip:d}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,c,d){var e,i;e=g.xdRegExp.exec(a);if(!e)return!0;a=e[2];e=e[3];e=e.split(":");i=e[1];e=e[0];return(!a||a===b)&&(!e||e.toLowerCase()===c.toLowerCase())&&(!i&&!e||i===d)},finishLoad:function(a,
b,c,d){c=b?g.strip(c):c;l.isBuild&&(k[a]=c);d(c)},load:function(d,e,k,h){if(h.isBuild&&!h.inlineText)k();else{l.isBuild=h.isBuild;var f=g.parseName(d),h=f.moduleName+(f.ext?"."+f.ext:""),j=e.toUrl(h),w=l.useXhr||g.useXhr;!c||w(j,b,a,i)?g.get(j,function(a){g.finishLoad(d,f.strip,a,k)},function(a){k.error&&k.error(a)}):e([h],function(a){g.finishLoad(f.moduleName+"."+f.ext,f.strip,a,k)})}},write:function(a,b,c){if(k.hasOwnProperty(b)){var d=g.jsEscape(k[b]);c.asModule(a+"!"+b,"define(function () { return '"+
d+"';});\n")}},writeFile:function(a,b,c,d,e){var b=g.parseName(b),i=b.ext?"."+b.ext:"",k=b.moduleName+i,l=c.toUrl(b.moduleName+i)+".js";g.load(k,c,function(){var b=function(a){return d(l,a)};b.asModule=function(a,b){return d.asModule(a,l,b)};g.write(a,k,b,e)},e)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)f=require.nodeRequire("fs"),g.get=function(a,b){var c=f.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));b(c)};else if(l.env===
"xhr"||!l.env&&g.createXhr())g.get=function(a,b,c,d){var e=g.createXhr(),i;e.open("GET",a,!0);if(d)for(i in d)d.hasOwnProperty(i)&&e.setRequestHeader(i.toLowerCase(),d[i]);if(l.onXhr)l.onXhr(e,a);e.onreadystatechange=function(){var d;if(e.readyState===4)d=e.status,d>399&&d<600?(d=Error(a+" HTTP status: "+d),d.xhr=e,c(d)):b(e.responseText)};e.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")g.get=function(a,b){var c,d,e=new java.io.File(a),i=java.lang.System.getProperty("line.separator"),
e=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(e),"utf-8")),k="";try{c=new java.lang.StringBuffer;(d=e.readLine())&&d.length()&&d.charAt(0)===65279&&(d=d.substring(1));for(c.append(d);(d=e.readLine())!==null;)c.append(i),c.append(d);k=String(c.toString())}finally{e.close()}b(k)};return g});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(j,g,f){return{slideoutHTMLFragment:function(e){var d=document.createElement("div");d.innerHTML=f;var h=g.$("#slideContainer",d);h.id=e+h.id;h=g.$("#pageCommandParameters",d);h.id=e+h.id;h=g.$("#pageCommandDismiss",d);h.id=e+h.id;return d.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(j){function g(e,d,h,c,b,a){this.type=a||"keydown";this.keyCode=typeof e==="string"&&this.type==="keydown"?e.toUpperCase().charCodeAt(0):e;this.mod1=d!==void 0&&d!==null?d:!1;this.mod2=h!==void 0&&h!==null?h:!1;this.mod3=c!==void 0&&c!==null?c:!1;this.mod4=b!==void 0&&b!==null?b:!1}function f(e){this.keys=e}g.prototype={getKeys:function(){return[this]},match:function(e,d){if(d!==void 0){if(d!==0)return!1}else if(e instanceof Array){if(e.length>1)return!1;
e=e[0]}return e.type!==this.type?!1:this.keyCode===e.keyCode||this.keyCode===String.fromCharCode(j.isOpera?e.which:e.charCode!==void 0?e.charCode:e.keyCode)?this.mod1!==(j.isMac?e.metaKey:e.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==e.shiftKey?!1:this.mod3!==e.altKey?!1:j.isMac&&this.mod4!==e.ctrlKey?!1:!0:!1},equals:function(e){return!e?!1:this.keyCode!==e.keyCode?!1:this.mod1!==e.mod1?!1:this.mod2!==e.mod2?!1:this.mod3!==e.mod3?!1:this.mod4!==e.mod4?!1:this.type!==e.type?!1:!0}};f.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(e,d){var h=this.keys;if(d!==void 0)return d>h.length?!1:h[d].match(e)?d===h.length-1?!0:d+1:!1;else{e instanceof Array||(e=[e]);if(e.length>h.length)return!1;var c;for(c=0;c<e.length;c++)if(!h[c].match(e[c]))return!1;return c===h.length?!0:c}},equals:function(e){if(!e.keys)return!1;if(e.keys.length!==this.keys.length)return!1;for(var d=0;d<e.keys.length;d++)if(!e.keys[d].equals(this.keys[d]))return!1;return!0}};return{KeyBinding:g,KeyStroke:g,
KeySequence:f}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(j,g){function f(e){this._init(e)}f.prototype={_init:function(e){this._dropdownNode=g.node(e.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=g.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=e.populate;this._selectionClass=e.selectionClass;var d=this;this._triggerNode.addEventListener("click",function(e){d.toggle()&&
g.stop(e)},!1);this._triggerNode.tagName.toLowerCase()==="span"&&this._triggerNode.addEventListener("keydown",function(e){if(e.keyCode===g.KEY.ENTER||e.keyCode===g.KEY.SPACE)d.toggle(),g.stop(e)},!1);this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},toggle:function(){return this.isVisible()?this.close():this.open()},isVisible:function(){return this._triggerNode.classList.contains("dropdownTriggerOpen")},open:function(){if(!this.isVisible()){this._populate&&(this.empty(),
this._populate(this._dropdownNode));var e=this.getItems();if(e.length>0){if(!this._hookedAutoDismiss){var d=g.$$(".dropdownSubMenu",this._dropdownNode);g.addAutoDismiss([this._triggerNode].concat(Array.prototype.slice.call(d)),function(){if(this.isVisible()){this.close();for(var d=this._dropdownNode.parentNode;d;)d.dropdown&&typeof d.dropdown.close==="function"&&d.dropdown.close(),d=d.parentNode}}.bind(this));this._hookedAutoDismiss=!0}this._triggerNode.classList.add("dropdownTriggerOpen");this._selectionClass&&
this._triggerNode.classList.add(this._selectionClass);this._dropdownNode.classList.add("dropdownMenuOpen");this._positionDropdown();e[0].focus();return!0}return!1}},_positionDropdown:function(){this._dropdownNode.style.left="";var e=g.bounds(this._dropdownNode),d=g.bounds(document.body);if(e.left+e.width>d.left+d.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-e.width+"px";else{var d=g.bounds(this._boundingNode(this._triggerNode)),h=g.bounds(this._triggerNode);
this._dropdownNode.style.left=h.left-d.left-e.width+h.width+"px"}},_boundingNode:function(e){var d=window.getComputedStyle(e,null);return d===null?e:d.getPropertyValue("position")==="absolute"||!e.parentNode||e===document.body?e:this._boundingNode(e.parentNode)},close:function(e){if(this.isVisible())return this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),
e&&this._triggerNode.focus(),!0},getItems:function(){var e=[],d=this;g.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(h){h.parentNode.parentNode===d._dropdownNode&&e.push(h)});return e},empty:function(){var e=this;g.$$array("li",this._dropdownNode).forEach(function(d){d.parentNode===e._dropdownNode&&d.parentNode.removeChild(d)})},_dropdownKeyDown:function(e){if(e.keyCode===g.KEY.UP||e.keyCode===g.KEY.DOWN||e.keyCode===g.KEY.RIGHT||e.keyCode===g.KEY.ENTER||
e.keyCode===g.KEY.LEFT){var d=this.getItems(),h=document.activeElement;if(d.length&&d.length>0&&h){var c=d.indexOf(h);c<0&&(c=d.indexOf(h.parentNode));c>=0&&(e.keyCode===g.KEY.UP&&c>0?(c--,d[c].focus()):e.keyCode===g.KEY.DOWN&&c<d.length-1?(c++,d[c].focus()):e.keyCode===g.KEY.ENTER||e.keyCode===g.KEY.RIGHT?h.classList.contains("dropdownTrigger")&&h.dropdown&&h.dropdown.open():e.keyCode===g.KEY.LEFT&&h.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),g.stop(e))}}else e.keyCode===
g.KEY.ESCAPE&&(this.close(!0),g.stop(e))}};f.prototype.constructor=f;return{Dropdown:f}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<span class="dropdownArrowDown core-sprite-downarrow"></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">${ButtonText}<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(j,g){function f(e){this._init(e)}f.prototype={_init:function(e){this._node=g.node(e.node);if(!this._node)throw"no dom node for tooltip found";this._position=e.position||["right","above","below","left"];this._text=e.text;this._hideDelay=e.hideDelay===void 0?200:e.hideDelay;this._tailSize=e.tailSize||10;this._trigger=e.trigger||"mouseover";this._afterShowing=e.afterShowing;this._afterHiding=e.afterHiding;var d=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(c){c.target===d._node&&(d.show(),g.stop(c))},!1);else if(this._trigger==="mouseover"){this._showDelay=e.showDelay===void 0?500:e.showDelay;e=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(c){g.contains(d._node,c.target)&&(d.show(),g.stop(c))},!1);this._leaveHandler=function(c){g.contains(d._node,c.target)&&d.hide()};for(var h=0;h<e.length;h++)this._node.addEventListener(e[h],
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 e=this;g.addAutoDismiss([this._tip,this._node],function(){e.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(e._timeout)window.clearTimeout(e._timeout),e._timeout=null;e._tip.addEventListener("mouseout",function(d){g.contains(e._tip,d.target)&&(e.hide(),g.stop(d))},
!1)},!1)}return this._tip},_positionTip:function(e,d){this._makeTipNode();e==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var h=this._node,c;for(c=g.bounds(h);h&&!c.width&&!c.height;h=h.parentNode)c=g.bounds(h);var h=g.bounds(this._tipInner),b;switch(e){case "above":b=c.top-h.height-this._tailSize-1;c=c.left-this._tailSize;break;case "below":b=c.top+c.height+this._tailSize+1;c=c.left-this._tailSize;break;case "left":b=c.top-this._tailSize/2;c=c.left-h.width-
this._tailSize-1;break;default:b=c.top-this._tailSize/2,c=c.left+c.width+this._tailSize+1}var a=g.bounds(document.documentElement);if(b+h.height>a.height)if(d)b=a.height-h.height-1;else return!1;if(c+h.width>a.width)if(d)c=a.width-h.width-1;else return!1;if(c<0)if(d)c=4;else return!1;if(b<0)if(d)b=4;else return!1;if(!this._tail&&(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+e),e==="above"||e==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,
this._tipInner),e==="left"))this._tail.style.left=h.width+"px";this._tip.style.top=b+"px";this._tip.style.left=c+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var e=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var d=!1,h=0;!d&&h<e._position.length;)d=e._positionTip(e._position[h]),h++;d||e._positionTip(e._position[0],
!0);e._tip.classList.add("tooltipShowing");e._afterShowing&&e._afterShowing()},this._showDelay)}},hide:function(e){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(e===void 0)e=this._hideDelay;var d=this;this._timeout=window.setTimeout(function(){d._tip.classList.remove("tooltipShowing");d._tip.removeAttribute("style");d._afterHiding&&d._afterHiding()},e)}},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 e=["mouseout","click"],d=0;d<e.length;d++)this._node.removeEventListener(e[d],this._leaveHandler,!1)}}};f.prototype.constructor=f;return{Tooltip:f}});
define("orion/commands","require,orion/util,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip".split(","),function(j,g,f,e,d,h,c,b){function a(a){var b=a.invocation;if(b){var c=a.command;if(c.hrefCallback)return a=c.hrefCallback.call(b.handler||window,b),a.then?a.then(function(a){window.open(a)}):window.open(a),!0;else if(b.commandRegistry)return b.commandRegistry._invoke(b),
!0;else if(c.onClick||c.callback)return window.setTimeout(function(){(c.onClick||c.callback).call(b.handler||window,b)},0),!0}return!1}function i(b,c){for(var d in c)if(c[d]&&c[d].keyBinding&&c[d].command&&c[d].keyBinding.match(b)){var e=c[d],i=e.keyBinding;if((!i.domScope||f.contains(f.node(i.domScope),b.target))&&a(e)){f.stop(b);break}}}function k(a,b,c){b.classList.add("commandImage");var d;a.imageClass?a.addImageClassToElement?b.classList.add(a.imageClass):(d=document.createElement("span"),b.appendChild(d),
d.classList.add(a.spriteClass),d.classList.add(a.imageClass)):(d=new Image,d.alt=a.name,d.name=c,d.id=c,d.src=a.image,b.appendChild(d));return d}function l(a,b,c,d,e){this.commandRegistry=e;this.handler=a;this.items=b;this.userData=c;this.command=d;if(d.parameters)this.parameters=d.parameters.makeCopy();this.id=d.id}function m(a){this._init(a)}var o=null,p={};window.document.addEventListener("keydown",function(a){a=a||window.event;if(function(a){if(g.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}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 b=a.target.nodeName.toLowerCase();if(b==="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(b==="textarea")return}b={};if(o){var c,d,e;d=Object.keys(p);for(c=0;c<d.length;c++)e=d[c],b[e]=p[e];var k=o();d=Object.keys(k);for(c=0;c<d.length;c++)e=d[c],b[e]=k[e]}else b=p;i(a,b)},!1);l.prototype=
{collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var b=new l(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}};l.prototype.constructor=l;m.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;
this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||j.toUrl("images/none.png");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},populateChoicesMenu:function(a,b,c,d,e){this.getChoices(b,c,d).forEach(function(c){if(c.name){var d=document.createElement("li");a.appendChild(d);var i=document.createElement("span");
i.tabIndex=0;i.role="menuitem";i.classList.add("dropdownMenuItem");var k=document.createTextNode(c.name);i.appendChild(k);d.appendChild(i);i.choice=c;i.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);i.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1)}else e._generateMenuSeparator(a)})},getChoices:function(a,b,c){return this.choiceCallback?
this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||this.image!==j.toUrl("images/none.png")}};m.prototype.constructor=m;return{Command:m,CommandInvocation:l,createDropdownMenu:function(a,b,c,i,l,h,m){a=f.node(a);if(!a)throw"no parent node was specified";var g=document.createRange();g.selectNode(a);g=g.createContextualFragment(d);f.processTextNodes(g,{ButtonText:b});a.appendChild(g);
a=a.lastChild;g=a.previousSibling;i?g.classList.add(i):(g.classList.add("orionButton"),g.classList.add("commandButton"));if(l){if(!h)g.textContent="",g.setAttribute("aria-label",b);k({spriteClass:"commandSprite",imageClass:l},g,b);g.classList.add("orionButton")}g.dropdown=new e.Dropdown({dropdown:a,populate:c,selectionClass:m});a.dropdown=g.dropdown;return{menuButton:g,menu:a,dropdown:g.dropdown}},createCheckedMenuItem:function(a,b,d,e){a=f.node(a);if(!a)throw"no parent node was specified";var i=
document.createRange();i.selectNode(a);i=i.createContextualFragment(c);f.processTextNodes(i,{ItemText:b});a.appendChild(i);a=f.$(".checkedMenuItem",a.lastChild);a.checked=d;a.addEventListener("change",e,!1);return a},createCommandItem:function(a,c,d,e,i,l,h){var f,l=l||!c.name&&c.hasImage();if(c.hrefCallback)f=document.createElement("a"),f.id=e,l&&c.hasImage()?k(c,f,e):(f.className="commandLink",f.appendChild(document.createTextNode(c.name))),h=c.hrefCallback.call(d.handler,d),h.then?h.then(function(a){f.href=
a}):f.href=h?h:"#";else{f=document.createElement("button");f.className="orionButton";l?c.hasImage()?(k(c,f,e),c.name&&f.setAttribute("aria-label",c.name)):(f.classList.add("commandButton"),f.classList.add("commandMissingImageButton"),f.appendChild(document.createTextNode(c.name))):(f.classList.add("commandButton"),e=document.createTextNode(c.name),f.appendChild(e));var m=h||c.callback;if(m)c.onClick=m,f.addEventListener("click",function(){m.call(d.handler,d)},!1)}a.nodeName.toLowerCase()==="ul"?(h=
document.createElement("li"),a.appendChild(h),a=h):f.classList.add("commandMargins");a.appendChild(f);if(c.tooltip)f.commandTooltip=new b.Tooltip({node:f,text:c.tooltip,position:["above","below","right","left"]});i&&(p[c.id]={keyBinding:i,command:c,invocation:d});return f},createCommandMenuItem:function(a,c,d,e,i){var k,l=a.dropdown;if(c.hrefCallback)k=document.createElement("a"),k.appendChild(document.createTextNode(c.name)),i=c.hrefCallback.call(d.handler,d),i.then?i.then(function(a){k.href=a}):
k.href=i?i:"#",k.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&k.click()},!1);else{k=document.createElement("span");k.tabIndex=0;k.appendChild(document.createTextNode(c.name));var h=i||c.callback;if(h)c.onClick=h,k.addEventListener("click",function(){l.close(!0);h.call(d.handler,d)},!1),k.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)a.preventDefault(),k.click()},!1)}if(c.tooltip)k.commandTooltip=new b.Tooltip({node:k,
text:c.tooltip,position:["right","left","above","below"]});k.className="dropdownMenuItem";k.role="menuitem";i=document.createElement("li");a.appendChild(i);i.appendChild(k);e&&(p[c.id]={keyBinding:e,command:c,invocation:d});return k},executeBinding:a,setKeyBindingProvider:function(a){o=a},localKeyBindings:p,_testMethodProcessKey:i}});
define("orion/explorers/navigationUtils",[],function(){function j(f,e){if(!g&&f)f.push({domNode:e}),e.tabIndex=-1,e.style.outline="none"}var g=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(f,e,d){f&&(f=f.getGridNavHolder(e,!0))&&j(f,d)},generateNavGrid:j,removeNavGrid:function(f,e){if(f)for(var d=0;d<f.length;d++)if(f[d].domNode===e){f.splice(d,1);break}}}});
define("orion/PageUtil",[],function(){var j=/^http[s]?/i;return{hash:function(){var g=window.location.href.split("#")[1];return g?"#"+g:""},matchResourceParameters:function(g){var g=g||window.location.toString(),f={resource:""},e=g.indexOf("#");if(e!==-1&&(g=g.substring(e+1),g.length!==0)){g=g.split(",");f.resource=decodeURIComponent(g[0]);for(e=1;e<g.length;e++){var d=/([^=]*)(=?)(.*)/.exec(g[e]),h=decodeURIComponent(d[1]||""),d=decodeURIComponent(d[3]||"");h!==""&&h!=="resource"&&(f[h]=d)}}return f},
validateURLScheme:function(g,f){var e=g;if(g.indexOf("://")===-1){var d=document.createElement("a");d.href=g;e=d.href}d=!1;return(d=f?f.some(function(d){return RegExp("^"+d+":","i").test(e)}):j.test(e))?g:(console.log("Illegal URL Scheme: '"+g+"'"),"")}}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(j,g){function f(d){var e="",c=navigator.platform.indexOf("Mac")!==-1;d.mod1&&(e+=c?"Cmd+":"Ctrl+");d.mod2&&(e+="Shift+");d.mod3&&(e+="Alt+");d.mod4&&c&&(e+="Ctrl+");if(d.alphaKey)return e+d.alphaKey;if(d.type==="keypress")return e+d.keyCode;for(var b in g.KEY)if(typeof(g.KEY[b]==="number")&&g.KEY[b]===d.keyCode)return e+b;var a;switch(d.keyCode){case 59:a=d.mod2?":":";";break;case 61:a=d.mod2?"+":"=";break;case 188:a=
d.mod2?"<":",";break;case 190:a=d.mod2?">":".";break;case 191:a=d.mod2?"?":"/";break;case 192:a=d.mod2?"~":"`";break;case 219:a=d.mod2?"{":"[";break;case 220:a=d.mod2?"|":"\\";break;case 221:a=d.mod2?"}":"]";break;case 222:a=d.mod2?'"':"'"}return a?e+a:d.keyCode>=112&&d.keyCode<=123?e+"F"+(d.keyCode-111):e+String.fromCharCode(d.keyCode)}function e(d){var e=window.navigator.platform.indexOf("Mac")!==-1;return e&&d.metaKey||!e&&d.ctrlKey}return{getUserKeyString:function(d){for(var e="",d=d.getKeys(),
c=0;c<d.length;c++)c!==0&&(e+=" "),e+=f(d[c]);return e},getUserText:function(d,e,c,b,a,i,k,l,f){var j=!1,k=function(k){return function(l){if(!j){var r=g.node(d),p=r.value;if(r)if(k&&l.keyCode===g.KEY.ESCAPE){if(c)e.style.display="inline";j=!0;r.parentNode.removeChild(r);i&&i()}else if(!(k&&l.keyCode!==g.KEY.ENTER)){if(p.length===0||!f&&p===b){if(c)e.style.display="inline"}else if(a(p),c&&e.parentNode)e.style.display="inline";j=!0;r.parentNode&&r.parentNode.removeChild(r);i&&i()}}}},p=document.createElement("input");
p.id=d;p.value=b||"";e.parentNode.insertBefore(p,e.nextSibling);p.classList.add("userEditBoxPrompt");if(c)e.style.display="none";p.addEventListener("keydown",k(!0),!1);p.addEventListener("blur",k(!1),!1);window.setTimeout(function(){p.focus();if(b){var a=g.node(d),c=l?b.indexOf(l):-1;if(c>0)if(a.createTextRange)a=a.createTextRange(),a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",c),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,c);else{if(a.selectionStart!==void 0)a.selectionStart=
0,a.selectionEnd=c}else a.select()}},0)},openInNewWindow:e,followLink:function(d,h){h&&e(h)?window.open(d):window.location=d},createButton:function(d,e){var c=document.createElement("button");c.className="orionButton commandButton commandMargins";c.addEventListener("click",function(b){e();g.stop(b)},!1);d&&c.appendChild(document.createTextNode(d));return c},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","require,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(j,g,f,e,d,h,c,b,a,i,k){function l(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function m(a,b){this.token=a;this.parameterName=b}function o(a,b,c,d,e){this.name=a;this.type=b;this.label=c;this.value=d;this.lines=e||1}function p(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=b&&b.clientCollect}l.prototype={_init:function(a){this._selectionService=a.selection;var b=this;g.setKeyBindingProvider(function(){return b._activeBindings})},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&
this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var c=this._urlBindings[b].urlBinding.match(a);if(c){var d=this._urlBindings[b],e=d.command,i=d.invocation;if(i&&i.parameters&&e.callback){i.parameters.setValue(c.parameterName,c.parameterValue);var k=this;window.setTimeout(function(){k._invoke(i)},0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(a,b,c,d){b?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback&&this._invoke(new g.CommandInvocation(c,
b,null,a,this),d):(b=this._urlBindings[a])&&b.command&&b.command.callback&&this._invoke(b.invocation,d)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,b,c))},confirm:function(a,b,c,d,e,i){var k=!1;if(this._parameterCollector&&!e){var l=this;this._parameterCollector.close();if(this._parameterCollector.open(a,
function(a,e){var i=document.createElement("span");i.classList.add("parameterPrompt");i.textContent=b;a.appendChild(i);i=document.createElement("button");i.addEventListener("click",function(){k=!0;l._parameterCollector.close()},!1);e.appendChild(i);i.appendChild(document.createTextNode(c));i.className="dismissButton";var h=document.createElement("button");h.addEventListener("click",function(){k=!1;l._parameterCollector.close()},!1);e.appendChild(h);h.appendChild(document.createTextNode(d));h.className=
"dismissButton";return i},function(){i(k)}))return}k=window.confirm(b);i(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,c){if(a)if(this._parameterCollector&&a.parameters&&a.parameters.hasParameters()&&(c||a.parameters.shouldCollectParameters())){var d=!1;a.parameters.updateParameters(a);
if(a.parameters.shouldCollectParameters()&&(d=this._parameterCollector.collectParameters(a),!d)){var e=new b.Tooltip({node:a.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),d=e.contentContainer();d.classList.add("parameterPopup");var i=window.document.activeElement,k=this._parameterCollector.getFillFunction(a,function(){i&&i.focus();e.destroy()})(d);e.show();window.setTimeout(function(){k.focus();k.select()},0);d=!0}d||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(){g.executeBinding(a)}}var c={},e,i,k=[],l;for(l in this._activeBindings)(i=this._activeBindings[l])&&i.keyBinding&&i.command&&(i.command.name||i.command.tooltip)&&k.push(i);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++)i=k[l],i.keyBinding.scopeName?(c[i.keyBinding.scopeName]||(c[i.keyBinding.scopeName]=[]),c[i.keyBinding.scopeName].push(i)):(e=d.getUserKeyString(i.keyBinding),a.createItem(e,i.command.name||i.command.tooltip,b(i)));for(var h in c)c[h].length&&c[h].length>0&&(a.createHeader(h),c[h].forEach(function(c){e=d.getUserKeyString(c.keyBinding);a.createItem(e,c.command.name||c.command.tooltip,b(c))}))},addCommand:function(a){this._commandList[a.id]=
a;var b=this._pendingBindings[a.id];if(b){var c=this;b.forEach(function(b){c._addBinding(a,b.type,b.binding,b.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,b,c,d,e,i,k,l,h){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));if(a[b]){if(d)a[b].title=d;if(c)a[b].position=c;if(k)a[b].imageClass=k;if(l)a[b].tooltip=l;if(h)a[b].selectionClass=h;a[b].emptyGroupMessage=i}else a[b]={title:d,
position:c,emptyGroupMessage:i,imageClass:k,tooltip:l,selectionClass:h,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){b&&b.split("/").forEach(function(b){if(b.length>1)a[b]||(a[b]={position:0,children:{}}),a=a[b].children});return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,c,d,e,i,k){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));a[b]={position:c};i&&((c=this._commandList[b])?this._addBinding(c,"key",i,e):this._addPendingBinding(b,"key",i,e));k&&((c=this._commandList[b])?this._addBinding(c,"url",k,e):this._addPendingBinding(b,"url",k,e));a.sortedContributions=null},_addBinding:function(a,b,c,d){if(!a.id)throw Error("No command id: "+a);b==="key"?this._activeBindings[a.id]={command:a,keyBinding:c,bindingOnly:d}:b==="url"&&
(this._urlBindings[a.id]={command:a,urlBinding:c,bindingOnly:d})},_addPendingBinding:function(a,b,c,d){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:b,binding:c,bindingOnly:d})},_checkForTrailingSeparator:function(a,b,c){var d;if(b==="tool"||b==="button")if((d=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&d.classList.contains("commandSeparator"))return c?(a.removeChild(d),!1):!0;if(b==="menu"&&(a=h.$$array("li > *",a),a.length>0&&a[a.length-
1].classList.contains("dropdownSeparator")))if(d=a[a.length-1],c)d.parentNode.parentNode.removeChild(d.parentNode);else return!0;return!1},renderCommands:function(a,b,c,d,e,i,k){if(typeof a!=="string")throw"a scope id for rendering must be specified";b=h.node(b);if(!b)throw"no parent";var l=this._contributionsByScopeId[a];if(!c&&l){var c=l.localSelectionService||this._selectionService,f=this;c&&c.getSelections(function(c){f.renderCommands(a,b,c,d,e,i)})}else l&&(this._render(this._contributionsByScopeId[a],
b,c,d,e||"button",i,k),this._checkForTrailingSeparator(b,e,!0))},destroy:function(a){a=h.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,c,d,e,i,k,l){var h=a.sortedContributions;if(!h){var h=[],m=!1,j;for(j in a)if(Object.prototype.hasOwnProperty.call(a,j)){var o=a[j];if(o&&typeof o.position==="number")o.id=j,h.push(o),m=!0}if(m)h.sort(function(a,
b){return a.position-b.position}),a.sortedContributions=h}var p=0,u=this;h.forEach(function(a){var h,m;if(!a.imageClass)a.imageClass=null;if(a.children&&Object.getOwnPropertyNames(a.children).length>0){h=a.children;var j;if(i==="tool"||i==="button")if(a.title)j=u._createDropdownMenu(c,a.title,null,null,a.imageClass,a.tooltip,a.selectionClass),l&&f.generateNavGrid(l,j.menuButton),window.setTimeout(function(){u._render(a.children,j.menu,d,e,"menu",k,l);u._checkForTrailingSeparator(j.menu,"menu",!0);
if(j.menu.childNodes.length===0)if(a.emptyGroupMessage){if(!j.menuButton.emptyGroupTooltip)j.menuButton.emptyGroupTooltip=new b.Tooltip({node:j.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else l&&f.removeNavGrid(l,j.menuButton),j.menu.parentNode&&j.menu.parentNode.removeChild(j.menu),j.destroyButton&&j.destroyButton.parentNode&&j.destroyButton.parentNode.removeChild(j.destroyButton);else j.menuButton.style.visibility="visible"},0);else{var o;c.childNodes.length>
0&&!u._checkForTrailingSeparator(c,i)&&(o=u.generateSeparatorImage(c));u._render(h,c,d,e,i,k,l);c.childNodes.length>0&&c.childNodes[c.childNodes.length-1]!==o&&(o=u.generateSeparatorImage(c))}else if(a.title){if(o=u._createDropdownMenu(c,a.title,!0,null,null,a.imageClass))u._render(h,o.menu,d,e,"menu",k,l),o.menu.childNodes.length===0&&o.destroyButton&&c.removeChild(o.destroyButton)}else c.childNodes.length>0&&u._generateMenuSeparator(c),u._render(h,c,d,e,i,k,l),u._generateMenuSeparator(c)}else{var n=
u._commandList[a.id];h=n?!0:!1;var x=null,x=null;if(n){m=new g.CommandInvocation(e,d,k,n,u);m.domParent=c;o=h&&(n.visibleWhen?n.visibleWhen(d):!0);if(u._activeBindings[n.id]&&u._activeBindings[n.id].keyBinding)x=u._activeBindings[n.id],x.invocation=o?m:null,x.bindingOnly&&(h=!1);if(u._urlBindings[n.id]&&u._urlBindings[n.id].urlBinding)x=u._urlBindings[n.id],x.invocation=o?m:null,x.bindingOnly&&(h=!1);h=h&&o}if(h)n.choiceCallback?(i==="tool"||i==="button"?(h=c,o=!1,c.nodeName.toLowerCase()==="ul"&&
(h=document.createElement("li"),c.appendChild(h))):(h=c,o=!0),u._createDropdownMenu(h,n.name,o,function(a){n.populateChoicesMenu(a,d,e,k,u)}.bind(n),n.imageClass,n.tooltip||n.title,n.selectionClass)):(m.handler=m.handler||this,m.domParent=c,o=function(){u._invoke(m)},i==="menu"?h=g.createCommandMenuItem(c,n,m,null,o):(h=i+n.id+p,h=g.createCommandItem(c,n,m,h,null,i==="tool",o)),f.generateNavGrid(l,h),m.domNode=h,p++)}})},_createDropdownMenu:function(a,d,e,i,l,f,m){a=h.node(a);if(!a||!h.contains(document.body,
a))return null;var j,o=a;if(e)f=document.createRange(),f.selectNode(a),f=f.createContextualFragment(k),h.processTextNodes(f,{ButtonText:d}),a.appendChild(f),j=a.lastChild,a=j.lastChild,d=a.previousSibling,d.dropdown=new c.Dropdown({dropdown:a,populate:i}),a.dropdown=d.dropdown;else if(a.nodeName.toLowerCase()==="ul"&&(o=document.createElement("li"),a.appendChild(o),j=o),a=null,l&&(a="dropdownButtonWithIcon",f=f||d),f=l?f||d:f,i=g.createDropdownMenu(o,d,i,a,l,!1,m),d=i.menuButton,a=i.menu,f)d.commandTooltip=
new b.Tooltip({node:d,text:f,position:["above","below","right","left"]});return{menuButton:d,menu:a,dropdown:d.dropdown,destroyButton:j}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var c=document.createElement("span");c.classList.add("dropdownSeparator");b.appendChild(c);a.appendChild(b)}},generateSeparatorImage:function(a){var b;b=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}};l.prototype.constructor=l;m.prototype={match:function(a){a=e.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};m.prototype.constructor=m;o.prototype={optionsRequested:function(){return this.optionsRequested}};o.prototype.constructor=o;p.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 c=this.parameterTable[a];
if(c)c.value=b},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=[];this.forEach(function(b){b=new o(b.name,b.type,b.label,b.value,b.lines);a.push(b)});var b=new p(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};p.prototype.constructor=p;return{CommandRegistry:l,URLBinding:m,ParametersDescription:p,
CommandParameter:o}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(j,g,f){function e(d,e){this._activeContainer=null;this._getElementsFunction=d;this._toolbarLayoutFunction=e}e.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&f.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&f.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(d,e,c){typeof d==="string"&&(d=f.node(d));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===d)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(d))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=c;var b=e(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!b)return!1;this._activeElements.focusNode=b;d=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(d.length===0){e=this._activeElements.dismissArea||
this._activeElements.parameterArea;d=document.createElement("button");d.id="closebox";d.className="imageSprite core-sprite-close dismissButton";d.title=j.Close;e.appendChild(d);var a=this;d.addEventListener("click",function(){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(b)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){b.focus();b.select&&b.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(d,e){f.$$array("input",e).forEach(function(c){c.type==="checkbox"?d.parameters.setValue(c.parameterName,c.checked):c.type!=="button"&&d.parameters.setValue(c.parameterName,c.value.trim())});f.$$array("textArea",e).forEach(function(c){d.parameters.setValue(c.parameterName,c.value.trim())});d.command.callback&&d.command.callback.call(d.handler,d)},collectParameters:function(d){return d.parameters?
(d.domNode&&d.domNode.classList.add("commandMarker"),this.open(d.domNode||d.domParent,this.getFillFunction(d))):!1},getFillFunction:function(d,e){var c=this;return function(b,a){var i=null,k=function(){e&&e();c.close()},l=function(a){a.keyCode===f.KEY.ENTER&&c._collectAndCall(d,b);if(a.keyCode===f.KEY.ESCAPE||a.keyCode===f.KEY.ENTER)k(),f.stop(a)};d.parameters.forEach(function(a){var c=null;if(a.label)c=document.createElement("label"),c.classList.add("parameterInput"),c.setAttribute("for",a.name+
"parameterCollector"),c.textContent=a.label,b.appendChild(c);var d=a.name+"parameterCollector",e=c||b;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)c=document.createElement("textarea"),c.rows=a.lines,c.type="textarea",c.id=d,e.appendChild(c),l=function(a){a.keyCode===f.KEY.ESCAPE&&(k(),f.stop(a))};else if(a.type==="boolean"){if(c=document.createElement("input"),c.type="checkbox",c.id=d,e.appendChild(c),a.value)c.checked=!0}else if(c=document.createElement("input"),c.type=a.type,c.id=d,
e.appendChild(c),a.value)c.value=a.value;c.classList.add("parameterInput");c.setAttribute("speech","speech");c.setAttribute("x-webkit-speech","x-webkit-speech");c.parameterName=a.name;i||(i=c);c.addEventListener("keydown",l,!1)});var m=a;m||(m=document.createElement("span"),m.classList.add("layoutRight"),m.classList.add("parametersDismiss"),b.appendChild(m));var g=function(a,b){var c=document.createElement("button");b.appendChild(c);a&&c.appendChild(document.createTextNode(a));c.classList.add("dismissButton");
return c};if(d.parameters.hasOptionalParameters())d.parameters.optionsRequested=!1,g(j.More,m).addEventListener("click",function(){d.parameters.optionsRequested=!0;c._collectAndCall(d,b);k()},!1);g(j.Submit,m).addEventListener("click",function(){c._collectAndCall(d,b);k()},!1);m=g(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");m.title=j.Close;m.addEventListener("click",function(){k()},!1);return i}}};e.prototype.constructor=e;return{CommandParameterCollector:e}});
define("orion/regex",[],function(){return{escape:function(j){return j.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(j){return(j=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(j))?{pattern:j[1],flags:j[2]}:null}}});
define("orion/contentTypes",[],function(){function j(d,c){function b(a,b,c,d){var c=b.filename.indexOf(c)>=0,e;e=d.toLowerCase();e=b.extension.indexOf(e)!==-1;if(c||e){if(!(e=!a))c&&(d=d.toLowerCase(),c=a.extension.indexOf(d)!==-1),e=c;if(e)return b}return a}if(typeof d!=="string")return null;for(var a=d&&d.split(".").pop(),e=null,k=0;k<c.length;k++){var l=c[k];b(e,l,d,a)===l&&(e=l)}return e}function g(h){this.serviceRegistry=h;this.map=function(c){function b(a){return a===null||typeof a==="undefined"?
[]:Array.isArray(a)?a:[a]}function a(a){return b(a).map(function(a){return String.prototype.toLowerCase.call(a)})}for(var c=c.getServiceReferences(e).concat(c.getServiceReferences(d)),i={},k=0;k<c.length;k++)for(var l=b(c[k].getProperty("contentTypes")),h=0;h<l.length;h++){var f=l[h];i[f.id]||(i[f.id]={id:f.id,name:f.name,image:f.image,"extends":f["extends"],extension:a(f.extension),filename:b(f.filename)})}return i}(h);h.registerService(f,this)}var f="orion.core.contentTypeRegistry",e="orion.core.contenttype",
d="orion.file.contenttype";g.prototype={getContentTypes:function(){var d=this.getContentTypesMap(),c=[],b;for(b in d)Object.prototype.hasOwnProperty.call(d,b)&&c.push(d[b]);return c},getContentTypesMap:function(){return this.map},getFileContentType:function(d){return j(d.Name,this.getContentTypes())},getFilenameContentType:function(d){return j(d,this.getContentTypes())},getContentType:function(d){return this.map[d]||null},isExtensionOf:function(d,c){d=typeof d==="string"?this.getContentType(d):d;
c=typeof c==="string"?this.getContentType(c):c;if(!d||!c)return!1;if(d.id===c.id)return!0;else for(var b=d,a={};b&&(b=this.getContentType(b["extends"]));){if(b.id===c.id)return!0;if(a[b.id])throw Error("Cycle: "+b.id);a[b.id]=!0}return!1},isSomeExtensionOf:function(d,c){for(var b=0;b<c.length;b++)if(this.isExtensionOf(d,c[b]))return!0;return!1}};return{ContentTypeRegistry:g,getFilenameContentType:j}});
define("orion/URITemplate",[],function(){function j(a){this._text=a}function g(a){return a.replace("%25","%")}function f(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(i,g);if(b==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function e(a,b,c){for(var d=
[],e=0;e<a.length;e++)typeof a[e]!=="undefined"&&d.push(f(a[e],b));return d.join(c)}function d(a,b,c,d){for(var e=Object.keys(a),i=[],h=0;h<e.length;h++)typeof a[e[h]]!=="undefined"&&i.push(f(e[h],b)+c+f(a[e[h]],b));return i.join(d)}function h(c){if(c.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=b[c[0]])?c=c.substring(1):this._operator=b.NUL;for(var d=[],e=c.split(","),i=0;i<e.length;i++){var f=e[i].match(a);if(f===null)throw Error("Bad VarSpec: "+c);d.push({name:f[1],
explode:!!f[2],prefix:f[3]?parseInt(f[3],10):-1})}this._varSpecList=d}function c(a){for(var b=[],c=0,d=a.indexOf("{",c);d!==-1;){b.push(new j(a.substring(c,d)));c=a.indexOf("}",d+1);if(c===-1)throw Error("Invalid template: "+a);b.push(new h(a.substring(d+1,c)));c+=1;d=a.indexOf("{",c)}b.push(new j(a.substring(c)));this._templateComponents=b}var b={NUL:{first:"",sep:",",named:!1,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R"},".":{first:".",sep:",",named:!1,ifemp:"",allow:"U"},
"/":{first:"/",sep:"/",named:!1,ifemp:"",allow:"U"},";":{first:";",sep:";",named:!0,ifemp:"",allow:"U"},"?":{first:"?",sep:"&",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]+))?$/,i=/%25[0-9A-F][0-9A-F]/g;j.prototype={expand:function(){return encodeURI(this._text)}};
h.prototype={expand:function(a){for(var b=[],c=0;c<this._varSpecList.length;c++){var i=this._varSpecList[c],h=i.name,g=a[h],j=typeof g;if(j!=="undefined"&&g!==null){var r=b.length===0?this._operator.first:this._operator.sep;if(j==="string")this._operator.named&&(r+=f(h,"U+R"),r+=g.length===0?this._operator.ifemp:"="),i.prefix!==-1&&i.prefix<g.length&&(g=g.substring(0,i.prefix)),r+=f(g,this._operator.allow);else if(Array.isArray(g))i.explode?r+=e(g,this._operator.allow,this._operator.sep):(this._operator.named&&
(r+=f(h,"U+R"),r+=g.length===0?this._operator.ifemp:"="),r+=e(g,this._operator.allow,","));else if(j==="object")i.explode?r+=d(g,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(r+=f(h,"U+R"),r+=Object.keys(g).length===0?this._operator.ifemp:"="),r+=d(g,this._operator.allow,",",","));else throw Error("bad param type: "+h+" : "+j);b.push(r)}}return b.join("")}};c.prototype={expand:function(a){for(var b=[],c=0;c<this._templateComponents.length;c++)b.push(this._templateComponents[c].expand(a));
return b.join("")}};return c});
define("orion/i18nUtil",["require","orion/Deferred"],function(j,g){function f(d){if(d=localStorage.getItem("orion/messageBundle/"+d))if(d=JSON.parse(d),d._expires&&d._expires>(new Date).getTime())return delete d._expires,d;return null}var e={};return{getMessageBundle:function(d){function h(){j(["i18n!"+d],function(a){if(a){var b=d;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}c.resolve(a)})}if(e[d])return e[d];var c=new g;e[d]=
c;var b=f(d);if(b)return c.resolve(b),c;try{j([d],h)}catch(a){j(["orion/i18n!"+d],h)}return c},formatMessage:function(d){var e=arguments;return d.replace(/\$\{([^\}]+)\}/g,function(c,b){return e[(b<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(j,g,f,e,d){function h(){return(new URL(j.toUrl("orion/../"),window.location.href)).href.slice(0,-1)}function c(b,a){var c=b.getServiceReferences(a||"orion.page.link"),k=f.matchResourceParameters(window.location.href),l={OrionHome:h(),Location:k.resource},m=[];c.forEach(function(a){var b={};a.getPropertyKeys().forEach(function(c){b[c]=a.getProperty(c)});if(b.uriTemplate&&
b.nls&&(b.name||b.nameKey)){var c=new g;d.getMessageBundle(b.nls).then(function(a){var d=(new e(b.uriTemplate)).expand(l),d=f.validateURLScheme(d);b.href=d;b.textContent=b.nameKey?a[b.nameKey]:b.name;c.resolve(b)});m.push(c)}else if(b.uriTemplate&&b.name){var i=(new e(b.uriTemplate)).expand(l),i=f.validateURLScheme(i);b.href=i;b.textContent=b.name;m.push((new g).resolve(b))}});return g.all(m)}return{createPageLinks:function(b,a){return c(b,a).then(function(a){a.sort(function(a,b){var c=a.textContent&&
a.textContent.toLowerCase(),d=b.textContent&&b.textContent.toLowerCase();return c<d?-1:c>d?1:0});return a.map(function(a){var b=a.href,a=a.textContent,c=document.createElement("a");c.href=b;c.target="_self";c.classList.add("targetSelector");c.textContent=a;return c})})},getPageLinksInfo:c,getOrionHome:h}});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim,orion/PageLinks".split(","),function(j,g,f,e,d,h,c,b,a){var i={},k=a.getOrionHome();i._cloneItemWithoutChildren=function o(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=o(a[c]));return b};i._getOpenWithNavCommandExtensions=function(a){function b(a,c){for(var d=a.getServiceReferences("orion.navigate.openWith"),
e=[],i=0;i<d.length;i++){var k=d[i];k.getProperty("editor")===c.id&&(k=k.getProperty("contentType"),k instanceof Array?e=e.concat(k):k!==null&&typeof k!=="undefined"&&e.push(k))}return e}for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],d=0;d<b.length;d++){var e=b[d],i=e.getProperty("id");c.push({id:i,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||e.getProperty("uriTemplate"),validationProperties:e.getProperty("validationProperties")||
[]})}return c}(),d=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),e=[],i=0;i<c.length;i++){var k=c[i],l=d&&d.editor===k.id,f=b(a,k);f.length&&e.push({properties:{name:k.name||k.id,nameKey:k.nameKey,id:"eclipse.openWithCommand."+k.id,tooltip:k.name,tooltipKey:k.nameKey,contentType:f,uriTemplate:k.uriTemplate,nls:k.nls,forceSingleItem:!0,isEditor:l?"default":"editor",validationProperties:k.validationProperties},
service:{}})}return e};i._makeValidator=function(a,b,c,e){function i(a,b,c,d){var e=c.match,k;if(b.indexOf("[")===0){if(b.indexOf("]")<0)return!1;if(!Array.isArray(a))return!1;k=b.replace("[","").replace("]","");for(b=0;b<a.length;b++)if(i(a[b],k,c,d))return!0}else if(b.indexOf("|")>=0)return k=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),i(a,k,c,d)?!0:i(a,b,c,d);else if(b.indexOf(":")>=0)return k=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[k]?i(a[k],b,c,d):!1;
else{a:{k=!1;var l;if(b.charAt(0)==="!")c=typeof a[b.substring(1)]==="undefined";else if(typeof a[b]!=="undefined"){if(typeof e==="undefined")l=a[b],k=!0;else if(typeof e==="string"){if(!typeof(a[b]==="string")){c=!1;break a}if(c.variableName){if(e=RegExp(e).exec(a[b]))k=e[0],l=c.variableMatchPosition==="before"?a[b].substring(0,e.index):c.variableMatchPosition==="after"?a[b].substring(e.index+k.length):c.variableMatchPosition==="only"?k:a[b],k=!0}else{c=RegExp(e).test(a[b]);break a}}else a[b]===
e&&(l=a[b],k=!0);if(k&&c.variableName&&(d[c.variableName]=l,d.itemCached=a,c.replacements))for(a=0;a<c.replacements.length;a++)b=!1,c.replacements[a].pattern?d[c.variableName]=d[c.variableName].replace(RegExp(c.replacements[a].pattern),c.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+c.replacements[a]);c=k}else c=!1}return c}}return{info:a,validationFunction:function(b){typeof e==="function"&&(b=e.call(this,b));if(b){if(Array.isArray(b)){if((this.info.forceSingleItem||
this.info.uriTemplate)&&b.length!==1)return!1;if(b.length<1)return!1}else b=[b];for(var k=0;k<b.length;k++){var l;a:{var f=b[k],h=c;if(this.info.validationProperties)for(l=0;l<this.info.validationProperties.length;l++){var g=this.info.validationProperties[l];if(typeof g.source!=="undefined"){if(!i(f,g.source,g,this)){l=!1;break a}}else{window.console.log("Invalid validationProperties in "+a.id+".  No source property specified.");l=!1;break a}}if(this.info.contentType&&h){g=!1;if(f=d.getFilenameContentType(f.Name,
h))for(l=0;l<this.info.contentType.length;l++)if(f.id===this.info.contentType[l]){g=!0;break}l=g}else l=!0}if(!l)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var b={},c;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);if(this.info.validationProperties)for(c=0;c<this.info.validationProperties.length;c++){var d=this.info.validationProperties[c];d.source&&d.variableName&&(this.itemCached===a&&this[d.variableName]||
i(a,d.source,d,this),a[d.variableName]?window.console.log("Variable name "+d.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[d.variableName]=this[d.variableName])}b.OrionHome=k;return(new h(this.info.uriTemplate)).expand(b)}return null}}};i._createCommandOptions=function(a,b,d,e,k,l){function f(c,h){var g=i._makeValidator(a,d,e,l);c.visibleWhen=g.validationFunction.bind(g);if(k)if(g.generatesURI.bind(g)())c.hrefCallback=function(a){a=
Array.isArray(a.items)?a.items[0]:a.items;return g.getURI.bind(g)(a)};else{var j=a;c.callback=function(a){var e;if(j.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,e=i._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){e=[];for(var k=0;k<a.items.length;k++)e.push(i._cloneItemWithoutChildren(a.items[k]))}else e=i._cloneItemWithoutChildren(a.items);if(d)var l=d.getService("orion.page.progress");b.run?l?l.progress(b.run(e),"Running command: "+c.name):b.run(e):d&&(l?l.progress(d.getService(b).run(e),
"Running command: "+c.name):d.getService(b).run(e))}}h.resolve(c)}var h=new g;a.nls?c.getMessageBundle(a.nls).then(function(b){f({name:a.nameKey?b[a.nameKey]:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltipKey?b[a.tooltipKey]:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},h)}):f({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},h);return h};i.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var d=a._commandList[c];
d.isEditor&&b.push(d)}return b};var l;i.createAndPlaceFileCommandsExtension=function(a,b,c,d,e,k){var l=!!k;return i.createFileCommands(a,null,k?"all":void 0,l).then(function(a){b._addedOpenWithCommands=l;var i=!1,k=!1;a.forEach(function(a){b.addCommand(a);e&&!i&&(i=!0,b.addCommandGroup(c,"eclipse.fileCommandExtensions",1E3,null,e));e&&!k&&(k=!0,b.addCommandGroup(c,"eclipse.openWith",1E3,"Open With",e+"/eclipse.fileCommandExtensions"));this.isEditor?b.registerCommandContribution(c,a.id,d+this.index,
e?e+"/eclipse.fileCommandExtensions/eclipse.openWith":null):b.registerCommandContribution(c,a.id,d+this.index,e?e+"/eclipse.fileCommandExtensions":null)});return{}})};i.createFileCommands=function(a,b,c,d){var c=c===void 0?"global":c,d=d===void 0?!0:d,e=a.getServiceReferences("orion.navigate.command"),k=[];if(c==="all"||c==="global")for(var h=0;h<e.length;h++)if(e[h].getProperty("id")!=="orion.navigateFromMetadata"){for(var j=a.getService(e[h]),s={},y=e[h].getPropertyKeys(),x=0;x<y.length;x++)s[y[x]]=
e[h].getProperty(y[x]);(c==="all"||s.forceSingleItem&&s.showGlobally)&&k.push({properties:s,service:j})}return g.when(function(){var c=a.getService("orion.core.contentTypeRegistry")||b;return l||g.when(c.getContentTypes(),function(a){return l=a})}(),function(){k=d?k.concat(i._getOpenWithNavCommandExtensions(a,l)):k;var b=k.map(function(b){var c=b.properties;return i._createCommandOptions(c,b.service,a,l,!0).then(function(a){a=new f.Command(a);if(c.isEditor)a.isEditor=c.isEditor;return a})});return g.all(b,
function(a){return{_error:a}}).then(function(a){return a})})};i.createOpenWithCommands=function(a,b,c){return c&&c._addedOpenWithCommands?(new g).resolve(i.getOpenWithCommands(c)):i.createFileCommands(a,b,"none",!0)};return i});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(j,g){function f(e){this._init(e)}f.prototype={_init:function(e){var d=g.node(e.container);if(!d)throw"no parent container";this._container=d;d.classList.remove("currentLocation");this._id=e.id||"eclipse.breadcrumbs";this._resource=e.resource||null;this._rootSegmentName=e.rootSegmentName;this._workspaceRootSegmentName=e.workspaceRootSegmentName;this._workspaceRootURL=e.workspaceRootURL;this._makeHref=e.makeHref;this.path="";this.measure();
this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var e;if(this._resource&&this._resource.Parents){e=document.createElement("a");var d=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(e,d):e.href=j.toUrl("edit/edit.html")+"#"+d}else e=document.createElement("span");g.empty(e);e.appendChild(document.createTextNode(this._workspaceRootSegmentName));return e}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],buildSegment:function(e){var d=
document.createElement("a");d.classList.add("breadcrumb");d.appendChild(document.createTextNode(e));return d},addSegmentHref:function(e,d){this._makeHref?this._makeHref(e,d.Location,d):e.href=j.toUrl("edit/edit.html")+"#"+d.ChildrenLocation},buildSegments:function(e,d){if(this._resource.Parents){var f=this._resource.Parents.slice(0),c,b;f&&(f=f.slice(0),d==="reverse"&&(f=f.reverse().slice(0)),f.forEach(function(a){e?(b=e,e=null):b=a.Name;c=this.buildSegment(b);this.path+=a.Name;this.addSegmentHref(c,
a);c.include=!1;this.segments.push(c)}.bind(this)))}},addDivider:function(){var e=document.createElement("span");e.appendChild(document.createTextNode(" / "));this.path+="/";e.classList.add("breadcrumbSeparator");this.append(e)},refresh:function(){(this.crumbs=g.node(this._id))?g.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(e){this.crumbs.appendChild(e)},addTitle:function(e,d){var f=d||document.title;this.crumbs.childNodes.length===0&&(e=document.createElement("span"),e.appendChild(document.createTextNode(f)),e.classList.add("breadcrumb"),e.classList.add("currentLocation"),this.append(e))},finalSegment:function(e,
d){e=document.createElement("span");d?e.appendChild(document.createTextNode(d)):e.appendChild(document.createTextNode(this._resource.Name));e.classList.add("currentLocation");this.path+=this._resource.Name;this.append(e)},firstSegment:function(e){if(e)this.append(e),this._resource&&this._resource.Parents?(e.classList.add("breadcrumb"),this.addDivider()):(e.href="",e.classList.add("currentLocation"))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(e){e.include===
!0&&(this.append(e),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var e=this.segments.slice(0).reverse();e.forEach(function(d){this.append(d);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?d.include=!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=e.reverse()}},measure:function(){var e=document.getElementById("location");e.style.width="auto";this.MAX_LENGTH=e.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility=
"hidden";var e=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;if(d)this.addTitle(e,d);else if(this.finalSegment(e,d),this._resource&&this._resource.Parents&&(this.buildSegments(d,"reverse"),this.measureSegments(),this.firstSegment(e)),this.crumbs.offsetWidth>=this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var e=this.getNavigatorWorkspaceRootSegment(),d=this._rootSegmentName;d?this.addTitle(e,d):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(e),
this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(e,d)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};f.prototype.constructor=f;return{BreadCrumbs:f}});
define("orion/webui/splitter",["require","orion/EventTarget","orion/webui/littlelib"],function(j,g,f){function e(d){g.attach(this);this._init(d)}e.prototype={_init:function(d){this._tracking=null;this._animationDelay=501;this.$node=f.node(d.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=f.node(d.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=f.node(d.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=
d.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(d.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 d.closeByDefault!=="undefined")this._closeByDefault=d.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(d){this.addEventListener("resize",function(e){d(e.node)})},_initializeFromStoredSettings:function(){var d=localStorage.getItem(this._prefix+"/toggleState");this._closed=typeof d==="string"?d==="closed":this._closeByDefault;if(this._vertical)if(d=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=parseInt(d,10);else{if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitTop=0}else if(d=localStorage.getItem(this._prefix+
"/xPosition"))this._splitLeft=parseInt(d,10);else if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitLeft=0},_getSplitPosition:function(){var d=f.bounds(this.$node),e=f.bounds(this.$node.parentNode);return this.vertical?d.top-e.top:d.left-e.left},_adjustToSplitPosition:function(d){var e=f.bounds(this.$node),c=f.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=e.height;if(d||!this._splitTop)this._splitTop=e.top,localStorage.setItem(this._prefix+"/yPosition",
this._splitTop);d=this._splitTop;this.$node.parentNode.style.position==="relative"&&(d=this._splitTop-c.top);this.$sideNode.style.height=d+"px";this.$sideNode.style.display="block";this.$node.style.top=d+"px"}else{this._splitWidth=e.width;if(d||!this._splitLeft)this._splitLeft=e.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);d=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(d=this._splitLeft-c.left);this.$sideNode.style.width=d+"px";this.$sideNode.style.display=
"block";this.$node.style.left=d+"px"}this._resize()},_resize:function(d,e,c){var d=d||0,b=f.bounds(this.$node.parentNode),a=f.bounds(this.$node);if(this._vertical){if(c===void 0)c=a.top,this.$node.parentNode.style.position==="relative"&&(c-=b.top);c+=a.height;this.$mainNode.style.top=c+"px"}else{if(e===void 0)e=a.left,this.$node.parentNode.style.position==="relative"&&(e-=b.left);e+=a.width;this.$mainNode.style.left=e+"px"}var i=this;window.setTimeout(function(){i._notifyResizeListeners(i.$mainNode);
i._notifyResizeListeners(i.$sideNode)},d)},_notifyResizeListeners:function(d){this.dispatchEvent({type:"resize",node:d})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(d,e){d||this._addAnimation();var c=this._splitTop,b=this._splitLeft;if(this._closed){if(this._closed=!1,!this._splitLeft&&!this._splitTop&&typeof this._initialSplit==="number")c=b=this._initialSplit}else this._closed=!0,c=b=0;this._vertical?(this.$sideNode.style.height=
c+"px",this.$node.style.top=c+"px"):(this.$sideNode.style.width=b+"px",this.$node.style.left=b+"px");this._resize(this._animationDelay,b,c);d||this._removeAnimation();e||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var a=this;window.setTimeout(function(){a._notifyToggleListeners()},this._animationDelay)},_removeAnimation:function(){var d=this;window.setTimeout(function(){d.$sideNode.classList.remove(d._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");
d.$mainNode.classList.remove(d._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");d.$node.classList.remove(d._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(d){if(d.target===this._thumb)return f.stop(d),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),f.stop(d)},_mouseMove:function(d){if(this._tracking){var e=f.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=d.clientY;if(this._splitTop<
e.top+5)this._splitTop=e.top+5;else if(this._splitTop>e.top+e.height-5)this._splitTop=e.top+e.height-5;var c=this._splitTop;this.$node.parentNode.style.position==="relative"&&(c=this._splitTop-e.top);this.$node.style.top=c+"px"}else{this._splitLeft=d.clientX;if(this._splitLeft<e.left+5)this._splitLeft=e.left+5;else if(this._splitLeft>e.left+e.width-5)this._splitLeft=e.left+e.width-5;c=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(c=this._splitLeft-e.left);this.$node.style.left=
c+"px"}this._adjustToSplitPosition(!0);f.stop(d)}},_mouseUp:function(d){if(this._tracking)window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),f.stop(d)}};e.prototype.constructor=e;return{Splitter:e}});
define("orion/widgets/themes/ThemePreferences",[],function(){function j(g,f){this._preferences=g;this._themeData=f;var e=f.getThemeStorageInfo(),d=g.listenForChangedSettings(e.storage,2,function(e){e.key===d&&this.apply()}.bind(this))}j.prototype={_initialize:function(g,f,e){var d=e.get(g.styleset);d||(d=f.getStyles(),e.put(g.styleset,JSON.stringify(d)));(f=e.get("selected"))&&(f=JSON.parse(f));if(!f||f[g.selectedKey]===void 0)f=f||{},f[g.selectedKey]=g.defaultTheme,e.put("selected",JSON.stringify(f))},
apply:function(){this.setTheme()},getTheme:function(g){var f=this._themeData,e=f.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(d){this._initialize(e,f,d);var h=JSON.parse(d.get("selected")),d=JSON.parse(d.get(e.styleset)),c;if(d)for(var b=0;b<d.length;b++)if(d[b].name===h[e.selectedKey]){c=d[b];break}g({style:c,styles:d})}.bind(this))},setTheme:function(g,f){var e=this._themeData,d=e.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(h){this._initialize(d,
e,h);var c=JSON.parse(h.get("selected"));g||(g=c[d.selectedKey]);c[d.selectedKey]=g;h.put("selected",JSON.stringify(c));f?h.put(d.styleset,JSON.stringify(f)):f=JSON.parse(h.get(d.styleset));for(h=0;h<f.length;h++)if(f[h].name===c[d.selectedKey]){e.processSettings(f[h]);break}}.bind(this))},setFontSize:function(g){var f=this._themeData,e=f.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(d){this._initialize(e,f,d);var h=JSON.parse(d.get("selected")),c=JSON.parse(d.get(e.styleset)),
b;if(c)for(var a=0;a<c.length;a++)c[a].fontSize=g,c[a].name===h[e.selectedKey]&&(b=c[a]);d.put(e.styleset,JSON.stringify(c));f.processSettings(b)}.bind(this))}};return{ThemePreferences:j}});
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 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",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 local editor settings drop down.",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","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(j,g){var f={root:g};Object.keys(j).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=j[e])});return f});
define("orion/editor/eventTarget",[],function(){function j(){}j.addMixin=function(g){var f=j.prototype,e;for(e in f)f.hasOwnProperty(e)&&(g[e]=f[e])};j.prototype={addEventListener:function(g,f,e){if(!this._eventTypes)this._eventTypes={};var d=this._eventTypes[g];d||(d=this._eventTypes[g]={level:0,listeners:[]});d.listeners.push({listener:f,useCapture:e})},dispatchEvent:function(g){var f=g.type;this._dispatchEvent("pre"+f,g);this._dispatchEvent(f,g);this._dispatchEvent("post"+f,g)},_dispatchEvent:function(g,
f){var e=this._eventTypes?this._eventTypes[g]:null;if(e){var d=e.listeners;try{if(e.level++,d)for(var h=0,c=d.length;h<c;h++)if(d[h]){var b=d[h].listener;typeof b==="function"?b.call(this,f):b.handleEvent&&typeof b.handleEvent==="function"&&b.handleEvent(f)}}finally{if(e.level--,e.compact&&e.level===0){for(h=d.length-1;h>=0;h--)d[h]||d.splice(h,1);d.length===0&&delete this._eventTypes[g];e.compact=!1}}}},isListening:function(g){return!this._eventTypes?!1:this._eventTypes[g]!==void 0},removeEventListener:function(g,
f,e){if(this._eventTypes){var d=this._eventTypes[g];if(d){for(var h=d.listeners,c=0,b=h.length;c<b;c++){var a=h[c];if(a&&a.listener===f&&a.useCapture===e){d.level!==0?(h[c]=null,d.compact=!0):h.splice(c,1);break}}h.length===0&&delete this._eventTypes[g]}}}};return{EventTarget:j}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(j,g,f){function e(d){d=d||{};this._document=d.document||document}var d={};e.getTheme=function(f){var f=f||"default",c=d[f];c||(c=d[f]=new e);return c};e.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(d,c){var b=this,a=b._themeClass;b._themeClass=d;this._load(d,c,function(){b.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:b.getThemeClass()})})},onThemeChanged:function(d){return this.dispatchEvent(d)},
buildStyleSheet:function(d,c){function b(b,c,e){c&&(a.push("."+d+" ."+b+" {"),a.push("\t"+(e?"background-color":"color")+": "+c+";"),a.push("}"))}var a=[];a.push("");a.push("."+d+" {");c.fontFamily&&a.push("\tfont-family: "+c.fontFamily+";");c.fontSize&&a.push("\tfont-size: "+c.fontSize+";");c.fontSize&&a.push("\tcolor: "+c.text+";");a.push("}");a.push("."+d+".textview {");c.background&&a.push("\tbackground-color: "+c.background+";");a.push("}");b("ruler.annotations",c.annotationRuler,!0);b("ruler.lines",
c.annotationRuler,!0);b("ruler.folding",c.annotationRuler,!0);b("ruler.overview",c.overviewRuler,!0);b("rulerLines",c.lineNumber,!1);b("rulerLines.even",c.lineNumberEven,!1);b("rulerLines.odd",c.lineNumberOdd,!1);b("annotationLine.currentLine",c.currentLine,!0);b("entity-name-tag",c.keyword,!1);b("entity-other-attribute-name",c.attribute,!1);b("string-quoted",c.string,!1);b("line_caret",c.currentLine,!0);b("token_keyword",c.keyword,!1);b("token_string",c.string,!1);b("token_singleline_comment",c.comment,
!1);b("token_multiline_comment",c.comment,!1);b("token_doc_comment",c.comment,!1);b("token_doc_html_markup",c.comment,!1);return a.join("\n")},_createStyle:function(d,c,b,a){var e=this._document,d="orion-theme-"+d,k=e.getElementById(d);if(k){if(a||k.firstChild.data===c)return;k.removeChild(k.firstChild);k.appendChild(e.createTextNode(c))}else a?(k=f.createElement(e,"link"),k.rel="stylesheet",k.type="text/css",k.href=c,k.addEventListener("load",function(){b()})):(k=f.createElement(e,"style"),k.appendChild(e.createTextNode(c))),
k.id=d,(e.getElementsByTagName("head")[0]||e.documentElement).appendChild(k);a||b()},_load:function(d,c,b){if(d)if(typeof c==="string")this._createStyle(d,c,b);else if(c=c.href,c.substring(c.length-4)!==".css"&&(c+=".css"),/^\//.test(c)||/[a-zA-Z0-9]+:\/\//i.test(c)||!j.toUrl)this._createStyle(d,c,b,!0);else{var a=this;j(["text!"+c],function(c){a._createStyle(d,c,b,!1)})}else b()}};g.EventTarget.addMixin(e.prototype);return{TextTheme:e}});
define("orion/widgets/themes/ThemeClass",[],function(){function j(g){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=g;this.classString="."+g+"{ "}j.prototype.className=null;j.prototype.classString=void 0;j.prototype.style=void 0;j.prototype.closeString=" }\n";j.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:j}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(j){function g(){}g.prototype.navbar="#333";g.prototype.button="#777777";g.prototype.location="#EFEFEF";g.prototype.selection="FEC";g.prototype.sidepanel="#FBFBFB";g.prototype.mainpanel="white";g.prototype.navtext="#bfbfbf";g.prototype.content="#3087B3";g.prototype.search="#444";g.prototype.toolpanel="white";g.prototype.writeNavigationStyle=function(){var f="",e=[],d=new j.ThemeClass("orionPage");
d.style.backgroundColor="#fdfdfd";d.style.width="100%";d.style.height="100%";e.push(d);d=new j.ThemeClass("topRowBanner");d.style.margin="0";d.style.border="0";d.style.backgroundColor=this.navbar;d.style.height="16px";d.style.padding="10px";d.style.paddingLeft="6px";d.style.paddingRight="2px";e.push(d);d=new j.ThemeClass("a");d.style.textDecoration="none";d.style.color=this.content;e.push(d);d=new j.ThemeClass("navlink");d.style.display="inline-block";d.style.padding="2px";d.style.color=this.content;
e.push(d);d=new j.ThemeClass("primaryNav");d.style.color=this.navtext;d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.paddingTop="0";d.style.verticalAlign="baseline";e.push(d);d=new j.ThemeClass("primaryNav a");d.style.fontSize="8pt";d.style.color=this.navtext;d.style.marginRight="6px";d.style.marginLeft="6px";d.style.verticalAlign="baseline";d.style.textDecoration="none";e.push(d);d=new j.ThemeClass("primaryNav a:hover");d.style.color="#bfbfbf";d.style.cursor="hand";d.style.color="white";
d.style.fontWeight="normal";e.push(d);for(var h in e)f+=e[h].toString();return f};g.prototype.writeLocationStyle=function(){var f="",e=[],d=new j.ThemeClass("titleArea");d.style.margin="0";d.style.paddingTop="5px";d.style.border="0";d.style.background=this.location;d.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+"), color-stop(100%,"+this.location+"))";d.style.borderBottom="1px solid "+this.location;d.style.minHeight="20px";e.push(d);d=new j.ThemeClass("breadcrumb");
d.style.fontSize="8pt";d.style.textDecoration="none";d.style.color="#f1f1f2;";d.style.paddingTop="2px";e.push(d);d=new j.ThemeClass("a.breadcrumb:hover");d.style.textDecoration="none";d.style.borderBottom="1px dotted";d.style.color="#F58B0F";d.style.cursor="pointer";e.push(d);d=new j.ThemeClass("breadcrumbSeparator");d.style.fontSize="8pt";d.style.textDecoration="none";d.style.color="#f1f1f2";d.style.fontWeight="bold";e.push(d);d=new j.ThemeClass("currentLocation");d.style.fontWeight="bold";d.style.fontSize=
"8pt";d.style.color="#f1f1f2";d.style.textDecoration="none";d.style.textWrap="normal";d.style.lineHeight="10pt";e.push(d);d=new j.ThemeClass("a.currentLocation:hover");d.style.fontWeight="bold";d.style.fontSize="10pt";d.style.color="#666666";d.style.textDecoration="none";d.style.borderBottom="0";e.push(d);d=new j.ThemeClass("navlinkonpage");d.style.color=this.content;e.push(d);d=new j.ThemeClass("progressPane_running");d.style.background="url(../images/progress_running_dark.gif) no-repeat center";
d.style.width="16px";d.style.height="16px";e.push(d);for(var h in e)f+=e[h].toString();return f};g.prototype.writeButtonStyle=function(){var f="",e=[],d=new j.ThemeClass("commandButton");d.style.color="#666";d.style.border="1px solid #dedede";d.style.backgroundColor="#ddd";d.style.textAlign="center";d.style.verticalAlign="baseline";d.style.cursor="pointer";d.style.display="inline-block";d.style.padding="4px 6px";d.style.borderRadius="3px";d.style.lineHeight="12px";d.style.fontSize="8pt";d.style.userSelect=
"none";e.push(d);d=new j.ThemeClass("commandButton:over");d.style.backgroundColor="#e6e6e6";d.style.border="1px solid #808080";e.push(d);d=new j.ThemeClass("commandMenu");d.style.color="#222";d.style.display="inline-block";d.style.verticalAlign="baseline";d.style.margin="0";d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.border="1px solid #dedede";d.style.backgroundColor="#efefef";d.style.cursor="pointer";d.style.borderRadius="1px";e.push(d);d=new j.ThemeClass("commandMenuItem");d.style.border=
"0";d.style.padding="0";d.style.margin="0";e.push(d);for(var h in e)f+=e[h].toString();return f};g.prototype.writeMainStyle=function(){var f="",e=[],d=new j.ThemeClass("searchbox");d.style.backgroundImage="url(../images/core_sprites.png)";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="4px -297px";d.style.width="12px";d.style.height="12px";d.style.backgroundColor=this.search;d.style.border="1px solid "+this.search;d.style.fontSize="11px";d.style.width="15em";d.style.height="16px";
d.style.borderRadius="10px";d.style.color="#999";d.style.padding="0";d.style.paddingLeft="20px";d.style.marginLeft="5px";d.style.marginTop="6px !important";d.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";e.push(d);d=new j.ThemeClass("searchbox:focus");d.style.color="white";d.style.outline="none";e.push(d);d=new j.ThemeClass("checkedRow");d.style.cssText="background-color:"+this.selection+" !important;";e.push(d);d=new j.ThemeClass("navbar-item-selected");
d.style.background=this.selection;d.style.color=this.content;e.push(d);d=new j.ThemeClass("auxpane");d.style.border="0";d.style.background=this.sidepanel;d.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";d.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";e.push(d);d=new j.ThemeClass("mainpane");d.style.background=this.mainpanel;d.style.border=0;e.push(d);d=new j.ThemeClass("mainToolbar");
d.style.background=this.toolpanel;d.style.height="32px";d.style.borderBottom="1px solid #ebebeb";d.style.paddingTop="3px";e.push(d);for(var h in e)f+=e[h].toString();return f};g.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};g.prototype.getSheet=function(f){f.navbar.value?(this.navbar=f.navbar.value,this.button=f.button.value,this.location=f.location.value,this.selection=
f.selection.value,this.sidepanel=f.sidepanel.value,this.mainpanel=f.mainpanel.value,this.navtext=f.navtext.value,this.search=f.search.value,this.content=f.content.value,this.toolpanel=f.toolpanel.value):(this.navbar=f.navbar,this.button=f.button,this.location=f.location,this.selection=f.selection,this.sidepanel=f.sidepanel,this.mainpanel=f.mainpanel,this.navtext=f.navtext,this.search=f.search,this.content=f.content,this.toolpanel=f.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+
this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:g}});
define("orion/widgets/themes/container/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(j,g,f){function e(){}function d(){this.styles=[];var c=new e;c.name="Orion";c.navbar="#404648";c.button="#EFEFEF";c.location="#efefef";c.selection="FEC";c.sidepanel="#FBFBFB";c.mainpanel="white";c.toolpanel="white";c.navtext="#bfbfbf";c.content="#3087B3";c.search="#444";c.breadcrumb="#3087B3";c.separator="#333";this.styles.push(c);
c=new e;c.name="Green Zone";c.navbar="seagreen";c.button="lavender";c.location="darkseagreen";c.selection="moccasin";c.sidepanel="aliceblue";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";c.content="darkgreen";c.search="darkgreen";c.breadcrumb="#3087B3";c.separator="seagreen";this.styles.push(c);c=new e;c.name="Pretty In Pink";c.navbar="plum";c.button="lavender";c.location="pink";c.selection="lavender";c.sidepanel="seashell";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";
c.content="mediumorchid";c.search="violet";c.breadcrumb="#3087B3";c.separator="plum";this.styles.push(c);c=new e;c.name="Blue Monday";c.navbar="cornflowerblue";c.button="lavender";c.location="skyblue";c.selection="lavender";c.sidepanel="aliceblue";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";c.content="royalblue";c.search="royalblue";c.breadcrumb="#3087B3";c.separator="cornflowerblue";this.styles.push(c);c=new e;c.name="Vanilla Skies";c.navbar="sandybrown";c.button="lemmonchiffon";
c.location="cornsilk";c.selection="lemonchiffon";c.sidepanel="white";c.mainpanel="white";c.toolpanel="white";c.navtext="lemonchiffon";c.content="chocolate";c.search="moccasin";c.breadcrumb="#3087B3";c.separator="sandybrown";this.styles.push(c);c=new e;c.name="Beetlejuice";c.navbar="indigo";c.button="slateblue";c.location="darkslateblue";c.selection="silver";c.sidepanel="lavender";c.mainpanel="white";c.toolpanel="white";c.navtext="#FBFBFB";c.content="mediumslateblue";c.search="#444";c.breadcrumb="#3087B3";
c.separator="indigo";this.styles.push(c);c=new e;c.name="Red";c.navbar="#CD2127";c.button="#777777";c.location="#D85F56";c.selection="lightcoral";c.sidepanel="#EFDAB2";c.mainpanel="#FDFADD";c.toolpanel="#FDFADD";c.navtext="#FBFBFB";c.content="darkred";c.search="#D85F56";c.breadcrumb="darkred";c.separator="#CD2127";this.styles.push(c)}function h(){return this.styles}e.prototype.name="Orion";e.prototype.navbar="#404648";e.prototype.button="#EFEFEF";e.prototype.location="#333";e.prototype.breadcrumb=
"#3087B3";e.prototype.separator="#333";e.prototype.selection="FEC";e.prototype.sidepanel="#FBFBFB";e.prototype.mainpanel="white";e.prototype.toolpanel="white";e.prototype.navtext="#bfbfbf";e.prototype.content="#3087B3";e.prototype.search="#444";d.prototype.styles=[];d.prototype.getStyles=h;d.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion",selectedKey:"selected"}};d.prototype.getViewData=function(){var c={top:10,left:10,width:350,height:350};
c.shapes=[{type:"RECTANGLE",name:j["Navigation Bar"],x:10,y:10,width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:j["Navigation Text"],label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:j["Search Box"],x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:j["Tool Panel"],x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",name:j["Selection Bar"],
x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},{type:"RECTANGLE",name:j.Location,x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:j["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:j.Content,label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:j.Content,label:"/",x:78,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif",
order:9},{type:"TEXT",name:j.Content,label:"Location",x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:j["Main Panel"],x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:j.Button,x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:j["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:j["Section Text"],label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:j["Line Color"],x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:j["Line Color"],x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:j["Line Color"],x1:20,y1:100,x2:140,
y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:j["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:j["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 b=0;b<3;b++)c.shapes.push({type:"TEXT",name:j.Content,label:"org.eclipse.orion.content",x:170,y:127+20*b,fill:"#3087B3",family:"content"});for(b=0;b<3;b++)c.shapes.push({type:"TEXT",name:j.Content,label:"Item",x:25,y:115+20*b,fill:"#3087B3",family:"content"});for(b=0;b<3;b++)c.shapes.push({type:"TRIANGLE",
name:"twisty",x1:160,y1:121+b*20,x2:165,y2:124+b*20,x3:160,y3:127+b*20,family:"navbar",fill:"#333"});c.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return c};d.prototype.processSettings=function(c){var b=new f.ThemeSheetWriter;(new g.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",b.getSheet(c))};return{ThemeData:d,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","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","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(j,g){var f={root:g};Object.keys(j).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=j[e])});return f});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(j){function g(f,e,d){this.elements=d;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);e===!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),j.addAutoDismiss([this.container],this.destroy.bind(this))):f.appendChild(this.taskPanel);this.chosenSwitch=this.createSwitch(null,!0);this.chosenSwitch.firstChild.className="chosenCircle";this.initialize();this.elements.forEach(this.createSwitch.bind(this))}g.prototype.elementNode=null;g.prototype.switchesContainer=null;g.prototype.switches=null;g.prototype.radioButtons=null;g.prototype.chosenSwitch=null;g.prototype.addElement=
function(f){var e=document.createElement("span");e.className="UAContainer-icon";e.innerHTML='<span class="workingSpan"><img src="'+f.image+'" id="'+f.label+'ImageNode" alt="'+f.alt+'" height="64" width="64"></span><span class="UAIcon-label"><span class="UALabel" id="'+f.label+'LabelNode" >'+f.label+"</span></span>";e.onmouseover=function(){document.getElementById(f.label+"ImageNode").src=f.secondaryImage;document.getElementById(f.label+"LabelNode").className="UALabel-live";e.className="UAContainer-icon-live"};
e.onmouseout=function(){document.getElementById(f.label+"ImageNode").src=f.image;document.getElementById(f.label+"LabelNode").className="UALabel";e.className="UAContainer-icon"};var d=this;e.onclick=function(){d.showMedia(f)};this.elementNode.appendChild(e)};g.prototype.clearElements=function(){this.elementNode.innerHTML=""};g.prototype.showMedia=function(f){this.clearElements();this.addElement(f);var e=document.createElement("span");e.className="UAContainer-media";e.innerHTML='<div></div><div></div><span class="mediaSpan"><img src="'+
f.media+'" alt="'+f.alt+'" height="300" width="400"></span>';this.elementNode.appendChild(e);setTimeout(function(){e.style.opacity=1},100);f=document.getElementById(f.label+"switch");this.chosenSwitch.firstChild.className="circle";this.chosenSwitch=f.parentNode;f.className="chosenCircle"};g.prototype.createSwitch=function(f){var e;e=f?f.label+"switch":"indexSwitch";var d=document.createElement("span");d.className="workingSpan";d.innerHTML='<div class="circle" id ="'+e+'"></div>';var h=this;d.onclick=
f?function(){h.showMedia(f)}:function(){h.initialize();h.chosenSwitch.firstChild.className="circle";h.chosenSwitch=d;h.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(d);return this.radioButtons[this.radioButtons.length]=d};g.prototype.initialize=function(){this.clearElements();this.elements.forEach(this.addElement.bind(this))};g.prototype.destroy=function(){document.body.removeChild(this.backdrop);document.body.removeChild(this.container)};return g});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(j,g,f,e){function d(){}d.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 d=document.body;this.$frameParent=d;this.$$modalExclusions=this.$$modalExclusions||[];var c=document.createRange();c.selectNode(d);c=c.createContextualFragment(this.CONTAINERTEMPLATE);d.appendChild(c);this.$frame=d.lastChild;this.title&&f.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=f.$("#closeDialog",this.$frame);var b=this;this.$close.addEventListener("click",function(){b.hide()},!1);this.$parent=f.$(".dialogContent",this.$frame);
c=document.createRange();c.selectNode(this.$parent);d=c.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(d,this.messages);this.$parent.appendChild(d);this.$buttonContainer=f.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE?b.hide():a.keyCode===f.KEY.ENTER&&typeof b._defaultCallback==="function"&&b._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 d=this;this.buttons.forEach(function(c){var b=e.createButton(c.text,c.callback);if(c.id)b.id=c.id,d["$"+b.id]=b;if(c.isDefault)d._defaultCallback=c.callback,d._defaultButton=b;d.$buttonContainer.appendChild(b)})}},_makeModal:function(){var d=this;this.$frame.addEventListener("blur",function(a){d.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var b=!f.contains(d.$frame,
a.target);if(b)for(var c=0;c<d.$$modalExclusions.length;c++)if(f.contains(d.$$modalExclusions[c],a.target)){b=!1;break}b&&(window.setTimeout(function(){(d.$lastFocusedElement||d.$parent).focus()},0),f.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var c=this.$frameParent.childNodes,b=!1;this._addedBackdrop=[];for(var a=0;a<c.length;a++){for(var e=0;e<this.$$modalExclusions.length;e++)if(f.contains(this.$$modalExclusions[e],
c[a])){b=!0;break}!b&&c[a]!==d.$frame&&c[a].classList&&!c[a].classList.contains("tooltipContainer")&&(e=c[a],e.classList.contains("modalBackdrop")||(e.classList.add("modalBackdrop"),this._addedBackdrop.push(e)))}(c=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.TAB){var b=d._getFirstFocusField();b&&b!==a.target&&b.focus();f.stop(a)}},!1)},_addChildDialog:function(d){this.$$modalExclusions.push(d.$frame||d.$parent)},
_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},hide:function(){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");typeof this._afterHiding==="function"&&this._afterHiding();var d=this;this.keepAlive||
window.setTimeout(function(){d.destroy()},0)},show:function(d){typeof this._beforeShowing==="function"&&this._beforeShowing();var c=f.bounds(this.$frame),b=f.bounds(document.documentElement),a;d?(a=f.bounds(d),d=a.top+a.height+4,a=a.left+4,d+c.height>b.height&&(d=Math.max(0,b.height-c.height-4)),a+c.width>b.width&&(a=Math.max(0,b.width-c.width-4))):(a=Math.max(0,(b.width-c.width)/2),d=Math.max(0,(b.height-c.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=d+"px";this.$frame.style.left=
a+"px";this.$frame.classList.add("dialogShowing");typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return f.firstTabbable(this.$parent)||this._defaultButton||f.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(d){d.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}};d.prototype.constructor=d;return{Dialog:d}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,orion/webui/littlelib,orion/PageLinks,orion/widgets/userAssistance/UATaskPanel,orion/webui/dialog".split(","),function(j,g,f,e,d){function h(c){this._displaySignOut=!0;this._init(c)}h.prototype={_init:function(c){this._dropdownNode=f.node(c.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=c.dropdown;this._serviceRegistry=c.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices=
{};this._noSeparator=c.noSeparator;this._dropDownItemClass=c.dropDownItemClass;this._keyAssistClass=c.keyAssistClass;if(c.signOut!==void 0)this._displaySignOut=c.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(c){var b=0,a;for(a in c)c.hasOwnProperty(a)&&b++;return b},_makeMenuItem:function(c,
b){var a=document.createElement("span");a.role="menuitem";a.tabIndex=0;var d=document.createTextNode(c);a.appendChild(d);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&a.classList.add(this._dropDownItemClass):a.classList.add("dropdownMenuItem");a.addEventListener("click",b,!1);a.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&b()},!1);return a},_renderAuthenticatedService:function(c){var b=this,a=this.authenticatedServices[c].authService;
if(a&&a.logout&&this._displaySignOut){var d=document.createElement("li"),e=this._makeMenuItem(j["Sign Out"],function(){a.logout().then(function(){b.addUserItem(c,a,b.authenticatedServices[c].label);localStorage.removeItem(c);localStorage.removeItem("lastLogin");for(var d=localStorage.length-1;d>=0;d--){var e=localStorage.key(d);e&&e.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(e)}a.getAuthForm(window.location.href).then(function(a){window.location=a})})});d.appendChild(e);this._dropdownNode.appendChild(d)}},
renderServices:function(){function c(c){a[c]||(a[c]=b.createDocumentFragment());return a[c]}var b=document,a=[],d=this._serviceRegistry;e.getPageLinksInfo(d,"orion.page.link.user").then(function(e){this._dropdown?this._dropdown.empty():this._dropdownNode&&f.empty(this._dropdownNode);e.forEach(function(a){var d=c(typeof a.category==="number"?a.category:1),e=b.createElement("li"),i=b.createElement("a");i.role="menuitem";typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&i.classList.add(this._dropDownItemClass):
i.classList.add("dropdownMenuItem");i.href=a.href;i.textContent=a.textContent;e.appendChild(i);d.appendChild(e);i.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&i.click()},!1)}.bind(this));if(this.keyAssistFunction){var e=document.createElement("li"),l=this._makeMenuItem(j["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass==="string"?this._keyAssistClass!==""&&l.classList.add(this._keyAssistClass):l.classList.add("key-assist-menuitem");
e.appendChild(l);c(0).appendChild(e)}if(e=d.getServiceReferences("orion.page.getstarted")[0])l=e.getProperty("data"),e=document.createElement("li"),l=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,l)),e.appendChild(l),c(0).appendChild(e);var h=this;a.sort(function(a,b){return a-b}).forEach(function(b,c){if(c<a.length-1&&!this._noSeparator){var d=document.createElement("li");d.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");
d.appendChild(e);b.appendChild(d)}h._dropdownNode.appendChild(b)}.bind(this));if(this.isSingleService())for(var g in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(g)&&this._renderAuthenticatedService(g,0)}.bind(this))},getStartedDialog:function(c){new d(null,!0,c)},setKeyAssist:function(c){this.keyAssistFunction=c;this.renderServices()},addUserItem:function(c,b,a,d){d?(this.unauthenticatedServices[c]&&delete this.unauthenticatedServices[c],this.authenticatedServices[c]={authService:b,
label:a,data:d}):(this.authenticatedServices[c]&&delete this.authenticatedServices[c],this.unauthenticatedServices[c]=this.unauthenticatedServices[c]?{authService:b,label:a,pending:this.unauthenticatedServices[c].pending}:{authService:b,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(j,g){var f={root:g};Object.keys(j).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=j[e])});return f});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(j,g,f,e,d,h){function c(a,b,c){var d="";c&&(d="^");if(d=f.parse("/"+d+a.searchStr+"/"))c=d.pattern,d=d.flags,d.indexOf("i")===-1&&!b.caseSensitive&&(d+="i"),a.regExp={pattern:c,flags:d},a.wildCard=!0}var b={ALL_FILE_TYPE:"*.*"};b.doSearch=function(a,c,d,e){if(a){var f=!0;d==="*"&&(d="");d===""&&(f=e&&e.type!==b.ALL_FILE_TYPE);if(f){d!==""&&b.addRecentSearch(c,
d,e?e.regEx:!1);var a=a.createSearchParams(d,!1,!1,e),h=b.generateSearchHref(a);b.getOpenSearchPref(c,function(a){a?window.open(h):window.location=h})}}else window.alert(j["Can't search: no search service is available"])};b.generateSearchHelper=function(a,d){var e=a.keyword,l=e,f={};a.fileType&&a.fileType!==b.ALL_FILE_TYPE&&e===""&&(l="*."+a.fileType);if(a.regEx)f.searchStr=e,c(f,a,d);else{var h=e.indexOf("*")>-1,g=e.indexOf("?")>-1;h&&(e=e.split("*").join(".*"));g&&(e=e.split("?").join("."));!h&&
!g&&!a.nameSearch?(f.searchStr=a.caseSensitive?e.split("\\").join(""):e.split("\\").join("").toLowerCase(),f.wildCard=!1):(f.searchStr=a.caseSensitive?e:e.toLowerCase(),c(f,a,d),f.wildCard=!0)}f.searchStrLength=f.searchStr.length;return{params:a,inFileQuery:f,displayedSearchTerm:l}};b.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"};b.copySearchParams=function(a,b){var c={},d;for(d in a)if(a[d]!==void 0&&a[d]!==null&&(b||d!=="replace"))c[d]=a[d];return c};b.generateSearchHref=function(a){var c=g.toUrl("search/search.html"),a=b.copySearchParams(a,!0),d=a.resource;a.resource=void 0;return typeof a.keyword!=="undefined"?(new h(c+"#{,resource,params*}")).expand({resource:d,params:a}):
(new h(c+"#{,resource}")).expand({resource:d})};b.generateFindURLBinding=function(a,b,c,d,e){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof d==="string"?d:void 0,atLine:typeof c==="number"?c:void 0};return e?a:","+(new h("{,params*}")).expand({params:a})};b.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)};b.replaceRegEx=function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)};b.replaceStringLiteral=function(a,c,d){c=f.parse("/"+c+"/gim");return b.replaceRegEx(a,c,d)};b.searchOnelineLiteral=function(a,b,c){var d;d=0;for(var e=!1,f=[];;)if(d=b.indexOf(a.searchStr,d),d<0)break;else{f.push({startIndex:d,length:a.searchStrLength});e=!0;if(c)break;d+=a.searchStrLength}return e?f:null};b.findRegExp=function(a,b,c,d){if(!b)return null;
c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var e=null;return(e=RegExp(b,c).exec(a.substring(d)))&&{startIndex:e.index+d,length:e[0].length}};b.searchOnelineRegEx=function(a,c,d){for(var e=0,f=!1,h=[];;)if(e=b.findRegExp(c,a.regExp.pattern,a.regExp.flags,e)){h.push(e);f=!0;if(d)break;e=e.startIndex+e.length}else break;return f?h:null};b.generateNewContents=function(a,c,d,e,f,h){if(e&&c){if(!a)d.contents=[];for(var g=0;g<c.length;g++){for(var j=c[g],q=!1,r=!1,w=[],z,t=0,s=
0;s<e.children.length;s++)if(e.children[s].lineNumber-1===g){t=s;for(q=0;q<e.children[s].matches.length;q++)e.children[s+q].checked!==!1&&w.push(q);r=w.length>0;z=e.children[s].matches;q=!0;break}if(q){if(r){w=b.replaceCheckedMatches(j,f,z,w,h);j=w.replacedStr;for(q=0;q<e.children[t].matches.length;q++)e.children[t+q].newMatches=w.newMatches}else for(q=0;q<e.children[t].matches.length;q++)e.children[t+q].newMatches=e.children[t+q].matches;a?d.contents[g]=j:d.contents.push(j)}else a||d.contents.push(j)}}};
b.generateMatchContext=function(a,b,c){var d=[],e=a*2+1,f;b.length<=e?(f=0,a=b.length-1):(f=c-a,f<0?(f=0,a=f+e-1):(a=c+a,a>b.length-1&&(a=b.length-1,f=a-e+1)));for(e=f;e<=a;e++)d.push({context:b[e],current:e===c});return d};b.splitFile=function(a){for(var b=0,c=0,d=0,e=0,f=[];;){b!==-1&&b<=d&&(b=a.indexOf("\r",d));c!==-1&&c<=d&&(c=a.indexOf("\n",d));if(c===-1&&b===-1){f.push(a.substring(e));break}var h=1;b!==-1&&c!==-1?b+1===c?(h=2,d=c+1):d=(b<c?b:c)+1:d=b!==-1?b+1:c+1;f.push(a.substring(e,d-h));
e=d}return f};b.searchWithinFile=function(a,c,d,e,f,h){d=b.splitFile(d);if(f)c.contents=d;if(c){c.children=[];for(var g=e=0;g<d.length;g++){var j=d[g];if(j&&j.length>0){var q=h?j:j.toLowerCase();if(q=a.wildCard?b.searchOnelineRegEx(a,q):b.searchOnelineLiteral(a,q)){var r,w=g+1;if(f)for(var z=0;z<q.length;z++)r=z+1,r={parent:c,checked:c.checked,type:"detail",matches:q,lineNumber:w,matchNumber:r,name:j,location:c.location+"-"+w+"-"+r},c.children.push(r);else r={parent:c,context:b.generateMatchContext(2,
d,g),checked:c.checked,type:"detail",matches:q,lineNumber:w,name:j,location:c.location+"-"+w},c.children.push(r);e+=q.length}}}c.totalMatches=e}};b.replaceCheckedMatches=function(a,b,c,d,e){for(var f=0,h="",g=[],j=0;j<c.length;j++){f!==c[j].startIndex&&(h+=a.substring(f,c[j].startIndex));if(c[j].length)e=c[j].length;for(var f=!1,r=0;r<d.length;r++)if(d[r]===j){f=!0;break}f?(g.push({startIndex:h.length,length:b.length}),h+=b):(g.push({startIndex:h.length,length:e}),h+=a.substring(c[j].startIndex,c[j].startIndex+
e));f=c[j].startIndex+e}f<a.length&&(h+=a.substring(f));return{replacedStr:h,newMatches:g}};b.fullPathNameByMeta=function(a){var b=a.length,c="";if(b>0)for(b-=1;b>-1;b--)c=c+(c===""?"":"/")+a[b].Name;return c};b.path2FolderName=function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};b._storeRecentSearch=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b);c&&window.setTimeout(function(){c.dispatchEvent({type:"recentSearchesChanged"})}.bind(this),
20)})};b.addRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var f,e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e){for(f in e)if(e[f].name===c)return;e.length>=20&&e.splice(19,e.length-20+1)}else e=[];e.splice(0,0,{name:c,regEx:d});b._storeRecentSearch(a,e)})};b.removeRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var f,
e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e)for(f in e)if(e[f].name===c){e.splice(f,1);b._storeRecentSearch(a,e,d);break}})};b.getSearches=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&c&&c(a)})};b.getMixedSearches=function(a,c,d,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var f=a.get("recentSearch");typeof f===
"string"&&(f=JSON.parse(f));c&&(a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(d){var c=b.parseQueryStr(a.query);f.some(function(a){return c.searchStrTitle===a.name})||f.push({name:c.searchStrTitle,label:a.name})}else f.push({name:null,label:a.name,value:a.query})}));f&&e&&e(f)})};b.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)})};b.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})};return b});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(j,g,f,e,d,h){function c(b,a,c,d){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=d&&d.searchOnName;this._buildSkeletonOnly=d&&d.buildSkeletonOnly;this._fetchChildrenCallBack=d&&d.fetchChildrenCallBack;this._searchParams=c;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:e.generateSearchHelper(c);this._location=d&&d.location;this._childrenLocation=d&&d.childrenLocation?d.childrenLocation:this._location;this._cancelled=!1;this.registry.getService("orion.page.message").setCancelFunction(function(){this._cancelFileContentsSearch()}.bind(this))}c.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;this._visitRecursively(this._childrenLocation).then(function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}})}.bind(this))}.bind(this))};c.prototype.searchName=function(b,a){if(b)this.searchHelper=e.generateSearchHelper(b,!0);if(a)this.onSearchNameComplete=a;var c=[];this._cancelled=!1;this._deferredArray=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var d=0;d<this.fileSkeleton.length;d++){var f=
this.fileSkeleton[d].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?e.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):e.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(c.push(this.fileSkeleton[d]),c.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:c.length,docs:c}})}};c.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=
[];var d=this;b();c.getContentTypes().then(function(b){d.contentTypesCache=b;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=!1;a();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};c.prototype._searchCompleted=function(){console.log("Search Completed.")};c.prototype._searchFiles=function(){var b=[];if(this.fileLocations.length>0)for(var a=0;a<this.fileLocations.length;a++)b.push(this._sniffSearch(this.fileLocations[a]));return h.all(b)};c.prototype._sort=function(b){b.sort(function(a,
b){var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0})};c.prototype._onFileType=function(b){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===e.ALL_FILE_TYPE?!0:b.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};c.prototype._visitRecursively=function(b){var a=[],c=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);var e=c.registry.getService("orion.page.progress");return(e?e.progress(c.fileClient.fetchChildren(b),
"Crawling search for children of "+b):c.fileClient.fetchChildren(b)).then(function(b){for(var e=0;e<b.length;e++)if(b[e].Directory!==void 0&&b[e].Directory===!1)if(c._searchOnName)a.push(c._buildSingleSkeleton(b[e]));else if(c._buildSkeletonOnly)a.push(c._buildSingleSkeleton(b[e]));else{if(!c._cancelled){var f=d.getFilenameContentType(b[e].Name,c.contentTypesCache);if(f&&(f["extends"]==="text/plain"||f.id==="text/plain")&&c._onFileType(f))f=c._sniffSearch(b[e]),a.push(f),c._deferredArray.push(f)}}else if(b[e].Location)if(c._cancelled)break;
else f=c._visitRecursively(b[e].ChildrenLocation),a.push(f),c._deferredArray.push(f);return h.all(a)})};c.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?e.searchOnelineRegEx(this.searchHelper.inFileQuery,b,!0):e.searchOnelineLiteral(this.searchHelper.inFileQuery,b,!0)};c.prototype._reportSingleHit=function(b){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)};c.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(b){b.cancel()});this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}});console.log("Crawling search cancelled. Deferred array length : "+this._deferredArray.length);this.registry.getService("orion.page.message").setProgressResult({Message:j["Search cancelled by user"],
Severity:"Warning"})};c.prototype._sniffSearch=function(b){this._totalCounter++;var a=this;if(!this._cancelled)if(this.searchHelper.params.keyword==="")this._reportSingleHit(b),this.registry.getService("orion.page.message").setProgressResult({Message:f.formatMessage(j["${0} files found out of ${1}"],this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(a.fileClient.read(b.Location),"Reading file "+b.Location).then(function(c){a._hitOnceWithinFile(c)&&
a._reportSingleHit(b);a.registry.getService("orion.page.message").setProgressResult({Message:f.formatMessage(j["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)},j.Cancel)},function(a){a&&a.message&&a.message.toLowerCase()!=="cancel"&&console.error("Error loading file content: "+a.message)})};c.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};c.prototype.constructor=c;return{SearchCrawler:c}});
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(j,g,f,e,d,h,c){function b(a){this._init(a)}b.prototype=new c.Dialog;b.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="'+e.toUrl("../../../images/progress_running.gif")+
'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';b.prototype._init=function(a){this.title=a.title||j["Find File Named"];this.modal=!0;this.messages=j;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=new f.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(j["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||typeof this._searchRenderer.makeRenderFunction!==
"function")throw Error(j["Missing required argument: searchRenderer"]);this._initialize()};b.prototype._bindToDom=function(a){var b=this;b.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",j.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===d.KEY.ENTER){var c=d.$("a",b.$results);
c&&(d.stop(a),window.open(c.href),b.hide())}},!1);a.addEventListener("keydown",function(a){var c,e,f;if(a.keyCode===d.KEY.DOWN||a.keyCode===d.KEY.UP)c=d.$$array("a",b.$results),e=document.activeElement,f=c.indexOf(e),a.keyCode===d.KEY.DOWN?f>=0?(e.classList.remove("treeIterationCursor"),c=f<c.length-1?c[f+1]:c[0],c.focus(),c.classList.add("treeIterationCursor")):c.length>0&&(c=-1<c.length-1?c[0]:c[0],c.focus(),c.classList.add("treeIterationCursor")):f>=0?(e.classList.remove("treeIterationCursor"),
e=b.$fileName,c=f>0?c[f-1]:e,c.focus(),f>0&&c.classList.add("treeIterationCursor")):c.length>0&&(c[c.length-1].focus(),c[c.length-1].classList.add("treeIterationCursor")),d.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 g.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(j["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()};b.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var a=(new Date).getTime();a-this._time>this._searchDelay?(this._time=a,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};b.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var b=this._searcher.createSearchParams(a,this._nameSearch,this._searchOnRoot),c=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));
this.currentSearch=c;var e=document.createElement("div");e.appendChild(document.createTextNode(this._nameSearch?j["Searching..."]:h.formatMessage(j["Searching for occurrences of"],a)));d.empty(this.$results);this.$results.appendChild(e);this._searcher.search(b,!1,function(){c===this.currentSearch&&c.apply(null,arguments)}.bind(this))}};b.prototype.decorateResult=function(a){for(var b=this,a=d.$$array("a",a),c=0;c<a.length;c++){var e=a[c];e.addEventListener("mouseup",function(a){a.button===0&&!a.ctrlKey&&
!a.metaKey&&b.hide()},!1);e.addEventListener("keyup",function(a){a.keyCode===d.KEY.ENTER&&b.hide()},!1)}};b.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};b.prototype._afterHiding=function(){this._onHide&&this._onHide()};b.prototype.constructor=b;return{OpenResourceDialog:b}});define("text!orion/banner/banner.html",[],function(){return'<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\t<\!-- Top row:  Logo + discovery links + search + user --\>\n\t<div id="staticBanner" class="layoutBlock topRowBanner"> <\!-- primaryNav --\>\n\t\t<a id="home" class="layoutLeft "></a>\n\t\t<nav id="primaryNav" class="bannerLeftArea" role="navigation">\n\t\t\t<button class="centralNavigation commandSprite core-sprite-hamburger" type="button"id="centralNavigation"></button>\n\t\t</nav>\n\t\t<div class="clear navigationBreadcrumb bannerMiddleArea" >\n\t\t\t<div id="location" class="currentLocation"></div>\n\t\t</div>\n\t\t<div class="bannerRightArea">\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\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\t\t\t<div id="userMenu" class="spacingRight layoutRight" style="color:#ccc;">\n\t\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger">\n\t\t\t\t\t<span class="dropdownArrowEmpty"></span>\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\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'<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<\!-- Requires some js code to bind the NLS variables  --\>\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="http://wiki.eclipse.org/Orion/FAQ" target="_blank">${FAQ}</a></li --\>\n\t\t\t<li><a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=4.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>'});
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<div class="layoutRight commandList pageActions" id="settingsActions"></div>\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(j,g){function f(e,d,f){if(e=g.node(e))this._parent=e;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;e=document.createElement("div");e.classList.add("dropDownContainer");e.id=this.navDropDownId;e.style.display="none";this._parent.appendChild(e);this._dropdownMenu=e;if(d=g.node(d))this._triggerNode=
d;else throw"Trigger node of dropdown menu not found";if(this._triggerNode.style.visibility==="hidden")this._triggerNode.style.visibility="visible";if(!f.noClick)this._triggerNode.onclick=this.click.bind(this);this._dropdownMenu.addEventListener("keydown",function(c){c.keyCode===g.KEY.ESCAPE&&this.clearPanel()}.bind(this))}j.mixin(f.prototype,{click:function(){this._dropdownMenu.style.display==="none"?this.updateContent(this.getContentNode(),function(){this._dropdownMenu.style.display="";this._positionDropdown();
this.selectionClass&&this._triggerNode.classList.add(this.selectionClass);this.handle=g.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",this.selectionClass&&this._triggerNode.classList.remove(this.selectionClass),this.options.onHide))this.options.onHide()},addContent:function(e){this._dropdownMenu.innerHTML=
e},getContentNode:function(){return this._dropdownMenu},updateContent:function(e,d){d()},_positionDropdown:function(){this._dropdownMenu.style.left="";var e=g.bounds(this._dropdownMenu),d=g.bounds(this._boundingNode(this._parent));if(e.left+e.width>d.left+d.width)this._dropdownMenu.style.right=0},_boundingNode:function(e){return e.style.right!==""||e.style.position==="absolute"||!e.parentNode||!e.parentNode.style?e:this._boundingNode(e.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)g.empty(this._parent),this._parent=this.select=null}});return f});
define("orion/widgets/input/GroupedContent",["i18n!orion/widgets/nls/messages","orion/objects","orion/webui/littlelib"],function(j,g){function f(){}g.mixin(f.prototype,{templateString:'<div style="float:left;"><section><span style="color:#333;padding:15px;">'+j["Main Pages"]+'</span><nav><ul id="navigationlinks"></ul></nav></section></div><div class="groupedContentDivider"></div><div style="float:left;"><section><span style="color:#333;padding:15px;">'+j["Related Links"]+'</span><nav><ul id="relatedLinks"></ul></nav></section></div>',
getContentPane:function(){return this.templateString}});return f});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","Delete the selected files or folders":"Delete the selected files or folders","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":"Export as 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":"New File","Create a new file":"Create a new file",
"Name:":"Name:","New Folder":"New 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...":"Import local file...","Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP from...","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 to...","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",
"Copy Items":"Copy Items","Copy the selected items to the copy/paste buffer":"Copy the selected items to the copy/paste buffer","Paste Items":"Paste Items","Paste items from the copy/paste buffer":"Paste items from the copy/paste buffer","Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With","Loading ":"Loading ",New:"New",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...":"Import from 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} 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(j,g){var f={root:g};Object.keys(j).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=j[e])});return f});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(j,g,f){function e(c,b,a){if(!c[b])throw b+j[" is not supported in this file system"];return c[b].apply(c,a)}function d(c,b,a,i){if(!c.readBlob)throw j["source file service does not support binary read"];if(!a.writeBlob)throw j["target file service does not support binary write"];if(b[b.length-1]!=="/")return e(c,"readBlob",[b]).then(function(b){return e(a,"writeBlob",[i,b])});var f=i.substring(0,
i.length-1),l=decodeURIComponent(f.substring(f.lastIndexOf("/")+1)),f=f.substring(0,f.lastIndexOf("/")+1);return e(a,"createFolder",[f,l]).then(function(){},function(){}).then(function(){return e(c,"fetchChildren",[b]).then(function(b){for(var e=[],f=0;f<b.length;++f){var k=b[f].Location,l=k;b[f].Directory&&(l=k.substring(0,k.length-1));l=decodeURIComponent(l.substring(l.lastIndexOf("/")+1));l=i+encodeURIComponent(l);b[f].Directory&&(l+="/");e[f]=d(c,k,a,l)}return g.all(e)})})}function h(c,b){function a(a){var b=
new g;b.reject(j["No Matching FileService for location:"]+a);return b}var d=c.getServiceReferences("orion.core.file"),e=d;if(b)for(var e=[],l=0;l<d.length;++l)b(d[l])&&e.push(d[l]);for(var h=[],o=[],p=[],n=[],q={fetchChildren:function(){var a=new g;a.resolve(n);return a},createWorkspace:function(){var a=new g;a.reject(j["no file service"]);return a},loadWorkspaces:function(){var a=new g;a.reject(j["no file service"]);return a},loadWorkspace:function(){var a=new g;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:j["File Servers"],Location:"/",Children:n,ChildrenLocation:"/"})},100);return a},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},d=0;d<e.length;++d)n[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:e[d].getProperty("top"),ChildrenLocation:e[d].getProperty("top"),Name:e[d].getProperty("Name")},l=e[d].getProperty("pattern")||".*",l[0]!=="^"&&(l="^"+l),h[d]=RegExp(l),o[d]=c.getService(e[d]),p[d]=e[d].getProperty("Name"),
e[d].getProperty("NameKey")&&e[d].getProperty("nls")&&f.getMessageBundle(e[d].getProperty("nls")).then(function(a,b){n[a].Name=b[e[a].getProperty("NameKey")];p[a]=b[e[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return o[0]?0:-1;for(var b=0;b<h.length;++b)if(h[b].test(a))return b;throw j["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?q:o[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?q.Name:p[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?q.Location:n[a].Location}}h.prototype={getService:function(c){return this._getService(c)},fileServiceName:function(c){return this._getServiceName(c)},fileServiceRootURL:function(c){return this._getServiceRootURL(c)},fetchChildren:function(c){return e(this._getService(c),"fetchChildren",arguments)},createWorkspace:function(c){return e(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return e(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(c){return e(this._getService(c),"loadWorkspace",arguments)},createProject:function(c,b,a,d){return e(this._getService(c),"createProject",arguments)},createFolder:function(c,b){return e(this._getService(c),"createFolder",arguments)},createFile:function(c,b){return e(this._getService(c),"createFile",arguments)},deleteFile:function(c){return e(this._getService(c),"deleteFile",arguments)},
moveFile:function(c,b,a){var i=this._getService(c),f=this._getService(b);if(i===f)return e(i,"moveFile",arguments);var l=c[c.length-1]==="/",h=b;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var g=c;l&&(g=g.substring(0,g.length-1));h+=g.substring(g.lastIndexOf("/")+1)}l&&h[h.length-1]!=="/"&&(h+="/");return d(i,c,f,h).then(function(){return e(i,"deleteFile",[c])})},copyFile:function(c,b,a){var i=this._getService(c),f=this._getService(b);if(i===f)return e(i,"copyFile",arguments);
var l=c[c.length-1]==="/",h=b;h[h.length-1]!=="/"&&(h+="/");if(a)h+=encodeURIComponent(a);else{var g=c;l&&(g=g.substring(0,g.length-1));h+=g.substring(g.lastIndexOf("/")+1)}l&&h[h.length-1]!=="/"&&(h+="/");return d(i,c,f,h)},read:function(c,b){return e(this._getService(c),"read",arguments)},write:function(c,b,a){return e(this._getService(c),"write",arguments)},remoteImport:function(c,b){return e(this._getService(c),"remoteImport",arguments)},remoteExport:function(c,b){return e(this._getService(c),
"remoteExport",arguments)},search:function(c){return e(this._getService(c.resource),"search",arguments)}};h.prototype.constructor=h;return{FileClient:h}});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/keyBinding,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/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/widgets/input/GroupedContent,orion/util,orion/customGlobalCommands,orion/fileClient".split(","),function(j,
g,f,e,d,h,c,b,a,i,k,l,m,o,p,n,q,r,w,z,t,s,y,x,K,I,F,u,B,v,A,D){function C(a,b){if(a.getLabel)return a.getLabel();else{var c=new t;c.resolve(b.properties.name);return c}}function E(a){l.node("progressPane").setAttribute("aria-label",j["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function R(a,b){var c=a.getServiceReferences("orion.core.auth");V=[];for(var d=L.createMenuGenerator.apply(this,arguments),e=0;e<c.length;e++){var i=
c[e],f=a.getService(i);C(f,i).then(function(a){f.getKey().then(function(b){V.push(b);f.getUser().then(function(c){d.addUserItem(b,f,a,c)},function(c,e){d.addUserItem(b,f,a,e)});window.addEventListener("storage",function(){T[b]!==localStorage.getItem(b)&&(T[b]=localStorage.getItem(b),f.getUser().then(function(c){d.addUserItem(b,f,a,c)},function(){d.addUserItem(b,f,a)}))},!1)})})}}function P(a){return a}function H(a,c,d,e,i){function f(a){if(a)if(!a.visibleWhen||a.visibleWhen(c)){var b=new h.CommandInvocation(c,
c,null,a,e);return(new t).resolve([a,b])}else if(typeof i==="function")return g||(g=i()),t.when(g,function(b){if(b&&c===U&&(!a.visibleWhen||a.visibleWhen(b)))return b=new h.CommandInvocation(b,b,null,a,e),[a,b]});return(new t).resolve()}var k=arguments,l,g,j=a&&a.getServiceReferences("orion.page.link.related");j&&j.length!==0&&t.when(function(){if(l)return l;var b=a.getService("orion.core.contentTypeRegistry");b||(b=new n.ContentTypeRegistry(a),b=a.getService("orion.core.contentTypeRegistry"));return b.getContentTypes().then(function(a){return l=
a})}(),function(){if(L.beforeGenerateRelatedLinks.apply(this,k)){for(var c=[],i=0;i<j.length;i++){var g={},m,o=j[i].getPropertyKeys();for(m=0;m<o.length;m++)g[o[m]]=j[i].getProperty(o[m]);if(g.id&&(m=m=null,d.indexOf(g.id)<0))if((g.nls&&g.nameKey||g.name)&&g.uriTemplate)m=b._createCommandOptions(g,j[i],a,l,!0),c.push(m);else if(m=e.findCommand(g.id))c.push((new t).resolve(m));else{var n=a.getServiceReferences("orion.navigate.command");for(m=0;m<n.length;m++)if(n[m].getProperty("id")===g.id){for(var g=
{},o=n[m].getPropertyKeys(),p=0;p<o.length;p++)g[o[p]]=n[m].getProperty(o[p]);m=b._createCommandOptions(g,n[m],a,l,!0);c.push(m);break}}}t.all(c,P).then(function(a){a=a.map(function(a){return a instanceof h.Command?a:new h.Command(a)}).sort(function(a,b){return a.name.localeCompare(b.name)});return t.all(a.map(f),P).then(function(a){a.forEach(function(a){a&&L.addRelatedLinkCommand(a[0],a[1])});L.afterGenerateRelatedLinks.apply(this,k)})})}})}function N(a){var b=l.node("globalActions");b&&(a.destroy(b),
a.renderCommands(b.id,b,{},{},"tool"))}function G(a){var b=window.getComputedStyle(a,null);return b===null?a:b.getPropertyValue("position")==="absolute"||!a.parentNode||a===document.body?a:G(a.parentNode)}function Q(a){var b={},c=null;typeof a==="string"&&(a=l.node(a));a||(a=l.node("pageActions"));for(var d=a;d&&d.classList;){if(d.classList.contains("toolComposite")){c=d;break}d=d.parentNode}if(a.classList.contains("commandMarker"))b.commandNode=a;if(c&&(b.slideContainer=l.$(".slideParameters",c),
b.parameterArea=l.$(".parameters",c),b.dismissArea=l.$(".parametersDismiss",c),b.notifications=l.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=l.$(".toolbarTarget",c.parentNode),b.toolbarTarget)))a=l.bounds(b.toolbarTarget),d=l.bounds(G(b.toolbarTarget.parentNode)),b.toolbarTargetY=a.top-d.top,b.toolbar=c;return b}function M(a){if(a.toolbarTarget&&a.toolbarTargetY){var b=0,c;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&(c=l.bounds(a.notifications),b+=c.height);
a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(c=l.bounds(a.slideContainer),b+=c.height);b>0&&(b+=8);b?(a.toolbarTarget.style.top=a.toolbarTargetY+b+"px",a.toolbar.style.paddingBottom=b+"px"):a.toolbarTarget.style.top=a.toolbar.style.paddingBottom=""}}var d=function(a){var b=document.createElement("a");b.href=a;return b.href}(g.toUrl("auth/NotifyAuthentication.html")),T={},L={createMenuGenerator:A.createMenuGenerator||function(a,b){if(l.node("userMenu")){var c=l.node("userDropdown"),
d=new o.Dropdown({dropdown:c}),c=new s.UserMenu({dropdownNode:c,dropdown:d,serviceRegistry:a}),d=l.node("userTrigger");new p.Tooltip({node:d,text:j.Options,position:["below","left"]});var d=document.getElementById("userTrigger"),e=d.className;e+=" imageSprite core-sprite-silhouette";d.className=e;c.setKeyAssist(b);return c}},beforeGenerateRelatedLinks:A.beforeGenerateRelatedLinks||function(){var a=l.node("relatedLinks");l.empty(a);return!0},addRelatedLinkCommand:A.addRelatedLinkCommand||function(a,
b){var c=l.node("relatedLinks");h.createCommandMenuItem(c,a,b).classList.remove("dropdownMenuItem")},afterGenerateRelatedLinks:A.afterGenerateRelatedLinks||function(){},afterSetPageTarget:A.afterSetPageTarget||function(){},generateNavigationMenu:A.generateNavigationMenu||function(){var a=document.getElementById("centralNavigation");new p.Tooltip({node:a,text:"Navigation Menu",position:["right"]});var a=new u("primaryNav","centralNavigation"),b=new B;a.addContent(b.getContentPane())},afterGenerateBanner:A.afterGenerateBanner||
function(){}},V=[],U,S=[],J,O=null;return{generateBanner:function(b,d,i,k,o,n,p,r){function q(){this.create();this._filterString=""}function t(a){a.registerService("orion.cm.managedservice",{updated:function(a){for(var a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=l.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}(new w.ThemePreferences(k,new z.ThemeData)).apply();var s=l.node(b);if(!s)throw j["could not find banner parent, id was "]+
b;var u=document.createRange();u.selectNode(s);u=u.createContextualFragment(K);l.processTextNodes(u,j);s.firstChild?s.insertBefore(u,s.firstChild):s.appendChild(u);s=l.node("home");s.href=g.toUrl("edit/edit.html");s.setAttribute("aria-label",j["Orion Home"]);l.node("progressPane").src=g.toUrl("images/none.png");if(s=l.node("pageToolbar"))s.classList.add("toolbarLayout"),s.innerHTML=F+f.slideoutHTMLFragment("mainToolbar");(s=l.node("closeNotifications"))&&s.setAttribute("aria-label",j["Close notification"]);
if(v.isFirefox<=17&&(s=l.node("staticBanner")))s.style.width="100%",s.style.MozBoxSizing="border-box";if(s=l.node("footer"))s.innerHTML=I,l.processTextNodes(s,j);i.setParameterCollector(new c.CommandParameterCollector(Q,M));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&(a=d.getService("orion.page.message"))&&a.setProgressMessage("")},!1);L.generateNavigationMenu.apply(this,arguments);var B=l.node("navigationlinks");B&&y.createPageLinks(d,"orion.page.link").then(function(a){a.forEach(function(a){var b=
document.createElement("li");b.appendChild(a);B.appendChild(b)})});if(s=l.$(".split")){var u=l.$(".sidePanelLayout"),A=l.$(".mainPanelLayout");if(u&&A)O={side:u,main:A},O.splitter=new m.Splitter({node:s,sidePanel:u,mainPanel:A,toggle:!0,closeByDefault:r}),s=new h.Command({name:j["Toggle side panel"],tooltip:j["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){O.splitter.toggleSidePanel()}}),i.addCommand(s),i.registerCommandContribution("pageActions","orion.toggleSidePane",
1,null,!0,new e.KeyBinding("o",!0)),p&&O.splitter.addResizeListener(function(a){p&&a===A&&p.resize()})}var C=!1,D=function(a,b,c){if(!C){var b=b.getService("orion.page.progress"),d=new x.OpenResourceDialog({searcher:a,progress:b,searchRenderer:a.defaultRenderer,onHide:function(){C=!1;c&&c.focus()}});window.setTimeout(function(){C=!0;d.show()},0)}},s=new h.Command({name:j["Find File Named..."],tooltip:j["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){D(o,
d,p)}});i.addCommand(s);i.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new e.KeyBinding("f",!0,!0));s=new h.Command({name:j["Toggle banner and footer"],tooltip:j["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=l.node("banner"),b=l.node("footer"),c=l.$(".content-fixedHeight");a.style.visibility==="hidden"?(a.style.visibility="visible",b.style.visibility="visible",c.classList.remove("content-fixedHeight-maximized")):(a.style.visibility=
"hidden",b.style.visibility="hidden",c.classList.add("content-fixedHeight-maximized"));p&&p.resize();return!0}});i.addCommand(s);i.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new e.KeyBinding("m",!0,!0));s=new h.Command({name:j["System Configuration Details"],tooltip:j["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return g.toUrl("help/about.html")}});i.addCommand(s);i.registerCommandContribution("globalActions","orion.configDetailsPage",
100,null,!0,new e.KeyBinding(112,!0,!0));s=new h.Command({name:j["Background Operations"],tooltip:j["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return g.toUrl("operations/list.html")}});i.addCommand(s);i.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new e.KeyBinding("o",!0,!0));q.prototype={create:function(){var a=this._keyAssistDiv=document.createElement("div");a.id="keyAssist";a.style.display="none";a.classList.add("keyAssistFloat");
a.setAttribute("role","menu");var b=this._keyAssistInput=document.createElement("input");b.classList.add("keyAssistInput");b.type="text";b.placeholder=j["Filter bindings"];a.appendChild(b);var c=this._keyAssistContents=document.createElement("div");c.classList.add("keyAssistContents");if(v.isIOS||v.isAndroid)c.style.overflowY="auto";a.appendChild(c);var d=this._keyAssistTable=document.createElement("table");d.tabIndex=0;d.classList.add("keyAssistList");c.appendChild(d);document.body.appendChild(a);
b.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));d.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));b.addEventListener("input",function(){this.filterChanged()}.bind(this));c.addEventListener(v.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&this.hide()}.bind(this));l.addAutoDismiss([a],function(){this.hide()}.bind(this))},createContents:function(){l.empty(this._keyAssistTable);
this._selectedIndex=-1;this._selectedRow=null;this._idCount=this._keyAssistContents.scrollTop=0;if(p&&p.getTextView&&p.getTextView()){var b=p.getTextView(),c=b.getActions(!0).filter(function(a){return(a=b.getActionDescription(a))&&a.name});c.sort(function(a,c){return b.getActionDescription(a).name.localeCompare(b.getActionDescription(c).name)});this.createHeader(j.Editor);for(var d=function(a){return function(){b.focus();return b.invokeAction(a)}},e={},f,k=0;k<c.length;k++)for(var h=c[k],g=b.getActionDescription(h),
m=b.getKeyBindings(h),o=0;o<m.length;o++){f=m[o];var n=a.getUserKeyString(f);f.scopeName?(e[f.scopeName]||(e[f.scopeName]=[]),e[f.scopeName].push({bindingString:n,name:g.name,execute:d(h)})):this.createItem(n,g.name,d(h))}for(var r in e)if(e[r].length){this.createHeader(r);for(c=0;c<e[r].length;c++)f=e[r][c],this.createItem(f.bindingString,f.name,f.execute)}}this.createHeader(j.Global);i.showKeyBindings(this)},createItem:function(a,b,c){if(this._filterString){var d=this._filterString.toLowerCase(),
e;d!==this._filterString?(d=this._filterString,e=function(a){return a}):e=function(a){return a.toLowerCase()};if(e(b).indexOf(d)===-1&&e(a).indexOf(d)===-1&&e(this._lastHeader).indexOf(d)===-1)return}var i=this._keyAssistTable.insertRow(-1);i.id="keyAssist-keyBinding-"+this._idCount++;i.setAttribute("role","menuitem");i._execute=c;i.classList.add("keyAssistItem");i.addEventListener("click",function(a){this._selectedRow=i;this.execute();a.preventDefault()}.bind(this));c=i.insertCell(-1);c.classList.add("keyAssistName");
c.appendChild(document.createTextNode(b));c=i.insertCell(-1);c.classList.add("keyAssistAccel");c.appendChild(document.createTextNode(a))},createHeader:function(a){this._lastHeader=a;var b=this._keyAssistTable.insertRow(-1);b.classList.add("keyAssistSection");var b=b.insertCell(-1),c=document.createElement("h2");c.appendChild(document.createTextNode(a));b.appendChild(c)},execute:function(){window.setTimeout(function(){this.hide();var a=this._selectedRow;this._selectedRow=null;a&&a._execute&&a._execute()}.bind(this),
0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var a=this._keyAssistInput.value;if(this._filterString!==a)this._filterString=a,this.createContents()}.bind(this),100)},hide:function(){if(this.isVisible()){var a=document.activeElement,b=this._keyAssistDiv,a=b===a||(b.compareDocumentPosition(a)&16)!==0;b.style.display="none";a&&document.compareDocumentPosition(this._previousActiveElement)!==1&&this._previousActiveElement.focus();
this._previousActiveElement=null}},isVisible:function(){return this._keyAssistDiv.style.display==="block"},select:function(a){var b=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(b.length===0)this._selectedIndex=-1;else{var c=this._selectedIndex;c+=a?1:-1;c%=b.length;c<0&&(c=b.length-1);if(this._selectedIndex!==-1)a=b[this._selectedIndex],a.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=c;if(this._selectedIndex!==-1){this._selectedRow=a=b[this._selectedIndex];
a.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",a.id);this._keyAssistTable.focus();var b=a.getBoundingClientRect(),d=this._keyAssistContents,e=d.getBoundingClientRect();a.offsetTop<d.scrollTop?c===0?d.scrollTop=0:a.scrollIntoView(!0):b.bottom>e.bottom&&a.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(a){if(a.keyCode===40)this.select(!0);else if(a.keyCode===38)this.select(!1);else if(a.keyCode===13)this.execute();else return;a.preventDefault()},_scrollWheel:function(a){var b=0,b=v.isIE||v.isOpera?-a.wheelDelta:v.isFirefox?a.detail*40:-a.wheelDeltaY,c=this._keyAssistContents,d=c.scrollTop;c.scrollTop+=b;if(d!==c.scrollTop)return a.preventDefault&&
a.preventDefault(),!1}};var H=new q,G=new h.Command({name:j["Show Keys"],tooltip:j["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){H.isVisible()?H.hide():H.show();return!0}});i.addCommand(G);i.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new e.KeyBinding(191,!1,!0));s=function(){p.getTextView().setKeyBinding(new e.KeyBinding(191,!1,!0,!v.isMac,v.isMac),G.id);p.getTextView().setAction(G.id,G.callback,G)};p&&p.getTextView&&
(p.getTextView()?s():p.addEventListener("TextViewInstalled",s));N(i);R(d,G.callback);E(d);window.addEventListener("hashchange",function(){i.processURL(window.location.href)},!1);window.setTimeout(function(){t(d)},0);L.afterGenerateBanner.apply(this,arguments)},getToolbarElements:Q,getMainSplitter:function(){return O},layoutToolbarElements:M,setPageTarget:function(a){var b,c,d=a.breadcrumbRootName,e=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&
!a.breadcrumbTarget&&(c=d?d+" ":"",c+=a.fileService.fileServiceName(a.target.Location),d=null),b=a.name||a.target.Name,U=a.target,H(e,a.target,S,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(d=d||a.task||a.name),b=a.name,H(e,{NoTarget:""},S,a.commandService,a.makeAlternate));(J=a.title)||(J=b?b+" - "+a.task:a.task);window.document.title=J;L.afterSetPageTarget.apply(this,arguments);if(b=l.node("location")){l.empty(b);var i=e&&new D.FileClient(e),e=a.breadcrumbTarget||a.target,i=i&&e&&e.Location?
i.fileServiceRootURL(e.Location):null;new k.BreadCrumbs({container:b,resource:e,rootSegmentName:d,workspaceRootSegmentName:c,workspaceRootURL:i,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){if(J)J.charAt(0)==="*"&&!a&&(J=J.substring(1)),a&&J.charAt(0)!=="*"&&(J="*"+J),window.document.title=J;var b=l.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){S=a},notifyAuthenticationSite:d}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(j){return{detectValidURL:function(g){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,e=f.exec(g),d=[],h=0;e;){if(e.length===3&&e[2].length>0){var c=new URL(e[2]);c.protocol!==":"&&j.validateURLScheme(c.href)&&(e.index>h&&d.push({segmentStr:g.substring(h,e.index)}),d.push({segmentStr:e[1].length>0?e[1]:e[2],urlStr:e[2]}),h=e.index+e[0].length)}e=f.exec(g)}if(h===0)return null;h<g.length-1&&d.push({segmentStr:g.substring(h)});return d},processURLSegments:function(g,
f){f.forEach(function(e){if(e.urlStr){var d=document.createElement("a");d.href=e.urlStr;d.appendChild(document.createTextNode(e.segmentStr))}else d=document.createElement("span"),d.textContent=e.segmentStr;g.appendChild(d)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(j,g,f,e){function d(c,b,a,d,e){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.message",this);this._operationsClient=b;this.notificationContainerDomId=e;this.domId=a;this.progressDomId=d||a;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var h;d.prototype={_init:function(){var c=g.node("closeNotifications");if(c&&
!this._hookedClose){c.style.cursor="pointer";this._hookedClose=!0;var b=g.node(this.notificationContainerDomId);g.addAutoDismiss([b],function(){this._clickToDisMiss&&this.close()}.bind(this));c.addEventListener("click",function(){this.close()}.bind(this));b.addEventListener("click",function(a){a&&a.target&&a.target.nodeName.toLowerCase()==="a"&&(a=g.$$("a",b))&&a.length&&a.length===1&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);this.setProgressMessage("");var c=g.node("closeNotifications");
if(this._cancelMsg&&this._cancelFunc&&c)c.innerHTML="",c.classList.remove("cancelButton"),c.classList.add("dismissButton"),c.classList.add("core-sprite-close"),c.classList.add("imageSprite"),this._cancelFunc(),this._cancelMsg=null},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=f.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(c,b,a){this._init();this.currentMessage=c;var d=g.node(this.domId);if(typeof a==="boolean"){var e=
d.getAttribute("aria-live");d.setAttribute("aria-live",a?"polite":"off");window.setTimeout(function(){c===this.currentMessage&&(g.empty(d),d.appendChild(document.createTextNode(c)),window.setTimeout(function(){d.setAttribute("aria-live",e)},100))}.bind(this),100)}else g.empty(d),d.appendChild(document.createTextNode(c));typeof b==="number"&&window.setTimeout(function(){c===this.currentMessage&&(g.empty(d),d.appendChild(document.createTextNode("")))}.bind(this),b)},setErrorMessage:function(c){this._clickToDisMiss=
!0;this.currentMessage=c;this._init();var b=c.responseText||c.message||c;if(typeof b==="string")try{b=JSON.parse(b)}catch(a){}var c=b.Message||b,d="red";if(b.Severity)switch(b.Severity){case "Warning":d="#FFCC00";break;case "Error":d="red";break;case "Info":case "Ok":d="green"}b=document.createElement("span");b.style.color=d;b.appendChild(document.createTextNode(c));c=g.node(this.domId);g.empty(c);c.appendChild(b)},setProgressMessage:function(c){this._clickToDisMiss=!1;this._init();this.currentMessage=
c;var b=document.createElement("span");b.classList.add("imageSprite");b.classList.add("progressIcon");b.classList.add("core-sprite-progress");var a=g.node(this.progressDomId);g.empty(a);a.appendChild(b);a.appendChild(document.createTextNode(c));b=g.node(this.notificationContainerDomId);b.classList.remove("notificationHide");if(c&&c.length>0)b.classList.add("progressNormal"),b.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();
else b.classList.remove("notificationShow"),b.classList.add("notificationHide")},setCancelFunction:function(c){this._cancelFunc=c},setProgressResult:function(c,b){this._clickToDisMiss=!1;this._cancelMsg=b;this.currentMessage=c;var a=c.responseText||c;if(typeof a==="string")try{a=JSON.parse(a)}catch(d){}this._init();var f=a.Message||a.toString(),l=j.UnknownError,h="core-sprite-information",o="progressNormal",p=document.createElement("span");p.classList.add("imageSprite");p.classList.add("progressIcon");
var n=[];if(a.Severity)switch(a.Severity){case "Warning":l=j.UnknownWarning;h="core-sprite-warning";o="progressWarning";n.push("progressInfo");n.push("progressError");n.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":h="core-sprite-error";o="progressError";n.push("progressWarning");n.push("progressInfo");n.push("progressNormal");this._clickToDisMiss=!0;break;default:o="progressNormal",n.push("progressWarning"),n.push("progressError"),n.push("progressNormal")}n.push("notificationHide");
p.classList.add(h);var q=g.node(this.progressDomId),h=g.node(this.notificationContainerDomId);g.empty(q);q.appendChild(p);f===Object.prototype.toString()&&(f=l);if(a.HTML)a=document.createElement("span"),a.innerHTML=f,q.appendChild(a);else{if(l=e.detectValidURL(f))f=document.createDocumentFragment(),e.processURLSegments(f,l),Array.prototype.forEach.call(g.$$("a",f),function(a){a.target="_blank"});else{if(a.Severity!=="Warning"&&a.Severity!=="Error"&&!b)this._timer&&window.clearTimeout(this._timer),
this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),5E3);f=document.createTextNode(f)}q.appendChild(f)}if(o&&this.progressDomId!==this.domId){h.classList.add(o);for(o=0;o<n.length;o++)h.classList.remove(n[o])}h.classList.add("notificationShow");if((n=g.node("closeNotifications"))&&this._cancelMsg)n.classList.add("cancelButton"),n.classList.remove("dismissButton"),n.classList.remove("core-sprite-close"),n.classList.remove("imageSprite"),n.innerHTML=this._cancelMsg},
showWhile:function(c,b){var a=this;if(b){a.setProgressMessage(b);var d=function(){b===a.currentMessage&&a.setProgressMessage("")};c.then(d,d)}return c},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(c,b){return new h(this,++this._lastProgressId,c,b)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var c="",b=!0,a;for(a in this._progressMonitors)this._progressMonitors[a].status&&(b||(c+=", "),c+=this._progressMonitors[a].status,b=!1);this.setProgressMessage(c)}else this.setProgressMessage("")},
_beginProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._renderOngoingMonitors()},_doneProgressMonitor:function(c){delete this._progressMonitors[c.progressId];this._progressMonitors.length--;c.status?this.setProgressResult(c.status):this._renderOngoingMonitors()}};d.prototype.constructor=d;h=function(c,b,a,d){this.statusService=c;this.progressId=
b;if(a){this.deferred=a;this.begin(d);var e=this;a.then(function(){e.done.bind(e)()},function(){e.done.bind(e)()})}};h.prototype.begin=function(c){this.status=c;this.statusService._beginProgressMonitor(this)};h.prototype.done=function(c){this.status=c;this.statusService._doneProgressMonitor(this)};h.prototype.worked=function(c){this.status=c;this.statusService._workedProgressMonitor(this)};h.prototype.constructor=h;return{StatusReportingService:d,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(j,g){var f={root:g};Object.keys(j).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=j[e])});return f});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(j,g,f,e){function d(){}d.prototype={_initialize:function(d,c,b,a,i){this._tooltip=new e.Tooltip({node:d,hideDelay:i||0,afterShowing:this._afterShowingFunction(c).bind(this),afterHiding:b,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";d=document.createRange();d.selectNode(this.$parent);d=d.createContextualFragment(this.TEMPLATE);
this.messages&&f.processTextNodes(d,j);this.$parent.appendChild(d);var k=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE&&k.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},_afterShowingFunction:function(d){return function(){d&&d.bind(this)();if(!this.customFocus){var c=
f.firstTabbable(this.$parent);c&&c.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};d.prototype.constructor=d;return{PopupDialog:d}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(j,g,f,e){var d={};(function(){var h=!1;d.updateNavTools=function(c,b,a,d,e,l){var g=f.node(d);if(g)b.destroy(g);else throw j["could not find toolbar "]+d;b.renderCommands(d,g,l,a,"button");if(e&&(d=f.node(e)))b.destroy(d),b.renderCommands(e,d,null,a,"button");h||(h=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",function(c){var d=f.node(e);
d&&(b.destroy(d),b.renderCommands(e,d,c.selections,a,"button"))}))};d.createOperationsCommands=function(c,b,a){function d(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var f=new e.Command({name:j["Remove Completed"],tooltip:j["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){b.loadOperations.bind(b)()})},visibleWhen:function(){return!0}});c.addCommand(f);
f=new e.Command({name:j.Remove,tooltip:j["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(c){for(var c=Array.isArray(c.items)?c.items:[c.items],d=0;d<c.length;d++){var e=c[d];a.removeOperation.bind(a)(e.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!d(a);for(var b in a)if(d(a[b]))return!1;return!0}});c.addCommand(f);
f=new e.Command({name:j.Cancel,tooltip:j["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 d(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!d(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;return!0}});c.addCommand(f)}})();
return d});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(j,g,f,e,d){function h(c){this._options=c}h.prototype=new e.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(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.commandRegistry;d.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};h.prototype._bindToDom=function(){this.$allOperationsLink.href=g.toUrl("operations/list.html");this._setOperationsVisibility()};h.prototype.setOperations=function(c,b){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(c)for(var a in c)this._myOperations.push(c[a]),this._operationsDeferreds.push(b[a]);this._renderOperations()};h.prototype.parseProgressResult=function(c){if(!c)return{};c=c.responseText||c;try{c=JSON.parse(c)}catch(b){}var a={Message:c.Message||c,Severity:c.Severity};if(c.DetailedMessage&&c.DetailedMessage!==a.Message)a.DetailedMessage=c.DetailedMessage;return a};h.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};h.prototype._renderOperationsTable=function(c,b,a){f.empty(c);for(var d=0;d<b.length;d++){var e=b[d],h=document.createElement("tr"),g=document.createElement("td");g.style.paddingLeft="5px";g.style.paddingRight="5px";g.textContent=e.Name;h.appendChild(g);var o=document.createElement("div");g.appendChild(o);g=document.createElement("span");g.style.paddingRight="5px";g.classList.add("imageSprite");switch(e.type){case "Warning":g.classList.add("core-sprite-warning");g.setAttribute("aria-label",
j["Operation resulted in a warning."]);break;case "error":g.classList.add("core-sprite-error");g.setAttribute("aria-label",j["Operation resulted in an error."]);break;case "loadstart":case "progress":g.classList.add("core-sprite-start");g.setAttribute("aria-label",j["Operation is running."]);break;case "abort":g.classList.add("core-sprite-stop");g.setAttribute("aria-label",j["Operation is canceled."]);break;case "load":case "loadend":g.classList.add("core-sprite-ok"),g.setAttribute("aria-label","Operation ok.")}o.appendChild(g);
g=document.createElement("span");g.classList.add("operationStatus");g.textContent=e.Name;o.appendChild(g);if(e.error){var p=e.error.Message||e.error;e.error.DetailedMessage&&e.error.DetailedMessage!==""&&(p+=": "+e.error.DetailedMessage);g.textContent=p;g.classList.remove("operationStatus");g.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",o,{operation:e,deferred:a[d]},this,"tool");c.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(j,g,f,e,d){function h(b,a){if(!this._progressPane){this._progressPane=e.node(b);this._operationsDialog=new d.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var c=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===e.KEY.ENTER)&&c._operationsDialog.show()})}}function c(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=j.Operations,this._progressPane.alt=j.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var e="";for(d in c){var f=c[d];if(f.type&&(f.type==="loadstart"||f.type==="progress")){e="running";break}}switch(e){case "running":this._progressPane.title=j["Operations running"];this._progressPane.alt=j["Operations running"];
this._progressPane.setAttribute("aria-valuetext",j["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=j["Some operations finished with warning"];this._progressPane.alt=j["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",j["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=j["Some operations finished with error"];this._progressPane.alt=
j["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",j["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=j.Operations,this._progressPane.alt=j.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;c.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 f=d._operations[e];if(a)f.Name=a;d._lastOperation=f;f.type="loadend";if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b);f.Location||d._removeOperationFromTheList.bind(d)(e)}},
function(f){if(d._operations[e]){var g=d._operations[e];if(a)g.Name=a;if(c)g.progressMonitor=c;d._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;d.writeOperation.bind(d)(e,g,b);g.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(a)f.Name=a;if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b)});return b},removeOperation:function(b){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===b){this._removeOperationFromTheList(a);
break}this._operationsClient.removeOperation.bind(this._operationsClient)(b)},_removeOperationFromTheList:function(b){var a=this._operations[b].progressMonitor;delete this._operations[b];delete this._operationDeferrds[b];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var b in this._operations){var a=this._operations[b];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){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);var c=this;b.then(function(){c._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){c.setProgressResult.bind(c)(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)}};c.prototype.constructor=c;return{ProgressService:c}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(j,g){function f(c,b,a){return c[b].apply(c,a)}function e(c){this._location=c}function d(){var c=new g;c.reject(j["No Matching OperationService for location:"]+this._location);return c}function h(c){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=c.getService("orion.core.preference");for(var b=c.getServiceReferences("orion.core.operation"),
a=0;a<b.length;a++){var d=c.getService(b[a]);this._services[a]=d;d=b[a].getProperty("pattern")||".*";d[0]!=="^"&&(d="^"+d);this._patterns[a]=RegExp(d)}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 e(a)}}e.prototype={getOperation:d,getOperations:d,removeCompletedOperations:d,removeOperation:d,cancelOperation:d};e.prototype.constructor=e;h.prototype={getOperations:function(){var c=
new g;if(this._operations)return c.resolve(this._operations),c;var b=this;this._preferenceService.getPreferences("/operations").then(function(a){b._operations=a;c.resolve(b._operations)});return c},getOperation:function(c){return f(this._getService(c),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],b=this,a=0;a<this._services.length;a++){var d=this._patterns[a],e=new g;c[a]=e.promise;f(this._services[a],"removeCompletedOperations").then(function(a){return function(c){Array.isArray(c)&&
b.getOperations.bind(b)().then(function(b){for(var e=b.keys(),f=0;f<e.length;f++){var g=e[f];d.test(g)&&c.indexOf(g)<0&&b.remove(g)}a.resolve()})}}(e),function(a){return function(b){a.reject(b)}}(e))}return g.all(c)},removeOperation:function(c){var b=this;return f(this._getService(c),"removeOperation",arguments).then(function(){b.getOperations.bind(b)().then(function(a){a.remove(c)})},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",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","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 in Search page for this directory","${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(j,g){var f={root:g};Object.keys(j).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=j[e])});return f});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(j,g){function f(e){this._init(e)}f.prototype={_init:function(e){var d=e.parent,f=this,d=g.node(d);if(!d)throw j["no parent"];if(!e.model)throw j["no tree model"];if(!e.renderer)throw j["no renderer"];this._parent=d;this._treeModel=e.model;this._renderer=e.renderer;this._showRoot=e.showRoot===void 0?!1:e.showRoot;this._indent=e.indent===void 0?16:e.indent;this._onCollapse=e.onCollapse;this._labelColumnIndex=
e.labelColumnIndex===void 0?0:e.labelColumnIndex;this._id=e.id===void 0?"treetable":e.id;this._tableStyle=e.tableStyle;this._tableElement=e.tableElement||"table";this._tableBodyElement=e.tableBodyElement||"tbody";this._tableRowElement=e.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(c){f._showRoot?(c._depth=0,f._generate([c],0)):f._treeModel.getChildren(c,function(b){f.destroyed||f._generate(b,0)})})},destroy:function(){this.destroyed=!0},_generate:function(e,d){g.empty(this._parent);
var f=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(f);var c=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(c);c.id=this._id;this._tableStyle&&c.classList.add(this._tableStyle);this._renderer.initTable(c,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+"tbody";e.length===
0?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(e,d);c.appendChild(this._bodyElement);f.appendChild(c);this._parent.appendChild(f);this._rowsChanged()},_generateChildren:function(e,d,f){for(var c=0;c<e.length;c++){var b=document.createElement(this._tableRowElement);b.id=this._treeModel.getId(e[c]);this._renderer.rowCallback&&this._renderer.rowCallback(b);b._depth=d;b._item=e[c];this._renderer.render(e[c],b);b.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*d+"px";f?(this._bodyElement.insertBefore(b,f.nextSibling),f&&(f=b)):this._bodyElement.appendChild(b)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(e,d,f){var c=this._treeModel.getId(e),b;if(c===this._id)this._removeChildRows(c),this._generateChildren(d,0),this._rowsChanged();else{var a=g.node(c);a?(a._item=e,a&&(f||a._expanded)?(this._removeChildRows(c),this._renderer.updateExpandVisuals(a,
!0),d?(a._expanded=!0,this._generateChildren(d,a._depth+1,a),this._rowsChanged()):(b=this,d=this._treeModel.getChildren(a._item,function(c){if(!b.destroyed&&!a._expanded)a._expanded=!0,b._generateChildren(c,a._depth+1,a),b._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(j["could not find table row "]+c)}},getItem:function(e){var d=g.node(e);return d&&d._item?d._item:e},toggle:function(e){var d=g.node(e);d&&(d._expanded?(this.collapse(e),this._renderer.updateExpandVisuals(d,
!1)):(this.expand(e),this._renderer.updateExpandVisuals(d,!0)))},isExpanded:function(e){e=typeof e==="string"?e:this._treeModel.getId(e);return(e=g.node(e))?e._expanded:!1},expand:function(e,d,f){var e=typeof e==="string"?e:this._treeModel.getId(e),c=g.node(e);if(c&&!c._expanded){var b=this;this._renderer.updateExpandVisuals(c,!0);this._treeModel.getChildren(c._item,function(a){if(!b.destroyed){if(!c._expanded)c._expanded=!0,b._generateChildren(a,c._depth+1,c),b._rowsChanged();d&&d.apply(b,f)}})}},
_removeChildRows:function(e){for(var d=e===this._id,f=!1,c=-1,b=[],a=g.$$array(".treeTableRow",this._parent),i=0;i<a.length;i++){var k=a[i];if(f)break;if(d)k._depth>c?b.push(k):f=!0;else if(k.id===e)d=!0,c=k._depth}for(e=0;e<b.length;e++)d=b[e],d.parentNode.removeChild(d)},collapse:function(e){var e=typeof e==="string"?e:this._treeModel.getId(e),d=g.node(e);if(d){if(!d._expanded)return;d._expanded=!1;this._renderer.updateExpandVisuals(d,!1);this._removeChildRows(e);this._rowsChanged()}this._onCollapse&&
this._onCollapse(d._item)}};f.prototype.constructor=f;return{TableTree:f}});
define("orion/treeModelIterator",[],function(){var j={};j.TreeModelIterator=function(){function g(f,e){this.firstLevelChildren=f;this.reset();this._init(e)}g.prototype={_init:function(f){if(f)this.isExpanded=f.isExpanded,this.isExpandable=f.isExpandable,this.forceExpandFunc=f.forceExpandFunc,this.getChildrenFunc=f.getChildrenFunc},topLevel:function(f){return f.parent?f.parent===this.root:!0},_getChildren:function(f){return typeof this.getChildrenFunc==="function"?this.getChildrenFunc(f):f?f.children:
null},_expanded:function(f){if(!f)return!0;var e=this._getChildren(f),e=e&&e.length>0;this.isExpanded&&e&&(e=this.isExpanded(f));return e},_expandable:function(f){return!f?!0:this.isExpandable?this.isExpandable(f):!1},_diveIn:function(f){return this._expanded(f)?(this.setCursor(this._getChildren(f)[0]),this.cursor()):null},_drillToLast:function(f){return this._expanded(f)?(f=this._getChildren(f),this._drillToLast(f[f.length-1])):f},_forward:function(f){if(!this._cursor)return null;var e=this._diveIn(this._cursor);
if(!e){if(f&&this._expandable(this._cursor)&&this.forceExpandFunc){var d=this;return this.forceExpandFunc(this._cursor,"first",function(e){e&&d.setCursor(e)})}(e=this._findSibling(this._cursor,!0))&&this.setCursor(e)}return e},_backward:function(f){if(!this._cursor)return null;var e=this._findSibling(this._cursor,!1);e&&e!==this._cursor.parent&&(e=this._drillToLast(e));if(f&&e&&this._expandable(e)&&this.forceExpandFunc&&e!==this._cursor.parent){var d=this;return this.forceExpandFunc(e,"last",function(e){e&&
d.setCursor(e)})}e&&this.setCursor(e);return e},_findSibling:function(f,e){for(var d=this.topLevel(f),g=this._getChildren(f.parent),g=d?this.firstLevelChildren:g,c=0;c<g.length;c++)if(g[c]===f)return c===0&&!e?d?null:f.parent:c===g.length-1&&e?d?null:this._findSibling(f.parent,e):e?g[c+1]:g[c-1];return null},_inParentChain:function(f,e){for(var d=f.parent;d;){if(d===e)return!0;d=d.parent}return!1},_getTopLevelParent:function(f){if(this.topLevel(f))return f;for(f=f.parent;f;){if(this.topLevel(f))return f;
f=f.parent}return null},_onCollapse:function(f){return this._expanded(f.parent)?f:this._onCollapse(f.parent)},_scan:function(f,e,d){this.setCursor(e);var g=[];for(g.push(e);;){if(this.iterate(f))g.push(this.cursor());else break;if(d===this.cursor())return g}return null},setCursor:function(f){this._prevCursor=this._cursor;this._cursor=f},setTree:function(f){this.firstLevelChildren=f;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(f,e){var d=this.cursor(),
g=this._scan(!0,f,e);g||(g=this._scan(!1,f,e));this.setCursor(d);return g},iterate:function(f,e){return f?this._forward(e):this._backward(e)},iterateOnTop:function(f,e){var d=this._findSibling(this._getTopLevelParent(this.cursor()),f);d?this.setCursor(d):e&&this.firstLevelChildren.length>0&&this.setCursor(f?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(f){if(!this._cursor)return null;return this._inParentChain(this._cursor,f)?(this.setCursor(f),
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 g}();return j});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator","orion/uiUtils"],function(j,g,f,e){var j={},d=navigator.userAgent.indexOf("iPad")!==-1,h=window.navigator.platform.indexOf("Mac")!==-1;j.ExplorerNavHandler=function(){function c(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 f.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(e.isFormElement(a.target))return!0;if(d.explorer.preventDefaultFunc&&
d.explorer.preventDefaultFunc(a,d._modelIterator.cursor()))return!0;if(a.keyCode===g.KEY.DOWN)return d.onDownArrow(a);else if(a.keyCode===g.KEY.UP)return d.onUpArrow(a);else if(a.keyCode===g.KEY.RIGHT)return d.onRightArrow(a);else if(a.keyCode===g.KEY.LEFT)return d.onLeftArrow(a);else if(a.keyCode===g.KEY.SPACE)return d.onSpace(a);else if(a.keyCode===g.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}c.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):g.node(this.explorer._parentId)},isExpandable:function(b){return!b?!1:g.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){var a=this;this.explorer.selection&&this.explorer.selection.getSelections(function(c){a._clearSelection();for(var d=0;d<c.length;d++)a._selections.push(c[d]);a._selections.length>0?a.cursorOn(a._selections[0],
!0,!1,b):a.cursorOn();if(!(a._shiftSelectionAnchor&&a._inSelection(a._shiftSelectionAnchor)>=0))a._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,f;if(b||a){if(f===this._modelIterator.cursor())return;e=this._modelIterator.cursor();f=b;this._modelIterator.setCursor(f)}else e=this._modelIterator.prevCursor(),f=this._modelIterator.cursor();if(e!==f||a)if(this.toggleCursor(e,!1),!a||f){this.moveColumn(null,0);this.toggleCursor(f,!0);if((b=this.getRowDiv())&&
!d){for(d=b.parentNode;d;){a=window.getComputedStyle(d,null);if(!a)break;a=a.getPropertyValue("overflow-y");if(a==="hidden"||a==="auto"||a==="scroll")break;d=d.parentNode}if(!d)d=document.body;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,f)}},getSelection:function(){return this._selections},getSelectionIds:function(){for(var b=
[],a=0;a<this._selections.length;a++)b.push(this.model.getId(this._selections[a]));return b},getRowDiv:function(b){b=b?b:this._modelIterator.cursor();if(!b)return null;var b=this.model.getId(b),a=this._navDict.getValue(b);return a&&a.rowDomNode?a.rowDomNode:g.node(b)},iterate:function(b,a,c){this.topIterationNodes.length!==0&&this._modelIterator.iterate(b,a)&&(this.cursorOn(null,!1,b),c&&(b=this._inSelection(this._modelIterator.prevCursor()),a=this._inSelection(this._modelIterator.cursor()),b>=0&&
a>=0?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)))},_checkRow:function(b,a){if(this.explorer.renderer._useCheckboxSelection){var c=this.getRowDiv(b);if(c){var d=g.node(this.explorer.renderer.getCheckBoxId(c.id)),e=a?!d.checked:!0;if(e!==d.checked)this.explorer.renderer.onCheck(c,d,e,!0)}}else this._select(b,a)},_select:function(b){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){var c=g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(b)));if(a.target!==c&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(b,a)))if(this.cursorOn(b,!0,!1,!0),d)this.setSelection(b,!0);else if(this._ctrlKeyOn(a))this.setSelection(b,!0,!0);else if(a.shiftKey&&this._shiftSelectionAnchor){if(c=
this._modelIterator.scan(this._shiftSelectionAnchor,b)){this._clearSelection(!0);for(var e=0;e<c.length;e++)this.setSelection(c[e],!0)}}else this.setSelection(b,!1,!0)},onCollapse:function(b){this._modelIterator.collapse(b)&&this.cursorOn()},onUpArrow:function(b){this.iterate(!1,!1,b.shiftKey);!this._ctrlKeyOn(b)&&!b.shiftKey&&this.setSelection(this.currentModel(),!1,!0);b.preventDefault();return!1},onDownArrow:function(b){this.iterate(!0,!1,b.shiftKey);!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),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(this.explorer.renderer.getRowActionElement&&(a=this._modelIterator.cursor()))if(a=this.explorer.renderer.getRowActionElement(this.model.getId(a)),
a.href)this._ctrlKeyOn(b)?window.open(a.href):window.location.href=a.href}};return c}();j.ExplorerNavDict=function(){function c(b){this._dict={};this._model=b}c.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 c}();return j});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands,orion/commandRegistry".split(","),function(j,g,f,e,d,h){var c={};c.Explorer=function(){function b(a,b,c,d){this.registry=a;this.renderer=c;this.selection=b;this.commandService=d;this.myTree=null}b.prototype={destroy:function(){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){a=this.getRow(a);if(c)return a=a.childNodes[c],a.appendChild(document.createElement("br")),c=document.createElement("span"),c.id=b+"placeHolderRow",a.appendChild(c),{tempNode:c,refNode:c};if(a){c=document.createElement("tr");c.id=b+"placeHolderRow";var d=document.createElement("td");d.id=b+"placeHolderCol";
c.appendChild(d);a.appendChild(c);c=f.node(b+"placeHolderRow");a=f.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=this.model.getId(a))return f.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,c){a=typeof a==="string"?a:a.id||a;this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=a+"innerTree",h=f.node(g);h&&f.empty(h);if(b)b.rootId=g;this.model=b;this._parentId=a;this._treeOptions=c;if(!c||c&&!c.noSelection)this.selectionPolicy=
c?c.selectionPolicy:"",this._navDict=new d.ExplorerNavDict(this.model);this.myTree=new e.TableTree({id:g,model:b,parent:a,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:c?!!c.showRoot:!1,indent:c?c.indent:void 0,onCollapse:c?c.onCollapse:void 0,navHandlerFactory:c?c.navHandlerFactory:void 0,tableElement:c?c.tableElement:void 0,tableBodyElement:c?c.tableBodyElement:void 0,tableRowElement:c?c.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 d.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}();c.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:j["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},
callback:function(a){a.items.expandAll()}}),e=new h.Command({tooltip:j["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.collapseAll()}});b.addCommand(d);b.addCommand(e)};c.ExplorerModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.idPrefix=c||""}b.prototype={destroy:function(){this.destroyed=!0},getRoot:function(a){var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=
c;a(c)})},getChildren:function(a,b){a.Children?b(a.Children):a.ChildrenLocation?this.fetchItems(a.ChildrenLocation).then(function(c){a.Children=c;b(c)}):b([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;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}();c.ExplorerFlatModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.root=c}b.prototype=new c.ExplorerModel;
b.prototype.getRoot=function(a){if(this.root)a(this.root);else{var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})}};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return b}();c.ExplorerRenderer=function(){function b(a,b){this.explorer=b;this._init(a);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";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;f.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=f.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(f.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=f.node(this.expandCollapseImageId(a.id));c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass))},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 g=this;e.onclick=function(){g.tableTree.toggle(a.id);if(g.tableTree.isExpanded(a.id))g._expanded.push(a.id);else for(var b in g._expanded)if(g._expanded[b]===a.id){g._expanded.splice(b,1);break}(b=g._getUIStatePreferencePath())&&window.sessionStorage&&g._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())},updateCommands:function(){if(this.commandService)for(var a=f.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],d=f.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}();
c.SelectionRenderer=function(){function b(a,b){this._init(a);this.explorer=b}b.prototype=new c.ExplorerRenderer;b.prototype.renderTableHeader=function(a){var b=document.createElement("thead"),c=document.createElement("tr");b.classList.add("navTableHeading");this._useCheckboxSelection&&c.appendChild(this.initCheckboxColumn(a));for(var d=0,e=this.getCellHeaderElement(d);e;)e.innerHTML.length>0&&e.classList.add("navColumn"),c.appendChild(e),e=this.getCellHeaderElement(++d);b.appendChild(c);d>0&&a.appendChild(b)};
b.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()):e.classList.add("navColumn"):
this.getSecondaryColumnStyle?e.classList.add(this.getSecondaryColumnStyle()):e.classList.add("secondaryColumn"),e=this.getCellElement(++c,a,b)};b.prototype.getCellHeaderElement=function(){};b.prototype.getCellElement=function(){};return b}();c.SimpleFlatModel=function(){function b(a,b,c){this.items=a;this.getKey=c;this.idPrefix=b;this.root={children:a}}b.prototype=new c.ExplorerModel;b.prototype.getRoot=function(a){a(this.root)};b.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};b.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return b}();return c});
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(j,g,f,e,d,h,c,b){function a(a,b,e,f,i,j,r,w,z){var b=h.clone(b),t;if(b.Directory)t=document.createElement("a"),t.className="navlinkonpage",t.href=!a?k:(new c(a+"#{,resource,params*}")).expand({resource:b.ChildrenLocation}),b.Name&&t.appendChild(document.createTextNode(b.Name));
else{i||(i=d.getOpenWithCommands(e));if(!j)for(a=0;a<i.length;a++)i[a].isEditor==="default"&&(j=i[a]);t=document.createElement("a");t.className="navlink targetSelector";r&&typeof r==="object"&&Object.keys(r).forEach(function(a){t[a]=r[a]});var s=null,y=null;if(s=z?z.holderDom:t)y=document.createElement("span"),y.className="core-sprite-file modelDecorationSprite",s.appendChild(y);b.Name&&t.appendChild(document.createTextNode(b.Name));var x=!1,K=b.Location;if(w&&typeof w==="object")b.params={},h.mixin(b.params,
w);for(a=0;a<i.length;a++)if(w=i[a],w.visibleWhen(b)){K=w.hrefCallback({items:b});x=!0;break}g.when(f.getFileContentType(b),function(a){var c;if(c=!x)if(c=j){a:{switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":c=!0;break a}c=!1}c=!c}c&&(K=j.hrefCallback({items:b}));if(s){c=s;var d=b.Location,e=y,f;switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":f=document.createElement("img");
f.src=d;f.classList.add("thumbnail");break;default:if(a&&a.image)f=document.createElement("img"),f.src=a.image,f.classList.add("thumbnail")}f&&c.replaceChild(f,e)}t.href=K})}return t}function i(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 k=new c("#{,resource,params*}");i.prototype=new f.SelectionRenderer;i.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};
i.prototype.tableCallback=function(a){a.setAttribute("aria-label",j.Navigator);a.setAttribute("role","presentation")};i.prototype.rowCallback=function(a){a.setAttribute("role","treeitem")};i.prototype.emptyCallback=function(a){var c=document.createElement("tr"),d=document.createElement("td");d.colSpan=this.oneColumn?1:3;var e=document.createElement("div");e.classList.add("noFile");e.textContent=j.NoFile;var f=document.createElement("span");f.classList.add("core-sprite-addcontent");f.classList.add("icon-inline");
f.classList.add("imageSprite");b.processDOMNodes(e,[f]);d.appendChild(e);c.appendChild(d);a.appendChild(c)};i.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"}};i.prototype.setTarget=function(a){this.target=a};i.prototype.getFolderImage=function(){if(!this.showFolderImage)return null;var a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};i.prototype.createFolderNode=
function(b){var c;this.showFolderLinks?(c=a(this.folderLink||"",b,this.commandService,this.contentTypeService),(b=this.getFolderImage(b))&&c.insertBefore(b,c.firstChild)):(c=document.createElement("span"),c.textContent=b.Name);return c};i.prototype.showFolderLinks=!0;i.prototype.getCellElement=function(b,c,f){switch(b){case 0:var b=document.createElement("td"),g=document.createElement("span");g.id=f.id+"MainCol";g.setAttribute("role","presentation");b.appendChild(g);b.setAttribute("role","presentation");
g.className="mainNavColumn";var i;if(c.Directory)this.getExpandImage(f,g),i=this.createFolderNode(c),g.appendChild(i),this.explorer._makeDropTarget(c,i),this.explorer._makeDropTarget(c,f);else{if(!this.openWithCommands){this.openWithCommands=d.getOpenWithCommands(this.commandService);for(i=0;i<this.openWithCommands.length;i++)if(this.openWithCommands[i].isEditor==="default")this.defaultEditor=this.openWithCommands[i]}i=a("",c,this.commandService,this.contentTypeService,this.openWithCommands,this.defaultEditor,
{target:this.target});g.appendChild(i)}if(i)i.id=f.id+"NameLink",i.nodeType===1&&(e.addNavGrid(this.explorer.getNavDict(),c,i),i.setAttribute("role","link"),i.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,g,c,this.explorer,"tool",null,!0);return b;case 1:if(this.oneColumn)return null;f=document.createElement("td");if(c.LocalTimeStamp)f.textContent=(new Date(c.LocalTimeStamp)).toLocaleString();return f;case 2:if(this.oneColumn)return null;
f=document.createElement("td");if(!c.Directory&&typeof c.Length==="number")c=parseInt(c.Length,10)/1024,f.textContent=Math.ceil(c).toLocaleString()+" KB";f.style.textAlign="right";return f}};i.prototype.constructor=i;return{NavigatorRenderer:i,createLink:a}});
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(j,g,f,e,d,h,c,b,a){function i(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 i(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}i.prototype.makeRenderFunction=function(i,h,k,p,n){var q=this.serviceRegistry,r=this.commandRegistry;this.openWithCommands=this.openWithCommands||b.createOpenWithCommands(q,i,r);var w=this;return function(b,q,s,y){a.when(w.openWithCommands,function(a){if(s)f.empty(h),a=document.createElement("div"),a.appendChild(document.createTextNode(j["Search failed."])),h.appendChild(a),typeof p==="function"&&p(h);else{var w=
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)}}}(),I=!1;f.empty(h);if(b&&b.length>0){var F=document.createElement("table");F.setAttribute("role","presentation");for(var u=0;u<b.length;u++){var B=
b[u],v;if(!I&&(I=!0,k))v=F.insertRow(0).insertCell(0),v.textContent=k;v=F.insertRow(-1).insertCell(0);v.colspan=2;n&&n(v);var A={Name:B.name,Directory:B.directory,Location:B.path||B.location},D=null;if(typeof B.LineNumber==="number")D={},D.line=B.LineNumber;if(y&&y.keyword&&!y.nameSearch){var C=d.generateSearchHelper(y),D=D||{};D.find=C.inFileQuery.searchStr;D.regEx=C.inFileQuery.wildCard?!0:void 0}A=c.createLink(g.toUrl("edit/edit.html"),A,r,i,a,null,{"aria-describedby":(B.folderName?B.folderName:
B.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""),style:{verticalAlign:"middle"}},D);B.LineNumber&&A.appendChild(document.createTextNode(" (Line "+B.LineNumber+")"));v.appendChild(A);w(v,B)}h.appendChild(F);typeof p==="function"&&p(h)}!I&&q&&(a=e.formatMessage(j["No matches found for ${0}"],q),f.empty(h),h.appendChild(document.createTextNode(a)),typeof p==="function"&&p(h))}})}};k.prototype={search:function(a,b,c){var e=function(a){for(var b=[],c=0;c<a.response.docs.length;c++){var e=a.response.docs[c];b.push({name:e.Name,
path:e.Location,folderName:d.path2FolderName(e.Path?e.Path:e.Location,e.Name),directory:e.Directory,lineNumber:e.LineNumber})}return b};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,function(b){c(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 d=a.keyword,d=d.substring(d.indexOf("}")+1),d=d.substring(d.indexOf(":")+1);c(e(b),d,null,a)},function(a){c(null,null,a,null)})}catch(f){typeof f===
"string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(b){c(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){c(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);
f.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var c="",d=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&a.Parents.length>0?d=b.index==="last"?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(d=a);if(d)this.setLocationbyURL(d.Location),c=d.Name,this._childrenLocation=d.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),c=this._fileService.fileServiceName(a.Location),
this._childrenLocation=a.ChildrenLocation;d=f.node("search");c||(c="");if(d&&d.placeholder){d.value="";var g=e.formatMessage(j["Search ${0}"],c);d.placeholder=g.length>30?g.substring(0,27)+"...":e.formatMessage(j["Search ${0}"],c)}if(d&&d.title)d.title=j["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/selection",["orion/EventTarget","orion/Deferred"],function(j){function g(f,e){e||(e="orion.page.selection");this._serviceRegistry=f;j.attach(this);this._serviceRegistration=f.registerService(e,this);this._selections=null}g.prototype={getSelection:function(f){var e=this._getSingleSelection();typeof f==="function"&&f(e);return e},getSelections:function(f){var e=Array.isArray(this._selections)?this._selections.slice():[];typeof f==="function"&&f(e);return e},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(f){var e=this._selections;this._selections=Array.isArray(f)?f.length>0?f.slice():null:f?[f]:null;e!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};g.prototype.constructor=g;return{Selection:g}});
define("orion/dialogs",[],function(){function j(g){this._serviceRegistry=g;this._serviceRegistration=g.registerService("orion.page.dialog",this)}j.prototype={confirm:function(g,f){f(window.confirm(g))},openFiles:function(){}};j.prototype.constructor=j;return{DialogService:j}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(j){return{makeRelative:function(g){if(!g)return g;var f=window.location.protocol+"//"+window.location.host;return g.indexOf(f)===0?g.substring(f.length):g},isAtRoot:function(g){if(!g)return!1;if(g==="/workspace")return!0;var f=new URL(j.toUrl("workspace"),window.location.href);return(new URL(g,window.location.href)).href.indexOf(f.href)===0}}});
define("orion/sites/siteUtils",["require","orion/fileUtils","orion/URITemplate"],function(j,g,f){return{generateEditSiteHref:function(e){var d=j.toUrl("sites/site.html");return(new f(d+"#{,resource,params*}")).expand({resource:g.makeRelative(e.Location)})}}});
define("orion/sites/nls/root/messages",{OK:"OK","Name:":"Name:",Path:"Path","Mount at (server path)":"Mount at (server path)","Mappings:":"Mappings:","Hostname hint:":"Hostname hint:","Status:":"Status:","Not a valid name":"Not a valid name","Not a valid hostname":"Not a valid hostname","Convert to Self-Hosting":"Convert to Self-Hosting","Enable the site configuration to launch an Orion server running your local client code":"Enable the site configuration to launch an Orion server running your local client code",
Save:"Save","Save the site configuration":"Save the site configuration","Choose folder...":"Choose folder\u2026","Choose Orion Source Folder":"Choose Orion Source Folder",SelectRepoSourceFolder:"Select the folder where you checked out the ${0} repository:","Loading...":"Loading...",Add:"Add","Add a directory mapping to the site configuration":"Add a directory mapping to the site configuration","There are unsaved changes. Do you still want to navigate away?":"There are unsaved changes. Do you still want to navigate away?",
"There are unsaved changes.":"There are unsaved changes.","Service method missing: ":"Service method missing: ","No Matching SiteService for ":"No Matching SiteService for ",Create:"Create","Create a new site configuration":"Create a new site configuration",Edit:"Edit","Edit the site configuration":"Edit the site configuration",Delete:"Delete","Delete the site configuration":"Delete the site configuration",ConfirmDeleteSingle:"Are you sure you want to delete the site configuration '${0}'?",ConfirmDeleteMultiple:"Are you sure you want to delete these ${0} site configurations?",
ViewOnSiteTitle:"View on Site",ViewOnSiteCaption:"Choose a site configuration to view '${0}' on.","Add to site":"Add to site","Add the file to this site":"Add the file to this site",View:"View","View the file on the site":"View the file on the site",Started:"Started at",Unknown:"Unknown",Name:"Name",Actions:"Actions",Status:"Status",URL:"URL","New Site":"New Site",WorkspaceFile:"Workspace file: ${0}",WorkspaceFolder:"Workspace folder: ${0}",WorkspaceResourceNotFound:"Workspace resource not found: ${0}",
ExternalLinkTo:"External link to ${0}","Move Up":"Move Up","Move Down":"Move Down",HostHint:"HostHint",Start:"Start",Stop:"Stop","Optional; used to determine the URL where a started site can be accessed.":"Optional; used to determine the URL where a started site can be accessed.","Changes you make here won't affect the running site.":"Changes you make here won't affect the running site.",Stopped:"Stopped","Started at ":"Started at ",EnterPortNumber:"Enter the HTTP port number that the Orion server is running on (default is ${0}):",
Sites:"Sites",Mappings:"Mappings"});define("orion/sites/nls/messages",["orion/i18n!orion/sites/nls/messages","orion/sites/nls/root/messages"],function(j,g){var f={root:g};Object.keys(j).forEach(function(e){typeof f[e]==="undefined"&&(f[e]=j[e])});return f});
define("orion/sites/siteClient",["i18n!orion/sites/nls/messages","require","orion/Deferred","orion/fileClient"],function(j,g,f,e){function d(a,b,c){var d=a[b],e=new f;if(typeof d!=="function")throw j["Service method missing: "]+b;d.apply(a,c).then(function(a){e.resolve(a)},function(a){e.reject(a)});return e}function h(a,b){return new e.FileClient(a,function(a){return(a=a.getProperty("top"))&&a.indexOf(b)===0})}function c(a,b,c){this._serviceRegistry=a;this._siteService=b;this._selfHost=c.getProperty("canSelfHost");
this._sitePattern=c.getProperty("sitePattern");this._filePattern=c.getProperty("filePattern");this._name=c.getProperty("name");this._id=c.getProperty("id");this._getService=function(){return this._siteService};this._getFilePattern=function(){return this._filePattern};this._getFileClient=function(){return h(this._serviceRegistry,this._getFilePattern())};this._canSelfHost=function(){return this._selfHost}}function b(a,b){a[b]=function(){return d(this._getService(),b,Array.prototype.slice.call(arguments))}}
function a(a,b,d){for(var e=a.getServiceReferences("orion.site"),f=[],g=[],h=[],q=0;q<e.length;q++){var r=e[q].getProperty(b),r=r[0]!=="^"?"^"+r:r;f.push(e[q]);g.push(RegExp(r));h.push(a.getService(e[q]))}d=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return 0;for(var c=0;c<g.length;c++)if(g[c].test(a))return c;throw j["No Matching SiteService for "]+b+": "+a;}(d);return new c(a,h[d],f[d])}c.prototype={isFileMapped:function(a,b){if(!a){var c=new f;c.resolve(!1);return c}return this.getURLOnSite(a,
b).then(function(a){return a!==null})},mapOnSiteAndStart:function(a,b,c){function d(c,g,h){return e.isFileMapped(a,b).then(function(a){a||h.push({Source:c,Target:g,FriendlyPath:c});a=new f;a.resolve();return a})}var e=this,g="/"+b.Name,h;if(a){if(a.HostingStatus.Status==="started")a.HostingStatus.Status="stopped";h=e.toInternalForm(b.Location).then(function(b){return d(g,b,a.Mappings).then(function(){return e.updateSiteConfiguration(a.Location,a).then(function(a){return e.updateSiteConfiguration(a.Location,
{HostingStatus:{Status:"started"}})})})})}else{var j=b.Name+" site";h=e.toInternalForm(b.Location).then(function(a){var b=[];return d(g,a,b).then(function(){return e.createSiteConfiguration(j,c,b,null,{Status:"started"}).then(function(a){return a})})})}return h.then(function(a){return e.getURLOnSite(a,b)})}};"createSiteConfiguration,getSiteConfigurations,deleteSiteConfiguration,loadSiteConfiguration,updateSiteConfiguration,toFileLocation,toInternalForm,getMappingObject,getMappingProposals,updateMappingsDisplayStrings,parseInternalForm,isSelfHostingSite,convertToSelfHosting,getURLOnSite".split(",").forEach(function(a){b(c.prototype,
a)});c.prototype.constructor=c;return{forLocation:function(b,c){return a(b,"pattern",c)},forFileLocation:function(b,c){return a(b,"filePattern",c)},getFileClient:h,SiteClient:c}});
define("orion/sites/siteCommands","i18n!orion/sites/nls/messages,require,orion/commandRegistry,orion/commands,orion/sites/siteUtils,orion/sites/siteClient,orion/Deferred,orion/i18nUtil".split(","),function(j,g,f,e,d,h,c,b){function a(a){return a instanceof Array?a:[a]}function i(a){return function(b){if(b instanceof Array&&b.length===1&&!(a instanceof Array))return b[0]}}var k=e.Command,l=b.formatMessage;return{createSiteServiceCommands:function(a,b,c){var c=c||{},g=new e.Command({name:j.Create,tooltip:j["Create a new site configuration"],
id:"orion.site.create",parameters:new f.ParametersDescription([new f.CommandParameter("name","text",j.Name)]),visibleWhen:function(){return!0},callback:function(b){var e=b.items,f=a.getService(e),e=h.getFileClient(a,e.getProperty("filePattern")),g=b.parameters&&b.parameters.valueFor("name"),b=a.getService("orion.page.progress");(b?b.progress(e.loadWorkspaces(),"Loading workspaces"):e.loadWorkspaces()).then(function(a){(a=a&&a[0]&&a[0].Id)&&g&&f.createSiteConfiguration(g,a).then(function(a){c.createCallback(d.generateEditSiteHref(a),
a)},c.errorCallback)})}});b.addCommand(g)},createSiteCommands:function(b,e){var f=b.getService("orion.page.dialog"),g=b.getService("orion.page.progress"),q=new k({name:j.Edit,tooltip:j["Edit the site configuration"],imageClass:"core-sprite-edit",id:"orion.site.edit",visibleWhen:function(a){a instanceof Array&&a.length===1&&(a=a[0]);return a.HostingStatus},hrefCallback:function(a){return d.generateEditSiteHref(a.items instanceof Array?a.items[0]:a.items)}});e.addCommand(q);q=new k({name:j.Start,tooltip:j["Start the site"],
imageClass:"core-sprite-start",id:"orion.site.start",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"})},callback:function(d){var e=a(d.items),f=d.userData;if(f.site&&e.length>1)throw Error("userData.site requires a single site configuration to act upon");e=e.map(function(a){var c=f.site||{};c.HostingStatus={Status:"started"};a=a.Location;return h.forLocation(b,a).updateSiteConfiguration(a,c)});g.showWhile(c.all(e)).then(i(d.items)).then(f.startCallback,
f.errorCallback)}});e.addCommand(q);q=new k({name:j.Stop,tooltip:j["Stop the site"],imageClass:"core-sprite-stop",id:"orion.site.stop",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="started"})},callback:function(d){var e=a(d.items),f=d.userData;if(f.site&&e.length>1)throw Error("userData.site requires a single site configuration to act upon");e=e.map(function(a){var c=f.site||{};c.HostingStatus={Status:"stopped"};a=a.Location;return h.forLocation(b,
a).updateSiteConfiguration(a,c)});g.showWhile(c.all(e)).then(i(d.items)).then(f.stopCallback,f.errorCallback)}});e.addCommand(q);q=new k({name:j.Delete,tooltip:j["Delete the site configuration"],imageClass:"core-sprite-delete",id:"orion.site.delete",visibleWhen:function(b){b=a(b);return b.length>0?b.every(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"}):!1},callback:function(d){var e=a(d.items),g=d.userData,k=e.length===1?l(j.ConfirmDeleteSingle,e[0].Name):l(j.ConfirmDeleteMultiple,
e.length);f.confirm(k,function(a){a&&(a=e.map(function(a){a=a.Location;return h.forLocation(b,a).deleteSiteConfiguration(a)}),c.all(a).then(i(d.items)).then(g.deleteCallback,g.errorCallback))})}});e.addCommand(q)},createViewOnSiteCommands:function(a,b){var c=a.getService("orion.core.file");b.addCommand(new k({name:j["Add to site"],tooltip:j["Add the file to this site"],id:"orion.site.add-to",imageClass:"core-sprite-add",visibleWhen:function(a){return!a.IsFileRunningOn},callback:function(b){var d=
b.userData.file,e=b.items.SiteConfiguration,f=a.getService("orion.page.progress");return(f?f.progress(c.loadWorkspaces(),"Loading workspaces"):c.loadWorkspaces()).then(function(b){return h.forFileLocation(a,d.Location).mapOnSiteAndStart(e,d,b[0].Id)}).then(b.userData.addToCallback,b.userData.errorCallback)}}));b.addCommand(new k({name:j.View,tooltip:j["View the file on the site"],id:"orion.site.view-on-link",visibleWhen:function(a){return a.IsFileRunningOn},hrefCallback:function(b){var c=b.userData.file,
b=b.items.SiteConfiguration;return h.forFileLocation(a,c.Location).getURLOnSite(b,c)}}))}}});
define("orion/section",["orion/webui/littlelib","orion/selection","orion/commandRegistry","orion/commonHTMLFragments"],function(j,g,f,e){function d(c,b){var a=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 d=b.useAuxStyle?["sectionWrapper","sectionWrapperAux","toolComposite"]:
["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");c.appendChild(this.domNode);for(var f=0;f<d.length;f++)this.domNode.classList.add(d[f]);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("sectionTitle"),this.domNode.style.cursor="pointer",this.domNode.appendChild(this.twistie),this.domNode.tabIndex=0,this.domNode.addEventListener("click",
function(b){(b.target===a.titleNode||b.target===a.twistie)&&a._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(b){b.keyCode===j.KEY.ENTER&&(b.target===a.domNode||b.target===a.titleNode||b.target===a.twistie)&&a._changeExpandedState()},!1);if(b.iconClass){var g=document.createElement("span");g.classList.add("sectionIcon");this.domNode.appendChild(g);(Array.isArray(b.iconClass)?b.iconClass:[b.iconClass]).forEach(function(a){g.classList.add(a)})}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")d=document.createElement("div"),d.classList.add("layoutLeft"),d.classList.add("sectionItemCount"),this.domNode.appendChild(d),d.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);d=document.createElement("div");d.id=b.id+"FilterSearchBox";this.domNode.appendChild(d);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("div");this.actionsNode.id=b.id+"ActionArea";this.actionsNode.classList.add("layoutRight");this.actionsNode.classList.add("sectionActions");this.domNode.appendChild(this.actionsNode);this.selectionNode=document.createElement("div");this.selectionNode.id=b.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("sectionActions");
this.domNode.appendChild(this.selectionNode);b.slideout&&(d=e.slideoutHTMLFragment(b.id),f=document.createRange(),f.selectNode(this.domNode),d=f.createContextualFragment(d),this.domNode.appendChild(d));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);c.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";if(this._preferenceService){var h=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(h.id);if(a!==void 0)h.hidden=!a;if(!h.hidden)h._contentParent.style.display="block";h._updateExpandedState(!h.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block";this._updateExpandedState(!this.hidden,
!1)}this._commandService=b.commandService;this._lastMonitor=0;this._loading={}}function h(c){this._section=c;this._id=++c._lastMonitor}d.prototype={setTitle:function(c){this.titleNode.textContent=c},setContent:function(c){typeof c==="string"?this._contentParent.innerHTML=c:(this._contentParent.innerHTML="",this._contentParent.appendChild(c))},getContentElement:function(){return this._contentParent},createProgressMonitor:function(){return new h(this)},_setMonitorMessage:function(c,b){this._progressNode.style.visibility=
"visible";this._loading[c]=b;var a="",d;for(d in this._loading)a!==""&&(a+="\n"),a+=this._loading[d];this._progressNode.title=a},_monitorDone:function(c){delete this._loading[c];var c="",b;for(b in this._loading)c!==""&&(c+="\n"),c+=this._loading[b];this._progressNode.title=c;if(c==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){this.hidden?(this._contentParent.style.display="block",this.hidden=!1):(this._contentParent.style.display="none",this.hidden=!0);this._updateExpandedState(!this.hidden,
!0)},_updateExpandedState:function(c,b){var a=this.twistie,d=this.id;a&&(a.classList.add(c?this._expandImageClass:this._collapseImageClass),a.classList.remove(c?this._collapseImageClass:this._expandImageClass));this._preferenceService&&b&&this._preferenceService.getPreferences("/window/views").then(function(a){a.put(d,c)});this._onExpandCollapse&&this._onExpandCollapse(c,this)}};d.prototype.constructor=d;h.prototype={begin:function(c){this.status=c;this._section._setMonitorMessage(this.id,c)},worked:function(c){this.status=
c;this._section._setMonitorMessage(this.id,c)},done:function(c){this.status=c;this._section._monitorDone(this.id)}};h.prototype.constructor=h;return{Section:d}});
define("orion/sites/sitesExplorer","i18n!orion/sites/nls/messages,orion/i18nUtil,orion/explorers/explorer,orion/Deferred,orion/commands,orion/keyBinding,orion/section,orion/globalCommands,orion/selection,orion/sites/siteUtils,orion/explorers/navigationUtils,orion/sites/siteClient,orion/sites/siteCommands,orion/webui/treetable,orion/webui/littlelib".split(","),function(j,g,f,e,d,h,c,b,a,i,k,l,m,o,p){var n,q,g=function(){function a(b,c,d,e){this.registry=b;this.checkbox=!1;this.parentId=e;this.selection=
c;this.commandService=d;this.pageActionsWrapperId="pageActions";this.selectionActionsWrapperId="selectionTools";this.defaultActionWrapperId="DefaultActionWrapper"}a.prototype=new f.Explorer;a.prototype._updatePageActions=function(a,b){var c=document.getElementById(this.pageActionsWrapperId);if(c)this.commandService.destroy(c);else throw"could not find toolbar "+this.pageActionsWrapperId;this.commandService.renderCommands(this.pageActionsWrapperId,c,b,this,"button",this.getRefreshHandler())};a.prototype._getSiteConfigurations=
function(a,b,c){var d=this;c||(c=new e);b||(b=[]);a.length>0?a[0].getSiteConfigurations().then(function(e){var f={};f.siteService=a[0];f.siteConfigurations=e?e.sort(function(a,b){var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0}):[];b.push(f);d._getSiteConfigurations(a.slice(1),b,c)}):c.resolve(b);return c};a.prototype.display=function(){var a=this,b=this.registry.getService("orion.page.message"),d=new e;b.showWhile(d,j["Loading..."]);var f=this.registry.getServiceReferences("orion.site");
this.siteClients=[];for(var g=0;g<f.length;g++){var i=f[g],k=this.registry.getService(i);this.siteClients.push(new l.SiteClient(this.registry,k,i))}var m=this.commandService;this._getSiteConfigurations(this.siteClients).then(function(e){a.renderer=new n({registry:a.registry,commandService:a.commandService,actionScopeId:"sdsd",cachePrefix:"SitesExplorer",checkbox:!1},a);m.registerCommandContribution(a.pageActionsWrapperId,"orion.site.create",100);m.registerCommandContribution(a.selectionActionsWrapperId,
"orion.site.start",20);m.registerCommandContribution(a.selectionActionsWrapperId,"orion.site.stop",30);m.registerCommandContribution(a.selectionActionsWrapperId,"orion.site.delete",40,null,!1,new h.KeyBinding(p.KEY.DEL));m.registerCommandContribution(a.defaultActionWrapperId,"orion.site.start",20);m.registerCommandContribution(a.defaultActionWrapperId,"orion.site.stop",30);for(var g=0;g<e.length;g++){var i=e[g].siteService._id;if(e.length>1)new c.Section(document.getElementById(a.parentId),{id:i+
"_Section",title:e[g].siteService._name,content:'<div id="'+i+'_Node" class="mainPadding"></list>',canHide:!0});else{var j=document.createElement("div");j.setAttribute("role","region");j.classList.add("sectionTable");document.getElementById(a.parentId).appendChild(j);var k=document.createElement("div");k.id=i+"_Node";k.classList.add("mainPadding");j.appendChild(k)}a.createTree(i+"_Node",new q(e[g].siteConfigurations),{setFocus:!0})}a._updatePageActions(a.registry,f[0]);if(!a.doOnce)a.registry.getService("orion.page.selection").addEventListener("selectionChanged",
function(b){var c=document.getElementById(a.selectionActionsWrapperId);c&&(m.destroy(c),m.renderCommands(a.selectionActionsWrapperId,c,b.selections,a,"button",a.getRefreshHandler()))}),a.doOnce=!0;d.resolve();b.setProgressMessage("")})};a.prototype.getRefreshHandler=function(){return{startCallback:this.refresh.bind(this),stopCallback:this.refresh.bind(this),deleteCallback:this.refresh.bind(this),errorCallback:this.refresh.bind(this)}};a.prototype.refresh=function(){var a=this;this._getSiteConfigurations(this.siteClients).then(function(b){for(var c=
0;c<b.length;c++){var d=b[c].siteService._id+"_Node";p.empty(p.node(d));a.createTree(d,new q(b[c].siteConfigurations),{setFocus:!0})}})};return a}();n=function(){function a(b,c){this._init(b);this.options=b;this.explorer=c;this.registry=b.registry;this.commandService=b.commandService}a.prototype=new f.SelectionRenderer;a.prototype.getCellElement=function(a,b){switch(a){case 0:var c=document.createElement("td"),d=document.createElement("div");d.classList.add("sectionTableItem");c.appendChild(d);var e=
this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(b,!0):null,f=i.generateEditSiteHref(b),g=document.createElement("a");g.href=f;d.appendChild(g);g.appendChild(document.createTextNode(b.Name));k.addNavGrid(this.explorer.getNavDict(),b,g);f=document.createElement("span");f.classList.add("statusField");d.appendChild(f);d=b.HostingStatus;if(typeof d==="object")if(d.Status==="started"){f.appendChild(document.createTextNode("("+j.Started+" "));g=document.createElement("a");g.textContent=
d.URL;f.appendChild(g);k.addNavGrid(this.explorer.getNavDict(),b,g);f.appendChild(document.createTextNode(")"));var h=document.createElement("span");h.classList.add("inlineAction");f.appendChild(h);this.commandService.renderCommands("DefaultActionWrapper",h,b,this.explorer,"button",this.explorer.getRefreshHandler(),e);f.appendChild(document.createTextNode("this site."));g.href=d.URL}else d="("+d.Status.substring(0,1).toUpperCase()+d.Status.substring(1)+")",f.appendChild(document.createTextNode(d)),
h=document.createElement("span"),h.classList.add("inlineAction"),f.appendChild(h),this.commandService.renderCommands("DefaultActionWrapper",h,b,this.explorer,"button",this.explorer.getRefreshHandler(),e),f.appendChild(document.createTextNode("this site"));else f.appendChild(document.createTextNode(j.Unknown));return c}};return a}();q=function(){function a(b,c){this._siteConfigurations=b;this._root={};this._id=c}a.prototype={getRoot:function(a){a(this._root)},getChildren:function(a,b){if(a.children)b(a.children);
else if(a===this._root)a.children=this._siteConfigurations,b(this._siteConfigurations);else return b([])},getId:function(a){return a===this._root||a===this._id?this._id:a.Id}};return a}();return g});
define('built-sites.js',"orion/browserCompatibility,orion/bootstrap,orion/status,orion/progress,orion/commandRegistry,orion/fileClient,orion/operationsClient,orion/searchClient,orion/selection,orion/dialogs,orion/globalCommands,orion/sites/siteUtils,orion/sites/siteCommands,orion/sites/sitesExplorer,i18n!orion/sites/nls/messages".split(","),function(j,g,f,e,d,h,c,b,a,i,k,l,m,o,p){g.startup().then(function(g){var j=g.serviceRegistry,g=g.preferences;new i.DialogService(j);var l=new c.OperationsClient(j),
w=new f.StatusReportingService(j,l,"statusPane","notifications","notificationArea"),z=new a.Selection(j),t=new d.CommandRegistry({});new e.ProgressService(j,l,t);l=new h.FileClient(j);l=new b.Searcher({serviceRegistry:j,commandService:t,fileService:l});k.generateBanner("orion-sites",j,t,g,l);k.setPageTarget({task:p.Sites});g=new o(j,z,t,"table");(function(){var a=w.setProgressResult.bind(w);m.createSiteServiceCommands(j,t,{createCallback:function(a){window.location=a},errorHandler:a});m.createSiteCommands(j,
t)})();g.display()})});