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

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

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

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

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

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

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

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

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

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

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

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *     Andy Clement (vmware) - bug 344614
 *******************************************************************************/

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

/*******************************************************************************
 * @license
 * Copyright (c) 2014 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
 ******************************************************************************/

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

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

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

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

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

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

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:  IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

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

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

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

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

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


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


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

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors: Anton McConville - IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - _initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made
 available under the terms of the Eclipse Public License v1.0
 (http://www.eclipse.org/legal/epl-v10.html), and 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 g(){for(var a=navigator.userAgent,c={browser:!1,version:!1},e=[{name:"Chrome/Chromium",regExp:/(?:chrome|crios|chromium)\/(\d+)/i,minVersion:24},{name:"Firefox",regExp:/firefox\/(\d+)/i,minVersion:17},{name:"Microsoft Internet Explorer",regExp:/msie\s(\d+)/i,minVersion:10},{name:"Microsoft Internet Explorer",regExp:/Trident\/(\d+)/i,minVersion:6},{name:"Safari",regExp:/version\/(\d+).*?safari/i,minVersion:6}],d=0;d<e.length;d++){var b=e[d],h=a.match(b.regExp);if(h){c.browser=
!0;c.version=h[1]>=b.minVersion;c.name=b.name;break}}return c}function k(){try{return"localStorage"in window&&window.localStorage!==null}catch(a){return!1}}function f(a){alert(a);throw Error("unsupported browser");}var c=g();if(c.browser)c.version||f("Sorry, your browser version is not supported.\n\nTo use Orion, please upgrade to the latest version of "+c.name+".\n");else if(k()&&!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 k()||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:g,supportsLocalStorage:k,throwBrowserAlert:f}})();define("orion/browserCompatibility",function(){});
(function(g,k){typeof define==="function"&&define.amd?define("orion/Deferred",k):typeof exports==="object"?module.exports=k():(g.orion=g.orion||{},g.orion.Deferred=k())})(this,function(){function g(){for(var e;e=a.shift();)e();i=!1}function k(e){a.push(e);i||(i=!0,setTimeout(g,0))}function f(a){return function(){a.apply(void 0,arguments)}}function c(){function e(){for(var b;b=m.shift();){var h=b.deferred,d=l==="fulfilled"?"resolve":"reject";if(typeof b[d]==="function")try{var e=(0,b[d])(j),c=e&&(typeof e===
"object"||typeof e==="function")&&e.then;if(typeof c==="function")if(e===h.promise)h.reject(new TypeError);else{var o=e.cancel;typeof o==="function"?h._protected(a).parentCancel=o.bind(e):delete h._protected(a).parentCancel;c.call(e,f(h.resolve),f(h.reject),f(h.progress))}else h.resolve(e)}catch(i){h.reject(i)}else h[d](j)}}function d(b){delete i.parentCancel;l="rejected";j=b;m.length&&k(e)}function b(h){function a(b){return function(h){f||(f=!0,b(h))}}var f=!1;delete i.parentCancel;try{var g=h&&
(typeof h==="object"||typeof h==="function")&&h.then;if(typeof g==="function")if(h===o)d(new TypeError);else{l="assumed";var u=h&&h.cancel;if(typeof u!=="function"){var x=new c,h=x.promise;try{g(x.resolve,x.reject,x.progress)}catch(w){x.reject(w)}u=h.cancel;g=h.then}j=h;g.call(h,a(b),a(d));i.parentCancel=u.bind(h)}else l="fulfilled",j=h,m.length&&k(e)}catch(B){a(d)(B)}}function h(){var b=i.parentCancel;if(b)delete i.parentCancel,b();else if(!l)b=Error("Cancel"),b.name="Cancel",d(b)}var j,l,m=[],o=
this,i={};Object.defineProperty(this,"_protected",{value:function(b){if(b!==a)throw Error("protected");return i}});this.resolve=function(h){l||b(h);return o};this.reject=function(b){l||d(b);return o};this.progress=function(b){l||m.forEach(function(h){if(h.progress)try{h.progress(b)}catch(d){}});return o.promise};this.cancel=function(){i.parentCancel?setTimeout(h,0):h();return o};this.then=function(b,h,d){b={resolve:b,reject:h,progress:d,deferred:new c};m.push(b);b.deferred._protected(a).parentCancel=
o.promise.cancel.bind(o);(l==="fulfilled"||l==="rejected")&&k(e);return b.deferred.promise};this.promise={then:o.then,cancel:o.cancel}}var a=[],i=!1;c.all=function(a,d){function b(b,h){m||(l[b]=h,--j===0&&o.resolve(l))}function h(h,a){if(!m){if(d)try{b(h,d(a));return}catch(j){a=j}o.reject(a)}}var j=a.length,l=[],m=!1,o=new c;o.then(void 0,function(){m=!0;a.forEach(function(b){b.cancel&&b.cancel()})});j===0?o.resolve(l):a.forEach(function(d,a){d.then(b.bind(void 0,a),h.bind(void 0,a))});return o.promise};
c.when=function(a,d,b,h){var j;if(!(a&&typeof a.then==="function"))j=new c,j.resolve(a),a=j.promise;return a.then(d,b,h)};return c});
define("orion/EventTarget",[],function(){function g(){this._namedListeners={}}g.prototype={dispatchEvent:function(g){if(!g.type)throw Error("unspecified type");var f=this._namedListeners[g.type];f&&f.forEach(function(c){try{typeof c==="function"?c(g):c.handleEvent(g)}catch(a){typeof console!=="undefined"&&console.log(a)}});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 c=this._namedListeners[g];if(c)for(var a=0;a<c.length;a++)if(c[a]===f){c.length===1?delete this._namedListeners[g]:c.splice(a,1);break}}};g.prototype.constructor=g;g.attach=function(k){var f=new g;k.dispatchEvent=f.dispatchEvent.bind(f);k.addEventListener=f.addEventListener.bind(f);k.removeEventListener=f.removeEventListener.bind(f)};return g});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(g,k){function f(d,b,h){this._properties=h||{};this._properties["service.id"]=d;this._properties.objectClass=b;this._properties["service.names"]=b}function c(d,b,h){this._serviceId=d;this._serviceReference=b;this._internalRegistry=h}function a(d,b){function h(h){return function(){var a;try{if(!b())throw Error("Service was unregistered");var j=d[h].apply(d,Array.prototype.slice.call(arguments));if(j&&typeof j.then==="function")return j;
else a=new g,a.resolve(j)}catch(e){a=new g,a.reject(e)}return a.promise}}for(var a in d)typeof d[a]==="function"&&(this[a]=h(a))}function i(a,b){this.type=a;this.serviceReference=b}function e(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new k;var a=this;this._internalRegistry={isRegistered:function(b){return a._entries[b]?!0:!1},unregisterService:function(b){var h=a._entries[b];if(!h)throw Error("Service has already been unregistered: "+b);var j=h.reference;a._serviceEventTarget.dispatchEvent(new i("unregistering",
j));a._entries[b]=null;j.getProperty("objectClass").forEach(function(b){for(var h=a._namedReferences[b],e=0;e<h.length;e++)if(h[e]===j){h.length===1?delete a._namedReferences[b]:h.splice(e,1);break}})},modifyService:function(b){var h=a._entries[b];if(!h)throw Error("Service not found while trying to send modified event: "+b);a._serviceEventTarget.dispatchEvent(new i("modified",h.reference))}}}f.prototype={getPropertyKeys:function(){var a=[],b;for(b in this._properties)this._properties.hasOwnProperty(b)&&
a.push(b);return a},getProperty:function(a){return this._properties[a]}};f.prototype.constructor=f;c.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(a){var b=this._serviceReference._properties;this._serviceReference._properties=a||{};a["service.id"]=this._serviceId;
a.objectClass=b.objectClass;a["service.names"]=b["service.names"];this._internalRegistry.modifyService(this._serviceId)}};c.prototype.constructor=c;e.prototype={getService:function(a){var b;if(typeof a==="string")(a=this._namedReferences[a])&&a.some(function(h){b=this._entries[h.getProperty("service.id")].service;return!!b},this);else if(a=this._entries[a.getProperty("service.id")])b=a.service;return b||null},getServiceReferences:function(a){if(a)return this._namedReferences[a]?this._namedReferences[a]:
[];var b=[];this._entries.forEach(function(h){h&&b.push(h.reference)});return b},registerService:function(d,b,h){if(typeof b==="undefined"||b===null)throw Error("invalid service");typeof d==="string"?d=[d]:Array.isArray(d)||(d=[]);var j=this._entries.length,e=new f(j,d,h),m=this._namedReferences;d.forEach(function(b){m[b]=m[b]||[];m[b].push(e)});d=new a(b,this._internalRegistry.isRegistered.bind(null,j));this._entries.push({reference:e,service:d});d=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new i("registered",
e));return new c(j,e,d)},addEventListener:function(a,b){this._serviceEventTarget.addEventListener(a,b)},removeEventListener:function(a,b){this._serviceEventTarget.removeEventListener(a,b)}};e.prototype.constructor=e;return{ServiceRegistry:e}});
define("orion/xhr",["orion/Deferred"],function(g){function k(f,c,a,i){var e=typeof a.response!=="undefined"?a.response:a.responseText,d;try{d=a.status}catch(b){d=0}f={args:c,response:e,responseText:typeof e==="string"?e:null,status:d,url:f,xhr:a};if(typeof i!=="undefined")f.error=i;return f}return function(f,c,a){var a=a||{},i=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,e=new g,d=a.headers||{},b=a.log||!1,h;typeof d["X-Requested-With"]==="undefined"&&(d["X-Requested-With"]="XMLHttpRequest");
if(typeof a.data!=="undefined"&&(f==="POST"||f==="PUT"))h=a.data;var j=!1,l=!1;e.promise.then(void 0,function(b){j=!0;!l&&b instanceof Error&&b.name==="Cancel"&&i.abort()});i.onabort=function(){l=!0;if(!j){var b=Error("Cancel");b.name="Cancel";e.reject(b)}};i.onload=function(){var h=k(c,a,i);200<=i.status&&i.status<400?e.resolve(h):(e.reject(h),b&&typeof console!=="undefined"&&console.log(Error(i.statusText)))};i.onerror=function(){var h=k(c,a,i);e.reject(h);b&&typeof console!=="undefined"&&console.log(Error(i.statusText))};
i.onprogress=function(b){b.xhr=i;e.progress(b)};try{i.open(f,c,!0);if(typeof a.responseType==="string")i.responseType=a.responseType;if(typeof a.timeout==="number")if(typeof i.timeout==="number")i.timeout=a.timeout,i.addEventListener("timeout",function(){e.reject(k(c,a,i,"Timeout exceeded"))});else{var m=setTimeout(function(){e.reject(k(c,a,i,"Timeout exceeded"))},a.timeout);e.promise.then(clearTimeout.bind(null,m),clearTimeout.bind(null,m))}Object.keys(d).forEach(function(b){i.setRequestHeader(b,
d[b])});i.send(h||null)}catch(o){e.reject(k(c,a,i,o))}return e.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(g,k,f){function c(b,a){this._name=b;this._providers=a;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function a(b,a){return{get:function(d,e){if(a===0)return null;var c=localStorage.getItem(b+d);if(c===null)return null;c=JSON.parse(c);return e||a===-1||c._expires&&c._expires>(new Date).getTime()?(delete c._expires,c):null},set:function(d,e){if(a!==0){if(a!==-1)e._expires=(new Date).getTime()+
1E3*a;if(Object.keys(e).length===0)localStorage.removeItem(b+d);else{var c=JSON.stringify(e);localStorage.setItem(b+d,c);delete e._expires}}},remove:function(a){localStorage.removeItem(b+a)}}}function i(b){this._currentPromises={};this._cache=new a("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var a=b.getServiceReferences("orion.core.preference.provider");if(a.length>0)this._service=b.getService(a[0])}return!!this._service}}function e(b){this._location=
b;this._currentPromise=null;this._cache=new a("/orion/preferences/default",3600)}function d(){this._cache=new a("/orion/preferences/local",-1)}function b(b,a){this._userProvider=new i(b);this._localProvider=new d;a=a||"defaults.pref";a.indexOf("://")===-1&&(a=g.toUrl(a));this._defaultsProvider=new e(a);this._serviceRegistration=b.registerService("orion.core.preference",this)}c.prototype={_flush:function(){for(var b=[],a=0;a<this._stores.length;++a){var d=this._stores[a];this._dirty.indexOf(d)!==-1&&
b.push(this._providers[a].put(this._name,d));if(this._pendingDeletes[a]&&this._pendingDeletes[a].length>0){for(d=0;d<this._pendingDeletes[a].length;d++)b.push(this._providers[a].remove(this._name,this._pendingDeletes[a][d]));delete this._pendingDeletes[a]}}this._dirty=[];return k.all(b)},_scheduleFlush:function(b){b&&this._dirty.indexOf(b)===-1&&this._dirty.push(b);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 b=0;b<this._stores.length;++b){var a=this._stores[b],d;for(d in a)a.hasOwnProperty(d)&&typeof this._cached[d]==="undefined"&&(this._cached[d]=a[d])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(b){return this._getCached()[b]},put:function(b,a){if(this._stores.length!==0){var d=this._stores[0];if(d[b]!==a)d[b]=a,this._cached=null,this._scheduleFlush(d)}},remove:function(b){for(var a=0;a<
this._stores.length;++a){var d=this._stores[a];if(d.hasOwnProperty(b))return delete d[b],this._pendingDeletes[a]||(this._pendingDeletes[a]=[]),this._pendingDeletes[a].push(b),this._cached=null,this._scheduleFlush(),!0}return!1},clear:function(){for(var b=0;b<this._stores.length;++b)this._stores[b]={},this._scheduleFlush(this._stores[b]);this._cached=null},sync:function(b){if(this._flushPending)return this._flushPending=!1,this._flush();for(var a=this,d=[],e=0;e<this._providers.length;++e)d.push(this._providers[e].get(this._name,
b).then(function(b){return function(h){a._stores[b]=h}}(e)));return k.all(d).then(function(){a._cached=null;a._getCached()})},flush:function(){this._flush()}};i.prototype={get:function(b,a){if(this._currentPromises[b])return this._currentPromises[b];var d=new k,e=null;a?this._cache.remove(b):e=this._cache.get(b);if(e!==null)d.resolve(e);else{this._currentPromises[b]=d;var c=this;this._service.get(b).then(function(a){c._cache.set(b,a);delete c._currentPromises[b];d.resolve(a)},function(a){a.status===
404?(a={},c._cache.set(b,a),delete c._currentPromises[b],d.resolve(a)):(delete c._currentPromises[b],d.resolve(c._cache.get(b,!0)||{}))})}return d},put:function(b,a){this._cache.set(b,a);return this._service.put(b,a)},remove:function(b,a){var d=this._cache.get(b);delete d[a];this._cache.set(b,d);return this._service.remove(b,a)}};e.prototype={get:function(b,a){if(this._currentPromise)return this._currentPromise;var d=new k,e=null;a?this._cache.remove(b):e=this._cache.get(b);if(e!==null)d.resolve(e);
else{this._currentPromise=d;var c=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=JSON.parse(a.response);c._cache.set(b,a[b]||{});c._currentPromise=null;d.resolve(a[b]||{})},function(a){a.xhr.status===401||a.xhr.status===404?(c._cache.set(b,{}),c._currentPromise=null,d.resolve({})):(c._currentPromise=null,a=c._cache.get(b,!0),a!==null?d.resolve(a[b]||{}):d.resolve({}))})}return d},put:function(){var b=new k;b.resolve();return b},remove:function(b,a){var d=
this._cache.get(b);delete d[a];this.put(b,d)}};d.prototype={get:function(b){var a=new k,b=this._cache.get(b);b!==null?a.resolve(b):a.resolve({});return a},put:function(b,a){var d=new k;this._cache.set(b,a);d.resolve();return d},remove:function(b,a){var d=this._cache.get(b);delete d[a];this.put(b,d)}};b.DEFAULT_SCOPE=1;b.LOCAL_SCOPE=2;b.USER_SCOPE=4;b.prototype={listenForChangedSettings:function(a,d,e){if(!d||typeof d!=="number"||d>7||d<1)e=d,d=b.DEFAULT_SCOPE|b.LOCAL_SCOPE|b.USER_SCOPE;window.addEventListener("storage",
e,!1);if((b.USER_SCOPE&d)!==0)return"/orion/preferences/user"+a;else if((b.LOCAL_SCOPE&d)!==0)return"/orion/preferences/local"+a;return"/orion/preferences/default"+a},getPreferences:function(a,d){if(!d||typeof d!=="number"||d>7||d<1)d=b.DEFAULT_SCOPE|b.LOCAL_SCOPE|b.USER_SCOPE;var e=[];b.USER_SCOPE&d&&this._userProvider.available()&&e.push(this._userProvider);b.LOCAL_SCOPE&d&&e.push(this._localProvider);b.DEFAULT_SCOPE&d&&e.push(this._defaultsProvider);var m=new c(a,e);return m.sync().then(function(){return m})},
getSetting:function(b,a,d){for(var e,c=0;c<b.length;c++)if(b[c].label===a)for(var i=0;i<b[c].data.length;i++)if(b[c].data[i].label===d){e=b[c].data[i].value;break}return e}};return{PreferencesService:b}});
(function(){function g(b){if(typeof b!=="string")throw new TypeError;}function k(b){return b?b.split("&"):[]}function f(b){return b.length===0?"":b.join("&")}function c(b){var a=/([^=]*)(?:=?)(.*)/.exec(b),b=a[1]?decodeURIComponent(a[1]):"",a=a[2]?decodeURIComponent(a[2]):"";return[b,a]}function a(b){var a=encodeURIComponent(b[0]);b[1]&&(a+="="+encodeURIComponent(b[1]));return a}function i(b,a){var d="",e=[],h=0;return{next:function(){if(d!==b.query)d=b.query,e=k(d);if(h<e.length){var j=c(e[h++]);
switch(a){case "keys":return j[0];case "values":return j[1];case "keys+values":return[j[0],j[1]];default:throw new TypeError;}}throw H;}}}function e(b){Object.defineProperty(this,"_url",{get:function(){return b._url}})}function d(b){return b?/[1-9]\d*$/.exec(b)[0]:""}function b(b){var a=[];b.split("/").forEach(function(b){b===".."?a.pop():b!=="."&&a.push(b)});return a.join("/")}function h(b){return b.replace(/\s/g,function(b){return"%"+b.charCodeAt(0).toString(16)})}function j(a,e){if(typeof a!==
"string")throw new TypeError;var a=h(a),j=r.exec(a);if(!j)return null;var c={};c.scheme=j[1]||"";if(c.scheme&&!p.test(c.scheme))return null;var l=j[2];if(l&&(l=q.exec(l),c.userinfo=l[1],c.host=l[2],c.port=l[3],c.port&&!n.test(c.port)))return null;c.path=j[3];c.query=j[4];c.fragment=j[5];if(!c.scheme&&e&&(c.scheme=e.scheme,!c.host&&e.host))c.userinfo=e.userinfo,c.host=e.host,c.port=e.port,c.pathRelative=!0;if(c.pathRelative)if(c.path){if(c.path[0]!=="/")j=/^(.*\/)[^\/]*$/.exec(e.path)[1]||"/",c.path=
j+c.path}else c.path=e.path;if(c.scheme)c.scheme=c.scheme.toLowerCase();if(c.port)c.port=d(c.port);if(c.host&&c.path)c.path=b(c.path);return c}function l(b,a){var d;if(a){a=a.href||a;d=j(a);if(!d||!d.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:d})}d=j(b,d);if(!d)throw new SyntaxError;Object.defineProperty(this,"_input",{value:b,writable:!0});Object.defineProperty(this,"_url",{value:d,writable:!0});var h=new e(this);Object.defineProperty(this,"query",{get:function(){return this._url?
h:null},enumerable:!0})}try{var m;if(typeof window.URL==="function"&&window.URL.length!==0&&(m=new window.URL("http://www.w3.org?q")).protocol==="http:"&&m.query)return}catch(o){}var r=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,q=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,p=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,n=/^\d*$/,t=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,u=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,x=/^([^?#\s]*)$/,w=/^([^\s]*)$/,B=/^\S*$/,y=/([^:]*):?(.*)/,H=typeof StopIteration!==
"undefined"?StopIteration:Error("Stop Iteration"),G={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(e.prototype,{get:{value:function(b){g(b);var a;k(this._url.query).some(function(d){d=c(d);if(d[0]===b)return a=d[1],!0});return a},enumerable:!0},set:{value:function(b,d){g(b);g(d);var e=k(this._url.query);e.some(function(h,j){var l=c(h);if(l[0]===b)return l[1]=d,e[j]=a(l),!0})||e.push(a([b,d]));this._url.query=f(e)},enumerable:!0},has:{value:function(b){g(b);
return k(this._url.query).some(function(a){if(c(a)[0]===b)return!0})},enumerable:!0},"delete":{value:function(b){g(b);var a=k(this._url.query),d=a.filter(function(a){return c(a)[0]!==b});return d.length!==a.length?(this._url.query=f(d),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(b,a){if(typeof b!=="function")throw new TypeError;var d=i(this._url,"keys+values");try{for(;;){var e=d.next();b.call(a,e[1],e[0],this)}}catch(h){if(h!==H)throw h;
}},enumerable:!0},keys:{value:function(){return i(this._url,"keys")},enumerable:!0},values:{value:function(){return i(this._url,"values")},enumerable:!0},items:{value:function(){return i(this._url,"keys+values")}},size:{get:function(){return k(this._url.query).length},enumerable:!0},getAll:{value:function(b){g(b);var a=[];k(this._url.query).forEach(function(d){d=c(d);d[0]===b&&a.push(d[1])});return a},enumerable:!0},append:{value:function(b,d){g(b);g(d);var e=k(this._url.query);e.push(a([b,d]));this._url.query=
f(e)},enumerable:!0}});Object.defineProperties(l.prototype,{href:{get:function(){var b;if(this._url){b=this._url;var a=b.scheme?b.scheme+":":"";b.host&&(a+="//",b.userinfo&&(a+=b.userinfo+"@"),a+=b.host,b.port&&(a+=":"+b.port));a+=b.path;b.query&&(a+="?"+b.query);b.fragment&&(a+="#"+b.fragment);b=a}else b=this._input;return b},set:function(b){g(b);this._input=b;this._url=j(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(b){g(b);if(this._url&&(b=b.slice(-1)===":"?b.substring(0,b.length-1):b,b===""||p.test(b)))this._url.scheme=b.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(b){g(b);if(this._url)this._url.userinfo=b}},username:{get:function(){if(!this._url)return"";var b=y.exec(this._userinfo);return decodeURIComponent(b[1]||"")},set:function(b){g(b);if(this._url){var a=
y.exec(this._userinfo),b=[encodeURIComponent(b||"")];a[2]&&b.push(a[2]);this._userinfo=b.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var b=y.exec(this._userinfo);return decodeURIComponent(b[2]||"")},set:function(b){g(b);if(this._url){var a=[y.exec(this._userinfo)[1]||""];b&&a.push(encodeURIComponent(b));this._userinfo=a.join(":")}},enumerable:!0},host:{get:function(){var b="";this._url&&this._url.host&&(b+=this._url.host,this._url.port&&(b+=":"+this._url.port));return b},
set:function(b){g(b);if(this._url&&(b=u.exec(b)))this._url.host=b[1],this._url.port=d(b[2])},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(b){g(b);if(this._url&&t.exec(b))this._url.host=b},enumerable:!0},port:{get:function(){var b=this._url?this._url.port||"":"";b&&b===G[this.protocol]&&(b="");return b},set:function(b){g(b);if(this._url&&n.exec(b))this._url.port=d(b)},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(a){g(a);
if(this._url&&x.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(b){g(b);if(this._url&&(b&&b[0]==="?"&&(b=b.substring(1)),w.exec(b)))this._url.query=b},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(b){g(b);if(this._url&&(b&&b[0]==="#"&&(b=b.substring(1)),B.exec(b)))this._url.fragment=b},enumerable:!0}});
if((m=window.URL||window.webkitURL)&&m.createObjectURL)Object.defineProperty(l,"createObjectURL",{value:m.createObjectURL.bind(m),enumerable:!1}),Object.defineProperty(l,"revokeObjectURL",{value:m.revokeObjectURL.bind(m),enumerable:!1});window.URL=l})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(g,k){function f(b,a){var d=Object.keys(b),e=Object.keys(a);if(d.length!==e.length)return!1;d.sort();e.sort();for(var h=0,c=d.length;h<c;h++){var j=d[h];if(j!==e[h])return!1;var i=b[j],j=a[j];if(i!==j&&JSON.stringify(i)!==JSON.stringify(j))return!1}return!0}function c(b){if(b.indexOf("://")===-1)try{return(new URL(b,location.href)).href}catch(a){}return b}function a(b){var a=null,d={key:function(d){return(a=
a||Object.keys(b))[d]},getItem:function(a){return b[a]},setItem:function(d,e){b[d]=e;a=null},removeItem:function(d){delete b[d];a=null},clear:function(){(a=a||Object.keys(b)).forEach(function(a){delete b[a]}.bind(this));a=null}};Object.defineProperty(d,"length",{get:function(){return(a=a||Object.keys(b)).length}});return d}function i(b,a){if(a&&a instanceof XMLHttpRequest){var d,e;try{d=a.status,e=a.statusText}catch(h){d=0,e=""}return{status:d||0,statusText:e}}return a}function e(b){var a=b?JSON.parse(JSON.stringify(b,
i)):b;if(b instanceof Error)a.__isError=!0,a.message=a.message||b.message,a.name=a.name||b.name;return a}function d(b,a){this.type=b;this.plugin=a}function b(b,a){this.__objectId=b;this.__methods=a}function h(a,h,c){function j(b){E&&c.postMessage(b,E)}function i(a){if(!E)return(new g).reject(Error("plugin not connected"));a.id=String(R++);var d=new g;L[a.id]=d;d.then(null,function(b){v==="active"&&b instanceof Error&&b.name==="Cancel"&&j({requestId:a.id,method:"cancel",params:b.message?[b.message]:
[]})});var e=Object.prototype.toString;a.params.forEach(function(h,c){if(e.call(h)==="[object Object]"&&!(h instanceof b)){var j,l;for(j in h)e.call(h[j])==="[object Function]"&&(l=l||[],l.push(j));if(l){var m=P++;M[m]=h;j=function(){delete M[m]};d.then(j,j);a.params[c]=new b(m,l)}}});c.postMessage(a,E);return d.promise}function p(b,a){b||b===0?j({id:b,result:null,error:a}):console.log(a)}function n(b,a,d,h){h.forEach(function(b,a){if(b&&typeof b.__objectId!=="undefined"){var d={};b.__methods.forEach(function(a){d[a]=
function(){return i({objectId:b.__objectId,method:a,params:Array.prototype.slice.call(arguments)})}});h[a]=d}});var c=typeof b===void 0?null:{id:b,result:null,error:null};try{var l=d.apply(a,h);if(c)l&&typeof l.then==="function"?(K[b]=l,l.then(function(a){delete K[b];c.result=a;j(c)},function(a){if(K[b])delete K[b],c.error=e(a),j(c)},function(){j({responseId:b,method:"progress",params:Array.prototype.slice.call(arguments)})})):(c.result=l,j(c))}catch(m){if(c)c.error=e(m),j(c)}}function t(b){try{if(b.method){var a=
b.method,d=b.params||[];if("serviceId"in b){var e=S[b.serviceId];e||p(b.id,"service not found");a in e?n(b.id,e,e[a],d):p(b.id,"method not found")}else if("objectId"in b){var h=M[b.objectId];h||p(b.id,"object not found");a in h?n(b.id,h,h[a],d):p(b.id,"method not found")}else if("requestId"in b){var j=K[b.requestId];j&&a==="cancel"&&j.cancel&&j.cancel.apply(j,d)}else if("responseId"in b){var l=L[b.responseId];l&&a==="progress"&&l.progress&&l.progress.apply(l,d)}else if("plugin"===b.method){var m=
b.params[0];N({headers:m.headers,services:m.services}).then(function(){z&&z.resolve(y)})}else if("timeout"===b.method)z&&z.reject(b.error);else throw Error("Bad method: "+b.method);}else{var i=L[String(b.id)];delete L[String(b.id)];if(b.error){var q=c.handleServiceError(y,b.error);i.reject(q)}else i.resolve(b.result)}}catch(f){console.log("Plugin._messageHandler "+f)}}function u(a){var d={};if(a.methods&&(a.methods.forEach(function(b){d[b]=function(){var d={serviceId:a.serviceId,method:b,params:Array.prototype.slice.call(arguments)};
return v==="active"?i(d):y.start({"transient":!0}).then(function(){return i(d)})}}),d.addEventListener&&d.removeEventListener)){var e=new k,h=P++;M[h]={handleEvent:e.dispatchEvent.bind(e)};var c=new b(h,["handleEvent"]),j=d.addEventListener;d.addEventListener=function(b,a){e._namedListeners[b]||j(b,c);e.addEventListener(b,a)};var l=d.removeEventListener;d.removeEventListener=function(b,a){e.removeEventListener(b,a);e._namedListeners[b]||l(b,c)}}return d}function x(b){var d=JSON.parse(JSON.stringify(b.properties));
d.__plugin__=a;b=b.names||b.type||[];Array.isArray(b)||(b=[b]);d.objectClass=b;return d}function w(b){var a=u(b),d=x(b),d=c.registerService(b.names||b.type,a,d);F[b.serviceId]={registration:d,proxy:a}}function B(){c.persist(a,{created:H,headers:G,services:D,autostart:s,lastModified:A})}var y=this,h=h||{},H=h.created||(new Date).getTime(),G=h.headers||{},D=h.services||[],s=h.autostart,A=h.lastModified||0,v="installed",C,z,E,O,F={},R=0,P=0,K={},L={},M={},S={},N;this._persist=B;this._resolve=function(){v=
"resolved";c.dispatchEvent(new d("resolved",y))};this._getAutostart=function(){return s};this._getCreated=function(){return H};this.getLocation=function(){return a};this.getHeaders=function(){return JSON.parse(JSON.stringify(G))};this.getName=function(){var b=this.getHeaders();return b?b.name||"":null};this.getVersion=function(){var b=this.getHeaders();return b?b.version||"0.0.0":null};this.getLastModified=function(){return A};this.getServiceReferences=function(){var b=[];Object.keys(F).forEach(function(a){b.push(F[a].registration.getReference())});
return b};this.setParent=function(b){return O!==b?(O=b,y.stop({"transient":!0}).then(function(){if("started"===s)return y.start({"transient":!0});else if("lazy"===s)return y.start({lazy:!0,"transient":!0})})):(new g).resolve()};this.getState=function(){return v};this.start=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(C)return C.promise.then(this.start.bind(this,b));if(v==="active")return(new g).resolve();if(!b||!b.transient){var e=b&&b.lazy?"lazy":"started";
e!==s&&(s=e,B())}e=c.getState();if(e!=="starting"&&e!=="active")return b.transient?(new g).reject(Error("start transient error")):(new g).resolve();if(v==="installed")try{this._resolve()}catch(h){return(new g).reject(h)}v==="resolved"&&D.forEach(function(b){w(b)});if(b&&b.lazy)return v!=="starting"&&(v="starting",c.dispatchEvent(new d("lazy activation",y))),(new g).resolve();var j=new g;C=j;v="starting";c.dispatchEvent(new d("starting",y));z=new g;E=c.connect(a,t,O);z.then(function(){z=null;v="active";
c.dispatchEvent(new d("started",y));C=null;j.resolve()},function(){z=null;v="stopping";c.dispatchEvent(new d("stopping",y));Object.keys(F).forEach(function(b){F[b].registration.unregister();delete F[b]});c.disconnect(E);E=null;v="resolved";C=null;c.dispatchEvent(new d("stopped",y));j.reject(Error("plugin activation error"))});return j.promise};this.stop=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(C)return C.promise.then(this.stop.bind(this,b));if((!b||
!b.transient)&&"stopped"!==s)s="stopped",B();if(v!=="active"&&v!=="starting")return(new g).resolve();C=b=new g;v="stopping";c.dispatchEvent(new d("stopping",y));Object.keys(F).forEach(function(b){F[b].registration.unregister();delete F[b]});E&&(c.disconnect(E),E=null);v="resolved";C=null;c.dispatchEvent(new d("stopped",y));b.resolve();return b.promise};N=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(!b)return A===0&&(A=(new Date).getTime(),B()),c.loadManifest(a).then(N);
var e=G,h=D,j=s;G=b.headers||{};D=b.services||{};s=b.autostart||s;b.lastModified?A=b.lastModified:(A=(new Date).getTime(),B());if(f(G,e)&&f(D,h)&&s===j)return(new g).resolve();if(v==="active"||v==="starting"){var m=[];Object.keys(D).forEach(function(b){var a=D[b];m.push(b);var d=F[b];if(d){if(f(a.methods,Object.keys(d.proxy))){var b=x(a),e=d.registration.getReference(),h={};e.getPropertyKeys().forEach(function(b){h[b]=e.getProperty(b)});f(b,h)||d.registration.setProperties(b);return}d.registration.unregister();
delete F[b]}w(a)});Object.keys(F).forEach(function(b){m.indexOf(b)===-1&&(F[b].registration.unregister(),delete F[b])})}v==="active"&&(c.disconnect(E),z=new g,E=c.connect(a,t,O),z.then(function(){z=null},function(){z=null;v="stopping";c.dispatchEvent(new d("stopping"),y);Object.keys(F).forEach(function(b){F[b].registration.unregister();delete F[b]});c.disconnect(E);E=null;v="resolved";c.dispatchEvent(new d("stopped",y))}));return(new g).resolve()};this.update=function(b){return N(b).then(function(){c.dispatchEvent(new d("updated",
y))})};this.uninstall=function(){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(v==="active"||v==="starting"||v==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));c.removePlugin(this);v="uninstalled";c.dispatchEvent(new d("uninstalled",y));return(new g).resolve()}}var j=/^http[s]?/i;return{Plugin:h,PluginRegistry:function(b,e){function i(b){var a=b.source;t.some(function(d){if(a===d.target){try{var e;if(typeof d.useStructuredClone===
"undefined"){var h=typeof b.data!=="string";e=h?b.data:JSON.parse(b.data);d.useStructuredClone=h}else e=d.useStructuredClone?b.data:JSON.parse(b.data);d.handler(e)}catch(c){}return!0}})}var e=e||{},f=e.storage||localStorage;f.getItem||(f=a(f));var q="installed",p,n=[],t=[],u=new k,x={},w={registerService:b.registerService.bind(b),connect:function(b,a,d,e){function h(b){b=Error(b);b.name="timeout";a({method:"timeout",error:b})}var c={handler:a,url:b},j=setTimeout(h.bind(null,"Load timeout for: "+b),
e||15E3),l=document.createElement("iframe");l.name=b+"_"+(new Date).getTime();l.src=b;l.onload=function(){clearTimeout(j);j=setTimeout(h.bind(null,"Plugin handshake timeout for: "+b),5E3)};l.sandbox="allow-scripts allow-same-origin";l.style.width=l.style.height="100%";l.frameBorder=0;(d||p).appendChild(l);c.target=l.contentWindow;c.close=function(){clearTimeout(j);if(l){var b=l.parentNode;b&&b.removeChild(l);l=null}};t.push(c);return c},disconnect:function(b){for(var a=0;a<t.length;a++)if(b===t[a]){t.splice(a,
1);try{b.close()}catch(d){}break}},removePlugin:function(b){for(var a=0;a<n.length;a++)if(b===n[a]){n.splice(a,1);break}f.removeItem("plugin."+b.getLocation())},persist:function(b,a){f.setItem("plugin."+b,JSON.stringify(a))},postMessage:function(b,a){a.target.postMessage(a.useStructuredClone?b:JSON.stringify(b),a.url)},dispatchEvent:function(b){try{u.dispatchEvent(b)}catch(a){console&&console.log("PluginRegistry.dispatchEvent "+a)}},loadManifest:function(b){var a=new g,d=w.connect(b,function(b){d&&
b.method&&("manifest"===b.method||"plugin"===b.method?(b=b.params[0],w.disconnect(d),d=null,a.resolve(b)):"timeout"===b.method&&(w.disconnect(d),d=null,a.reject(b.error)))});return a.promise},getState:function(){return q},handleServiceError:function(b,a){if(a&&a.status===401){var d=b.getHeaders(),e=b.getName()||b.getLocation(),h=document.createElement("span");h.appendChild(document.createTextNode("Authentication required for: "+e+"."));if(d.login)h.appendChild(document.createTextNode(" ")),e=document.createElement("a"),
e.target="_blank",e.textContent="Login",e.href=d.login,j.test(e.href)?(h.appendChild(e),h.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+d.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(h)}}if(a.__isError){var c=a,a=Error(c.message);Object.keys(c).forEach(function(b){a[b]=c[b]});delete a.__isError}return a}};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=w.getState;this.init=function(){if(!(q==="starting"||q==="active"||q==="stopping")){addEventListener("message",i,!1);for(var b=[],a=0,d=f.length;a<d;a++)b.push(f.key(a));b.forEach(function(b){if(b.indexOf("plugin.")===0){var a=b.substring(7),b=JSON.parse(f.getItem(b));b.created&&n.push(new h(a,b,w))}});n.sort(function(b,a){return b._getCreated()<a._getCreated()?-1:1});if(e.parent)p=e.parent;else{p=document.createElement("div");
if(!e.visible)p.style.display="none",p.style.visibility="hidden";document.body.appendChild(p)}e.plugins&&Object.keys(e.plugins).forEach(function(b){b=c(b);if(!this.getPlugin(b)){var a=e.plugins[b];typeof a!=="object"&&(a={});a.autostart=a.autostart||e.defaultAutostart||"lazy";n.push(new h(b,a,w))}}.bind(this));q="starting"}};this.start=function(){q!=="starting"&&this.init();if(q!=="starting")return(new g).reject("Cannot start framework. Framework is already "+q+".");var b=[],a=(new Date).getTime();
n.forEach(function(d){var e=d._getAutostart();d.getLastModified()===0?b.push(d.update().then(function(){if("started"===e)return d.start({"transient":!0});if("lazy"===e)return d.start({lazy:!0,"transient":!0});d._resolve()})):"started"===e?b.push(d.start({"transient":!0})):"lazy"===e?(b.push(d.start({lazy:!0,"transient":!0})),a>d.getLastModified()+864E5&&d.update()):d._resolve()});return g.all(b,function(b){console.log("PluginRegistry.stop "+b)}).then(function(){q="active"})};this.stop=function(){if(q!==
"starting"&&q!=="active")return(new g).reject("Cannot stop registry. Registry is already "+q+".");q="stopping";var b=[];n.forEach(function(a){b.push(a.stop({"transient":!0}))});return g.all(b,function(b){console.log("PluginRegistry.stop "+b)}).then(function(){if(!e.parent){var b=p.parentNode;b&&b.removeChild(p)}p=null;removeEventListener("message",i);q="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new g).reject("Cannot uninstall registry")};
this.installPlugin=function(b,a){var b=c(b),e=this.getPlugin(b);if(e)return(new g).resolve(e);if(x[b])return x[b];if(a)return e=new h(b,a,w),n.push(e),e._persist(),w.dispatchEvent(new d("installed",e)),(new g).resolve(e);var j=w.loadManifest(b).then(function(a){e=new h(b,a,w);n.push(e);e._persist();delete x[b];w.dispatchEvent(new d("installed",e));return e},function(a){delete x[b];throw a;});return x[b]=j};this.getPlugins=function(){return n.slice()};this.getPlugin=function(b){var a=null,b=c(b);n.some(function(d){if(b===
d.getLocation())return a=d,!0});return a};this.addEventListener=u.addEventListener.bind(u);this.removeEventListener=u.removeEventListener.bind(u);this.resolvePlugins=function(){var b=!0;n.forEach(function(a){b=b&&a._resolve()});return b}}}});
define("orion/serviceTracker",[],function(){function g(c,a){function i(a){var e=a.getProperty("service.id"),h=this.addingService(a);h&&(d[e]=a,b[e]=h)}function e(a){var e=a.getProperty("service.id"),h=b[e];delete d[e];delete b[e];this.removedService(a,h)}this.serviceRegistry=c;var d={},b={},h=k,j,l;this.close=function(){if(h!==f)throw"Already closed";h=k;c.removeEventListener("registered",j);c.removeEventListener("unregistering",l);l=j=null;var b=this;this.getServiceReferences().forEach(function(a){e.call(b,
a)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var b=Object.keys(d);return!b.length?null:b.map(function(b){return d[b]})};this.open=function(){if(h!==k)throw"Already open";h=f;var b=this;j=function(d){if(d.serviceReference.getProperty("objectClass").indexOf(a)!==-1&&(i.call(b,d.serviceReference),typeof b.onServiceAdded==="function"))return b.onServiceAdded(d.serviceReference,b.serviceRegistry.getService(d.serviceReference))};l=function(d){d.serviceReference.getProperty("objectClass").indexOf(a)!==
-1&&e.call(b,d.serviceReference)};c.addEventListener("registered",j);c.addEventListener("unregistering",l);c.getServiceReferences(a).forEach(function(a){i.call(b,a);if(typeof b.onServiceAdded==="function")return b.onServiceAdded(a,c.getService(a))});if(typeof this.onOpen==="function")this.onOpen()}}var k=0,f=1;g.prototype={addingService:function(c){return this.serviceRegistry.getService(c)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return g});
define("orion/objects",[],function(){function g(g){for(var f=1;f<arguments.length;f++){var c=arguments[f],a;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(g[a]=c[a])}return g}return{clone:function(k){if(Array.isArray(k))return Array.prototype.slice.call(k);var f=Object.create(Object.getPrototypeOf(k));g(f,k);return f},mixin:g,toArray:function(g){return Array.isArray(g)?g:[g]}}});
define("orion/config",["orion/Deferred","orion/serviceTracker","orion/objects"],function(g,k,f){var c,a,i,e,d,b="pid";c=function(a,d,e){function h(b,a,e){a.forEach(function(h,c){try{var j=b[c].getProperty("__plugin__"),m=j&&d.getPlugin(j);(!j||m&&m.getState()==="active")&&a[c].updated(e)}catch(i){typeof console!=="undefined"&&console.log(i)}})}k.call(this,a,"orion.cm.managedservice");var c={},i={},p=function(d){var h=[];d.plugin.getServiceReferences().forEach(function(d){if(d.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var c=d.getProperty(b),d=a.getService(d);c&&d&&(c=(c=e._find(c))&&c.getProperties(),h.push(d.updated(c)))}});return g.all(h)};this.addingService=function(d){var e=d.getProperty(b),h=a.getService(d);if(!e||!h)return null;c[e]||(c[e]=[]);i[e]||(i[e]=[]);c[e].push(d);i[e].push(h);return h};this.onServiceAdded=function(a,d){var c=a.getProperty(b),c=e._find(c);h([a],[d],c&&c.getProperties())};this.onOpen=function(){d.addEventListener("started",p)};this.onClose=function(){d.removeEventListener("started",
p)};this.notifyUpdated=function(b){var a=b.getPid();h(c[a]||[],i[a]||[],b.getProperties())};this.notifyDeleted=function(b){b=b.getPid();h(c[b]||[],i[b]||[],null)};this.removedService=function(a,d){var e=a.getProperty(b),h=c[e],j=i[e];h.length>1?h.splice(h.indexOf(a),1):delete c[e];j.length>1?j.splice(j.indexOf(d),1):delete i[e]}};a=function(){function b(a,d,h){this.store=new i(this,h);this.configAdmin=new e(this,this.store);this.tracker=new c(a,d,this.store)}b.prototype={getConfigurationAdmin:function(){var b=
this;return this.configAdmin._init().then(function(a){b.tracker.open();return a})},notifyDeleted:function(b){this.tracker.notifyDeleted(b)},notifyUpdated:function(b){this.tracker.notifyUpdated(b)}};return b}();e=function(){function b(a,d){this.factory=a;this.store=d}b.prototype={_init:function(){var b=this;return this.store._init().then(function(){return b})},getConfiguration:function(b){return this.store.get(b)},listConfigurations:function(){return this.store.list()}};return b}();var h="/cm/configurations";
i=function(){function a(e,c){this.factory=e;this.prefsService=c;this.configs=Object.create(null);this.pref=null;var j=this;this.initPromise=this.prefsService.getPreferences(h).then(function(a){j.pref=a;a.keys().forEach(function(e){if(!j.configs[e]){var h=a.get(e);typeof h==="object"&&h!==null&&Object.keys(h).length>0&&(h[b]=e,j.configs[e]=new d(j.factory,j,h))}})})}a.prototype={_init:function(){return this.initPromise},_find:function(b){return this.configs[b]||null},get:function(b){var a=this._find(b);
a||(a=new d(this.factory,this,b),this.configs[b]=a);return a},list:function(){var b=this,a=[];this.pref.keys().forEach(function(d){(d=b._find(d))&&d.getProperties()!==null&&a.push(d)});return a},remove:function(b){this.pref.remove(b);delete this.configs[b]},save:function(b,a){this.pref.put(b,a.getProperties(!0)||{})}};return a}();d=function(){function a(d,e){e=f.clone(e);delete e[b];d.properties=e}function d(e,h,c){this.factory=e;this.store=h;if(c!==null&&typeof c==="object")this.pid=c[b],a(this,
c);else if(typeof c==="string")this.pid=c,this.properties=null;else throw Error("Invalid pid/properties "+c);}d.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(a){this._checkRemoved();var d=null;if(this.properties&&(d=f.clone(this.properties),!a))d[b]=this.pid;return d},remove:function(){this._checkRemoved();this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=
!0},update:function(b){this._checkRemoved();a(this,b);this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return d}();return{ConfigurationAdminFactory:a}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(g,k,f,c,a,i){var e;return{startup:function(){if(e)return e;e=new k;var d=new f.ServiceRegistry,b=new c.PreferencesService(d);return b.getPreferences("/plugins").then(function(h){var c={plugins:{}};h.keys().forEach(function(b){var a=g.toUrl(b);c.plugins[a]=h[b]});var l=new a.PluginRegistry(d,c);return l.start().then(function(){if(d.getServiceReferences("orion.core.preference.provider").length>
0)return b.getPreferences("/plugins",b.USER_SCOPE).then(function(b){var a=[];b.keys().forEach(function(b){b=g.toUrl(b);l.getPlugin(b)||a.push(l.installPlugin(b,{autostart:"lazy"}).then(function(b){return b.update().then(function(){return b.start({lazy:!0})})}))});return k.all(a,function(b){console.log(b)})})}).then(function(){return(new i.ConfigurationAdminFactory(d,l,b)).getConfigurationAdmin().then(d.registerService.bind(d,"orion.cm.configadmin"))}).then(function(){var b=d.getService("orion.core.auth");
if(b){var a=b.getUser().then(function(a){if(a)localStorage.setItem("lastLogin",(new Date).getTime());else return b.getAuthForm(window.location.href).then(function(b){setTimeout(function(){window.location=b},0)})}),e=localStorage.getItem("lastLogin");if(!e||e<(new Date).getTime()-9E5)return a}}).then(function(){var a={serviceRegistry:d,preferences:b,pluginRegistry:l};e.resolve(a);return a})})}}});
(function(){function g(a,c,e,d,b,h){c[a]&&(e.push(a),(c[a]===!0||c[a]===1)&&d.push(b+a+"/"+h))}function k(a,c,e,d,b){c=d+c+"/"+b;require._fileExists(a.toUrl(c+".js"))&&e.push(c)}function f(a,c,e){for(var d in c)c.hasOwnProperty(d)&&(!a.hasOwnProperty(d)||e)?a[d]=c[d]:typeof c[d]==="object"&&f(a[d],c[d],e)}var c=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(a){var i=a.config?a.config():{};return{version:"2.0.1+",load:function(a,d,b,h){h=h||{};if(h.locale)i.locale=h.locale;
var j=c.exec(a),l=j[1],m=j[4],o=j[5],r=m.split("-"),q=[],p={},n,t="";if(j[5])l=j[1],a=l+o;else{o=j[4];m=i.locale;if(!m)m=i.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();r=m.split("-")}if(h.isBuild){q.push(a);k(d,"root",q,l,o);for(n=0;n<r.length;n++)h=r[n],t+=(t?"-":"")+h,k(d,t,q,l,o);d(q,function(){b()})}else d([a],function(a){var e=[],h;g("root",a,e,q,l,o);for(n=0;n<r.length;n++)h=r[n],t+=(t?"-":"")+h,g(t,a,e,q,l,o);d(q,function(){var h,
c,j;for(h=e.length-1;h>-1&&e[h];h--){j=e[h];c=a[j];if(c===!0||c===1)c=d(l+j+"/"+o);f(p,c)}b(p)})})}}})})();
define("orion/i18n",[],function(){return{load:function(g,k,f,c){var c=c||{},a=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,i=a.exec(g);if(i){if(!k.defined||k.defined(g))try{f(k(g));return}catch(e){}if(c.isBuild||c.isTest)f({});else if(k.specified&&!k.specified("orion/bootstrap"))f({});else{var d=i[1],b=i[3]?i[2]:"",h=i[3]||i[2];k(["orion/bootstrap"],function(e){e.startup().then(function(e){var j=e.serviceRegistry,e=j.getServiceReferences("orion.i18n.message");if(b)e.some(function(b){return g===b.getProperty("name")?
(j.getService(b).getMessageBundle().then(function(b){f(b)},function(){f({})}),!0):!1})||f({});else{var o={},r;e.forEach(function(e){var j=e.getProperty("name");if((i=a.exec(j))&&d===i[1]&&h===(i[3]||i[2]))if(b=i[3]?i[2]:""){if((e=c.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&e.toLowerCase().indexOf(b.toLowerCase())===0)o[b]=!0,(!k.specified||!k.specified(j))&&define(j,["orion/i18n!"+j],function(b){return b})}else r=e});!k.specified||!k.specified(g)?r?
j.getService(r).getMessageBundle().then(function(b){Object.keys(o).forEach(function(a){typeof b[a]==="undefined"&&(b[a]=o[a])});define(g,[],b);f(b)},function(){define(g,[],o);f(o)}):(define(g,[],o),f(o)):f(o)}})})}}else f(null)}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell",ShellLinkWorkspace:"Workspace Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor",EditorRelatedLink:"Show Current Folder",EditorRelatedLinkParent:"Show Enclosing Folder",EditorLinkWorkspace:"Show Workspace",EditorRelatedLinkProj:"Show Project","Filter bindings":"Filter bindings","Orion Editor":"Orion Editor","Orion Image Viewer":"Orion Image Viewer","Orion Markdown Viewer":"Orion Markdown Viewer","Orion JSON Editor":"Orion JSON Editor",
"View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion.","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer","Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it",
"Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown","Unknown item":"Unknown item","Can't search: no search service is available":"Can't search: no search service is available","could not find banner parent, id was ":"could not find banner parent, id was ",
Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Bugs","Privacy Policy":"Privacy","Terms of Use":"Terms","Copyright Agent":"Copyright","Orion Logo":"Orion Logo","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"I20140226-2325","LOG: ":"LOG: ",View:"View","no parent":"no parent","no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ","Resource is out of sync with the server. Do you want to save it anyway?":"Resource is out of sync with the server. Do you want to save it anyway?",
Operations:"Operations","Operations running":"Operations running","Some operations finished with warning":"Some operations finished with warning","Some operations finished with error":"Some operations finished with error","no service registry":"no service registry",Tasks:"Tasks",Close:"Close","Expand all":"Expand all","Collapse all":"Collapse all",Search:"Search","Advanced search":"Advanced search",Submit:"Submit",More:"More","Saved searches":"Saved searches","Recent searches":"Recent searches","Regular expression":"Regular expression",
"Search options":"Search options","Global search":"Global search","Orion Home":"Orion Home","Close notification":"Close notification","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations","Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Toggle side panel":"Toggle side panel","Open or close the side panel":"Open or close the side panel",Projects:"Projects","Toggle Sidebar":"Toggle Sidebar","Sample HTML5 Site":"Sample HTML5 Site",
"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.":"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.","Sample Orion Plugin":"Sample Orion Plugin","Generate a sample plugin for integrating with Orion.":"Generate a sample plugin for integrating with Orion.",Browser:"Web Browser",OutlineProgress:"Getting outline for ${0} from ${1}",UnknownError:"An unknown error occurred.",UnknownWarning:"An unknown warning occurred.",Filter:"Filter (* = any string, ? = any character)",
"To view the browser's context menu, trigger the context menu again.":"To view the browser's context menu, trigger the context menu again.",Edit:"Edit",CentralNavTooltip:"Toggle Navigation Menu"});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/util",[],function(){var g=navigator.userAgent,k=g.indexOf("MSIE")!==-1||g.indexOf("Trident")!==-1?document.documentMode:void 0,f=parseFloat(g.split("Firefox/")[1]||g.split("Minefield/")[1])||void 0,c=g.indexOf("Opera")!==-1?parseFloat(g.split("Version/")[1]):void 0,a=parseFloat(g.split("Chrome/")[1])||void 0,i=g.indexOf("Safari")!==-1&&!a,e=parseFloat(g.split("WebKit/")[1])||void 0,d=g.indexOf("Android")!==-1,b=g.indexOf("iPad")!==-1,g=g.indexOf("iPhone")!==-1,h=b||g,j=navigator.platform.indexOf("Mac")!==
-1,l=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==-1,o="ontouchstart"in document.createElement("input");return{formatMessage:function(b){var a=arguments;return b.replace(/\$\{([^\}]+)\}/g,function(b,d){return a[(d<<0)+1]})},createElement:function(b,a){return b.createElementNS?b.createElementNS("http://www.w3.org/1999/xhtml",a):b.createElement(a)},isIE:k,isFirefox:f,isOpera:c,isChrome:a,isSafari:i,isWebkit:e,isAndroid:d,isIPad:b,isIPhone:g,isIOS:h,isMac:j,isWindows:l,
isLinux:m,isTouch:o,platformDelimiter:l?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(g){function k(b,a){a||(a=document);return a.querySelectorAll(b)}function f(b){var a=b.tabIndex;a===0&&g.isIE&&!{a:!0,body:!0,button:!0,frame:!0,iframe:!0,img:!0,input:!0,isindex:!0,object:!0,select:!0,textarea:!0}[b.nodeName.toLowerCase()]&&!b.attributes.tabIndex&&(a=-1);return a}function c(b){if(f(b)>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var d=c(b.childNodes[a]);if(d)return d}return null}function a(b){if(f(b)>=
0)return b;if(b.hasChildNodes())for(var d=b.childNodes.length-1;d>=0;d--){var e=a(b.childNodes[d]);if(e)return e}return null}function i(b,a){if(b.nodeType===3){var d=e.exec(b.nodeValue);d&&d.length>1&&a(b,d)}if(b.hasChildNodes())for(d=0;d<b.childNodes.length;d++)i(b.childNodes[d],a)}var e=/\$\{([^\}]+)\}/,d=null;return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:k,$$array:function(b,a){return Array.prototype.slice.call(k(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 d=b.compareDocumentPosition(a);return Boolean(d&16)},bounds:function(b){b=b.getBoundingClientRect();return{left:b.left+document.documentElement.scrollLeft,top:b.top+document.documentElement.scrollTop,width:b.width,height:b.height}},empty:function(b){for(;b.hasChildNodes();)b.removeChild(b.firstChild)},firstTabbable:c,lastTabbable:a,stop:function(b){if(window.document.all)b.keyCode=0;b.preventDefault&&(b.preventDefault(),b.stopPropagation())},
processTextNodes:function(b,a){i(b,function(b,d){b.parentNode.replaceChild(document.createTextNode(a[d[1]]||d[1]),b)})},processDOMNodes:function(b,a){i(b,function(b,d){var e=a[d[1]];if(e){var c=document.createRange(),i=d.index;c.setStart(b,i);c.setEnd(b,i+d[0].length);c.deleteContents();c.insertNode(e)}})},addAutoDismiss:function(b,a){function e(b){d.forEach(function(a){var d=!1,e=a.excludeNodes.some(function(a){return document.body.contains(a)?(d=!0,a.contains(b.target)):!1});if(d&&!e)try{a.dismiss(b)}catch(c){typeof console!==
"undefined"&&console&&console.error(c&&c.message)}});d=d.filter(function(b){return b.excludeNodes.some(function(b){return document.body.contains(b)})})}d===null&&(d=[],document.addEventListener("click",e,!0),g.isIOS&&document.addEventListener("touchend",function(b){function a(){b.target.removeEventListener("click",a)}b.touches.length===0&&b.target.addEventListener("click",a)},!1));d.push({excludeNodes:b,dismiss:a})},setFramesEnabled:function(b){for(var a=document.getElementsByTagName("iframe"),d=
0;d<a.length;d++)a[d].parentNode.style.pointerEvents=b?"":"none"},removeAutoDismiss:function(b){d=d.filter(function(a){return b!==a.dismiss})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
define("text",["module"],function(g){var k,f,c=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],a=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,i=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=typeof location!=="undefined"&&location.href,d=e&&location.protocol&&location.protocol.replace(/\:/,""),b=e&&location.hostname,h=e&&(location.port||void 0),j=[],l=g.config&&g.config()||{};k={version:"2.0.5",strip:function(b){if(b){var b=b.replace(a,""),d=b.match(i);d&&(b=d[1])}else b="";return b},
jsEscape:function(b){return b.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:l.createXhr||function(){var b,a,d;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(a=0;a<3;a+=1){d=c[a];try{b=new ActiveXObject(d)}catch(e){}if(b){c=[d];break}}return b},parseName:function(b){var a,
d,e=!1,c=b.indexOf(".");a=b.indexOf("./")===0||b.indexOf("../")===0;c!==-1&&(!a||c>1)?(a=b.substring(0,c),d=b.substring(c+1,b.length)):a=b;b=d||a;c=b.indexOf("!");c!==-1&&(e=b.substring(c+1)==="strip",b=b.substring(0,c),d?d=b:a=b);return{moduleName:a,ext:d,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(b,a,d,e){var c,h;c=k.xdRegExp.exec(b);if(!c)return!0;b=c[2];c=c[3];c=c.split(":");h=c[1];c=c[0];return(!b||b===a)&&(!c||c.toLowerCase()===d.toLowerCase())&&(!h&&!c||h===e)},finishLoad:function(b,
a,d,e){d=a?k.strip(d):d;l.isBuild&&(j[b]=d);e(d)},load:function(a,c,j,i){if(i.isBuild&&!i.inlineText)j();else{l.isBuild=i.isBuild;var f=k.parseName(a),i=f.moduleName+(f.ext?"."+f.ext:""),g=c.toUrl(i),t=l.useXhr||k.useXhr;!e||t(g,d,b,h)?k.get(g,function(b){k.finishLoad(a,f.strip,b,j)},function(b){j.error&&j.error(b)}):c([i],function(b){k.finishLoad(f.moduleName+"."+f.ext,f.strip,b,j)})}},write:function(b,a,d){if(j.hasOwnProperty(a)){var e=k.jsEscape(j[a]);d.asModule(b+"!"+a,"define(function () { return '"+
e+"';});\n")}},writeFile:function(b,a,d,e,c){var a=k.parseName(a),h=a.ext?"."+a.ext:"",j=a.moduleName+h,l=d.toUrl(a.moduleName+h)+".js";k.load(j,d,function(){var a=function(b){return e(l,b)};a.asModule=function(b,a){return e.asModule(b,l,a)};k.write(b,j,a,c)},c)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)f=require.nodeRequire("fs"),k.get=function(b,a){var d=f.readFileSync(b,"utf8");d.indexOf("\ufeff")===0&&(d=d.substring(1));a(d)};else if(l.env===
"xhr"||!l.env&&k.createXhr())k.get=function(b,a,d,e){var c=k.createXhr(),h;c.open("GET",b,!0);if(e)for(h in e)e.hasOwnProperty(h)&&c.setRequestHeader(h.toLowerCase(),e[h]);if(l.onXhr)l.onXhr(c,b);c.onreadystatechange=function(){var e;if(c.readyState===4)e=c.status,e>399&&e<600?(e=Error(b+" HTTP status: "+e),e.xhr=c,d(e)):a(c.responseText)};c.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")k.get=function(b,a){var d,e,c=new java.io.File(b),h=java.lang.System.getProperty("line.separator"),
c=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(c),"utf-8")),j="";try{d=new java.lang.StringBuffer;(e=c.readLine())&&e.length()&&e.charAt(0)===65279&&(e=e.substring(1));for(e!==null&&d.append(e);(e=c.readLine())!==null;)d.append(h),d.append(e);j=String(d.toString())}finally{c.close()}a(j)};return k});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(g,k,f){return{slideoutHTMLFragment:function(c){var a=document.createElement("div");a.innerHTML=f;var i=k.$("#slideContainer",a);i.id=c+i.id;i=k.$("#pageCommandParameters",a);i.id=c+i.id;i=k.$("#pageCommandDismiss",a);i.id=c+i.id;return a.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(g){function k(c,a,i,e,d,b){this.type=b||"keydown";this.keyCode=typeof c==="string"&&this.type==="keydown"?c.toUpperCase().charCodeAt(0):c;this.mod1=a!==void 0&&a!==null?a:!1;this.mod2=i!==void 0&&i!==null?i:!1;this.mod3=e!==void 0&&e!==null?e:!1;this.mod4=d!==void 0&&d!==null?d:!1}function f(c){this.keys=c}k.prototype={getKeys:function(){return[this]},match:function(c,a){if(a!==void 0){if(a!==0)return!1}else if(c instanceof Array){if(c.length>1)return!1;
c=c[0]}return c.type!==this.type?!1:this.keyCode===c.keyCode||this.keyCode===String.fromCharCode(g.isOpera?c.which:c.charCode!==void 0?c.charCode:c.keyCode)?this.mod1!==(g.isMac?c.metaKey:c.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==c.shiftKey?!1:this.mod3!==c.altKey?!1:g.isMac&&this.mod4!==c.ctrlKey?!1:!0:!1},equals:function(c){return!c?!1:this.keyCode!==c.keyCode?!1:this.mod1!==c.mod1?!1:this.mod2!==c.mod2?!1:this.mod3!==c.mod3?!1:this.mod4!==c.mod4?!1:this.type!==c.type?!1:!0}};f.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(c,a){var i=this.keys;if(a!==void 0)return a>i.length?!1:i[a].match(c)?a===i.length-1?!0:a+1:!1;else{c instanceof Array||(c=[c]);if(c.length>i.length)return!1;var e;for(e=0;e<c.length;e++)if(!i[e].match(c[e]))return!1;return e===i.length?!0:e}},equals:function(c){if(!c.keys)return!1;if(c.keys.length!==this.keys.length)return!1;for(var a=0;a<c.keys.length;a++)if(!c.keys[a].equals(this.keys[a]))return!1;return!0}};return{KeyBinding:k,KeyStroke:k,
KeySequence:f}});
define("orion/webui/dropdown",["require","orion/webui/littlelib","orion/EventTarget"],function(g,k,f){function c(a){f.attach(this);this._init(a)}c.prototype={_init:function(a){this._dropdownNode=k.node(a.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._populate=a.populate;this._selectionClass=a.selectionClass;this._parentDropdown=a.parentDropdown;this._positioningNode=a.positioningNode;if(!this._parentDropdown)for(var c=this._dropdownNode.parentNode;c&&document!==c;){if(c.classList&&
c.classList.contains("dropdownMenu")){this._parentDropdown=c.dropdown;break}c=c.parentNode}this._triggerNode=a.triggerNode?a.triggerNode:k.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";if(!a.skipTriggerEventListeners){var e=this;this._triggerNode.addEventListener("click",function(a){e.toggle(a)&&k.stop(a)},!1);this._triggerNode.tagName.toLowerCase()==="span"&&this._triggerNode.addEventListener("keydown",function(a){if(a.keyCode===
k.KEY.ENTER||a.keyCode===k.KEY.SPACE)e.toggle(),k.stop(a)},!1)}this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},addTriggerNode:function(a){var c=this;a.addEventListener("click",function(a){c.toggle(a)&&k.stop(a)},!1)},toggle:function(a){return this.isVisible()?this.close():this.open(a)},isVisible:function(){return this._isVisible},open:function(a){var c=!1;if(!this.isVisible()){this.dispatchEvent({type:"triggered",dropdown:this,event:a});k.setFramesEnabled(!1);this._populate&&
(this.empty(),this._populate(this._dropdownNode));var e=this.getItems();if(e.length>0){if(!this._hookedAutoDismiss)this._boundAutoDismiss?k.removeAutoDismiss(this._boundAutoDismiss):this._boundAutoDismiss=this._autoDismiss.bind(this),c=k.$$array(".dropdownSubMenu",this._dropdownNode),k.addAutoDismiss([this._triggerNode].concat(c),this._boundAutoDismiss),this._hookedAutoDismiss=!0;this._triggerNode.classList.add("dropdownTriggerOpen");this._selectionClass&&this._triggerNode.classList.add(this._selectionClass);
this._dropdownNode.classList.add("dropdownMenuOpen");this._isVisible=!0;this._positionDropdown(a);e[0].focus();c=!0;this._parentDropdown&&this._parentDropdown.submenuOpen(this)}}return c},_autoDismiss:function(a){if(this.close(!1)&&this._dropdownNode.contains(a.target))for(a=this._parentDropdown;a;)a.close(!1),a=a._parentDropdown},_positionDropdown:function(){this._dropdownNode.style.left="";this._dropdownNode.style.top="";if(this._positioningNode)this._dropdownNode.style.left=this._positioningNode.offsetLeft+
"px";else{var a=k.bounds(this._dropdownNode),c=k.bounds(document.body);if(a.left+a.width>c.left+c.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-a.width+"px";else{var e=k.bounds(this._boundingNode(this._triggerNode)),d=k.bounds(this._triggerNode);this._dropdownNode.style.left=d.left-e.left-a.width+d.width+"px"}a=a.top+a.height-(c.top+c.height);if(0<a)this._dropdownNode.style.top=Math.floor(this._dropdownNode.style.top-a)+"px"}},_boundingNode:function(a){var c=
window.getComputedStyle(a,null);return c===null?a:c.getPropertyValue("position")==="absolute"||!a.parentNode||a===document.body?a:this._boundingNode(a.parentNode)},close:function(a){var c=!1;if(this.isVisible())this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),k.setFramesEnabled(!0),a&&this._triggerNode.focus(),this._isVisible=!1,c=!0;return c},getItems:function(){var a=
[],c=this;k.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(e){e.parentNode.parentNode===c._dropdownNode&&a.push(e)});a.forEach(function(a){if(!a._hasDropdownMouseover)a.addEventListener("mouseover",function(d){a.dropdown?a.dropdown.open(d):(c._closeSelectedSubmenu(),k.stop(d))}),a._hasDropdownMouseover=!0});return a},empty:function(){var a=this;k.$$array("li",this._dropdownNode).forEach(function(c){c.parentNode===a._dropdownNode&&c.parentNode.removeChild(c)});
this._hookedAutoDismiss=!1},_dropdownKeyDown:function(a){if(a.keyCode===k.KEY.UP||a.keyCode===k.KEY.DOWN||a.keyCode===k.KEY.RIGHT||a.keyCode===k.KEY.ENTER||a.keyCode===k.KEY.LEFT){var c=this.getItems(),e=document.activeElement;if(c.length&&c.length>0&&e){var d=c.indexOf(e);d<0&&(d=c.indexOf(e.parentNode));d>=0&&(a.keyCode===k.KEY.UP&&d>0?(d--,c[d].focus()):a.keyCode===k.KEY.DOWN&&d<c.length-1?(d++,c[d].focus()):a.keyCode===k.KEY.ENTER||a.keyCode===k.KEY.RIGHT?e.classList.contains("dropdownTrigger")&&
e.dropdown&&e.dropdown.open():a.keyCode===k.KEY.LEFT&&e.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),k.stop(a))}}else a.keyCode===k.KEY.ESCAPE&&(this.close(!0),k.stop(a))},submenuOpen:function(a){if(a!==this._selectedSubmenu)this._closeSelectedSubmenu(),this._selectedSubmenu=a},_closeSelectedSubmenu:function(){for(var a=this._selectedSubmenu;a;)a.close(),a=a._selectedSubmenu},destroy:function(){this.empty();this._boundAutoDismiss&&k.removeAutoDismiss(this._boundAutoDismiss)}};
c.prototype.constructor=c;return{Dropdown:c}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<\!--span class="dropdownArrowDown core-sprite-openarrow"></span--\></button><ul class="dropdownMenu"></ul>'});define("text!orion/webui/dropdowntriggerbuttonwitharrow.html",[],function(){return'<button class="dropdownTrigger dropdownDefaultButton">${ButtonText}<span class="dropdownArrowDown core-sprite-openarrow"></span></button><ul class="dropdownMenu"></ul>'});
define("text!orion/webui/submenutriggerbutton.html",[],function(){return'<li class="dropdownSubMenu"><span class="dropdownTrigger dropdownMenuItem" role="menuitem" tabindex="0"><span class="dropdownCommandName">${ButtonText}</span><span class="dropdownArrowRight core-sprite-closedarrow"></span></span><ul class="dropdownMenu"></ul></li>'});define("text!orion/webui/checkedmenuitem.html",[],function(){return'<li><label class="dropdownMenuItem"><input class="checkedMenuItem" role="menuitem" type="checkbox" />${ItemText}</label></li>'});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(g,k){function f(c){this._init(c)}f.prototype={_init:function(c){this._node=k.node(c.node);if(!this._node)throw"no dom node for tooltip found";this._position=c.position||["right","above","below","left"];this._text=c.text;this._hideDelay=c.hideDelay===void 0?200:c.hideDelay;this._tailSize=c.tailSize||10;this._trigger=c.trigger||"mouseover";this._afterShowing=c.afterShowing;this._afterHiding=c.afterHiding;var a=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(e){e.target===a._node&&(a.show(),k.stop(e))},!1);else if(this._trigger==="mouseover"){this._showDelay=c.showDelay===void 0?500:c.showDelay;c=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(e){k.contains(a._node,e.target)&&(a.show(),k.stop(e))},!1);this._leaveHandler=function(e){k.contains(a._node,e.target)&&a.hide()};for(var f=0;f<c.length;f++)this._node.addEventListener(c[f],
this._leaveHandler,!1)}},_makeTipNode:function(){if(!this._tip){this._tip=document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("div");this._tipInner.classList.add("tooltip");if(this._text)this._tipTextContent=document.createElement("div"),this._tipTextContent.classList.add("textContent"),this._tipInner.appendChild(this._tipTextContent),this._tipTextContent.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);
document.body.appendChild(this._tip);var c=this;k.addAutoDismiss([this._tip,this._node],function(){c.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(c._timeout)window.clearTimeout(c._timeout),c._timeout=null;c._tip.addEventListener("mouseout",function(a){k.contains(c._tip,a.target)&&(c.hide(),k.stop(a))},
!1)},!1)}return this._tip},_positionTip:function(c,a){this._makeTipNode();c==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var f=this._node,e;for(e=k.bounds(f);f&&!e.width&&!e.height;f=f.parentNode)e=k.bounds(f);var f=k.bounds(this._tipInner),d;switch(c){case "above":d=e.top-f.height-this._tailSize-1;e=e.left-this._tailSize;break;case "below":d=e.top+e.height+this._tailSize+1;e=e.left-this._tailSize;break;case "left":d=e.top-this._tailSize/2;e=e.left-f.width-
this._tailSize-1;break;default:d=e.top-this._tailSize/2,e=e.left+e.width+this._tailSize+1}var b=k.bounds(document.documentElement);if(d+f.height>b.height)if(a)d=b.height-f.height-1;else return!1;if(e+f.width>b.width)if(a)e=b.width-f.width-1;else return!1;if(e<0)if(a)e=4;else return!1;if(d<0)if(a)d=4;else return!1;if(this._tail&&this._tail.previousPosition!==c)this._tip.removeChild(this._tail),this._tail=null;if(!this._tail){this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+
c);c==="above"||c==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner);if(c==="left")this._tail.style.left=f.width+"px";this._tail.previousPosition=c}this._tip.style.top=d+"px";this._tip.style.left=e+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._showDelay?this._timeout=
window.setTimeout(this._showImmediately.bind(this),this._showDelay):this._showImmediately()}},_showImmediately:function(){for(var c=!1,a=0;!c&&a<this._position.length;)c=this._positionTip(this._position[a]),a++;c||this._positionTip(this._position[0],!0);this._tip.classList.add("tooltipShowing");this._afterShowing&&this._afterShowing()},hide:function(c){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(c===void 0)c=
this._hideDelay;var a=this;this._timeout=window.setTimeout(function(){a._tip.classList.remove("tooltipShowing");a._tip.removeAttribute("style");a._afterHiding&&a._afterHiding()},c)}},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 c=["mouseout","click"],a=0;a<c.length;a++)this._node.removeEventListener(c[a],this._leaveHandler,!1)}}};f.prototype.constructor=f;return{Tooltip:f}});
define("orion/commands","orion/util,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/dropdowntriggerbuttonwitharrow.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip".split(","),function(g,k,f,c,a,i,e,d){function b(b){var a=b.invocation;if(a){var d=b.command;if(d.hrefCallback)return b=d.hrefCallback.call(a.handler||window,a),b.then?b.then(function(b){window.open(b)}):window.open(b),!0;else if(a.commandRegistry)return a.commandRegistry._invoke(a),
!0;else if(d.onClick||d.callback)return window.setTimeout(function(){(d.onClick||d.callback).call(a.handler||window,a)},0),!0}return!1}function h(a,d){for(var e in d)if(d[e]&&d[e].keyBinding&&d[e].command&&d[e].keyBinding.match(a)){var c=d[e],h=c.keyBinding;if((!h.domScope||k.contains(k.node(h.domScope),a.target))&&b(c)){k.stop(a);break}}}function j(){var b={};if(t){var a,d,e;d=Object.keys(u);for(a=0;a<d.length;a++)e=d[a],b[e]=u[e];var c=t();d=Object.keys(c);for(a=0;a<d.length;a++)e=d[a],b[e]=c[e]}else b=
u;return b}function l(b){h(b,j())}function m(b,a){b=b||window.event;if(function(b){if(g.isMac){if(b.metaKey&&!b.altKey)return!b.shiftKey&&!b.ctrlKey&&(b.keyCode===65||b.keyCode===67||b.keyCode===86||b.keyCode===88||b.keyCode===90)?!0:!1;if(b.ctrlKey)return!1}else{if(b.ctrlKey&&!b.altKey)return!b.shiftKey&&(b.keyCode===65||b.keyCode===67||b.keyCode===86||b.keyCode===88||b.keyCode===90)?!0:!1;if(b.altKey&&!b.ctrlKey)return!1}if(b["char"])return b["char"].length>0;else if(b.charCode||b.keyCode)switch(b=
b.charCode||b.keyCode,b){case 8:case 9:case 13:case 46:return!0;default:return b>=32&&b<112||b>123}return!1}(b)){if(b.target.contentEditable==="true")return;var d=b.target.nodeName.toLowerCase();if(d==="input")switch(b.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(d==="textarea")return}a?a(b):l(b)}function o(){this._init()}
function r(b,a,d){a.classList.add("commandImage");var e;b.imageClass?b.addImageClassToElement?a.classList.add(b.imageClass):(e=document.createElement("span"),a.appendChild(e),e.classList.add(b.spriteClass),e.classList.add(b.imageClass)):(e=new Image,e.alt=b.name,e.name=d,e.id=d,e.src=b.image,a.appendChild(e));return e}function q(b,a){var d=document.createElement("span");d.classList.add("dropdownKeyBinding");d.appendChild(document.createTextNode(a));b.appendChild(d)}function p(b,a,d,e,c){this.commandRegistry=
c;this.handler=b;this.items=a;this.userData=d;this.command=e;if(e.parameters)this.parameters=e.parameters.makeCopy();this.id=e.id}function n(b){this._init(b)}var t=null,u={};o.prototype={setProxy:function(b){this.proxy=b},setKeyBindings:function(b){this.bindings=b},_init:function(){var b=this;document.addEventListener("keydown",function(a){return m(a,function(a){var d=b.proxy,e=b.bindings;if(e&&d)for(var c=0;c<e.length;c++)e[c].match(a)&&(d.processKey({type:a.type,keyCode:a.keyCode,altKey:a.altKey,
ctrlKey:a.ctrlKey,metaKey:a.metaKey,shiftKey:a.shiftKey}),k.stop(a))})})}};window.document.addEventListener("keydown",m,!1);p.prototype={collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(b){var a=new p(this.handler,this.items,this.userData,this.command,this.commandRegistry);a.domNode=this.domNode;a.domParent=this.domParent;if(b)a.parameters=b.makeCopy();else if(this.parameters)a.parameters=this.parameters.makeCopy();return a}};
p.prototype.constructor=p;n.prototype={_init:function(b){this.id=b.id;this.name=b.name;this.tooltip=b.tooltip;this.callback=b.callback;this.hrefCallback=b.hrefCallback;this.choiceCallback=b.choiceCallback;this.positioningNode=b.positioningNode;this.image=b.image||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC";this.imageClass=b.imageClass;this.addImageClassToElement=b.addImageClassToElement;this.selectionClass=
b.selectionClass;this.spriteClass=b.spriteClass||"commandSprite";this.visibleWhen=b.visibleWhen;this.parameters=b.parameters;this.isEditor=b.isEditor},populateChoicesMenu:function(b,a,d,e,c){var d=this.getChoices(a,d,e),h=d.some(function(b){return b.checked});d.forEach(function(d){if(d.name){var e=document.createElement("li");b.appendChild(e);var j=document.createElement("span");j.tabIndex=0;j.role="menuitem";j.classList.add("dropdownMenuItem");if(h){var l=document.createElement("span");l.classList.add("check");
l.appendChild(document.createTextNode(d.checked?"\u25cf":""));j.appendChild(l)}l=document.createTextNode(d.name);j.appendChild(l);e.appendChild(j);j.choice=d;j.addEventListener("click",function(b){b.target.choice&&b.target.choice.callback.call(b.target.choice,a)},!1);j.addEventListener("keydown",function(b){(b.keyCode===k.KEY.ENTER||b.keyCode===k.KEY.SPACE)&&b.target.choice&&b.target.choice.callback.call(b.target.choice,a)},!1)}else c._generateMenuSeparator(b)})},getChoices:function(b,a,d){return this.choiceCallback?
this.choiceCallback.call(a,b,d):null},makeChoiceCallback:function(b,a){return function(d){b.callback&&b.callback.call(b,a,d)}},hasImage:function(){return this.imageClass||this.image!=="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC"}};n.prototype.constructor=n;return{Command:n,CommandInvocation:p,createDropdownMenu:function(b,d,e,h,j,l,m,i,p){b=k.node(b);if(!b)throw"no parent node was specified";
var g=document.createRange();g.selectNode(b);g=p?g.createContextualFragment(a):g.createContextualFragment(c);k.processTextNodes(g,{ButtonText:d});b.appendChild(g);var b=b.lastChild,q;p?(p=b.previousSibling,q=p.lastChild):p=b.previousSibling;h?p.classList.add(h):(p.classList.add("orionButton"),p.classList.add("commandButton"));if(j){if(!l)p.textContent="",p.setAttribute("aria-label",d);r({spriteClass:"commandSprite",imageClass:j},p,d);p.classList.add("orionButton")}p.dropdown=new f.Dropdown({dropdown:b,
populate:e,selectionClass:m,skipTriggerEventListeners:!!q,positioningNode:i});b.dropdown=p.dropdown;return{menuButton:p,menu:b,dropdown:p.dropdown,dropdownArrow:q}},createCheckedMenuItem:function(b,a,d,c){b=k.node(b);if(!b)throw"no parent node was specified";var h=document.createRange();h.selectNode(b);h=h.createContextualFragment(e);k.processTextNodes(h,{ItemText:a});b.appendChild(h);b=k.$(".checkedMenuItem",b.lastChild);b.checked=d;b.addEventListener("change",c,!1);return b},createCommandItem:function(b,
a,e,c,h,j,l){var f,j=j||!a.name&&a.hasImage();if(a.hrefCallback)f=document.createElement("a"),f.id=c,j&&a.hasImage()?r(a,f,c):(f.className="commandLink",f.appendChild(document.createTextNode(a.name))),l=a.hrefCallback.call(e.handler,e),l.then?l.then(function(b){f.href=b}):f.href=l?l:"#";else{f=document.createElement("button");f.className="orionButton";j?a.hasImage()?(r(a,f,c),a.name&&f.setAttribute("aria-label",a.name)):(f.classList.add("commandButton"),f.classList.add("commandMissingImageButton"),
f.appendChild(document.createTextNode(a.name))):(f.classList.add("commandButton"),c=document.createTextNode(a.name),f.appendChild(c));var m=l||a.callback;if(m)a.onClick=m,f.addEventListener("click",function(){m.call(e.handler,e)},!1)}b.nodeName.toLowerCase()==="ul"?(l=document.createElement("li"),b.appendChild(l),b=l):f.classList.add("commandMargins");b.appendChild(f);if(a.tooltip)f.commandTooltip=new d.Tooltip({node:f,text:a.tooltip,position:["above","below","right","left"]});h&&(u[a.id]={keyBinding:h,
command:a,invocation:e});return f},createCommandMenuItem:function(b,a,e,c,h,j){var l,f=b.dropdown;if(a.hrefCallback){l=document.createElement("a");var m=document.createElement("span");m.appendChild(document.createTextNode(a.name));m.classList.add("dropdownCommandName");l.appendChild(m);h=a.hrefCallback.call(e.handler,e);h.then?h.then(function(b){l.href=b}):l.href=h?h:"#";l.addEventListener("keydown",function(b){(b.keyCode===k.KEY.ENTER||b.keyCode===k.KEY.SPACE)&&l.click()},!1)}else{l=document.createElement("span");
l.tabIndex=0;m=document.createElement("span");m.appendChild(document.createTextNode(a.name));m.classList.add("dropdownCommandName");l.appendChild(m);var i=h||a.callback;if(i)a.onClick=i,l.addEventListener("click",function(){f.close(!0);i.call(e.handler,e)},!1),l.addEventListener("keydown",function(b){if(b.keyCode===k.KEY.ENTER||b.keyCode===k.KEY.SPACE)b.preventDefault(),l.click()},!1)}l.className="dropdownMenuItem";l.role="menuitem";if(a.tooltip)l.commandTooltip=new d.Tooltip({node:l,text:a.tooltip,
position:["above","below","right","left"]});j&&q(l,j);j=document.createElement("li");b.appendChild(j);j.appendChild(l);c&&(u[a.id]={keyBinding:c,command:a,invocation:e});return l},executeBinding:b,setKeyBindingProvider:function(b){t=b},localKeyBindings:u,CommandsProxy:o,getKeyBindings:j,processKey:l,NO_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC",_testMethodProcessKey:h}});
define("orion/explorers/navigationUtils",[],function(){function g(f,c){if(!k&&f)f.push({domNode:c}),c.tabIndex=-1,c.style.outline="none"}var k=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(f,c,a){f&&(f=f.getGridNavHolder(c,!0))&&g(f,a)},generateNavGrid:g,removeNavGrid:function(f,c){if(f)for(var a=0;a<f.length;a++)if(f[a].domNode===c){f.splice(a,1);break}}}});
define("orion/PageUtil",[],function(){var g=/^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:""},c=g.indexOf("#");if(c!==-1&&(g=g.substring(c+1),g.length!==0)){g=g.split(",");f.resource=decodeURIComponent(g[0]);for(c=1;c<g.length;c++){var a=/([^=]*)(=?)(.*)/.exec(g[c]),i=decodeURIComponent(a[1]||""),a=decodeURIComponent(a[3]||"");i!==""&&i!=="resource"&&(f[i]=a)}}return f},
validateURLScheme:function(k,f){var c=k;if(k.indexOf("://")===-1){var a=document.createElement("a");a.href=k;c=a.href}a=!1;return(a=f?f.some(function(a){return RegExp("^"+a+":","i").test(c)}):g.test(c))?k:(console.log("Illegal URL Scheme: '"+k+"'"),"")}}});
define("orion/uiUtils",["orion/webui/littlelib"],function(g){function k(c){var a="",f=navigator.platform.indexOf("Mac")!==-1;f?(c.mod4&&(a+="\u2303"),c.mod3&&(a+="\u2325"),c.mod2&&(a+="\u21e7"),c.mod1&&(a+="\u2318")):(c.mod1&&(a+="Ctrl+"),c.mod2&&(a+="Shift+"),c.mod3&&(a+="Alt+"));if(c.alphaKey)return a+c.alphaKey;if(c.type==="keypress")return a+c.keyCode;for(var e in g.KEY)if(typeof(g.KEY[e]==="number")&&g.KEY[e]===c.keyCode){if(f)switch(g.KEY[e]){case g.KEY.BKSPC:e="\u232b";break;case g.KEY.TAB:e=
"\u21e5";break;case g.KEY.ENTER:e="\u23ce";break;case g.KEY.ESCAPE:e="\u238b";break;case g.KEY.SPACE:e="\u2423";break;case g.KEY.PAGEUP:e="\u21de";break;case g.KEY.PAGEDOWN:e="\u21df";break;case g.KEY.END:e="\u21f2";break;case g.KEY.HOME:e="\u21f1";break;case g.KEY.DEL:e="\u2326"}switch(g.KEY[e]){case g.KEY.DOWN:e="\u2193";break;case g.KEY.UP:e="\u2191";break;case g.KEY.RIGHT:e="\u2192";break;case g.KEY.LEFT:e="\u2190"}return a+e}var d;switch(c.keyCode){case 59:d=c.mod2?":":";";break;case 61:d=c.mod2?
"+":"=";break;case 188:d=c.mod2?"<":",";break;case 190:d=c.mod2?">":".";break;case 191:d=c.mod2?"?":"/";break;case 192:d=c.mod2?"~":"`";break;case 219:d=c.mod2?"{":"[";break;case 220:d=c.mod2?"|":"\\";break;case 221:d=c.mod2?"}":"]";break;case 222:d=c.mod2?'"':"'"}return d?a+d:c.keyCode>=112&&c.keyCode<=123?a+"F"+(c.keyCode-111):a+String.fromCharCode(c.keyCode)}function f(c){var a=window.navigator.platform.indexOf("Mac")!==-1;return a&&c.metaKey||!a&&c.ctrlKey}return{getUserKeyString:function(c){for(var a=
"",c=c.getKeys(),f=0;f<c.length;f++)f!==0&&(a+=" "),a+=k(c[f]);return a},getUserText:function(c){var a=c.id,f=c.refNode,e=c.hideRefNode,d=c.initialText,b=c.onComplete,h=c.onEditDestroy,j=c.selectTo,l=c.isInitialValid,c=c.insertAsChild,m=!1,k=function(c){return function(j){if(!m){var k=g.node(a),o=k.value;if(k)if(c&&j.keyCode===g.KEY.ESCAPE){if(e)f.style.display="inline";m=!0;k.parentNode.removeChild(k);h&&h()}else if(!(c&&j.keyCode!==g.KEY.ENTER)){if(o.length===0||!l&&o===d){if(e)f.style.display=
"inline"}else if(b(o),e&&f.parentNode)f.style.display="inline";m=!0;k.parentNode&&k.parentNode.removeChild(k);h&&h()}}}},r=document.createElement("input");r.id=a;r.value=d||"";c?f.appendChild(r):f.parentNode.insertBefore(r,f.nextSibling);r.classList.add("userEditBoxPrompt");if(e)f.style.display="none";r.addEventListener("keydown",k(!0),!1);r.addEventListener("blur",k(!1),!1);window.setTimeout(function(){r.focus();if(d){var b=g.node(a),e=j?d.indexOf(j):-1;if(e>0)if(b.createTextRange)b=b.createTextRange(),
b.collapse(!0),b.moveStart("character",0),b.moveEnd("character",e),b.select();else if(b.setSelectionRange)b.setSelectionRange(0,e);else{if(b.selectionStart!==void 0)b.selectionStart=0,b.selectionEnd=e}else b.select()}},0)},openInNewWindow:f,followLink:function(c,a){a&&f(a)?window.open(c):window.location=c},createButton:function(c,a){var f=document.createElement("button");f.className="orionButton commandButton commandMargins";f.addEventListener("click",function(e){a();g.stop(e)},!1);c&&f.appendChild(document.createTextNode(c));
return f},createDropdownButton:function(){},isFormElement:function(c){switch(c.tagName.toLowerCase()){case "button":case "fieldset":case "form":case "input":case "keygen":case "label":case "legend":case "meter":case "optgroup":case "output":case "progress":case "select":case "textarea":return!0}return!1}}});
define("orion/commandRegistry","orion/commands,orion/explorers/navigationUtils,orion/PageUtil,orion/uiUtils,orion/webui/littlelib,orion/webui/dropdown,orion/webui/tooltip,text!orion/webui/checkedmenuitem.html,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html".split(","),function(g,k,f,c,a,i,e,d,b,h){function j(b){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(b);this._parameterCollector=
null}function l(b,a){this.token=b;this.parameterName=a}function m(b,a,d){this.event=b;this.handler=a;this.capture=d||!1}function o(b,a,d,e,c,h){this.name=b;this.type=a;this.label=d;this.value=e;this.lines=c||1;this.eventListeners=Array.isArray(h)?h:h?[h]:[]}function r(b,a,d){this._storeParameters(b);this._hasOptionalParameters=a&&a.hasOptionalParameters;this._options=a;this.optionsRequested=!1;this.getParameters=d;this.clientCollect=a&&a.clientCollect}j.prototype={_init:function(b){this._selectionService=
b.selection;var a=this;g.setKeyBindingProvider(function(){return a._activeBindings})},processURL:function(b){for(var a in this._urlBindings)if(this._urlBindings[a]&&this._urlBindings[a].urlBinding&&this._urlBindings[a].command){var d=this._urlBindings[a].urlBinding.match(b);if(d){var e=this._urlBindings[a],c=e.command,h=e.invocation;if(h&&h.parameters&&c.callback){h.parameters.setValue(d.parameterName,d.parameterValue);var j=this;window.setTimeout(function(){j._invoke(h)},0);break}}}},findCommand:function(b){return this._commandList[b]},
runCommand:function(b,a,d,e){a?(b=this._commandList[b])&&(b.visibleWhen?b.visibleWhen(a):1)&&b.callback&&this._invoke(new g.CommandInvocation(d,a,null,b,this),e):(a=this._urlBindings[b])&&a.command&&a.command.callback&&this._invoke(a.invocation,e)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(b){this._parameterCollector=b},openParameterCollector:function(b,a,d){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(b,
a,d))},confirm:function(b,a,d,e,c,h){var j=!1;if(this._parameterCollector&&!c){var l=this;this._parameterCollector.close();if(this._parameterCollector.open(b,function(b,c){var h=document.createElement("span");h.classList.add("parameterPrompt");h.textContent=a;b.appendChild(h);h=document.createElement("button");h.addEventListener("click",function(){j=!0;l._parameterCollector.close()},!1);c.appendChild(h);h.appendChild(document.createTextNode(d));h.className="dismissButton";var f=document.createElement("button");
f.addEventListener("click",function(){j=!1;l._parameterCollector.close()},!1);c.appendChild(f);f.appendChild(document.createTextNode(e));f.className="dismissButton";return h},function(){h(j)}))return}j=window.confirm(a);h(j)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(b,a){return this._collectAndInvoke(b.makeCopy(a),!1)},_collectAndInvoke:function(b,a){if(b)if(this._parameterCollector&&
b.parameters&&b.parameters.hasParameters()&&(a||b.parameters.shouldCollectParameters())){var d=!1;b.parameters.updateParameters(b);if(b.parameters.shouldCollectParameters()&&(d=this._parameterCollector.collectParameters(b),!d)){var c=new e.Tooltip({node:b.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),d=c.contentContainer();d.classList.add("parameterPopup");var h=window.document.activeElement,j=this._parameterCollector.getFillFunction(b,
function(){h&&h.focus();c.destroy()})(d);c.show();window.setTimeout(function(){j.focus();j.select()},0);d=!0}d||b.command.callback.call(b.handler||window,b)}else b.command.callback.call(b.handler||window,b);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},collectParameters:function(b){this._collectAndInvoke(b,!0)},showKeyBindings:function(b){function a(b){return function(){g.executeBinding(b)}}var d={},e,h,j=[],l;for(l in this._activeBindings)(h=
this._activeBindings[l])&&h.keyBinding&&h.command&&(h.command.name||h.command.tooltip)&&j.push(h);j.sort(function(b,a){return(b.command.name||b.command.tooltip).localeCompare(a.command.name||a.command.tooltip)});for(l=0;l<j.length;l++)h=j[l],h.keyBinding.scopeName?(d[h.keyBinding.scopeName]||(d[h.keyBinding.scopeName]=[]),d[h.keyBinding.scopeName].push(h)):(e=c.getUserKeyString(h.keyBinding),b.createItem(e,h.command.name||h.command.tooltip,a(h)));for(var f in d)d[f].length&&d[f].length>0&&(b.createHeader(f),
d[f].forEach(function(d){e=c.getUserKeyString(d.keyBinding);b.createItem(e,d.command.name||d.command.tooltip,a(d))}))},addCommand:function(b){this._commandList[b.id]=b;var a=this._pendingBindings[b.id];if(a){var d=this;a.forEach(function(a){d._addBinding(b,a.type,a.binding,a.bindingOnly)});delete this._pendingBindings[b.id]}},addCommandGroup:function(b,a,d,e,c,h,j,l,f,m){this._contributionsByScopeId[b]||(this._contributionsByScopeId[b]={});b=this._contributionsByScopeId[b];c&&(b=this._createEntryForPath(b,
c));if(b[a]){if(e)b[a].title=e;if(d)b[a].position=d;if(j)b[a].imageClass=j;if(l)b[a].tooltip=l;if(f)b[a].selectionClass=f;m===!0?b[a].pretendDefaultActionId=!0:b[a].defaultActionId=m;b[a].emptyGroupMessage=h}else b[a]={title:e,position:d,emptyGroupMessage:h,imageClass:j,tooltip:l,selectionClass:f,defaultActionId:m===!0?null:m,pretendDefaultActionId:m===!0,children:{}},b.sortedContributions=null},_createEntryForPath:function(b,a){a&&a.split("/").forEach(function(a){if(a.length>1){if(!b[a])b[a]={position:0,
children:{}},b.sortedContributions=null;b=b[a].children}});return b},registerSelectionService:function(b,a){this._contributionsByScopeId[b]||(this._contributionsByScopeId[b]={});this._contributionsByScopeId[b].localSelectionService=a},registerCommandContribution:function(b,a,d,e,c,h,j){this._contributionsByScopeId[b]||(this._contributionsByScopeId[b]={});b=this._contributionsByScopeId[b];e&&(b=this._createEntryForPath(b,e));b[a]={position:d};h&&((d=this._commandList[a])?this._addBinding(d,"key",h,
c):this._addPendingBinding(a,"key",h,c));j&&((d=this._commandList[a])?this._addBinding(d,"url",j,c):this._addPendingBinding(a,"url",j,c));b.sortedContributions=null},unregisterCommandContribution:function(b,a,d){if(this._contributionsByScopeId[b]){delete this._commandList[a];delete this._activeBindings[a];delete this._urlBindings[a];delete this._pendingBindings[a];var e=this._contributionsByScopeId[b];d&&d.split("/").forEach(function(b){if(b.length>1&&e[b])e=e[b].children});delete e[a];e.sortedContributions=
null}},_addBinding:function(b,a,d,e){if(!b.id)throw Error("No command id: "+b);a==="key"?this._activeBindings[b.id]={command:b,keyBinding:d,bindingOnly:e}:a==="url"&&(this._urlBindings[b.id]={command:b,urlBinding:d,bindingOnly:e})},_addPendingBinding:function(b,a,d,e){this._pendingBindings[b]=this._pendingBindings[b]||[];this._pendingBindings[b].push({type:a,binding:d,bindingOnly:e})},_checkForTrailingSeparator:function(b,d,e){var c;if(d==="tool"||d==="button")if((c=b.childNodes.length>0?b.childNodes[b.childNodes.length-
1]:null)&&c.classList.contains("commandSeparator"))return e?(b.removeChild(c),!1):!0;if(d==="menu"&&(b=a.$$array("li > *",b),b.length>0&&b[b.length-1].classList.contains("dropdownSeparator")))if(c=b[b.length-1],e)c.parentNode.parentNode.removeChild(c.parentNode);else return!0;return!1},renderCommands:function(b,d,e,c,h,j,l){if(typeof b!=="string")throw"a scope id for rendering must be specified";d=a.node(d);if(!d)throw"no parent";var f=this._contributionsByScopeId[b];if(!e&&f){var e=f.localSelectionService||
this._selectionService,m=this;e&&e.getSelections(function(a){m.renderCommands(b,d,a,c,h,j)})}else f&&(this._render(f,d,e,c,h||"button",j,l),this._checkForTrailingSeparator(d,h,!0))},destroy:function(b){b=a.node(b);if(!b)throw"no parent";for(;b.hasChildNodes();){var d=b.firstChild;d.commandTooltip&&d.commandTooltip.destroy();d.emptyGroupTooltip&&d.emptyGroupTooltip.destroy();this.destroy(d);b.removeChild(d)}},_render:function(b,a,d,h,j,l,f){var m=b.sortedContributions;if(!m){var m=[],i=!1,o;for(o in b)if(Object.prototype.hasOwnProperty.call(b,
o)){var r=b[o];if(r&&typeof r.position==="number")r.id=o,m.push(r),i=!0}if(i)m.sort(function(b,a){return b.position-a.position}),b.sortedContributions=m}var D=0,s=this;m.forEach(function(b){var m;if(!b.imageClass)b.imageClass=null;if(b.children&&Object.getOwnPropertyNames(b.children).length>0){var i=b.children;if(j==="tool"||j==="button")if(b.title){var o;if(b.defaultActionId)(i=s._commandList[b.defaultActionId])&&(i.visibleWhen?i.visibleWhen(d):1)?(o=new g.CommandInvocation(h,d,l,i,s),o.domParent=
a):b.pretendDefaultActionId=!0;i=s._createDropdownMenu(a,b.title,null,null,b.imageClass,b.tooltip,b.selectionClass,null,o,b.pretendDefaultActionId);f&&k.generateNavGrid(f,i.menuButton);if(i)if(s._render(b.children,i.menu,d,h,"menu",l,f),s._checkForTrailingSeparator(i.menu,"menu",!0),i.menu.childNodes.length===0)if(b.emptyGroupMessage){if(!i.menuButton.emptyGroupTooltip)i.menuButton.emptyGroupTooltip=new e.Tooltip({node:i.menuButton,text:b.emptyGroupMessage,trigger:"click",position:["below","right",
"above","left"]})}else f&&k.removeNavGrid(f,i.menuButton),b=function(b){b&&b.parentNode&&b.parentNode.removeChild(b)},b(i.menu),b(i.menuButton),b(i.destroyButton);else i.menuButton.style.visibility="visible"}else{var r;a.childNodes.length>0&&!s._checkForTrailingSeparator(a,j)&&(r=s.generateSeparatorImage(a));s._render(i,a,d,h,j,l,f);a.childNodes.length>0&&a.childNodes[a.childNodes.length-1]!==r&&(r=s.generateSeparatorImage(a))}else if(b.title){if(b=s._createDropdownMenu(a,b.title,!0,null,null,b.imageClass))s._render(i,
b.menu,d,h,"menu",l,f),s._checkForTrailingSeparator(b.menu,"menu",!0),b.menu.childNodes.length===0&&b.destroyButton&&a.removeChild(b.destroyButton)}else a.childNodes.length>0&&s._generateMenuSeparator(a),s._render(i,a,d,h,j,l,f),s._generateMenuSeparator(a)}else{var q=s._commandList[b.id],i=q?!0:!1;o=b=null;if(q){m=new g.CommandInvocation(h,d,l,q,s);m.domParent=a;r=i&&(q.visibleWhen?q.visibleWhen(d):!0);if(s._activeBindings[q.id]&&s._activeBindings[q.id].keyBinding)b=s._activeBindings[q.id],b.invocation=
r?m:null,b.bindingOnly&&(i=!1);if(s._urlBindings[q.id]&&s._urlBindings[q.id].urlBinding)o=s._urlBindings[q.id],o.invocation=r?m:null,o.bindingOnly&&(i=!1);i=i&&r}if(i)q.choiceCallback?(j==="tool"||j==="button"?(b=a,i=!1,a.nodeName.toLowerCase()==="ul"&&(b=document.createElement("li"),a.appendChild(b))):(b=a,i=!0),s._createDropdownMenu(b,q.name,i,function(b){q.populateChoicesMenu(b,d,h,l,s)}.bind(q),q.imageClass,q.tooltip||q.title,q.selectionClass,q.positioningNode)):(m.handler=m.handler||this,m.domParent=
a,i=function(){s._invoke(m)},j==="menu"?(o=null,b&&b.keyBinding&&(o=c.getUserKeyString(b.keyBinding)),b=g.createCommandMenuItem(a,q,m,null,i,o)):(b=j+q.id+D,b=g.createCommandItem(a,q,m,b,null,j==="tool",i)),k.generateNavGrid(f,b),m.domNode=b,D++)}})},_createDropdownMenu:function(b,d,c,j,l,f,m,k,o,r){b=a.node(b);if(!b||!a.contains(document.body,b))return null;var G,D,s=b;if(c)f=document.createRange(),f.selectNode(b),f=f.createContextualFragment(h),a.processTextNodes(f,{ButtonText:d}),b.appendChild(f),
D=b.lastChild,l=D.lastChild,d=l.previousSibling,d.dropdown=new i.Dropdown({dropdown:l,populate:j,parentDropdown:b.dropdown}),l.dropdown=d.dropdown;else{b.nodeName.toLowerCase()==="ul"&&(s=document.createElement("li"),b.appendChild(s),D=s);b=null;l&&(b="dropdownButtonWithIcon",f=f||d);var f=l?f||d:f,A=g.createDropdownMenu(s,d,j,b,l,!1,m,k,o||r);G=A.dropdownArrow;d=A.menuButton;if(G){if(o)o.domNode=A.menuButton;var v=this;d.onclick=function(b){var d=a.bounds(G);b.clientX>=d.left&&A.dropdown?A.dropdown.toggle(b):
v._invoke(o)};if(A.dropdown)d.onkeydown=function(b){a.KEY.DOWN===b.keyCode&&(A.dropdown.toggle(b),a.stop(b))}}var l=A.menu,C;(j=o&&o.command&&(o.command.tooltip||o.command.name))?C=o.command.tooltip||o.command.name:j&&(C=f);if(C)d.commandTooltip=new e.Tooltip({node:d,text:C,position:["above","below","right","left"]})}return{menuButton:d,menu:l,dropdown:d.dropdown,destroyButton:D,dropdownArrow:G}},_generateMenuSeparator:function(b){if(!this._checkForTrailingSeparator(b,"menu")){var a=document.createElement("li");
a.classList.add("dropdownSeparator");var d=document.createElement("span");d.classList.add("dropdownSeparator");a.appendChild(d);b.appendChild(a)}},generateSeparatorImage:function(b){var a;a=b.nodeName.toLowerCase()==="ul"?document.createElement("li"):document.createElement("span");b.appendChild(a);a.classList.add("core-sprite-sep");a.classList.add("imageSprite");a.classList.add("commandSeparator");return a}};j.prototype.constructor=j;l.prototype={match:function(b){b=f.matchResourceParameters(b);return typeof b[this.token]!==
"undefined"?(this.parameterValue=b[this.token],this):null}};l.prototype.constructor=l;m.prototype.constructor=m;o.prototype={optionsRequested:function(){return this.optionsRequested}};o.prototype.constructor=o;r.prototype={_storeParameters:function(b){this.parameterTable=null;if(b){var a=this.parameterTable={};b.forEach(function(b){a[b.name]=b})}},updateParameters:function(b){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(b))},hasParameters:function(){return this.parameterTable!==
null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(b){return this.parameterTable[b]},valueFor:function(b){return(b=this.parameterTable[b])?b.value:null},setValue:function(b,a){var d=this.parameterTable[b];if(d)d.value=a},forEach:function(b){for(var a in this.parameterTable)this.parameterTable[a].type&&this.parameterTable[a].name&&b(this.parameterTable[a])},makeCopy:function(){var b=[];this.forEach(function(a){a=new o(a.name,a.type,a.label,
a.value,a.lines,a.eventListeners);b.push(a)});var a=new r(b,this._options,this.getParameters);a.clientCollect=this.clientCollect;return a},hasOptionalParameters:function(){return this._hasOptionalParameters}};r.prototype.constructor=r;return{CommandRegistry:j,URLBinding:l,ParametersDescription:r,CommandParameter:o,CommandEventListener:m}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(g,k,f){function c(a,c){this._activeContainer=null;this._getElementsFunction=a;this._toolbarLayoutFunction=c}c.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(a,c,e){typeof a==="string"&&(a=f.node(a));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===a)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(a))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=e;var d=c(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!d)return!1;this._activeElements.focusNode=d;a=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(a.length===0){c=this._activeElements.dismissArea||
this._activeElements.parameterArea;a=document.createElement("button");a.id="closebox";a.className="imageSprite core-sprite-close dismissButton";a.title=g.Close;c.appendChild(a);var b=this;a.addEventListener("click",function(){b.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(d)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){d.focus();d.select&&d.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(a,c){f.$$array("input",c).forEach(function(e){e.type==="checkbox"?a.parameters.setValue(e.parameterName,e.checked):e.type!=="button"&&a.parameters.setValue(e.parameterName,e.value.trim())});f.$$array("textArea",c).forEach(function(e){a.parameters.setValue(e.parameterName,e.value.trim())});a.command.callback&&a.command.callback.call(a.handler,a)},collectParameters:function(a){return a.parameters?
(a.domNode&&a.domNode.classList.add("commandMarker"),this.open(a.domNode||a.domParent,this.getFillFunction(a))):!1},getFillFunction:function(a,c){var e=this;return function(d,b){var h=null,j=function(){c&&c();e.close()},l=function(b){b.keyCode===f.KEY.ENTER&&e._collectAndCall(a,d);if(b.keyCode===f.KEY.ESCAPE||b.keyCode===f.KEY.ENTER)j(),f.stop(b)};a.parameters.forEach(function(b){var e=null;if(b.label)e=document.createElement("label"),e.classList.add("parameterInput"),e.setAttribute("for",b.name+
"parameterCollector"),e.textContent=b.label,d.appendChild(e);var c=b.name+"parameterCollector",m,e=e||d;if(b.type==="text"&&typeof b.lines==="number"&&b.lines>1)m=document.createElement("textarea"),m.rows=b.lines,m.type="textarea",m.id=c,e.appendChild(m),l=function(b){b.keyCode===f.KEY.ESCAPE&&(j(),f.stop(b))};else if(b.type==="boolean"){if(m=document.createElement("input"),m.type="checkbox",m.id=c,e.appendChild(m),b.value)m.checked=!0}else if(m=document.createElement("input"),m.type=b.type,m.id=
c,e.appendChild(m),b.value)m.value=b.value;m.classList.add("parameterInput");m.setAttribute("speech","speech");m.setAttribute("x-webkit-speech","x-webkit-speech");m.parameterName=b.name;h||(h=m);b.eventListeners.length>0&&b.eventListeners.forEach(function(b){m.addEventListener(b.event,function(d){return b.handler(d,a)},b.capture)});m.addEventListener("keydown",l,!1)});var m=b;m||(m=document.createElement("span"),m.classList.add("layoutRight"),m.classList.add("parametersDismiss"),d.appendChild(m));
var o=function(b,a){var d=document.createElement("button");a.appendChild(d);b&&d.appendChild(document.createTextNode(b));d.classList.add("dismissButton");return d};if(a.parameters.hasOptionalParameters())a.parameters.optionsRequested=!1,o(g.More,m).addEventListener("click",function(){a.parameters.optionsRequested=!0;e._collectAndCall(a,d);j()},!1);o(g.Submit,m).addEventListener("click",function(){e._collectAndCall(a,d);j()},!1);m=o(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");
m.title=g.Close;m.addEventListener("click",function(){j()},!1);return h}}};c.prototype.constructor=c;return{CommandParameterCollector:c}});define("orion/regex",[],function(){return{escape:function(g){return g.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(g){return(g=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(g))?{pattern:g[1],flags:g[2]}:null}}});
define("orion/contentTypes",[],function(){function g(b,a){function d(b,a,e,c){var e=a.filename.indexOf(e)>=0,h;h=c.toLowerCase();h=a.extension.indexOf(h)!==-1;if(e||h){if(!(h=!b))e&&(c=c.toLowerCase(),e=b.extension.indexOf(c)!==-1),h=e;if(h)return a}return b}if(typeof b!=="string")return null;for(var e=b&&b.split(".").pop(),c=null,f=0;f<a.length;f++){var i=a[f];d(c,i,b,e)===i&&(c=i)}return c}function k(b){return b===null||typeof b==="undefined"?[]:Array.isArray(b)?b:[b]}function f(b){return k(b).map(function(b){return String.prototype.toLowerCase.call(b)})}
function c(b){return{id:b.id,name:b.name,image:b.image,imageClass:b.imageClass,"extends":b["extends"],extension:f(b.extension),filename:k(b.filename)}}function a(b){var a=Object.create(null);b.map(c).forEach(function(b){Object.prototype.hasOwnProperty.call(a,b.id)||(a[b.id]=b)});return a}function i(c){if(c&&c.registerService){this.serviceRegistry=c;for(var j=c.getServiceReferences(d).concat(c.getServiceReferences(b)),l=[],f=0;f<j.length;f++)for(var i=k(j[f].getProperty("contentTypes")),g=0;g<i.length;g++)l.push(i[g]);
this.map=a(l);c.registerService(e,this)}else if(Array.isArray(c))this.serviceRegistry=null,this.map=a(c);else throw Error("Invalid parameter");}var e="orion.core.contentTypeRegistry",d="orion.core.contenttype",b="orion.file.contenttype";i.prototype={getContentTypes:function(){var b=this.getContentTypesMap(),a=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&a.push(b[d]);return a},getContentTypesMap:function(){return this.map},getFileContentType:function(b){return g(b.Name,this.getContentTypes())},
getFilenameContentType:function(b){return g(b,this.getContentTypes())},getContentType:function(b){return this.map[b]||null},isExtensionOf:function(b,a){b=typeof b==="string"?this.getContentType(b):b;a=typeof a==="string"?this.getContentType(a):a;if(!b||!a)return!1;if(b.id===a.id)return!0;else for(var d=b,e={};d&&(d=this.getContentType(d["extends"]));){if(d.id===a.id)return!0;if(e[d.id])throw Error("Cycle: "+d.id);e[d.id]=!0}return!1},isSomeExtensionOf:function(b,a){for(var d=0;d<a.length;d++)if(this.isExtensionOf(b,
a[d]))return!0;return!1}};return{ContentTypeRegistry:i,getFilenameContentType:g}});
define("orion/URITemplate",[],function(){function g(b){this._text=b}function k(b){return b.replace("%25","%")}function f(b,a){if(a==="U")return encodeURIComponent(b).replace(/[!'()*]/g,function(b){return"%"+b.charCodeAt(0).toString(16).toUpperCase()});if(a==="U+R")return encodeURI(b).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(h,k);if(a==="U+R-,")return encodeURI(b).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+a);}function c(b,a,d){for(var e=
[],c=0;c<b.length;c++)typeof b[c]!=="undefined"&&e.push(f(b[c],a));return e.join(d)}function a(b,a,d,e){for(var c=Object.keys(b),h=[],i=0;i<c.length;i++)typeof b[c[i]]!=="undefined"&&h.push(f(c[i],a)+d+f(b[c[i]],a));return h.join(e)}function i(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=d[a[0]])?a=a.substring(1):this._operator=d.NUL;for(var e=[],c=a.split(","),h=0;h<c.length;h++){var f=c[h].match(b);if(f===null)throw Error("Bad VarSpec: "+a);e.push({name:f[1],
explode:!!f[2],prefix:f[3]?parseInt(f[3],10):-1})}this._varSpecList=e}function e(b){for(var a=[],d=0,e=b.indexOf("{",d);e!==-1;){a.push(new g(b.substring(d,e)));d=b.indexOf("}",e+1);if(d===-1)throw Error("Invalid template: "+b);a.push(new i(b.substring(e+1,d)));d+=1;e=b.indexOf("{",d)}a.push(new g(b.substring(d)));this._templateComponents=a}var d={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-,"}},b=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/,h=/%25[0-9A-F][0-9A-F]/g;g.prototype={expand:function(){return encodeURI(this._text)}};
i.prototype={expand:function(b){for(var d=[],e=0;e<this._varSpecList.length;e++){var h=this._varSpecList[e],i=h.name,g=b[i],k=typeof g;if(k!=="undefined"&&g!==null){var n=d.length===0?this._operator.first:this._operator.sep;if(k==="string")this._operator.named&&(n+=f(i,"U+R"),n+=g.length===0?this._operator.ifemp:"="),h.prefix!==-1&&h.prefix<g.length&&(g=g.substring(0,h.prefix)),n+=f(g,this._operator.allow);else if(Array.isArray(g)){if(g.length===0)continue;h.explode?n+=c(g,this._operator.allow,this._operator.sep):
(h=c(g,this._operator.allow,","),this._operator.named&&(n+=f(i,"U+R"),n+=h.length===0?this._operator.ifemp:"="),n+=h)}else if(k==="object"){if(Object.keys(g).length===0)continue;h.explode?n+=a(g,this._operator.allow,"=",this._operator.sep):(h=a(g,this._operator.allow,",",","),this._operator.named&&(n+=f(i,"U+R"),n+=h.length===0?this._operator.ifemp:"="),n+=h)}else throw Error("bad param type: "+i+" : "+k);d.push(n)}}return d.join("")}};e.prototype={expand:function(b){for(var a=[],d=0;d<this._templateComponents.length;d++)a.push(this._templateComponents[d].expand(b));
return a.join("")}};return e});
define("orion/i18nUtil",["require","orion/Deferred"],function(g,k){function f(a){if(a=localStorage.getItem("orion/messageBundle/"+a))if(a=JSON.parse(a),a._expires&&a._expires>(new Date).getTime())return delete a._expires,a;return null}var c={};return{getMessageBundle:function(a){function i(b){b?g(["i18n!"+a],function(b){if(b){var e=a;b._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+e,JSON.stringify(b));delete b._expires}d.resolve(b)}):e(Error(a))}function e(b){d.reject(b)}
if(c[a])return c[a];var d=new k;c[a]=d;var b=f(a);if(b)return d.resolve(b),d;try{g([a],i,e)}catch(h){g(["orion/i18n!"+a],i,e)}return d},formatMessage:function(a){var c=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,d){return c[(d<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/objects,orion/URL-shim".split(","),function(g,k,f,c,a,i){function e(){return g.toUrl?(new URL(g.toUrl("orion/../"),window.location.href)).href.slice(0,-1):(new URL("/",window.location.href)).href.slice(0,-1)}function d(b){var a={};b.getPropertyKeys().forEach(function(d){d!=="objectClass"&&d!=="service.names"&&d!=="service.id"&&d!=="__plugin__"&&(a[d]=b.getProperty(d))});return a}function b(b){return a.getMessageBundle(b.nls).then(function(a){b.textContent=
b.nameKey?a[b.nameKey]:b.name;return b},function(){b.textContent=b.nameKey||b.name;return b})}function h(a,h){var j=a.getServiceReferences(h||"orion.page.link"),l=f.matchResourceParameters(window.location.href),m={OrionHome:e(),Location:l.resource},i=[];j.forEach(function(a){a=d(a);if(a.uriTemplate&&(a.nls||a.name)){var e=(new c(a.uriTemplate)).expand(m),e=f.validateURLScheme(e);a.href=e;a.nls?i.push(b(a)):(a.textContent=a.name,i.push((new k).resolve(a)))}});return k.all(i)}function j(b){var a=this.categories=
Object.create(null);b.forEach(function(b){a[b.id]=b})}function l(b){this.allPageLinks=b;this.allPageLinks.sort(m)}function m(b,a){var d=b.textContent&&b.textContent.toLowerCase(),e=a.textContent&&a.textContent.toLowerCase();return d<e?-1:d>e?1:0}var o;i.mixin(j.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(b){return this.categories[b]||null}});i.mixin(l.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(b){var a=b.href,b=
b.textContent,d=document.createElement("a");d.href=a;d.target="_self";d.classList.add("targetSelector");d.textContent=b;return d})},getAllLinks:function(){return this.allPageLinks}});return{getCategoriesInfo:function(a){var e;return!o?(e=[],a.getServiceReferences("orion.page.link.category").forEach(function(a){a=d(a);if(a.id&&(a.name||a.nameKey))a.nls?e.push(b(a)):(a.textContent=a.name,e.push((new k).resolve(a)))}),k.all(e).then(function(b){return o=new j(b)})):(new k).resolve(o)},getPageLinksInfo:function(b,
a){return h(b,a).then(function(b){return new l(b)})},getOrionHome:e}});
define("orion/edit/nls/root/messages",{Editor:"Editor",switchEditor:"Switch Editor",Fetching:"Fetching: ${0}",confirmUnsavedChanges:"There are unsaved changes.  Do you still want to navigate away?",searchFiles:"Search Files...",searchTerm:"Enter search term:",unsavedChanges:"There are unsaved changes.",unsavedAutoSaveChanges:"Please stay on the page until Auto Save is complete.",Save:"Save",Saved:"Saved",Blame:"Blame",BlameTooltip:"Show blame annotations",saveOutOfSync:"Resource is out of sync with the server. Do you want to save it anyway?",
loadOutOfSync:"Resource is out of sync with the server. Do you want to load it anyway? This will overwrite your local changes.",ReadingMetadata:"Reading metadata of ${0}",ReadingMetadataError:"Can not get metadata of ${0}",Reading:"Reading ${0}",readonly:"Read Only.",saveFile:"Save this file",gotoLine:"Go to Line...",gotoLineTooltip:"Go to specified line number",gotoLinePrompt:"Go to line:",Undo:"Undo",Redo:"Redo",Find:"Find...",noResponse:"No response from server.  Check your internet connection and try again.",
savingFile:"Saving file ${0}",running:"Running ${0}","Saving...":"Saving...",View:"View",SidePanel:"Side Panel",SidePanelTooltip:"Choose what to show in the side panel.",Actions:"Actions",Navigator:"Navigator",FolderNavigator:"Folder Navigator",Project:"Project",New:"New",File:"File",Edit:"Edit",Tools:"Tools",Add:"Add",noActions:"There are no actions for the current selection.",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding.",LocalEditorSettings:"Local Editor Settings",
NoProject:"${0} is not a project. To convert it to a project use ${1}.",NoProjects:"There are no projects in your workspace. Use the ${0} menu to create projects.",disconnected:"(disconnected)",ChooseFS:"Choose Filesystem",ChooseFSTooltip:"Choose the filesystem you want to view.",FSTitle:"${0} (${1})",Deploy:"Deploy","Deploy As":"Deploy As",Import:"Import",Export:"Export",OpenWith:"Open With",OpenRelated:"Open Related",Dependency:"Dependency",UnnamedCommand:"Unnamed"});
define("orion/edit/nls/messages",["orion/i18n!orion/edit/nls/messages","orion/edit/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim,orion/PageLinks,i18n!orion/edit/nls/messages".split(","),function(g,k,f,c,a,i,e,d,b,h){function j(b){var a={};b.getPropertyKeys().forEach(function(d){a[d]=b.getProperty(d)});return a}var l={},m=b.getOrionHome();l._cloneItemWithoutChildren=function p(b){if(b===null||typeof b!=="object")return b;var a=b.constructor(),d;for(d in b)d!=="children"&&d!==
"Children"&&(a[d]=p(b[d]));return a};l._getOpenWithNavCommandExtensions=function(b){function a(b,d){for(var e=b.getServiceReferences("orion.navigate.openWith"),c=[],h=[],j=0;j<e.length;j++){var l=e[j];if(l.getProperty("editor")===d.id){var f=l.getProperty("contentType");f instanceof Array?c=c.concat(f):c.push(f||"*/*");l=l.getProperty("excludedContentTypes");l instanceof Array?h=h.concat(l):l!==null&&typeof l!=="undefined"&&h.push(l)}}0===c.length&&(c=null);0===h.length&&(h=null);return{contentTypes:c,
excludedContentTypes:h}}for(var d=function(){for(var a=b.getServiceReferences("orion.edit.editor"),d=[],e=0;e<a.length;e++){var c=a[e],h=c.getProperty("id");d.push({id:h,"default":c.getProperty("default")||!1,name:c.getProperty("name"),nameKey:c.getProperty("nameKey"),nls:c.getProperty("nls"),uriTemplate:c.getProperty("orionTemplate")||c.getProperty("uriTemplate"),validationProperties:c.getProperty("validationProperties")||[]})}return d}(),e=[],c=0;c<d.length;c++){var h=d[c],j=a(b,h);e.push({properties:{name:h.name||
h.id,nameKey:h.nameKey,id:"eclipse.openWithCommand."+h.id,contentType:j.contentTypes,excludedContentTypes:j.excludedContentTypes,uriTemplate:h.uriTemplate,nls:h.nls,forceSingleItem:!0,isEditor:h["default"]?"default":"editor",validationProperties:h.validationProperties},service:{}})}return e};l._makeValidator=function(b,d,e,c){function h(b,a,d,e){var c=d.match,j,l;if((j=a.indexOf("["))>=0){if((l=a.indexOf("]"))<0)return!1;var f=a.substring(0,j),m;if(!(m=b[f])||!Array.isArray(m))return!1;j=a.substring(j+
1,l);j=parseInt(j,10);if(isNaN(j))return!1;j<0&&(j+=m.length);a=a.substring(l+1);a=f+":"+String(j)+a}if(a.indexOf("|")>=0)return j=a.substring(0,a.indexOf("|")),a=a.substring(a.indexOf("|")+1),h(b,j,d,e)?!0:h(b,a,d,e);else if(a.indexOf(":")>=0)return j=a.substring(0,a.indexOf(":")),a=a.substring(a.indexOf(":")+1),b[j]?h(b[j],a,d,e):!1;else{a:{var f=!1,i;if(a.charAt(0)==="!")d=typeof b[a.substring(1)]==="undefined";else if(typeof b[a]!=="undefined"){if(typeof c==="undefined")i=b[a],f=!0;else if(typeof c===
"string"){if(!typeof(b[a]==="string")){d=!1;break a}if(d.variableName){if(c=RegExp(c).exec(b[a]))i=c[0],i=d.variableMatchPosition==="before"?b[a].substring(0,c.index):d.variableMatchPosition==="after"?b[a].substring(c.index+i.length):d.variableMatchPosition==="only"?i:b[a],f=!0}else{d=RegExp(c).test(b[a]);break a}}else b[a]===c&&(i=b[a],f=!0);if(f&&d.variableName&&(e[d.variableName]=i,e.itemCached=b,d.replacements))for(b=0;b<d.replacements.length;b++)i=!1,d.replacements[b].pattern?e[d.variableName]=
e[d.variableName].replace(RegExp(d.replacements[b].pattern),d.replacements[b].replacement||""):i=!0,i&&window.console.log("Invalid replacements specified in validation property.  "+d.replacements[b]);d=f}else d=!1}return d}}function j(d,e,c){if(c.info.validationProperties)for(var l=0;l<c.info.validationProperties.length;l++){var f=c.info.validationProperties[l];if(typeof f.source!=="undefined"){if(!h(d,f.source,f,c))return!1}else return window.console.log("Invalid validationProperties in "+b.id+".  No source property specified."),
!1}var l=!0,m=e?a.getFilenameContentType(d.Name,e):null,m=m||{id:"application/octet-stream"};c.info.excludedContentTypes&&e&&(l=c.info.excludedContentTypes.every(function(b){b=b.replace(/([*?])/g,".$1");return-1!==m.id.search(b)?!1:!0}));l&&c.info.contentType&&e&&(l=c.info.contentType.some(function(b){b=b.replace(/([*?])/g,".$1");return-1!==m.id.search(b)?!0:!1}));return l}return{info:b,validationFunction:function(b){typeof c==="function"&&(b=c.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 a=0;a<b.length;a++)if(!j(b[a],e,this))return!1;return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(b){if(this.info.uriTemplate){var a={},d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);if(this.info.validationProperties)for(d=0;d<this.info.validationProperties.length;d++){var e=this.info.validationProperties[d];e.source&&e.variableName&&(this.itemCached===
b&&this[e.variableName]||h(b,e.source,e,this),b[e.variableName]?window.console.log("Variable name "+e.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):a[e.variableName]=this[e.variableName])}a.OrionHome=m;return(new i(this.info.uriTemplate)).expand(a)}return null}}};var o=h.UnnamedCommand;l._createCommandOptions=function(b,a,d,c,h,j){function f(e,m){var i=l._makeValidator(b,d,c,j);e.visibleWhen=i.validationFunction.bind(i);if(h)if(i.generatesURI.bind(i)())e.hrefCallback=
function(b){b=Array.isArray(b.items)?b.items[0]:b.items;return i.getURI.bind(i)(b)};else{var g=b;e.callback=function(b){var c;if(g.forceSingleItem)b=Array.isArray(b.items)?b.items[0]:b.items,c=l._cloneItemWithoutChildren(b);else if(Array.isArray(b.items)){c=[];for(var h=0;h<b.items.length;h++)c.push(l._cloneItemWithoutChildren(b.items[h]))}else c=l._cloneItemWithoutChildren(b.items);if(d)var j=d.getService("orion.page.progress");a.run?j?j.progress(a.run(c),"Running command: "+e.name):a.run(c):d&&
(j?j.progress(d.getService(a).run(c),"Running command: "+e.name):d.getService(a).run(c))}}m.resolve(e)}var m=new k;if(b.nls){var i=function(a){var d;a?(d=b.tooltipKey&&a[b.tooltipKey],a=b.nameKey&&a[b.nameKey]||b.name||o,d=d||b.tooltip||""):(a=b.name||b.nameKey||o,d=b.tooltip||b.tooltipKey||"");f({name:a,image:b.image,id:b.id||b.name,tooltip:d,isEditor:b.isEditor,showGlobally:b.showGlobally},m)};e.getMessageBundle(b.nls).then(i,i.bind(this,null))}else f({name:b.name,image:b.image,id:b.id||b.name,
tooltip:b.tooltip,isEditor:b.isEditor,showGlobally:b.showGlobally},m);return m};l.getOpenWithCommand=function(b,a,d){for(var e,b=d||l.getOpenWithCommands(b),d=0;d<b.length;d++)if(b[d].visibleWhen(a)){var c=b[d].isEditor==="default";if(!e||c)if(e=b[d],c)break}return e};l.getOpenWithCommands=function(b){var a=[],d;for(d in b._commandList){var e=b._commandList[d];e.isEditor&&a.push(e)}return a};var r;l.createAndPlaceFileCommandsExtension=function(b,a,d,e,c,j){return l.createFileCommands(b,null,j?"all":
void 0,!!j,a).then(function(b){c&&0<b.length&&(a.addCommandGroup(d,"eclipse.openWith",1E3,h.OpenWith,c,null,null,null,"dropdownSelection"),a.addCommandGroup(d,"eclipse.fileCommandExtensions",1E3,h.OpenRelated,c));b.forEach(function(b){var h=null;c&&(h=b.isEditor?c+"/eclipse.openWith":c+"/eclipse.fileCommandExtensions");a.registerCommandContribution(d,b.id,e,h)});return{}})};l.createFileCommands=function(b,a,d,e,c){var d=d===void 0?"global":d,e=e===void 0?!0:e,h=[];l._cachedFileCommands||l._createCachedFileCommands(b);
(d==="all"||d==="global")&&l._cachedFileCommands.forEach(function(b){var a=b.properties;(d==="all"||a.forceSingleItem&&a.showGlobally)&&h.push(b)});return k.when(function(){var d=b.getService("orion.core.contentTypeRegistry")||a;return r||k.when(d.getContentTypes(),function(b){return r=b})}(),function(){if(e){if(!l._cachedOpenWithExtensions)l._cachedOpenWithExtensions=l._getOpenWithNavCommandExtensions(b,r);h=h.concat(l._cachedOpenWithExtensions);c._addedOpenWithCommands=e}var a=h.map(function(a){var d=
a.properties,a=a.service,e=c.findCommand(d.id||d.name);return e?(new k).resolve(e):l._createCommandOptions(d,a,b,r,!0).then(function(b){b=new f.Command(b);c.addCommand(b);return b})});return k.all(a,function(b){return{_error:b}}).then(function(b){return b})})};l._createCachedFileCommands=function(b){var a=b.getServiceReferences("orion.navigate.command");l._cachedFileCommands=[];for(var d=0;d<a.length;d++)if(a[d].getProperty("id")!=="orion.navigateFromMetadata"){var e=b.getService(a[d]),c=j(a[d]);
l._cachedFileCommands.push({properties:c,service:e})}};l.getFileCommandIds=function(){var b=[];if(l._cachedFileCommands)l._cachedFileCommands.length&&(b=l._cachedFileCommands.map(function(b){return b.properties.id}));else throw"extensionCommandUtils._cachedFileCommands is not initialized";return b};l.createOpenWithCommands=function(b,a,d){return d&&d._addedOpenWithCommands?(new k).resolve(l.getOpenWithCommands(d)):l.createFileCommands(b,a,"none",!0,d)};return l});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(g,k){function f(c){this._init(c)}f.prototype={_init:function(c){var a=k.node(c.container);if(!a)throw"no parent container";this._container=a;a.classList.remove("currentLocation");this._id=c.id||"eclipse.breadcrumbs";this._resource=c.resource||null;this._rootSegmentName=c.rootSegmentName;this._workspaceRootSegmentName=c.workspaceRootSegmentName;this._workspaceRootURL=c.workspaceRootURL;this._makeHref=c.makeHref;this._makeFinalHref=
c.makeFinalHref;this._maxLength=c.maxLength;this.path="";this.measure();this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var c;if(this._resource&&this._resource.Parents&&!this._resource.skip){c=document.createElement("a");var a=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(c,a):c.href=g.toUrl("edit/edit.html")+"#"+a}else c=document.createElement("span");k.empty(c);c.appendChild(document.createTextNode(this._workspaceRootSegmentName));
return c}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],buildSegment:function(c){var a=document.createElement("a");a.classList.add("breadcrumb");a.appendChild(document.createTextNode(c));return a},addSegmentHref:function(c,a){this._makeHref?this._makeHref(c,a.Location,a):c.href=g.toUrl("edit/edit.html")+"#"+a.ChildrenLocation},buildSegments:function(c,a){if(this._resource.Parents){var f=this._resource.Parents.slice(0),e,d;f&&(f=f.slice(0),a==="reverse"&&(f=f.reverse().slice(0)),
f.forEach(function(b){if(!b.skip)c?(d=c,c=null):d=b.Name,e=this.buildSegment(d),this.path+=b.Name,this.addSegmentHref(e,b),e.include=!1,this.segments.push(e)}.bind(this)))}},addDivider:function(){var c=document.createElement("span");c.appendChild(document.createTextNode(" / "));this.path+="/";c.classList.add("breadcrumbSeparator");this.append(c)},refresh:function(){(this.crumbs=k.node(this._id))?k.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(c){this.crumbs.appendChild(c)},addTitle:function(c,a){var f=a||document.title;this.crumbs.childNodes.length===0&&(c=document.createElement("span"),c.appendChild(document.createTextNode(f)),
c.classList.add("breadcrumb"),c.classList.add("currentLocation"),this.append(c))},finalSegment:function(c,a){if(!this._resource.skip){var f;f=a?a:this._resource.Name;this._makeFinalHref?(c=this.buildSegment(f),this.addSegmentHref(c,this._resource)):(c=document.createElement("span"),c.appendChild(document.createTextNode(f)));c.classList.add("currentLocation");this.path+=this._resource.Name;this.append(c)}},firstSegment:function(c){if(c)if(this.append(c),this._resource&&this._resource.Parents&&!this._resource.skip)c.classList.add("breadcrumb"),
this.addDivider();else{if(!this._resource.skip)c.href="";c.classList.add("currentLocation")}},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(c){c.include===!0&&(this.append(c),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var c=this.segments.slice(0).reverse();c.forEach(function(a){this.append(a);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?a.include=!0:this.INCLUDE_FIRST_SECTION=
!1}.bind(this));this.segments=c.reverse()}},measure:function(){var c=this._container;c.style.width="auto";this.MAX_LENGTH=this._maxLength?this._maxLength:c.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var c=this.getNavigatorWorkspaceRootSegment(),a=this._rootSegmentName;if(a)this.addTitle(c,a);else if(this.finalSegment(c,a),this._resource&&this._resource.Parents&&(this.buildSegments(a,"reverse"),this.measureSegments(),this.firstSegment(c)),this.crumbs.offsetWidth>=
this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var c=this.getNavigatorWorkspaceRootSegment(),a=this._rootSegmentName;a?this.addTitle(c,a):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(c),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(c,a)));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(g,k,f){function c(a){k.attach(this);this._init(a)}c.prototype={_init:function(a){this._tracking=null;this._animationDelay=501;this._closeReversely=a.closeReversely;this.$node=f.node(a.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=f.node(a.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=f.node(a.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";
this._vertical=a.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(a.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 a.closeByDefault!=="undefined")this._closeByDefault=a.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(a){this.addEventListener("resize",function(c){a(c.node)})},_initializeFromStoredSettings:function(){var a=localStorage.getItem(this._prefix+"/toggleState");this._closed=typeof a==="string"?a==="closed":this._closeByDefault;var a=f.bounds(this.$node.parentNode),c=f.bounds(this.$node),e;if(this._vertical)if(e=localStorage.getItem(this._prefix+"/yPosition")){if(this._splitTop=parseInt(e,10),this._splitTop>a.top+a.height-c.height)this._splitTop=a.top+a.height/
2}else{if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitTop=0}else if(e=localStorage.getItem(this._prefix+"/xPosition")){if(this._splitLeft=parseInt(e,10),this._splitLeft>a.left+a.width-c.width)this._splitLeft=a.left+a.width/2}else if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitLeft=0},_getSplitPosition:function(){var a=f.bounds(this.$node),c=f.bounds(this.$node.parentNode);return this.vertical?a.top-c.top:a.left-c.left},_adjustToSplitPosition:function(a){var c=
f.bounds(this.$node),e=f.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=c.height;if(a||!this._splitTop)this._splitTop=c.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);a=this._splitTop;this.$node.parentNode.style.position==="relative"&&(a=this._splitTop-e.top);this.$sideNode.style.height=a+"px";this.$sideNode.style.display="block";this.$node.style.top=a+"px"}else{this._splitWidth=c.width;if(a||!this._splitLeft)this._splitLeft=c.left,localStorage.setItem(this._prefix+
"/xPosition",this._splitLeft);a=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(a=this._splitLeft-e.left);this.$sideNode.style.width=a+"px";this.$sideNode.style.display="block";this.$node.style.left=a+"px"}this._resize()},_resize:function(a,c,e){var a=a||0,d=f.bounds(this.$node.parentNode),b=f.bounds(this.$node);this._vertical?(e===void 0&&(e=b.top-d.top),e+=b.height,this.$mainNode.style.top=e+"px"):(c===void 0&&(c=b.left-d.left),c+=b.width,this.$mainNode.style.left=c+"px");var h=
this;window.setTimeout(function(){h._notifyResizeListeners(h.$mainNode);h._notifyResizeListeners(h.$sideNode)},a)},_notifyResizeListeners:function(a){this.dispatchEvent({type:"resize",node:a})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(a,c){a||this._addAnimation();var e=this._splitTop,d=this._splitLeft;if(this._closed){if(this._closed=!1,!this._splitLeft&&!this._splitTop&&typeof this._initialSplit==="number")e=d=this._initialSplit}else if(this._closed=
!0,this._closeReversely){var b=f.bounds(this.$node.parentNode),h=f.bounds(this.$node);this._vertical?e=b.height-h.height:d=b.width-h.width}else e=d=0;this._vertical?(this.$sideNode.style.height=e+"px",this.$node.style.top=e+"px"):(this.$sideNode.style.width=d+"px",this.$node.style.left=d+"px");this._resize(this._animationDelay,d,e);a||this._removeAnimation();c||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var j=this;window.setTimeout(function(){j._notifyToggleListeners()},
this._animationDelay)},_removeAnimation:function(){var a=this;window.setTimeout(function(){a.$sideNode.classList.remove(a._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");a.$mainNode.classList.remove(a._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");a.$node.classList.remove(a._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(a){if(a.target===this._thumb)return f.stop(a),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.setFramesEnabled(!1),f.stop(a)},_mouseMove:function(a){if(this._tracking){var c=f.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=a.clientY;if(this._splitTop<c.top+5)this._splitTop=c.top+5;else if(this._splitTop>c.top+c.height-5)this._splitTop=c.top+c.height-5;var e=this._splitTop,e=this._splitTop-c.top;this.$node.style.top=e+"px"}else{this._splitLeft=a.clientX;if(this._splitLeft<c.left+5)this._splitLeft=c.left+5;else if(this._splitLeft>
c.left+c.width-5)this._splitLeft=c.left+c.width-5;e=this._splitLeft;e=this._splitLeft-2*c.left;this.$node.style.left=e+"px"}this._adjustToSplitPosition(!0);f.stop(a)}},_mouseUp:function(a){if(this._tracking)f.setFramesEnabled(!0),window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),f.stop(a)}};c.prototype.constructor=c;return{Splitter:c}});
define("orion/keyAssist",["i18n!orion/nls/messages","orion/webui/littlelib","orion/util"],function(g,k,f){function c(a){this.commandRegistry=a.commandRegistry;this.create();this._filterString="";this._providers=[]}c.prototype={addProvider:function(a){this._providers.push(a)},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 c=this._keyAssistInput=document.createElement("input");
c.classList.add("keyAssistInput");c.type="text";c.placeholder=g["Filter bindings"];a.appendChild(c);var e=this._keyAssistContents=document.createElement("div");e.classList.add("keyAssistContents");if(f.isIOS||f.isAndroid)e.style.overflowY="auto";a.appendChild(e);var d=this._keyAssistTable=document.createElement("table");d.tabIndex=0;d.classList.add("keyAssistList");e.appendChild(d);document.body.appendChild(a);c.addEventListener("keydown",function(b){this._keyDown(b)}.bind(this));d.addEventListener("keydown",
function(b){this._keyDown(b)}.bind(this));c.addEventListener("input",function(){this.filterChanged()}.bind(this));e.addEventListener(f.isFirefox?"DOMMouseScroll":"mousewheel",function(b){this._scrollWheel(b)}.bind(this));document.addEventListener("keydown",function(b){b.keyCode===k.KEY.ESCAPE&&this.hide()}.bind(this));k.addAutoDismiss([a],function(){this.hide()}.bind(this))},createContents:function(){k.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;for(var a=this._idCount=
this._keyAssistContents.scrollTop=0;a<this._providers.length;a++)this._providers[a].showKeyBindings(this);this.createHeader(g.Global);this.commandRegistry.showKeyBindings(this)},createItem:function(a,c,e){if(this._filterString){var d=this._filterString.toLowerCase(),b;d!==this._filterString?(d=this._filterString,b=function(b){return b}):b=function(b){return b.toLowerCase()};if(b(c).indexOf(d)===-1&&b(a).indexOf(d)===-1&&b(this._lastHeader).indexOf(d)===-1)return}var h=this._keyAssistTable.insertRow(-1);
h.id="keyAssist-keyBinding-"+this._idCount++;h.setAttribute("role","menuitem");h._execute=e;h.classList.add("keyAssistItem");h.addEventListener("click",function(b){this._selectedRow=h;this.execute();b.preventDefault()}.bind(this));e=h.insertCell(-1);e.classList.add("keyAssistName");e.appendChild(document.createTextNode(c));e=h.insertCell(-1);e.classList.add("keyAssistAccel");e.appendChild(document.createTextNode(a))},createHeader:function(a){this._lastHeader=a;var c=this._keyAssistTable.insertRow(-1);
c.classList.add("keyAssistSection");var c=c.insertCell(-1),e=document.createElement("h2");e.appendChild(document.createTextNode(a));c.appendChild(e)},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,c=this._keyAssistDiv,a=c===a||(c.compareDocumentPosition(a)&16)!==0;c.style.display="none";a&&document.compareDocumentPosition(this._previousActiveElement)!==1&&this._previousActiveElement.focus();this._previousActiveElement=null}},isVisible:function(){return this._keyAssistDiv.style.display==="block"},removeProvider:function(a){a=this._providers.indexOf(a);a!==-1&&this._providers.splice(a,
1)},select:function(a){var c=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(c.length===0)this._selectedIndex=-1;else{var e=this._selectedIndex;e+=a?1:-1;e%=c.length;e<0&&(e=c.length-1);if(this._selectedIndex!==-1)a=c[this._selectedIndex],a.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=e;if(this._selectedIndex!==-1){this._selectedRow=a=c[this._selectedIndex];a.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",a.id);this._keyAssistTable.focus();
var c=a.getBoundingClientRect(),d=this._keyAssistContents,b=d.getBoundingClientRect();a.offsetTop<d.scrollTop?e===0?d.scrollTop=0:a.scrollIntoView(!0):c.bottom>b.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 c=0,c=f.isIE||f.isOpera?-a.wheelDelta:f.isFirefox?a.detail*40:-a.wheelDeltaY,e=this._keyAssistContents,d=e.scrollTop;e.scrollTop+=c;if(d!==e.scrollTop)return a.preventDefault&&a.preventDefault(),!1}};return{KeyAssistPanel:c}});
define("orion/widgets/themes/ThemePreferences",[],function(){function g(g,f){this._preferences=g;this._themeData=f;var c=f.getThemeStorageInfo();this._themeVersion=c.version;var a=g.listenForChangedSettings(c.storage,2,function(c){c.key===a&&this.apply()}.bind(this))}g.prototype={_initialize:function(g,f,c){var a,i;this._themeVersion===void 0||c.get("version")===this._themeVersion?(a=c.get(g.styleset),(i=c.get("selected"))&&(i=JSON.parse(i))):i=a=null;a||(a=f.getStyles(),c.put(g.styleset,JSON.stringify(a)));
if(!i||i[g.selectedKey]===void 0)i=i||{},i[g.selectedKey]=g.defaultTheme,c.put("selected",JSON.stringify(i));c.put("version",this._themeVersion)},apply:function(){this.setTheme()},getTheme:function(g){var f=this._themeData,c=f.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(a){this._initialize(c,f,a);var i=JSON.parse(a.get("selected")),a=JSON.parse(a.get(c.styleset)),e;if(a)for(var d=0;d<a.length;d++)if(a[d].name===i[c.selectedKey]){e=a[d];break}g({style:e,styles:a})}.bind(this))},
setTheme:function(g,f){var c=this._themeData,a=c.getThemeStorageInfo();this._preferences.getPreferences(a.storage,2).then(function(i){this._initialize(a,c,i);var e=JSON.parse(i.get("selected"));g||(g=e[a.selectedKey]);e[a.selectedKey]=g;i.put("selected",JSON.stringify(e));f?i.put(a.styleset,JSON.stringify(f)):f=JSON.parse(i.get(a.styleset));for(var d=0;d<f.length;d++)if(f[d].name===e[a.selectedKey]){c.processSettings(f[d]);break}i.put("version",this._themeVersion)}.bind(this))},setFontSize:function(g){var f=
this._themeData,c=f.getThemeStorageInfo();this._preferences.getPreferences(c.storage,2).then(function(a){this._initialize(c,f,a);var i=JSON.parse(a.get("selected")),e=JSON.parse(a.get(c.styleset)),d;if(e)for(var b=0;b<e.length;b++)e[b].fontSize=g,e[b].name===i[c.selectedKey]&&(d=e[b]);a.put(c.styleset,JSON.stringify(e));f.processSettings(d)}.bind(this))}};return{ThemePreferences:g}});
define("orion/settings/nls/root/messages",{"Plugin Description":"Plugin Description",Create:"Create","Loading...":"Loading...","Label:":"Label:",Title:"Title",Plugins:"Plugins","User Profile":"User Profile",Git:"Git","Git Settings":"Git Settings",General:"General",Navigation:"Navigation",Links:"Links","Open in same tab":"Open in same tab","Open in new tab":"Open in new tab",Font:"Font",Family:"Family","Sans Serif":"Sans Serif",Serif:"Serif",Size:"Size","8pt":"8pt","9pt":"9pt","10pt":"10pt","12pt":"12pt",
Color:"Color",Background:"Background",Strings:"Strings","String Types":"String Types",blue:"blue",Weight:"Weight",Normal:"Normal",Bold:"Bold",Comments:"Comments","Comment Types":"Comment Types",green:"green",Keywords:"Keywords","Keyword Types":"Keyword Types",darkred:"darkred",Categories:"Categories",Username:"Username","Full Name":"Full Name","Email Address":"Email Address","Email Confirmed":"Email Confirmed",Account:"Account","Current Password":"Current Password","New Password":"New Password","Verify Password":"Verify Password",
Password:"Password",OpenId:"OpenId",AOL:"AOL",Yahoo:"Yahoo",Google:"Google",Unlink:"Unlink",Link:"Link",Unlinked:"Unlinked",Linked:"Linked","Linked Accounts":"Linked Accounts","Git Email Address":"Git Email Address","Git Username":"Git Username","Git Credentials Storage":"Git Credentials Storage",Update:"Update","Update Profile Settings":"Update Profile Settings","Update Git User Settings":"Update Git User Settings","Update Git Credentials":"Update Git Credentials","User profile data successfully updated.":"User profile data successfully updated.",
"Git user data successfully updated.":"Git user data successfully updated.","Git Credentials successfully updated.":"Git Credentials successfully updated.","Edit Plugin JavaScript":"Edit Plugin JavaScript","Install Plugin":"Install Plugin","Plugin Name:":"Plugin Name:","Author Name:":"Author Name:","Licence:":"Licence:","Description:":"Description:","A plugin for Eclipse Orion":"A plugin for Eclipse Orion","Plugin Link":"Plugin Link",Install:"Install","Install a plugin by specifying its URL":"Install a plugin by specifying its URL",
"Plugin URL:":"Plugin URL:",Disable:"Disable",DisableTooltip:"Disable the plugin",Enable:"Enable",EnableTooltip:"Enable the plugin","Reload all":"Reload all","Reload all installed plugins":"Reload all installed plugins","Create a new Orion Plugin":"Create a new Orion Plugin","Find More Orion Plugins":"Find More Orion Plugins","Get Plugins":"Get Plugins",Reload:"Reload","Reload the plugin":"Reload the plugin",Delete:"Delete","Delete this plugin from the configuration":"Delete this plugin from the configuration",
"Type a plugin url here ...":"Type a plugin url here ...","Installed ":"Installed ","Installing ":"Installing ","Already installed":"Already installed"," plugin":" plugin","Reloaded ":"Reloaded ","Uninstalled ":"Uninstalled ","Are you sure you want to uninstall '":"Are you sure you want to uninstall '",Services:"Services",Value:"Value","JavaScript Object":"JavaScript Object","click here, then check javascript console to drill down":"click here, then check javascript console to drill down",Item:"Item",
"Git Config":"Git Config","Clear Git Credentials":"Clear Git Credentials","Enable Storage":"Enable Storage","Please be aware that your credentials will be stored persistently in the browser.":"Please be aware that your credentials will be stored persistently in the browser.","Do you wish to enable the Key Storage?":"Do you wish to enable the Key Storage?",general:"General",validation:"Validation","Deleted git credentials for ${0}":"Deleted git credentials for ${0}",Editor:"Editor",editorSettings:"Settings",
EditorThemes:"Themes",Import:"Import","Import a theme":"Import a theme",Export:"Export","Export a theme":"Export a theme","Theme name:":"Theme name:",yourTheme:"yourTheme",fileManagement:"File Management",typing:"Typing",autoSave:"Auto Save",autoSaveTimeout:"Save interval (ms)",autoLoad:"Auto Load",saveDiffs:"Save file as diffs",trimTrailingWhiteSpace:"Trim Trailing Whitespace on Save",Restore:"Restore Defaults",Default:"Default",keys:"Keys",tabs:"Tabs",tabSize:"Tab Size",expandTab:"Insert spaces for tabs",
smoothScrolling:"Smooth Scrolling",scrollAnimation:"Scrolling Animation",scrollAnimationTimeout:"Scrolling Duration (ms)",keyBindings:"Key Bindings",rulers:"Rulers",annotationRuler:"Show Annotation Ruler",lineNumberRuler:"Show Line Number Ruler",foldingRuler:"Show Folding Ruler",overviewRuler:"Show Overview Ruler",whitespaces:"White Spaces",wrapping:"Wrapping",wordWrap:"Word Wrap",showMargin:"Show Margin",marginOffset:"Margin Column",showTabs:"Show Tabs",showSpaces:"Show Spaces",autoSaveTimeoutInvalid:"Invalid save interval.",
scrollAnimationTimeoutInvalid:"Invalid scrolling duration.",tabSizeInvalid:"Invalid tab size.",localSettingsTooltip:"Toggle whether this setting is shown in the local editor settings drop down.",editorSettingsInfo:"Use the ${0} and ${1} to toggle whether a given setting is shown in the local editor settings drop down ${2}.",autoPairParentheses:"Autopair (Parentheses)",autoPairBraces:"Autopair {Braces}",autoPairSquareBrackets:"Autopair [Square] Brackets",autoPairAngleBrackets:"Autopair <Angle> Brackets",
autoPairQuotations:'Autopair "Strings"',autoCompleteComments:"Autocomplete /** Block Comments */",smartIndentation:"Smart Indentation",sourceControl:"Source Control",showBlame:"Show Blame",languageTools:"Language Tools",showOccurrences:"Show Occurrences",contentAssistAutoTrigger:"Show Content Assist automatically","Editor preferences updated":"Editor preferences updated","Editor defaults restored":"Editor defaults restored",Theme:"Theme","Font Size":"Font Size","New Theme Name:":"New Theme Name:",
"Font Size:":"Font Size:","UI Theme":"UI Theme","Navigation Bar":"Navigation Bar","Navigation Text":"Navigation Text","Search Box":"Search Box","Tool Panel":"Tool Panel","Selection Bar":"Selection Bar",Location:"Location",Content:"Content","Main Panel":"Main Panel",Button:"Button","Button Text":"Button Text","Section Text":"Section Text","Side Panel":"Side Panel","Line Color":"Line Color","Line Numbers":"Line Numbers",Foreground:"Foreground","Current Line":"Current Line","HTML Attribute":"HTML Attribute",
"Overview Ruler":"Overview Ruler","HTML Tag":"HTML Tag","Annotation Ruler":"Annotation Ruler","Show Guide":"Show Guide","Check Guide":"Check Guide",Cancel:"Cancel","Revert Theme":"Revert Theme","Update Theme":"Update Theme","Theme:":"Theme:",clickDiagram:"Click diagram to style.",clickUpdate:"Click Update button to save preview.","CSS Class Name":"CSS Class Name","CSS Attribute":"CSS Attribute","CSS Value":"CSS Value","CSS Text":"CSS Text","COLOR:":"Color:","NEW COLOR:":"New Color:",Ok:"Ok","OR HEX:":"Or Hex: "});
define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages","orion/settings/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/editor/eventTarget",[],function(){function g(){}g.addMixin=function(k){var f=g.prototype,c;for(c in f)f.hasOwnProperty(c)&&(k[c]=f[c])};g.prototype={addEventListener:function(g,f,c){if(!this._eventTypes)this._eventTypes={};var a=this._eventTypes[g];a||(a=this._eventTypes[g]={level:0,listeners:[]});a.listeners.push({listener:f,useCapture:c})},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 c=this._eventTypes?this._eventTypes[g]:null;if(c){var a=c.listeners;try{if(c.level++,a)for(var i=0,e=a.length;i<e;i++)if(a[i]){var d=a[i].listener;typeof d==="function"?d.call(this,f):d.handleEvent&&typeof d.handleEvent==="function"&&d.handleEvent(f)}}finally{if(c.level--,c.compact&&c.level===0){for(i=a.length-1;i>=0;i--)a[i]||a.splice(i,1);a.length===0&&delete this._eventTypes[g];c.compact=!1}}}},isListening:function(g){return!this._eventTypes?!1:this._eventTypes[g]!==void 0},removeEventListener:function(g,
f,c){if(this._eventTypes){var a=this._eventTypes[g];if(a){for(var i=a.listeners,e=0,d=i.length;e<d;e++){var b=i[e];if(b&&b.listener===f&&b.useCapture===c){a.level!==0?(i[e]=null,a.compact=!0):i.splice(e,1);break}}i.length===0&&delete this._eventTypes[g]}}}};return{EventTarget:g}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(g,k,f){function c(a){a=a||{};this._document=a.document||document}var a={};c.getTheme=function(f){var f=f||"default",e=a[f];e||(e=a[f]=new c);return e};c.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(a,e){var d=this,b=d._themeClass;d._themeClass=a;this._load(a,e,function(){d.onThemeChanged({type:"ThemeChanged",oldValue:b,newValue:d.getThemeClass()})})},onThemeChanged:function(a){return this.dispatchEvent(a)},
buildStyleSheet:function(a,e){function d(d,e,c){e&&(b.push("."+a+" ."+d+" {"),b.push("\t"+(c?"background-color":"color")+": "+e+";"),b.push("}"))}var b=[];b.push("");b.push("."+a+" {");e.fontFamily&&b.push("\tfont-family: "+e.fontFamily+";");e.fontSize&&b.push("\tfont-size: "+e.fontSize+";");e.fontSize&&b.push("\tcolor: "+e.text+";");b.push("}");b.push("."+a+".textview {");e.background&&b.push("\tbackground-color: "+e.background+";");b.push("}");d("ruler.annotations",e.annotationRuler,!0);d("ruler.lines",
e.annotationRuler,!0);d("ruler.folding",e.annotationRuler,!0);d("ruler.overview",e.overviewRuler,!0);d("rulerLines",e.lineNumber,!1);d("rulerLines.even",e.lineNumberEven,!1);d("rulerLines.odd",e.lineNumberOdd,!1);d("annotationLine.currentLine",e.currentLine,!0);d("entity-name-tag",e.keyword,!1);d("entity-other-attribute-name",e.attribute,!1);d("string-quoted",e.string,!1);d("meta.annotation.currentLine",e.currentLine,!0);d("keyword",e.keyword,!1);d("string",e.string,!1);d("comment",e.comment,!1);
d("comment.block.documentation",e.comment,!1);d("keyword.other.documentation.markup",e.comment,!1);return b.join("\n")},_createStyle:function(a,e,d,b){var c=this._document,a="orion-theme-"+a,j=c.getElementById(a);if(j){if(b||j.firstChild.data===e)return;j.removeChild(j.firstChild);j.appendChild(c.createTextNode(e))}else b?(j=f.createElement(c,"link"),j.rel="stylesheet",j.type="text/css",j.href=e,j.addEventListener("load",function(){d()})):(j=f.createElement(c,"style"),j.appendChild(c.createTextNode(e))),
j.id=a,(c.getElementsByTagName("head")[0]||c.documentElement).appendChild(j);b||d()},_load:function(a,e,d){if(a)if(typeof e==="string")this._createStyle(a,e,d);else if(e=e.href,e.substring(e.length-4)!==".css"&&(e+=".css"),/^\//.test(e)||/[a-zA-Z0-9]+:\/\//i.test(e)||!g.toUrl)this._createStyle(a,e,d,!0);else{var b=this;g(["text!"+e],function(e){b._createStyle(a,e,d,!1)})}else d()}};k.EventTarget.addMixin(c.prototype);return{TextTheme:c}});
define("orion/widgets/themes/ThemeClass",[],function(){function g(g){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=g;this.classString="."+g+"{ "}g.prototype.className=null;g.prototype.classString=void 0;g.prototype.style=void 0;g.prototype.closeString=" }\n";g.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:g}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(g){function k(){}k.prototype.navbar="white";k.prototype.button="#777777";k.prototype.location="#EFEFEF";k.prototype.selection="#cedce7";k.prototype.sidepanel="#F7F7F7";k.prototype.mainpanel="white";k.prototype.navtext="#bfbfbf";k.prototype.content="#3087B3";k.prototype.search="#444";k.prototype.toolpanel="white";k.prototype.writeNavigationStyle=function(){var f="",c=[],a=new g.ThemeClass("orionPage");
a.style.backgroundColor="#fdfdfd";a.style.width="100%";a.style.height="100%";c.push(a);a=new g.ThemeClass("topRowBanner");a.style.margin="0";a.style.border="0";a.style.backgroundColor=this.navbar;a.style.height="16px";a.style.padding="10px";a.style.paddingLeft="6px";a.style.paddingRight="2px";a.style.borderBottom="none";a.style.boxShadow="0 2px 2px 0 rgba(0, 0, 0, 0.1),0 1px 0 0 rgba(0, 0, 0, 0.1)";a.style.zIndex="100";c.push(a);a=new g.ThemeClass("a");a.style.textDecoration="none";a.style.color=
this.content;c.push(a);a=new g.ThemeClass("navlink");a.style.display="inline-block";a.style.padding="2px";a.style.color=this.content;a.style.verticalAlign="bottom";c.push(a);a=new g.ThemeClass("primaryNav");a.style.color=this.navtext;a.style.fontSize="8pt";a.style.fontWeight="normal";a.style.paddingTop="0";a.style.verticalAlign="baseline";c.push(a);a=new g.ThemeClass("primaryNav a");a.style.fontSize="8pt";a.style.color=this.navtext;a.style.marginRight="6px";a.style.marginLeft="6px";a.style.verticalAlign=
"baseline";a.style.textDecoration="none";c.push(a);a=new g.ThemeClass("primaryNav a:hover");a.style.color="#bfbfbf";a.style.cursor="hand";a.style.color="white";a.style.fontWeight="normal";c.push(a);for(var i in c)f+=c[i].toString();return f};k.prototype.writeLocationStyle=function(){var f="",c=[],a=new g.ThemeClass("titleArea");a.style.margin="0";a.style.paddingTop="5px";a.style.border="0";a.style.background=this.location;a.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+
this.location+"), color-stop(100%,"+this.location+"))";a.style.borderBottom="1px solid "+this.location;a.style.minHeight="20px";c.push(a);a=new g.ThemeClass("breadcrumb");a.style.fontSize="8pt";a.style.textDecoration="none";a.style.color="#f1f1f2;";a.style.paddingTop="2px";c.push(a);a=new g.ThemeClass("a.breadcrumb:hover");a.style.textDecoration="none";a.style.borderBottom="1px dotted";a.style.color="#F58B0F";a.style.cursor="pointer";c.push(a);a=new g.ThemeClass("breadcrumbSeparator");a.style.fontSize=
"8pt";a.style.textDecoration="none";a.style.color=this.separator;a.style.fontWeight="bold";c.push(a);a=new g.ThemeClass("currentLocation");a.style.fontWeight="bold";a.style.fontSize="8pt";a.style.color=this.breadcrumb;a.style.textDecoration="none";a.style.textWrap="normal";a.style.lineHeight="10pt";c.push(a);a=new g.ThemeClass("a.currentLocation:hover");a.style.fontWeight="bold";a.style.fontSize="10pt";a.style.color="#666666";a.style.textDecoration="none";a.style.borderBottom="0";c.push(a);a=new g.ThemeClass("navlinkonpage");
a.style.color=this.content;a.style.verticalAlign="middle";c.push(a);if(this.bannerProgress)a=new g.ThemeClass("topRowBanner .progressPane_running"),a.style.borderColor=this.bannerProgress,c.push(a);for(var i in c)f+=c[i].toString();return f};k.prototype.writeButtonStyle=function(){var f="",c=[],a=new g.ThemeClass("commandButton");a.style.color="#666";a.style.border="1px solid #dedede";a.style.backgroundColor="#ddd";a.style.textAlign="center";a.style.verticalAlign="middle";a.style.cursor="pointer";
a.style.display="inline-block";a.style.padding="4px 6px";a.style.borderRadius="3px";a.style.lineHeight="12px";a.style.fontSize="9pt";a.style.userSelect="none";c.push(a);a=new g.ThemeClass("commandButton:over");a.style.backgroundColor="#e6e6e6";a.style.border="1px solid #808080";c.push(a);a=new g.ThemeClass("commandMenu");a.style.color="#222";a.style.display="inline-block";a.style.verticalAlign="baseline";a.style.margin="0";a.style.fontSize="8pt";a.style.fontWeight="normal";a.style.border="1px solid #dedede";
a.style.backgroundColor="#efefef";a.style.cursor="pointer";a.style.borderRadius="1px";c.push(a);a=new g.ThemeClass("commandMenuItem");a.style.border="0";a.style.padding="0";a.style.margin="0";c.push(a);for(var i in c)f+=c[i].toString();return f};k.prototype.writeMainStyle=function(){var f="",c=[],a=new g.ThemeClass("searchbox");a.style.backgroundImage="url(../images/core_sprites.png)";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="4px -297px";a.style.width="12px";a.style.height=
"12px";a.style.backgroundColor=this.search;a.style.border="1px solid "+this.search;a.style.fontSize="11px";a.style.width="15em";a.style.height="16px";a.style.borderRadius="10px";a.style.color="#999";a.style.padding="0";a.style.paddingLeft="20px";a.style.marginLeft="5px";a.style.marginTop="6px !important";a.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";c.push(a);a=new g.ThemeClass("searchbox:focus");a.style.color="white";a.style.outline=
"none";c.push(a);a=new g.ThemeClass("checkedRow");a.style.cssText="background-color:"+this.selection+" !important;";c.push(a);a=new g.ThemeClass("navbar-item-selected");a.style.background=this.selection;a.style.color=this.content;c.push(a);a=new g.ThemeClass("auxpane");a.style.border="0";a.style.background=this.sidepanel;c.push(a);a=new g.ThemeClass("mainpane");a.style.background=this.mainpanel;a.style.border=0;c.push(a);a=new g.ThemeClass("mainToolbar");a.style.background=this.toolpanel;c.push(a);
for(var i in c)f+=c[i].toString();return f};k.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};k.prototype.getSheet=function(f){f.navbar.value?(this.navbar=f.navbar.value,this.button=f.button.value,this.location=f.location.value,this.selection=f.selection.value,this.sidepanel=f.sidepanel.value,this.mainpanel=f.mainpanel.value,this.navtext=f.navtext.value,this.search=
f.search.value,this.content=f.content.value,this.toolpanel=f.toolpanel.value,this.bannerProgress=f.bannerProgress.value):(this.navbar=f.navbar,this.button=f.button,this.location=f.location,this.selection=f.selection,this.sidepanel=f.sidepanel,this.mainpanel=f.mainpanel,this.navtext=f.navtext,this.search=f.search,this.content=f.content,this.toolpanel=f.toolpanel,this.bannerProgress=f.bannerProgress);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};
return{ThemeSheetWriter:k}});
define("orion/widgets/themes/container/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(g,k,f){function c(){}function a(){this.styles=[];var a=new c;a.name="Orion";a.navbar="white";a.button="#EFEFEF";a.location="#efefef";a.selection="FEC";a.sidepanel="#FBFBFB";a.mainpanel="white";a.toolpanel="white";a.navtext="#bfbfbf";a.content="#3087B3";a.search="#444";a.breadcrumb="#3087B3";a.separator="#333";a.bannerProgress="whitesmoke";
this.styles.push(a);a=new c;a.name="Orion2014";a.navbar="white";a.button="#EFEFEF";a.location="#EFEFEF";a.selection="FEC";a.sidepanel="#EEEEEE";a.mainpanel="#EEEEEE";a.toolpanel="#EEEEEE";a.navtext="#BFBFBF";a.content="#333333";a.search="#444444";a.breadcrumb="#333333";a.separator="#333333";a.bannerProgress="orange";this.styles.push(a);a=new c;a.name="Green Zone";a.navbar="seagreen";a.button="lavender";a.location="darkseagreen";a.selection="moccasin";a.sidepanel="aliceblue";a.mainpanel="white";a.toolpanel=
"white";a.navtext="#FBFBFB";a.content="darkgreen";a.search="darkgreen";a.breadcrumb="#3087B3";a.separator="seagreen";a.bannerProgress="#F2F2F2";this.styles.push(a);a=new c;a.name="Pretty In Pink";a.navbar="plum";a.button="lavender";a.location="pink";a.selection="lavender";a.sidepanel="seashell";a.mainpanel="white";a.toolpanel="white";a.navtext="#FBFBFB";a.content="mediumorchid";a.search="violet";a.breadcrumb="#3087B3";a.separator="plum";a.bannerProgress="#F2F2F2";this.styles.push(a);a=new c;a.name=
"Blue Monday";a.navbar="cornflowerblue";a.button="lavender";a.location="skyblue";a.selection="lavender";a.sidepanel="aliceblue";a.mainpanel="white";a.toolpanel="white";a.navtext="#FBFBFB";a.content="royalblue";a.search="royalblue";a.breadcrumb="#3087B3";a.separator="cornflowerblue";a.bannerProgress="#F2F2F2";this.styles.push(a);a=new c;a.name="Vanilla Skies";a.navbar="sandybrown";a.button="lemmonchiffon";a.location="cornsilk";a.selection="lemonchiffon";a.sidepanel="white";a.mainpanel="white";a.toolpanel=
"white";a.navtext="lemonchiffon";a.content="chocolate";a.search="moccasin";a.breadcrumb="#3087B3";a.separator="sandybrown";a.bannerProgress="#F2F2F2";this.styles.push(a);a=new c;a.name="Beetlejuice";a.navbar="indigo";a.button="slateblue";a.location="darkslateblue";a.selection="silver";a.sidepanel="lavender";a.mainpanel="white";a.toolpanel="white";a.navtext="#FBFBFB";a.content="mediumslateblue";a.search="#444";a.breadcrumb="#3087B3";a.separator="indigo";a.bannerProgress="#F2F2F2";this.styles.push(a);
a=new c;a.name="Red";a.navbar="#CD2127";a.button="#777777";a.location="#D85F56";a.selection="lightcoral";a.sidepanel="#EFDAB2";a.mainpanel="#FDFADD";a.toolpanel="#FDFADD";a.navtext="#FBFBFB";a.content="darkred";a.search="#D85F56";a.breadcrumb="darkred";a.separator="#CD2127";a.bannerProgress="#F2F2F2";this.styles.push(a)}function i(){return this.styles}c.prototype.name="Orion";c.prototype.navbar="#404648";c.prototype.button="#EFEFEF";c.prototype.location="#333";c.prototype.breadcrumb="#3087B3";c.prototype.separator=
"#333";c.prototype.selection="FEC";c.prototype.sidepanel="#FBFBFB";c.prototype.mainpanel="white";c.prototype.toolpanel="white";c.prototype.navtext="#bfbfbf";c.prototype.content="#3087B3";c.prototype.search="#444";c.prototype.bannerProgress="white";a.prototype.styles=[];a.prototype.getStyles=i;a.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion2014",selectedKey:"selected",version:"5.0"}};a.prototype.getViewData=function(){var a={top:10,left:10,
width:350,height:350};a.shapes=[{type:"RECTANGLE",name:g["Navigation Bar"],x:10,y:10,width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:g["Navigation Text"],label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:g["Search Box"],x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:g["Tool Panel"],x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",
name:g["Selection Bar"],x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},{type:"RECTANGLE",name:g.Location,x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:g["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:g.Content,label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:g.Content,label:"/",x:78,y:60,family:"content",
fill:"#3087B3",font:"8pt sans-serif",order:9},{type:"TEXT",name:g.Content,label:"Location",x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:g["Main Panel"],x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:g.Button,x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:g["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:g["Section Text"],label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:g["Line Color"],x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:g["Line Color"],x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:g["Line Color"],
x1:20,y1:100,x2:140,y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:g["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:g["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 d=0;d<3;d++)a.shapes.push({type:"TEXT",name:g.Content,label:"org.eclipse.orion.content",x:170,y:127+20*d,fill:"#3087B3",family:"content"});for(d=0;d<3;d++)a.shapes.push({type:"TEXT",name:g.Content,label:"Item",x:25,y:115+20*d,fill:"#3087B3",family:"content"});for(d=0;d<3;d++)a.shapes.push({type:"TRIANGLE",
name:"twisty",x1:160,y1:121+d*20,x2:165,y2:124+d*20,x3:160,y3:127+d*20,family:"navbar",fill:"#333"});a.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return a};a.prototype.processSettings=function(a){var d=new f.ThemeSheetWriter;(new k.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",d.getSheet(a))};return{ThemeData:a,getStyles:i}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? = any character, * = any string):":"Type the name of a file to open (? = any character, * = any string):",Search:"Search","FileName FolderName":"FileName FolderName(Optional)","Searching...":"Searching...","Searching for occurrences of":'Searching for occurrences of: "${0}"',
name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","</a>":"</a>",">":">","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Report a Bug":"Report a Bug","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:",
"Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination","Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'.","Main Pages":"Main Pages","Related Links":"Related Links"});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/widgets/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(g){function k(f,c,a){this.elements=a;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);c===!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),g.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))}k.prototype.elementNode=null;k.prototype.switchesContainer=null;k.prototype.switches=null;k.prototype.radioButtons=null;k.prototype.chosenSwitch=null;k.prototype.addElement=
function(f){var c=document.createElement("span");c.className="UAContainer-icon";c.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>";c.onmouseover=function(){document.getElementById(f.label+"ImageNode").src=f.secondaryImage;document.getElementById(f.label+"LabelNode").className="UALabel-live";c.className="UAContainer-icon-live"};
c.onmouseout=function(){document.getElementById(f.label+"ImageNode").src=f.image;document.getElementById(f.label+"LabelNode").className="UALabel";c.className="UAContainer-icon"};var a=this;c.onclick=function(){a.showMedia(f)};this.elementNode.appendChild(c)};k.prototype.clearElements=function(){this.elementNode.innerHTML=""};k.prototype.showMedia=function(f){this.clearElements();this.addElement(f);var c=document.createElement("span");c.className="UAContainer-media";c.innerHTML='<div></div><div></div><span class="mediaSpan"><img src="'+
f.media+'" alt="'+f.alt+'" height="300" width="400"></span>';this.elementNode.appendChild(c);setTimeout(function(){c.style.opacity=1},100);f=document.getElementById(f.label+"switch");this.chosenSwitch.firstChild.className="circle";this.chosenSwitch=f.parentNode;f.className="chosenCircle"};k.prototype.createSwitch=function(f){var c;c=f?f.label+"switch":"indexSwitch";var a=document.createElement("span");a.className="workingSpan";a.innerHTML='<div class="circle" id ="'+c+'"></div>';var g=this;a.onclick=
f?function(){g.showMedia(f)}:function(){g.initialize();g.chosenSwitch.firstChild.className="circle";g.chosenSwitch=a;g.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(a);return this.radioButtons[this.radioButtons.length]=a};k.prototype.initialize=function(){this.clearElements();this.elements.forEach(this.addElement.bind(this))};k.prototype.destroy=function(){document.body.removeChild(this.backdrop);document.body.removeChild(this.container)};return k});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(g,k,f,c){function a(){}var i=null;a.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 a=document.body;this.$frameParent=a;this.$$modalExclusions=this.$$modalExclusions||[];var d=document.createRange();d.selectNode(a);d=d.createContextualFragment(this.CONTAINERTEMPLATE);a.appendChild(d);this.$frame=a.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);
d=document.createRange();d.selectNode(this.$parent);a=d.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(a,this.messages);this.$parent.appendChild(a);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 a=this;this.buttons.forEach(function(d){var b=c.createButton(d.text,d.callback);if(d.id)b.id=d.id,a["$"+b.id]=b;if(d.isDefault)a._defaultCallback=d.callback,a._defaultButton=b;a.$buttonContainer.appendChild(b)})}},_makeModal:function(){var a=this;this.$frame.addEventListener("blur",function(b){a.$lastFocusedElement=b.target},!0);this._modalListener=function(b){var d=!f.contains(a.$frame,
b.target);if(d)for(var c=0;c<a.$$modalExclusions.length;c++)if(f.contains(a.$$modalExclusions[c],b.target)){d=!1;break}d&&(window.setTimeout(function(){(a.$lastFocusedElement||a.$parent).focus()},0),f.stop(b))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var d=this.$frameParent.childNodes,b=!1;this._addedBackdrop=[];for(var c=0;c<d.length;c++){for(var j=0;j<this.$$modalExclusions.length;j++)if(f.contains(this.$$modalExclusions[j],
d[c])){b=!0;break}!b&&d[c]!==a.$frame&&d[c].classList&&!d[c].classList.contains("tooltipContainer")&&(j=d[c],j.classList.contains("modalBackdrop")||(j.classList.add("modalBackdrop"),this._addedBackdrop.push(j)))}(d=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&d.addEventListener("keydown",function(b){if(b.keyCode===f.KEY.TAB){var d=a._getFirstFocusField();d&&d!==b.target&&d.focus();f.stop(b)}},!1)},_addChildDialog:function(a){this.$$modalExclusions.push(a.$frame||a.$parent)},
_inModalExclusion:function(a){return this.$$modalExclusions.some(function(d){return a.$frame===d||a.$parent===d})},_bindElements:function(a){for(var d=0;d<a.childNodes.length;d++){var b=a.childNodes[d];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},hide:function(a){!a&&i===this&&(i=null);typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,
!0));this.$frame.classList.remove("dialogShowing");f.setFramesEnabled(!0);typeof this._afterHiding==="function"&&this._afterHiding();var d=this;this.keepAlive||window.setTimeout(function(){d.destroy()},0)},show:function(a){if(this.modal)if(i){if(!i._inModalExclusion(this)){this.hide(!0);return}}else i=this;typeof this._beforeShowing==="function"&&this._beforeShowing();f.setFramesEnabled(!1);var d=f.bounds(this.$frame),b=f.bounds(document.documentElement),c;a?(c=f.bounds(a),a=c.top+c.height+4,c=c.left+
4,a+d.height>b.height&&(a=Math.max(0,b.height-d.height-4)),c+d.width>b.width&&(c=Math.max(0,b.width-d.width-4))):(c=Math.max(0,(b.width-d.width)/2),a=Math.max(0,(b.height-d.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=a+"px";this.$frame.style.left=c+"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(){if(this.$frame)i===this&&(i=null),f.setFramesEnabled(!0),this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(a){a.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}};a.prototype.constructor=
a;return{Dialog:a}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,orion/webui/littlelib,orion/PageLinks,orion/widgets/userAssistance/UATaskPanel,orion/webui/dialog".split(","),function(g,k,f,c,a){function i(a){this._displaySignOut=!0;this._init(a)}i.prototype={_init:function(a){this._dropdownNode=f.node(a.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=a.dropdown;this._serviceRegistry=a.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices=
{};this._noSeparator=a.noSeparator;this._dropDownItemClass=a.dropDownItemClass;this._keyAssistClass=a.keyAssistClass;if(a.signOut!==void 0)this._displaySignOut=a.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(a){var d=0,b;for(b in a)a.hasOwnProperty(b)&&d++;return d},_makeMenuItem:function(a,
d){var b=document.createElement("span");b.role="menuitem";b.tabIndex=0;var c=document.createTextNode(a);b.appendChild(c);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&b.classList.add(this._dropDownItemClass):b.classList.add("dropdownMenuItem");b.addEventListener("click",d,!1);b.addEventListener("keydown",function(b){(b.keyCode===f.KEY.ENTER||b.keyCode===f.KEY.SPACE)&&d()},!1);return b},_renderAuthenticatedService:function(a){var d=this,b=this.authenticatedServices[a].authService;
if(b&&b.logout&&this._displaySignOut){var c=document.createElement("li"),j=this._makeMenuItem(g["Sign Out"],function(){b.logout().then(function(){d.addUserItem(a,b,d.authenticatedServices[a].label);localStorage.removeItem(a);localStorage.removeItem("lastLogin");for(var c=localStorage.length-1;c>=0;c--){var h=localStorage.key(c);h&&h.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(h)}b.getAuthForm(window.location.href).then(function(b){window.location=b})})});c.appendChild(j);this._dropdownNode.appendChild(c)}},
renderServices:function(){function a(c){b[c]||(b[c]=d.createDocumentFragment());return b[c]}var d=document,b=[],h=this._serviceRegistry;c.getPageLinksInfo(h,"orion.page.link.user").then(function(c){this._dropdown?this._dropdown.empty():this._dropdownNode&&f.empty(this._dropdownNode);c.getAllLinks().forEach(function(b){var c,h;if(b.category&&(h=/user\.(\d+)/.exec(b.category)))c=parseInt(h[1],10);if(typeof c!=="number"||isNaN(c))c=1;c=a(c);h=d.createElement("li");var j=d.createElement("a");j.role="menuitem";
typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&j.classList.add(this._dropDownItemClass):j.classList.add("dropdownMenuItem");j.href=b.href;j.textContent=b.textContent;h.appendChild(j);c.appendChild(h);j.addEventListener("keydown",function(b){(b.keyCode===f.KEY.ENTER||b.keyCode===f.KEY.SPACE)&&j.click()},!1)}.bind(this));if(this.keyAssistFunction){var c=document.createElement("li"),l=this._makeMenuItem(g["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass===
"string"?this._keyAssistClass!==""&&l.classList.add(this._keyAssistClass):l.classList.add("key-assist-menuitem");c.appendChild(l);a(0).appendChild(c)}if(c=h.getServiceReferences("orion.page.getstarted")[0])l=c.getProperty("data"),c=document.createElement("li"),l=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,l)),c.appendChild(l),a(0).appendChild(c);var m=this;b.sort(function(b,a){return b-a}).forEach(function(a,d){if(d<b.length-1&&!this._noSeparator){var c=document.createElement("li");
c.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");c.appendChild(e);a.appendChild(c)}m._dropdownNode.appendChild(a)}.bind(this));if(this.isSingleService())for(var i in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(i)&&this._renderAuthenticatedService(i,0)}.bind(this))},getStartedDialog:function(c){new a(null,!0,c)},setKeyAssist:function(a){this.keyAssistFunction=a;this.renderServices()},addUserItem:function(a,d,b,c){c?
(this.unauthenticatedServices[a]&&delete this.unauthenticatedServices[a],this.authenticatedServices[a]={authService:d,label:b,data:c}):(this.authenticatedServices[a]&&delete this.authenticatedServices[a],this.unauthenticatedServices[a]=this.unauthenticatedServices[a]?{authService:d,label:b,pending:this.unauthenticatedServices[a].pending}:{authService:d,label:b});this.renderServices()}};i.prototype.constructor=i;return{UserMenu:i}});
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(g,k){var f={root:k};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(g,k,f,c,a,i){function e(b,a,d){var c="";d&&(c="^");if(c=f.parse("/"+c+b.searchStr+"/"))d=c.pattern,c=c.flags,c.indexOf("i")===-1&&!a.caseSensitive&&(c+="i"),b.regExp={pattern:d,flags:c},b.wildCard=!0}var d={ALL_FILE_TYPE:"*.*"};d.doSearch=function(b,a,c,e){if(b){var f=!0;c==="*"&&(c="");c===""&&(f=e&&e.type!==d.ALL_FILE_TYPE);if(f)c!==""&&d.addRecentSearch(a,
c,e?e.regEx:!1),b=b.createSearchParams(c,!1,!1,e),b=d.generateSearchHref(b),window.location=b}else window.alert(g["Can't search: no search service is available"])};d.generateSearchHelper=function(b,a){var c=b.keyword,l=c,f={};b.fileType&&b.fileType!==d.ALL_FILE_TYPE&&c===""&&(l="*."+b.fileType);if(b.regEx)f.searchStr=c,e(f,b,a);else{var g=c.indexOf("*")>-1,i=c.indexOf("?")>-1;g&&(c=c.split("*").join(".*"));i&&(c=c.split("?").join("."));!g&&!i&&!b.nameSearch?(f.searchStr=b.caseSensitive?c.split("\\").join(""):
c.split("\\").join("").toLowerCase(),f.wildCard=!1):(f.searchStr=b.caseSensitive?c:c.toLowerCase(),e(f,b,a),f.wildCard=!0)}f.searchStrLength=f.searchStr.length;return{params:b,inFileQuery:f,displayedSearchTerm:l}};d.convertSearchParams=function(b){if(b.rows!==void 0)b.rows=parseInt(b.rows,10);if(b.start!==void 0)b.start=parseInt(b.start,10);if(typeof b.regEx==="string")b.regEx=b.regEx.toLowerCase()==="true";if(typeof b.caseSensitive==="string")b.caseSensitive=b.caseSensitive.toLowerCase()==="true";
if(typeof b.nameSearch==="string")b.nameSearch=b.nameSearch.toLowerCase()==="true"};d.copySearchParams=function(b,a){var d={},c;for(c in b)if(b[c]!==void 0&&b[c]!==null&&(a||c!=="replace"))d[c]=b[c];return d};d.generateSearchHref=function(b){var a=k.toUrl("search/search.html"),b=d.copySearchParams(b,!0),c=b.resource;b.resource=void 0;return typeof b.keyword!=="undefined"?(new i(a+"#{,resource,params*}")).expand({resource:c,params:b}):(new i(a+"#{,resource}")).expand({resource:c})};d.generateFindURLBinding=
function(b,a,d,c,e){b={find:a.searchStr,regEx:a.wildCard?!0:void 0,caseSensitive:b.caseSensitive?!0:void 0,replaceWith:typeof c==="string"?c:void 0,atLine:typeof d==="number"?d:void 0};return e?b:","+(new i("{,params*}")).expand({params:b})};d.convertFindURLBinding=function(b){if(typeof b.regEx==="string")b.regEx=b.regEx.toLowerCase()==="true";if(typeof b.caseSensitive==="string")b.caseSensitive=b.caseSensitive.toLowerCase()==="true";if(typeof b.atLine==="string")b.atLine=parseInt(b.atLine,10)};d.replaceRegEx=
function(b,a,d){return b.replace(RegExp(a.pattern,a.flags),d)};d.replaceStringLiteral=function(b,a,c){a=f.parse("/"+a+"/gim");return d.replaceRegEx(b,a,c)};d.searchOnelineLiteral=function(b,a,d){var c;c=0;for(var e=!1,f=[];;)if(c=a.indexOf(b.searchStr,c),c<0)break;else{f.push({startIndex:c,length:b.searchStrLength});e=!0;if(d)break;c+=b.searchStrLength}return e?f:null};d.findRegExp=function(b,a,d,c){if(!a)return null;d=d||"";d+=(d.indexOf("g")===-1?"g":"")+(d.indexOf("m")===-1?"m":"");var e=null;
return(e=RegExp(a,d).exec(b.substring(c)))&&{startIndex:e.index+c,length:e[0].length}};d.searchOnelineRegEx=function(b,a,c){for(var e=0,f=!1,g=[];;)if(e=d.findRegExp(a,b.regExp.pattern,b.regExp.flags,e)){g.push(e);f=!0;if(c)break;e=e.startIndex+e.length}else break;return f?g:null};d.generateNewContents=function(b,a,c,e,f,g){if(e&&a){if(!b)c.contents=[];for(var i=0;i<a.length;i++){for(var k=a[i],p=!1,n=!1,t=[],u,x=0,w=0;w<e.children.length;w++)if(e.children[w].lineNumber-1===i){x=w;for(p=0;p<e.children[w].matches.length;p++)e.children[w+
p].checked!==!1&&t.push(p);n=t.length>0;u=e.children[w].matches;p=!0;break}if(p){if(n){t=d.replaceCheckedMatches(k,f,u,t,g);k=t.replacedStr;for(p=0;p<e.children[x].matches.length;p++)e.children[x+p].newMatches=t.newMatches}else for(p=0;p<e.children[x].matches.length;p++)e.children[x+p].newMatches=e.children[x+p].matches;b?c.contents[i]=k:c.contents.push(k)}else b||c.contents.push(k)}}};d.generateMatchContext=function(b,a,d){var c=[],e=b*2+1,f;a.length<=e?(f=0,b=a.length-1):(f=d-b,f<0?(f=0,b=f+e-1):
(b=d+b,b>a.length-1&&(b=a.length-1,f=b-e+1)));for(e=f;e<=b;e++)c.push({context:a[e],current:e===d});return c};d.splitFile=function(b){for(var a=0,d=0,c=0,e=0,f=[];;){a!==-1&&a<=c&&(a=b.indexOf("\r",c));d!==-1&&d<=c&&(d=b.indexOf("\n",c));if(d===-1&&a===-1){f.push(b.substring(e));break}var g=1;a!==-1&&d!==-1?a+1===d?(g=2,c=d+1):c=(a<d?a:d)+1:c=a!==-1?a+1:d+1;f.push(b.substring(e,c-g));e=c}return f};d.searchWithinFile=function(b,a,c,e,f,g){c=d.splitFile(c);if(f)a.contents=c;if(a){a.children=[];for(var i=
e=0;i<c.length;i++){var k=c[i];if(k&&k.length>0){var p=g?k:k.toLowerCase();if(p=b.wildCard?d.searchOnelineRegEx(b,p):d.searchOnelineLiteral(b,p)){var n,t=i+1;if(f)for(var u=0;u<p.length;u++)n=u+1,n={parent:a,checked:a.checked,type:"detail",matches:p,lineNumber:t,matchNumber:n,name:k,location:a.location+"-"+t+"-"+n},a.children.push(n);else n={parent:a,context:d.generateMatchContext(2,c,i),checked:a.checked,type:"detail",matches:p,lineNumber:t,name:k,location:a.location+"-"+t},a.children.push(n);e+=
p.length}}}a.totalMatches=e}};d.replaceCheckedMatches=function(b,a,d,c,e){for(var f=0,g="",i=[],k=0;k<d.length;k++){f!==d[k].startIndex&&(g+=b.substring(f,d[k].startIndex));if(d[k].length)e=d[k].length;for(var f=!1,n=0;n<c.length;n++)if(c[n]===k){f=!0;break}f?(i.push({startIndex:g.length,length:a.length}),g+=a):(i.push({startIndex:g.length,length:e}),g+=b.substring(d[k].startIndex,d[k].startIndex+e));f=d[k].startIndex+e}f<b.length&&(g+=b.substring(f));return{replacedStr:g,newMatches:i}};d.fullPathNameByMeta=
function(b){var a=b.length,d="";if(a>0)for(a-=1;a>-1;a--)d=d+(d===""?"":"/")+b[a].Name;return d};d.path2FolderName=function(b,a,d){return b.substring(0,b.length-a.length-(d?0:1))};d._storeRecentSearch=function(b,a,d,c){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b.put("recentSearch",a);d&&window.setTimeout(function(){d.dispatchEvent({type:"inputDataListChanged",deleting:c})}.bind(this),20)})};d.addRecentSearch=function(b,a,c){typeof a==="string"&&a&&
b.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===a)return;e.length>=20&&e.splice(19,e.length-20+1)}else e=[];e.splice(0,0,{name:a,regEx:c});d._storeRecentSearch(b,e)})};d.removeRecentSearch=function(b,a,c){typeof a==="string"&&a&&b.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===a){e.splice(f,1);d._storeRecentSearch(b,e,c,!0);break}})};d.getSearches=function(b,a,d){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b=b.get(a);typeof b==="string"&&(b=JSON.parse(b));b&&d&&d(b)})};d.getMixedSearches=function(b,a,c,e){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){var f=b.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));a&&(b=
b.get("search"),typeof b==="string"&&(b=JSON.parse(b)),b&&b.forEach(function(b){if(c){var a=d.parseQueryStr(b.query);f.some(function(b){return a.searchStrTitle===b.name})||f.push({name:a.searchStrTitle,label:b.name})}else f.push({name:null,label:b.name,value:b.query})}));f&&e&&e(f)})};d.getOpenSearchPref=function(b,a){b.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(b){b=b.get("nav.config");a(b&&b["links.newtab"]!=="undefined"?b["links.newtab"]?!0:!1:!1)})};
d.setOpenSearchPref=function(b,a){b.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b.put("openSearchPref",{openInNewTab:a})})};return d});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(g,k,f,c,a,i){function e(a,b,e,j){this.registry=a;this.fileClient=b;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=j&&j.searchOnName;this._buildSkeletonOnly=j&&j.buildSkeletonOnly;this._fetchChildrenCallBack=j&&j.fetchChildrenCallBack;this._searchParams=e;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:c.generateSearchHelper(e);this._location=j&&j.location;this._childrenLocation=j&&j.childrenLocation?j.childrenLocation:this._location;this._cancelled=!1;this._statusService=this.registry.getService("orion.page.message");this._progressService=this.registry.getService("orion.page.progress");this._statusService&&this._statusService.setCancelFunction(function(){this._cancelFileContentsSearch()}.bind(this))}e.prototype.search=function(a){var b=this.registry.getService("orion.core.contentTypeRegistry");
this._onSearchComplete=a;this._cancelled=!1;this._deferredArray=[];b.getContentTypes().then(function(b){this.contentTypesCache=b;var a=this;this._visitRecursively(this._childrenLocation).then(function(){a._cancelled||a._reportResult()}.bind(a),function(b){a._reportResult();a._statusService&&b.name==="Cancel"&&(console.log("Crawling search cancelled. Deferred array length : "+a._deferredArray.length),a._statusService.setProgressResult({Message:g["Search cancelled by user"],Severity:"Warning"}))}.bind(a))}.bind(this))};
e.prototype.searchName=function(a,b){if(a)this._searchParams=a,this.searchHelper=c.generateSearchHelper(a,!0);if(b)this.onSearchNameComplete=b;var e=[];this._cancelled=!1;this._deferredArray=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var j=0;j<this.fileSkeleton.length;j++){var f=this.fileSkeleton[j].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?c.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(e.push(this.fileSkeleton[j]),
e.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:e.length,docs:e}})}else this.onSearchNameComplete({response:{numFound:0,docs:[]}})};e.prototype.buildSkeleton=function(a,b){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=[];var e=this;a();c.getContentTypes().then(function(a){e.contentTypesCache=a;e._visitRecursively(e._childrenLocation).then(function(){e._buildingSkeleton=!1;
b();e.searchHelper&&!e._buildSkeletonOnly&&e.searchName()})})};e.prototype._sort=function(a){a.sort(function(b,a){var d,e;if(this._searchParams.sort==="Path asc"){d=b.Location&&b.Location.toLowerCase();d=c.path2FolderName(d,b.Name&&b.Name.toLowerCase(),!0);e=a.Location&&a.Location.toLowerCase();e=c.path2FolderName(e,a.Name&&a.Name.toLowerCase(),!0);if(d<e)return-1;if(d>e)return 1}return this._sortOnNameSingle(b,a)}.bind(this))};e.prototype._reportResult=function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,
docs:this.fileLocations}})};e.prototype._sortOnNameSingle=function(a,b){var c=a.Name&&a.Name.toLowerCase(),e=b.Name&&b.Name.toLowerCase();return c<e?-1:c>e?1:0};e.prototype._onFileType=function(a){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===c.ALL_FILE_TYPE?!0:a.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};e.prototype._visitRecursively=function(d){var b=[],c=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(d);return(c._progressService?this._progressService.progress(c.fileClient.fetchChildren(d),
"Crawling search for children of "+d):c.fileClient.fetchChildren(d)).then(function(d){for(var e=0;e<d.length;e++)if(d[e].Directory!==void 0&&d[e].Directory===!1)if(c._searchOnName)b.push(c._buildSingleSkeleton(d[e]));else if(c._buildSkeletonOnly)b.push(c._buildSingleSkeleton(d[e]));else{if(!c._cancelled){var f=a.getFilenameContentType(d[e].Name,c.contentTypesCache);if(f&&(f["extends"]==="text/plain"||f.id==="text/plain")&&c._onFileType(f))f=c._sniffSearch(d[e]),b.push(f),c._deferredArray.push(f)}}else if(d[e].Location)if(c._cancelled)break;
else f=c._visitRecursively(d[e].ChildrenLocation),b.push(f),c._deferredArray.push(f);return i.all(b)})};e.prototype._hitOnceWithinFile=function(a){a=this._searchParams.caseSensitive?a:a.toLowerCase();return this.searchHelper.inFileQuery.wildCard?c.searchOnelineRegEx(this.searchHelper.inFileQuery,a,!0):c.searchOnelineLiteral(this.searchHelper.inFileQuery,a,!0)};e.prototype._reportSingleHit=function(a){if(!this._cancelled)a.LastModified=a.LocalTimeStamp,this.fileLocations.push(a),this._hitCounter++,
this._sort(this.fileLocations),this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};e.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(a){a.cancel()})};e.prototype._sniffSearch=function(a){this._totalCounter++;var b=this;if(!this._cancelled)if(this.searchHelper.params.keyword==="")this._reportSingleHit(a),this._statusService&&this._statusService.setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return(b._progressService?b._progressService.progress(b.fileClient.read(a.Location),"Reading file "+a.Location):b.fileClient.read(a.Location)).then(function(c){b._hitOnceWithinFile(c)&&b._reportSingleHit(a);b._statusService&&b._statusService.setProgressResult({Message:f.formatMessage(g["${0} files found out of ${1}"],b._hitCounter,b._totalCounter)},g.Cancel)},function(b){b&&b.message&&b.message.toLowerCase()!=="cancel"&&console.error("Error loading file content: "+
b.message)})};e.prototype._buildSingleSkeleton=function(a){this._totalCounter++;this.fileSkeleton.push(a);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();a=new i;a.resolve(this._totalCounter);return a};e.prototype.constructor=e;return{SearchCrawler:e}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,orion/webui/littlelib,orion/util,orion/webui/dialog".split(","),function(g,k,f,c,a,i,e){function d(b){this._init(b)}d.prototype=new e.Dialog;d.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="'+
c.toUrl("../../../images/progress_running.gif")+'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="results" style="max-height:250px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';d.prototype._init=function(b){this.title=b.title||g["Find File Named"];this.modal=!0;this.messages=g;this._searcher=b.searcher;this._progress=b.progress;this._onHide=b.onHide;this._contentTypeService=new f.ContentTypeRegistry(this._searcher.registry);
if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=b.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=b.initialText;this._message=b.message;this._nameSearch=!0;if(b.nameSearch!==void 0)this._nameSearch=b.nameSearch;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(g["Missing required argument: fileService"]);this._searchRenderer=b.searchRenderer;if(!this._searchRenderer||
typeof this._searchRenderer.makeRenderFunction!=="function")throw Error(g["Missing required argument: searchRenderer"]);this._initialize()};d.prototype._bindToDom=function(b){var d=this;d.$crawlingProgress.style.display="none";this._nameSearch?this.$fileName.setAttribute("placeholder",g["FileName FolderName"]):this.$fileName.setAttribute("placeholder",g.Search);this.$fileName.addEventListener("input",function(){d._time=+new Date;d._timeoutId&&clearTimeout(d._timeoutId);d._timeoutId=setTimeout(d.checkSearch.bind(d),
0)},!1);this.$fileName.addEventListener("keydown",function(b){if(b.keyCode===a.KEY.ENTER){var c=a.$("a",d.$results);if(c)a.stop(b),(i.isMac?b.metaKey:b.ctrlKey)?window.open(c.href):(window.location.href=c.href,d.hide())}},!1);b.addEventListener("keydown",function(b){var c,e,f;if(b.keyCode===a.KEY.DOWN||b.keyCode===a.KEY.UP)c=a.$$array("a",d.$results),e=document.activeElement,f=c.indexOf(e),b.keyCode===a.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=d.$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")),a.stop(b)});b.addEventListener("mouseup",function(b){b.target.focus()},!1);setTimeout(function(){if(d._forceUseCrawler||!d._fileService.getService(d._searcher.getSearchLocation()).search){var b=
d._searchOnRoot?d._searcher.getSearchRootLocation():d._searcher.getChildrenLocation(),b=new k.SearchCrawler(d._searcher.registry,d._fileService,"",{searchOnName:!0,location:b});d._searcher.setCrawler(b);b.buildSkeleton(function(){d.$crawlingProgress.style.display="inline";d.$progress.appendChild(document.createTextNode(g["Building file skeleton..."]))},function(){d.$crawlingProgress.style.display="none";d.$progress.removeChild(d.$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()};d.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var b=(new Date).getTime();b-this._time>this._searchDelay?(this._time=b,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};d.prototype._detectFolderKeyword=function(b){var a,d=b,c=null;if(this._nameSearch&&(a=/(\S+)\s*(.*)/,(b=a.exec(b))&&b.length===3))b[1]&&
(d=b[1]),b[2]&&(c=b[2]);return{keyword:d,folderKeyword:c}};d.prototype.doSearch=function(){var b=this.$fileName.value;if(b){var d=this._detectFolderKeyword(b),c=this._searcher.createSearchParams(d.keyword,this._nameSearch,this._searchOnRoot),e=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));this.currentSearch=e;var f=document.createElement("div");f.appendChild(document.createTextNode(this._nameSearch?g["Searching..."]:i.formatMessage(g["Searching for occurrences of"],
b)));a.empty(this.$results);this.$results.appendChild(f);this._searcher.search(c,d.folderKeyword,function(){e===this.currentSearch&&e.apply(null,arguments)}.bind(this))}};d.prototype.decorateResult=function(b){function d(b){b.button===0&&!b.ctrlKey&&!b.metaKey&&c.hide()}for(var c=this,b=a.$$array("a",b),e=0;e<b.length;e++)b[e].addEventListener("click",d,!1)};d.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};d.prototype._afterHiding=function(){this._onHide&&this._onHide()};d.prototype.constructor=
d;return{OpenResourceDialog:d}});define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner">\n\t<\!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\>\n\n\t<div id="staticBanner" class="layoutBlock topRowBanner"> <\!-- primaryNav --\>\n\t\t<div id="centralNavigationArea" style="position:absolute;left:0;top:0;width:39px;height:36px; z-index:1;border-right:1px solid #ddd;"></div>\n\n\t\t<\!-- Static "Home" link. TODO delete this --\>\n\t\t<a id="home" class="layoutLeft "></a>\n\n\t\t<\!-- Left banner component: hamburger --\>\n\t\t<nav id="primaryNav" class="bannerLeftArea" style="z-index:2;" role="navigation">\n\t\t\t\t<button class="centralNavigation commandSprite core-sprite-hamburger" type="button"id="centralNavigation"></button>\n\t\t</nav>\n\n\t\t<\!-- Middle banner component: Breadcrumb bar --\>\n\t\t<div class="clear navigationBreadcrumb bannerMiddleArea" >\n\t\t\t<div id="location" class="currentLocation"></div>\n\t\t</div>\n\n\t\t<\!-- Right banner component: user identity --\>\n\t\t<div class="bannerRightArea" style="z-index:2;">\n\t\t\t<\!-- Global commands support. --\>\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\n\t\t\t<\!-- Search. TODO delete this --\>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search" style="display:none;">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;display:none;"></div>\n\n\t\t\t<\!-- User identity menu and Progress --\>\n\t\t\t<div id="userMenu" class="spacingRight layoutRight" style="color:#ccc;line-height:16px;">\n\t\t\t\t<div style="position: absolute;right: 0px;top:0;width: 39px;height:36px; z-index:-50;border-left: 1px solid #ddd;"></div>\n\n\t\t\t\t<\!-- Progress indicator --\>\n\t\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\n\t\t\t\t<\!-- User identity menu --\>\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger" style="z-index:2;">\n\t\t\t\t</span>\n\t\t\t\t<ul id="userDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<\!-- IDE notification messages go in here --\>\n\t<div id="notificationArea" class="notificationHide">\n\t\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t\t<div class="layoutRight"><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" type="button" id="closeNotifications"></span></div>\n\t</div>\n</header>'});
define("text!orion/banner/footer.html",[],function(){return'<\!--\n<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<div class="logoFooter commandSprite core-sprite-orion-logo"></div>\n\t<div class="footerBlock">${Orion is in Beta. Please try it out but BEWARE your data may be lost.}</div>\n\t<div class="footerRightBlock">\n\t\t<ul>\n\t\t\t<li><a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=5.0" target="_blank">${Report a Bug}</a>\n\t\t\t<li><a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a></li>\n\t\t</ul>\n\t</div>\n</footer>\n--\>'});
define("text!orion/banner/toolbar.html",[],function(){return'<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>\n<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>\n<ul class="layoutLeft commandList pageActions" id="navActions"></ul>\n<div class="layoutLeft" style="padding-left:7px;padding-right:7px;margin-top:2px;" id="filterBox" style="visibility: hidden;"></div>\n<ul class="layoutRight commandList pageActions" id="settingsActions"></ul>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>'});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(g,k){function f(c,a,f){if(c=k.node(c))this._parent=c;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;c=document.createElement("div");c.classList.add("dropDownContainer");c.id=this.navDropDownId;c.style.display="none";this._parent.appendChild(c);this._dropdownMenu=c;if(a=k.node(a))this._triggerNode=
a;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(a){a.keyCode===k.KEY.ESCAPE&&this.clearPanel()}.bind(this))}g.mixin(f.prototype,{click:function(){this._dropdownMenu.style.display==="none"?this.updateContent(this.getContentNode(),function(){k.setFramesEnabled(!1);this._dropdownMenu.style.display=
"";this._positionDropdown();this.selectionClass&&this._triggerNode.classList.add(this.selectionClass);this.handle=k.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",k.setFramesEnabled(!0),this.selectionClass&&this._triggerNode.classList.remove(this.selectionClass),this.options.onHide))this.options.onHide()},
addContent:function(c){this._dropdownMenu.innerHTML=c},getContentNode:function(){return this._dropdownMenu},updateContent:function(c,a){a()},_positionDropdown:function(){this._dropdownMenu.style.right="";var c=k.bounds(this._dropdownMenu),a=k.bounds(document.body);if(c.left+c.width>a.left+a.width)c=k.bounds(this._boundingNode(this._triggerNode)),a=k.bounds(this._triggerNode),this._dropdownMenu.style.right=c.width-(a.left-c.left+a.width)+"px"},_boundingNode:function(c){var a=window.getComputedStyle(c,
null);return a===null?c:a.getPropertyValue("position")==="absolute"||!c.parentNode||c===document.body?c:this._boundingNode(c.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)k.setFramesEnabled(!0),k.empty(this._parent),this._parent=this.select=null}});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","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Export as zip":"Zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"Folder","Folder name:":"Folder name:","Create a new folder":"Create a new folder",
"Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file",
"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.",
"Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.","Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Go Into":"Go Into","Move into the selected folder":"Move into the selected folder",
"Import local file...":"File System","Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location",Exporting:"Exporting to ${0}","Pasting ${0}":"Pasting ${0}",
"Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location",Cut:"Cut",Copy:"Copy","Fetching children of ":"Fetching children of ",Paste:"Paste","Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With",
"Loading ":"Loading ",New:"New",File:"File",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system","Create new content":"Create new content","Import from HTTP...":"HTTP","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.",
"You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.","Unzip ${0}?":"Unzip ${0}?",NoFile:"Use the ${0} menu to create new files and folders. Click a file to start coding."});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(g,k,f){function c(a,d,b){if(!a[d])throw d+g[" is not supported in this file system"];return a[d].apply(a,b)}function a(e,d,b,h){if(!e.readBlob)throw g["source file service does not support binary read"];if(!b.writeBlob)throw g["target file service does not support binary write"];if(d[d.length-1]!=="/")return c(e,"readBlob",[d]).then(function(a){return c(b,"writeBlob",[h,a])});var f=h.substring(0,
h.length-1),l=decodeURIComponent(f.substring(f.lastIndexOf("/")+1)),f=f.substring(0,f.lastIndexOf("/")+1);return c(b,"createFolder",[f,l]).then(function(){},function(){}).then(function(){return c(e,"fetchChildren",[d]).then(function(d){for(var c=[],f=0;f<d.length;++f){var j=d[f].Location,l=j;d[f].Directory&&(l=j.substring(0,j.length-1));l=decodeURIComponent(l.substring(l.lastIndexOf("/")+1));l=h+encodeURIComponent(l);d[f].Directory&&(l+="/");c[f]=a(e,j,b,l)}return k.all(c)})})}function i(a,d){function b(b){var a=
new k;a.reject(g["No Matching FileService for location:"]+b);return a}var c=a.getServiceReferences("orion.core.file"),j=c;if(d)for(var j=[],l=0;l<c.length;++l)d(c[l])&&j.push(c[l]);for(var m=[],i=[],r=[],q=[],p={fetchChildren:function(){var b=new k;b.resolve(q);return b},createWorkspace:function(){var b=new k;b.reject(g["no file service"]);return b},loadWorkspaces:function(){var b=new k;b.reject(g["no file service"]);return b},loadWorkspace:function(){var b=new k;window.setTimeout(function(){b.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:g["File Servers"],Location:"/",Children:q,ChildrenLocation:"/"})},100);return b},search:b,createProject:b,createFolder:b,createFile:b,deleteFile:b,moveFile:b,copyFile:b,read:b,write:b},c=0;c<j.length;++c)q[c]={Directory:!0,Length:0,LocalTimeStamp:0,Location:j[c].getProperty("top"),ChildrenLocation:j[c].getProperty("top"),Name:j[c].getProperty("Name")},l=j[c].getProperty("pattern")||j[c].getProperty("top").replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),l[0]!=="^"&&(l=
"^"+l),m[c]=RegExp(l),i[c]=a.getService(j[c]),r[c]=j[c].getProperty("Name"),j[c].getProperty("NameKey")&&j[c].getProperty("nls")&&f.getMessageBundle(j[c].getProperty("nls")).then(function(b,a){q[b].Name=a[j[b].getProperty("NameKey")];r[b]=a[j[b].getProperty("NameKey")]}.bind(this,c));this._getServiceIndex=function(b){if(b==="/")return-1;else if(!b||b.length&&b.length===0)return i[0]?0:-1;for(var a=0;a<m.length;++a)if(m[a].test(b))return a;throw g["No Matching FileService for location:"]+b;};this._getService=
function(b){b=this._getServiceIndex(b);return b===-1?p:i[b]};this._getServiceName=function(b){b=this._getServiceIndex(b);return b===-1?p.Name:r[b]};this._getServiceRootURL=function(b){b=this._getServiceIndex(b);return b===-1?p.Location:q[b].Location}}i.prototype={getService:function(a){return this._getService(a)},fileServiceName:function(a){return this._getServiceName(a)},fileServiceRootURL:function(a){return this._getServiceRootURL(a)},fetchChildren:function(a){return c(this._getService(a),"fetchChildren",
arguments)},createWorkspace:function(a){return c(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return c(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(a){return c(this._getService(a),"loadWorkspace",arguments)},createProject:function(a,d,b,h){return c(this._getService(a),"createProject",arguments)},createFolder:function(a,d){return c(this._getService(a),"createFolder",arguments)},createFile:function(a,d){return c(this._getService(a),"createFile",
arguments)},deleteFile:function(a){return c(this._getService(a),"deleteFile",arguments)},moveFile:function(e,d,b){var h=this._getService(e),f=this._getService(d);if(h===f)return c(h,"moveFile",arguments);var l=e[e.length-1]==="/",g=d;g[g.length-1]!=="/"&&(g+="/");if(b)g+=encodeURIComponent(b);else{var i=e;l&&(i=i.substring(0,i.length-1));g+=i.substring(i.lastIndexOf("/")+1)}l&&g[g.length-1]!=="/"&&(g+="/");return a(h,e,f,g).then(function(){return c(h,"deleteFile",[e])})},copyFile:function(e,d,b){var h=
this._getService(e),f=this._getService(d);if(h===f)return c(h,"copyFile",arguments);var l=e[e.length-1]==="/",g=d;g[g.length-1]!=="/"&&(g+="/");if(b)g+=encodeURIComponent(b);else{var i=e;l&&(i=i.substring(0,i.length-1));g+=i.substring(i.lastIndexOf("/")+1)}l&&g[g.length-1]!=="/"&&(g+="/");return a(h,e,f,g)},read:function(a,d){return c(this._getService(a),"read",arguments)},readBlob:function(a){return c(this._getService(a),"readBlob",arguments)},write:function(a,d,b){return c(this._getService(a),"write",
arguments)},remoteImport:function(a,d){return c(this._getService(a),"remoteImport",arguments)},remoteExport:function(a,d){return c(this._getService(a),"remoteExport",arguments)},search:function(a){return c(this._getService(a.resource),"search",arguments)}};i.prototype.constructor=i;return{FileClient:i}});
define("orion/webui/SideMenu","orion/commands,orion/objects,orion/webui/littlelib,orion/PageLinks,orion/PageUtil,orion/URITemplate,orion/URL-shim,orion/util".split(","),function(g,k,f,c,a,i,e,d){function b(b,a){this.parentNode=f.node(b);this.contentNode=f.node(a);if(!this.parentNode)throw Error("Missing parentNode");this.menuitems=Object.create(null);this.categories=this.links=null;this.anchor=document.createElement("ul");this.anchor.classList.add("sideMenuList");this.parentNode.appendChild(this.anchor);
this.anchor.addEventListener("click",this._handleEvent.bind(this));this.anchor.addEventListener("touchstart",this._handleEvent.bind(this));this.anchor.addEventListener("focus",this._handleEvent.bind(this),!0);f.addAutoDismiss([this.anchor],this._expandMenu.bind(this,null))}function h(b){return!b.isRelatedLink}function j(b,a){var d=b.order,c=a.order;if(d<c)return-1;else if(c<d)return 1;return 0}function l(b,a){var d=b.source.order,c=a.source.order,d=typeof d==="number"?d:100,c=typeof c==="number"?
c:100;return d===c?b.textContent.localeCompare(a.textContent):d<c?-1:1}var m=d.isTouch;k.mixin(b.prototype,{LOCAL_STORAGE_NAME:"sideMenuNavigation",OPEN_STATE:"open",CLOSED_STATE:"closed",DEFAULT_STATE:"open",SIDE_MENU_OPEN_WIDTH:"40px",TRANSITION_DURATION_MS:301,addMenuItem:function(b,a,d){var c=this.anchor,b=this.createListItem(b,a);d&&b.classList.add("sideMenuItemActive");c.appendChild(b);this.menuitems[a]=b},setSideMenu:function(){var b=this.getDisplayState(),a=this.parentNode;if(a){if(b===this.CLOSED_STATE){this.setPageContentLeft("0");
if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){a.style.display="none"},this.TRANSITION_DURATION_MS);a.classList.add("animating")}if(b===this.OPEN_STATE){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;a.classList.remove("animating");a.style.display="block";a.style.width=this.SIDE_MENU_OPEN_WIDTH;this.setPageContentLeft(this.SIDE_MENU_OPEN_WIDTH)}}},setPageContentLeft:function(b){var a=this.contentNode;if(a)a.style.left=
b},toggleSideMenu:function(){var b=this.getDisplayState(),a=this.contentNode;a&&a.classList.add("content-fixedHeight-animation");b=b===this.OPEN_STATE?this.CLOSED_STATE:this.OPEN_STATE;b===this.DEFAULT_STATE?localStorage.removeItem(this.LOCAL_STORAGE_NAME):localStorage.setItem(this.LOCAL_STORAGE_NAME,b);this.setSideMenu()},clearMenuItems:function(){this.menuitems=[];f.empty(this.anchor)},getMenuItems:function(){var b=this.menuitems;return Object.keys(b).map(function(a){return b[a]})},getMenuItem:function(b){return this.menuitems[b]},
getDisplayState:function(){var b=localStorage.getItem(this.LOCAL_STORAGE_NAME);if(!b)b=this.DEFAULT_STATE;return b},createListItem:function(b,a){var d=document.createElement("li");d.className=b;d.classList.add("sideMenuItem");d.categoryId=a;return d},setCategories:function(b){this.categories=b;this.links=Object.create(null)},setPageLinks:function(b){this.pageLinks=b;var a=this,d=b.createLinkElements();b.getAllLinks().forEach(function(b,c){var e=d[c];e.source=b;a._getLinksBin(b.category).push(e)});
this._renderLinks()},setRelatedLinks:function(b,a){this.relatedLinks=b;var d=this;Object.keys(this.links).forEach(function(b){var a=d._getLinksBin(b);d.links[b]=a.filter(h)});var c=document.createDocumentFragment();b.forEach(function(b){var a=b.relatedLink,e=d._getLinksBin(a.category),b=g.createCommandMenuItem(c,b.command,b.invocation);b.classList.remove("dropdownMenuItem");b.isRelatedLink=!0;b.source=a;e.push(b)});this._renderLinks(a)},_getLinksBin:function(b){if(b){var a=this.links;a[b]=a[b]||[];
return a[b]}else return[]},_sort:function(){var b=this.links;Object.keys(b).forEach(function(a){b[a].sort(l)})},_renderCategories:function(){var b=this.categories,d=this,e=new URL(window.location.href),h=a.matchResourceParameters();h.OrionHome=c.getOrionHome();var f=!1;this.clearMenuItems();b.getCategoryIDs().map(function(a){return b.getCategory(a)}).sort(j).forEach(function(b){var a=d._getLinksBin(b.id);a.length&&(f?d.addMenuItem(b.imageClass,b.id,!1):(a=a.some(function(b){if(!b.source.uriTemplate)return!1;
b=new i(b.source.uriTemplate);b=new URL(b.expand(h),window.location);return b.protocol===e.protocol&&b.host===e.host&&b.hostname===e.hostname&&b.port===e.port&&b.pathname===e.pathname&&b.search===e.search?f=!0:!1}),d.addMenuItem(b.imageClass,b.id,a)))})},_renderLinks:function(b){b=b||[];this._sort();this._renderCategories();var a=this,d=window.location.href;Object.keys(this.menuitems).forEach(function(c){var e=a.getMenuItem(c);if(e){for(var h=a._getLinksBin(c).slice(),h=h.filter(function(a){var c=
a.source;return b.indexOf(c.id)>=0||!c.default&&!c.force&&a.href===d?!1:!0}),h=h.filter(function(b){b=b.source;return!(h.length>1&&b.default&&!b.force)}),f=h.length-1;f>0;f--)h[f].href===h[f-1].href&&h.splice(f,1);if(h.length){e.appendChild(a._createCategoryElement(c,e,h[0]));var j=document.createElement("ul");j.className="sideMenuSubMenu";h.forEach(function(b){var a=document.createElement("li");a.className="sideMenuSubMenuItem";var d=document.createElement("a");d.href=b;d.className="sideMenuSubMenuItemLink";
var c=document.createElement("span");c.innerHTML=b.innerHTML;c.className="sideMenuSubMenuItemSpan";d.appendChild(c);a.appendChild(d);j.appendChild(a)});e.appendChild(j)}}})},_createCategoryElement:function(b,a,d){var b=this.categories.getCategory(b),c;m?(c=document.createElement("button"),c.type="button"):(c=document.createElement("a"),c.href=d.href);c.className+=b.imageClass;c.classList.add("submenu-trigger");c.tabIndex="0";a.classList.remove(b.imageClass);return c},_handleEvent:function(b){var a=
b.target,b=b.type==="focus";if(a.tagName!=="A"||b)a.classList.contains("submenu-trigger")&&(m||b)&&this._expandMenu(f.$(".sideMenuSubMenu",a.parentNode))},_expandMenu:function(b){this.getMenuItems().forEach(function(a){a=f.$(".sideMenuSubMenu",a);b!==a&&a.classList.remove("expanded")});b&&b.classList.toggle("expanded")}});return b});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/keyBinding,orion/EventTarget,orion/commandRegistry,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/keyBinding,orion/breadcrumbs,orion/webui/littlelib,orion/webui/splitter,orion/webui/dropdown,orion/webui/tooltip,orion/contentTypes,orion/URITemplate,orion/keyAssist,orion/PageUtil,orion/widgets/themes/ThemePreferences,orion/widgets/themes/container/ThemeData,orion/Deferred,orion/widgets/UserMenu,orion/PageLinks,orion/webui/dialogs/OpenResourceDialog,text!orion/banner/banner.html,text!orion/banner/footer.html,text!orion/banner/toolbar.html,orion/widgets/input/DropDownMenu,orion/util,orion/customGlobalCommands,orion/fileClient,orion/webui/SideMenu,orion/objects".split(","),function(g,
k,f,c,a,i,e,d,b,h,j,l,m,o,r,q,p,n,t,u,x,w,B,y,H,G,D,s,A,v,C,z,E,O,F){var R,P,K,L,M,S,N,V;function ea(b,a){if(b.getLabel)return b.getLabel();else{var d=new B;d.resolve(a.properties.name);return d}}function ga(b){m.node("progressPane").setAttribute("aria-label",g["Operations - Press spacebar to show current operations"]);(b=b.getService("orion.page.progress"))&&b.init.bind(b)("progressPane")}function fa(b,a){var d=b.getServiceReferences("orion.core.auth");ba=[];var c=R.apply(this,arguments);if(c)for(var e=
0;e<d.length;e++){var h=d[e],f=b.getService(h);ea(f,h).then(function(b){f.getKey().then(function(a){ba.push(a);f.getUser().then(function(d){c.addUserItem(a,f,b,d)},function(d,e){c.addUserItem(a,f,b,e)});window.addEventListener("storage",function(){aa[a]!==localStorage.getItem(a)&&(aa[a]=localStorage.getItem(a),f.getUser().then(function(d){c.addUserItem(a,f,b,d)},function(){c.addUserItem(a,f,b)}))},!1)})})}}function W(b){return b}function X(a,d,c,h,f){function j(b){for(var a={},d=b.getPropertyKeys(),
c,e=0;e<d.length;e++)c=d[e],a[c]=b.getProperty(c);return a}function g(b,a){var d=null;b.some(function(b){return a===b.getProperty("id")?!!(d=b):!1});return d}function l(b){var a=b.command;if(!a.visibleWhen||a.visibleWhen(d))return b.invocation=new e.CommandInvocation(d,d,null,a,h),(new B).resolve(b);else if(typeof f==="function")return o||(o=f()),B.when(o,function(c){if(c&&d===ca&&(!a.visibleWhen||a.visibleWhen(c)))return b.invocation=new e.CommandInvocation(c,c,null,a,h),b});return(new B).resolve()}
function i(b,a,d){return d?(new B).resolve({relatedLink:b,command:d}):a.then(function(a){return{relatedLink:b,command:new e.Command(a)}})}var m=arguments,k,o,r=a&&a.getServiceReferences("orion.page.link.related");if(r&&r.length!==0){var q=this;B.when(function(){if(k)return k;var b=a.getService("orion.core.contentTypeRegistry");b||(b=new p.ContentTypeRegistry(a),b=a.getService("orion.core.contentTypeRegistry"));return b.getContentTypes().then(function(b){return k=b})}(),function(){if(P.apply(q,m)){var d=
a.getServiceReferences("orion.navigate.command"),e=[];r.forEach(function(c){var f=j(c);if(f.id){var l;if((f.nls&&f.nameKey||f.name)&&f.uriTemplate)l=b._createCommandOptions(f,c,a,k,!0),e.push(i(f,l,null));else if(l=g(d,f.id)){var m=j(l),c={};F.mixin(c,m,f);(f=h.findCommand(f.id))?e.push(i(c,null,f)):(l=b._createCommandOptions(m,l,a,k,!0),e.push(i(c,l,null)))}}});B.all(e,W).then(function(b){b.sort(function(b,a){return b.command.name.localeCompare(a.command.name)});return B.all(b.map(l),W).then(function(a){var d=
[],a=a.filter(function(a,c){if(a)return!0;d.push(b[c]);return!1});K.call(q,h,a,d,c);L.apply(q,m)})})}})}}function ha(b){var a=m.node("globalActions");a&&(b.destroy(a),b.renderCommands(a.id,a,{},{},"tool"))}function Y(b){var a=window.getComputedStyle(b,null);return a===null?b:a.getPropertyValue("position")==="absolute"||!b.parentNode||b===document.body?b:Y(b.parentNode)}function Z(b){var a={},d=null;typeof b==="string"&&(b=m.node(b));b||(b=m.node("pageActions"));for(var c=b;c&&c.classList;){if(c.classList.contains("toolComposite")){d=
c;break}c=c.parentNode}if(b.classList.contains("commandMarker"))a.commandNode=b;if(d&&(a.slideContainer=m.$(".slideParameters",d),a.parameterArea=m.$(".parameters",d),a.dismissArea=m.$(".parametersDismiss",d),a.notifications=m.$("#notificationArea",d),d.parentNode&&(a.toolbarTarget=m.$(".toolbarTarget",d.parentNode),a.toolbarTarget)))b=m.bounds(a.toolbarTarget),c=m.bounds(Y(a.toolbarTarget.parentNode)),a.toolbarTargetY=b.top-c.top,a.toolbar=d;return a}function $(b){if(b=b.slideContainer)if(b.style.left=
"",b.style.top="",b.classList.contains("slideContainerActive")){var a=m.bounds(b),d=m.bounds(b.parentNode);b.style.left=(d.width-a.width)/2+"px";b.style.top="0"}}var i=function(b){var a=document.createElement("a");a.href=b;return a.href}(k.toUrl("auth/NotifyAuthentication.html")),aa={},J=null;R=z.createMenuGenerator||function(b,a){if(m.node("userMenu")){var d=m.node("userDropdown"),c=new r.Dropdown({dropdown:d}),d=new y.UserMenu({dropdownNode:d,dropdown:c,serviceRegistry:b}),c=m.node("userTrigger");
new q.Tooltip({node:c,text:g.Options,position:["below","left"]});var c=document.getElementById("userTrigger"),e=c.className;e+=" imageSprite core-sprite-silhouette";c.className=e;d.setKeyAssist(a);return d}};P=z.beforeGenerateRelatedLinks||function(){return!0};K=z.addRelatedLinkCommands||function(b,a,d,c){this.sideMenu&&this.sideMenu.setRelatedLinks(a,c)};L=z.afterGenerateRelatedLinks||function(){};M=z.afterSetPageTarget||function(){};S=z.generateNavigationMenu||function(){var b=m.node("sideMenu");
if(b){var a=m.node("centralNavigation");new q.Tooltip({node:a,text:g.CentralNavTooltip,position:["right"]});J=this.sideMenu=new O(b,m.node("pageContent"));a.addEventListener("click",J.toggleSideMenu.bind(J));(b=m.node("sideMenuToggle"))&&b.addEventListener("click",J.toggleSideMenu.bind(J))}};N=z.afterGenerateNavigationMenu||function(){};V=z.afterGenerateBanner||function(){};var ba=[],ca,U=[],I,T=null,Q=null,da=new a;return{generateBanner:function(b,a,h,j,l,i,r,q){function p(b){b.registerService("orion.cm.managedservice",
{updated:function(b){for(var b=b&&b["links.newtab"]!=="undefined"?b["links.newtab"]?"_blank":"_self":"_self",a=m.$$array(".targetSelector"),d=0;d<a.length;d++)a[d].target=b}},{pid:"nav.config"})}(new x.ThemePreferences(j,new w.ThemeData)).apply();var n=m.node(b);if(!n)throw g["could not find banner parent, id was "]+b;var u=document.createRange();u.selectNode(n);u=u.createContextualFragment(D);m.processTextNodes(u,g);n.firstChild?n.insertBefore(u,n.firstChild):n.appendChild(u);n=m.node("home");n.href=
k.toUrl("edit/edit.html");n.setAttribute("aria-label",g["Orion Home"]);m.node("progressPane").src=e.NO_IMAGE;if(n=m.node("pageToolbar"))n.classList.add("toolbarLayout"),n.innerHTML=A+f.slideoutHTMLFragment("mainToolbar");(n=m.node("closeNotifications"))&&n.setAttribute("aria-label",g["Close notification"]);if(C.isFirefox<=17&&(n=m.node("staticBanner")))n.style.width="100%",n.style.MozBoxSizing="border-box";if(n=m.node("footer"))n.innerHTML=s,m.processTextNodes(n,g);h.setParameterCollector(new d.CommandParameterCollector(Z,
$));document.addEventListener("keydown",function(b){b.keyCode===m.KEY.ESCAPE&&(b=a.getService("orion.page.message"))&&b.setProgressMessage("")},!1);S.apply(this,arguments);N.apply(this,arguments);n=H.getCategoriesInfo(a);u=H.getPageLinksInfo(a,"orion.page.link");B.all([n,u]).then(function(b){if(J){var a=b[1];J.setCategories(b[0]);J.setPageLinks(a);J.setSideMenu()}});if(n=m.$(".split")){var u=m.$(".sidePanelLayout"),y=m.$(".mainPanelLayout");if(u&&y)T={side:u,main:y},T.splitter=new o.Splitter({node:n,
sidePanel:u,mainPanel:y,toggle:!0,closeByDefault:q}),n=new e.Command({name:g["Toggle side panel"],tooltip:g["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){T.splitter.toggleSidePanel()}}),h.addCommand(n),h.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new c.KeyBinding("l",C.isMac?!1:!0,!0,!1,C.isMac?!0:!1))}var v=!1,z=function(b,a){if(!v){var d=a.getService("orion.page.progress"),c=new G.OpenResourceDialog({searcher:b,progress:d,searchRenderer:b.defaultRenderer,
onHide:function(){v=!1}});window.setTimeout(function(){v=!0;c.show()},0)}},n=new e.Command({name:g["Find File Named..."],tooltip:g["Choose a file by name and open an editor on it"],id:"orion.openResource",callback:function(){z(l,a)}});h.addCommand(n);h.registerCommandContribution("globalActions","orion.openResource",100,null,!0,new c.KeyBinding("f",!0,!0));n=new e.Command({name:g["Toggle banner and footer"],tooltip:g["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var b=
m.node("banner"),a=m.node("footer"),d=m.node("sideMenu"),c=m.$(".content-fixedHeight"),e=b.style.visibility==="hidden";e?(b.style.visibility="visible",a.style.visibility="visible",c.classList.remove("content-fixedHeight-maximized"),d&&d.classList.remove("sideMenu-maximized")):(b.style.visibility="hidden",a.style.visibility="hidden",c.classList.add("content-fixedHeight-maximized"),d&&d.classList.add("sideMenu-maximized"));da.dispatchEvent({type:"toggleTrim",maximized:!e});return!0}});h.addCommand(n);
h.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new c.KeyBinding("m",!0,!0));n=new e.Command({name:g["System Configuration Details"],tooltip:g["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return k.toUrl("help/about.html")}});h.addCommand(n);h.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new c.KeyBinding(112,!0,!0));n=new e.Command({name:g["Background Operations"],tooltip:g["Background Operations Tooltip"],
id:"orion.backgroundOperations",hrefCallback:function(){return k.toUrl("operations/list.html")}});h.addCommand(n);h.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new c.KeyBinding("o",!0,!0));Q=new t.KeyAssistPanel({commandRegistry:h});n=new e.Command({name:g["Show Keys"],tooltip:g["Show a list of all the keybindings on this page"],id:"orion.keyAssist",callback:function(){Q.isVisible()?Q.hide():Q.show();return!0}});h.addCommand(n);h.registerCommandContribution("globalActions",
"orion.keyAssist",100,null,!0,new c.KeyBinding(191,!1,!0));ha(h);fa(a,n.callback);ga(a);window.addEventListener("hashchange",function(){h.processURL(window.location.href)},!1);window.setTimeout(function(){p(a)},0);V.apply(this,arguments)},getToolbarElements:Z,getMainSplitter:function(){return T},getKeyAssist:function(){return Q},getGlobalEventTarget:function(){return da},layoutToolbarElements:$,setPageTarget:function(b){var a,d,c=b.breadcrumbRootName,e=b.serviceRegistry;b.target?(b.searchService&&
b.searchService.setLocationByMetaData(b.target),b.fileService&&!b.breadcrumbTarget&&(d=c?c+" ":"",d+=b.fileService.fileServiceName(b.target.Location),c=null),a=b.name||b.target.Name,ca=b.target,X.call(this,e,b.target,U,b.commandService,b.makeAlternate)):(b.breadcrumbTarget||(c=c||b.task||b.name),a=b.name,X.call(this,e,{NoTarget:""},U,b.commandService,b.makeAlternate));(I=b.title)||(I=a?a+" - "+b.task:b.task);window.document.title=I;M.apply(this,arguments);if(a=b.breadCrumbContainer?m.node(b.breadCrumbContainer):
m.node("location")){m.empty(a);var h=e&&new E.FileClient(e),e=b.breadcrumbTarget||b.target,h=h&&e&&e.Location?h.fileServiceRootURL(e.Location):null;new l.BreadCrumbs({container:a,resource:e,rootSegmentName:c,workspaceRootSegmentName:d,workspaceRootURL:h,makeFinalHref:b.makeBreadcrumFinalLink,makeHref:b.makeBreadcrumbLink})}},setDirtyIndicator:function(b){if(I)I.charAt(0)==="*"&&!b&&(I=I.substring(1)),b&&I.charAt(0)!=="*"&&(I="*"+I),window.document.title=I;var a=m.node("dirty");if(a)a.textContent=
b?"*":""},setPageCommandExclusions:function(b){U=b},notifyAuthenticationSite:i}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(g){return{detectValidURL:function(k){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,c=f.exec(k),a=[],i=0;c;){if(c.length===3&&c[2].length>0){var e=new URL(c[2]);e.protocol!==":"&&g.validateURLScheme(e.href)&&(c.index>i&&a.push({segmentStr:k.substring(i,c.index)}),a.push({segmentStr:c[1].length>0?c[1]:c[2],urlStr:c[2]}),i=c.index+c[0].length)}c=f.exec(k)}if(i===0)return null;i<k.length-1&&a.push({segmentStr:k.substring(i)});return a},processURLSegments:function(g,
f){f.forEach(function(c){if(c.urlStr){var a=document.createElement("a");a.href=c.urlStr;a.appendChild(document.createTextNode(c.segmentStr))}else a=document.createElement("span"),a.textContent=c.segmentStr;g.appendChild(a)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(g,k,f,c){function a(a,d,b,c,f){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.message",this);this._operationsClient=d;this.notificationContainerDomId=f;this.domId=b;this.progressDomId=c||b;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var i;a.prototype={_init:function(){var a=k.node("closeNotifications");if(a&&
!this._hookedClose){a.style.cursor="pointer";this._hookedClose=!0;var d=k.node(this.notificationContainerDomId);k.addAutoDismiss([d],function(){this._clickToDisMiss&&this.close()}.bind(this));a.addEventListener("click",function(){this.close()}.bind(this));d.addEventListener("click",function(b){b&&b.target&&b.target.nodeName.toLowerCase()==="a"&&(b=k.$$("a",d))&&b.length&&b.length===1&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);var a=k.node("closeNotifications");
this._cancelMsg&&this._cancelFunc&&a?(a.innerHTML="",a.classList.remove("cancelButton"),a.classList.add("dismissButton"),a.classList.add("core-sprite-close"),a.classList.add("imageSprite"),this._cancelFunc(),this._cancelMsg=null):this.setProgressMessage("")},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=f.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(a,d,b){this._init();this.currentMessage=a;var c=k.node(this.domId);
if(typeof b==="boolean"){var f=c.getAttribute("aria-live");c.setAttribute("aria-live",b?"polite":"off");window.setTimeout(function(){a===this.currentMessage&&(k.empty(c),c.appendChild(document.createTextNode(a)),window.setTimeout(function(){c.setAttribute("aria-live",f)},100))}.bind(this),100)}else k.empty(c),c.appendChild(document.createTextNode(a));typeof d==="number"&&window.setTimeout(function(){a===this.currentMessage&&(k.empty(c),c.appendChild(document.createTextNode("")))}.bind(this),d)},setErrorMessage:function(a){this._clickToDisMiss=
!0;this.currentMessage=a;this._init();var d=a.responseText||a.message||a;if(typeof d==="string")try{d=JSON.parse(d)}catch(b){}var a=d.Message||d,c="red";if(d.Severity)switch(d.Severity){case "Warning":c="#FFCC00";break;case "Error":c="red";break;case "Info":case "Ok":c="green"}d=document.createElement("span");d.style.color=c;d.appendChild(document.createTextNode(a));a=k.node(this.domId);k.empty(a);a.appendChild(d)},setProgressMessage:function(a){this._clickToDisMiss=!1;this._init();this.currentMessage=
a;var d=document.createElement("span");d.classList.add("progressIcon");var b=k.node(this.progressDomId);k.empty(b);b.appendChild(d);b.appendChild(document.createTextNode(a));d=k.node(this.notificationContainerDomId);d.classList.remove("notificationHide");if(a&&a.length>0)d.classList.add("progressNormal"),d.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else d.classList.remove("notificationShow"),d.classList.add("notificationHide")},
setCancelFunction:function(a){this._cancelFunc=a},setProgressResult:function(a,d){this._clickToDisMiss=!1;this._cancelMsg=d;this.currentMessage=a;var b=a.responseText||a;if(typeof b==="string")try{b=JSON.parse(b)}catch(f){}this._init();var j=b.Message||b.toString(),l=g.UnknownError,i="core-sprite-information",o="progressNormal",r=document.createElement("span");r.classList.add("imageSprite");r.classList.add("progressIcon");var q=[];if(b.Severity)switch(b.Severity){case "Warning":l=g.UnknownWarning;
i="core-sprite-warning";o="progressWarning";q.push("progressInfo");q.push("progressError");q.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":i="core-sprite-error";o="progressError";q.push("progressWarning");q.push("progressInfo");q.push("progressNormal");this._clickToDisMiss=!0;break;default:o="progressNormal",q.push("progressWarning"),q.push("progressError"),q.push("progressNormal")}q.push("notificationHide");r.classList.add(i);var p=k.node(this.progressDomId),i=k.node(this.notificationContainerDomId);
k.empty(p);p.appendChild(r);j===Object.prototype.toString()&&(j=l);if(b.HTML)b=document.createElement("span"),b.innerHTML=j,p.appendChild(b);else{if(l=c.detectValidURL(j))j=document.createDocumentFragment(),c.processURLSegments(j,l),Array.prototype.forEach.call(k.$$("a",j),function(b){b.target="_blank"});else{if(b.Severity!=="Warning"&&b.Severity!=="Error"&&!d)this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),
5E3);j=document.createTextNode(j)}p.appendChild(j)}if(o&&this.progressDomId!==this.domId){i.classList.add(o);for(o=0;o<q.length;o++)i.classList.remove(q[o])}i.classList.add("notificationShow");if(q=k.node("closeNotifications"))this._cancelMsg?(q.classList.add("cancelButton"),q.classList.remove("dismissButton"),q.classList.remove("core-sprite-close"),q.classList.remove("imageSprite"),q.innerHTML=this._cancelMsg):(q.innerHTML="",q.classList.remove("cancelButton"),q.classList.add("dismissButton"),q.classList.add("core-sprite-close"),
q.classList.add("imageSprite"))},showWhile:function(a,d){var b=this;if(d){b.setProgressMessage(d);var c=function(){d===b.currentMessage&&b.setProgressMessage("")};a.then(c,c)}return a},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(a,d){return new i(this,++this._lastProgressId,a,d)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var a="",d=!0,b;for(b in this._progressMonitors)this._progressMonitors[b].status&&(d||(a+=", "),a+=this._progressMonitors[b].status,
d=!1);this.setProgressMessage(a)}else this.setProgressMessage("")},_beginProgressMonitor:function(a){this._progressMonitors[a.progressId]=a;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(a){this._progressMonitors[a.progressId]=a;this._renderOngoingMonitors()},_doneProgressMonitor:function(a){delete this._progressMonitors[a.progressId];this._progressMonitors.length--;a.status?this.setProgressResult(a.status):this._renderOngoingMonitors()}};a.prototype.constructor=
a;i=function(a,d,b,c){this.statusService=a;this.progressId=d;if(b){this.deferred=b;this.begin(c);var f=this;b.then(function(){f.done.bind(f)()},function(){f.done.bind(f)()})}};i.prototype.begin=function(a){this.status=a;this.statusService._beginProgressMonitor(this)};i.prototype.done=function(a){this.status=a;this.statusService._doneProgressMonitor(this)};i.prototype.worked=function(a){this.status=a;this.statusService._workedProgressMonitor(this)};i.prototype.constructor=i;return{StatusReportingService:a,
ProgressMonitor:i}});
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(g,k){var f={root:k};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(g,k,f,c){function a(){}a.prototype={_initialize:function(a,e,d,b,h){this._tooltip=new c.Tooltip({node:a,hideDelay:h||0,afterShowing:this._afterShowingFunction(e).bind(this),afterHiding:d,trigger:b?b:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";a=document.createRange();a.selectNode(this.$parent);a=a.createContextualFragment(this.TEMPLATE);
this.messages&&f.processTextNodes(a,g);this.$parent.appendChild(a);var j=this._tooltip;this.$parent.addEventListener("keydown",function(b){b.keyCode===f.KEY.ESCAPE&&j.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(a){for(var c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];d.id&&(this["$"+d.id]=d);this._bindElements(d)}},_afterShowingFunction:function(a){return function(){a&&a.bind(this)();if(!this.customFocus){var c=
f.firstTabbable(this.$parent);c&&c.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};a.prototype.constructor=a;return{PopupDialog:a}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(g,k,f,c){var a={};(function(){var i=!1;a.updateNavTools=function(a,d,b,c,j,l){var m=f.node(c);if(m)d.destroy(m);else throw g["could not find toolbar "]+c;d.renderCommands(c,m,l,b,"button");if(j&&(c=f.node(j)))d.destroy(c),d.renderCommands(j,c,null,b,"button");i||(i=!0,a.getService("orion.page.selection").addEventListener("selectionChanged",function(a){var c=f.node(j);
c&&(d.destroy(c),d.renderCommands(j,c,a.selections,b,"button"))}))};a.createOperationsCommands=function(a,d,b){function f(b){return!b.operation||!b.operation.type?!1:b.operation.type==="loadstart"||b.operation.type==="progress"}var j=new c.Command({name:g["Remove Completed"],tooltip:g["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){b.removeCompletedOperations().then(function(){d.loadOperations.bind(d)()})},visibleWhen:function(){return!0}});a.addCommand(j);
j=new c.Command({name:g.Remove,tooltip:g["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],c=0;c<a.length;c++){var e=a[c];b.removeOperation.bind(b)(e.Location).then(function(){d.loadOperations.bind(d)()},function(){d.loadOperations.bind(d)()})}},visibleWhen:function(b){if(!Array.isArray(b)||b.length===0)return!f(b);for(var a in b)if(f(b[a]))return!1;return!0}});a.addCommand(j);
j=new c.Command({name:g.Cancel,tooltip:g["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(b){for(var b=Array.isArray(b.items)?b.items:[b.items],a=0;a<b.length;a++){var d=b[a];d.deferred&&d.deferred.cancel()}},visibleWhen:function(b){if(!Array.isArray(b)||b.length===0)return f(b)&&(b.operation&&b.operation.cancelable?!0:!1);for(var a in b)if(!f(b[a])||!b[a].operation||!b[a].operation.cancelable)return!1;return!0}});a.addCommand(j)}})();
return a});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(g,k,f,c,a){function i(a){this._options=a}i.prototype=new c.PopupDialog;i.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>';i.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.commandRegistry;a.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};i.prototype._bindToDom=function(){this.$allOperationsLink.href=k.toUrl("operations/list.html");this._setOperationsVisibility()};i.prototype.setOperations=function(a,d){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(a)for(var b in a)this._myOperations.push(a[b]),this._operationsDeferreds.push(d[b]);this._renderOperations()};i.prototype.parseProgressResult=function(a){if(!a)return{};a=a.responseText||a;try{a=JSON.parse(a)}catch(d){}var b={Message:a.Message||a,Severity:a.Severity};if(a.DetailedMessage&&a.DetailedMessage!==b.Message)b.DetailedMessage=a.DetailedMessage;return b};i.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};i.prototype._renderOperationsTable=function(a,d,b){f.empty(a);for(var c=0;c<d.length;c++){var j=d[c],l=document.createElement("tr"),i=document.createElement("td");i.style.paddingLeft="5px";i.style.paddingRight="5px";i.textContent=j.Name;l.appendChild(i);var k=document.createElement("div");i.appendChild(k);i=document.createElement("span");i.style.paddingRight="5px";i.classList.add("imageSprite");switch(j.type){case "Warning":i.classList.add("core-sprite-warning");i.setAttribute("aria-label",
g["Operation resulted in a warning."]);break;case "error":i.classList.add("core-sprite-error");i.setAttribute("aria-label",g["Operation resulted in an error."]);break;case "loadstart":case "progress":i.classList.add("core-sprite-start");i.setAttribute("aria-label",g["Operation is running."]);break;case "abort":i.classList.add("core-sprite-stop");i.setAttribute("aria-label",g["Operation is canceled."]);break;case "load":case "loadend":i.classList.add("core-sprite-ok"),i.setAttribute("aria-label","Operation ok.")}k.appendChild(i);
i=document.createElement("span");i.classList.add("operationStatus");i.textContent=j.Name;k.appendChild(i);if(j.error){var r=j.error.Message||j.error;j.error.DetailedMessage&&j.error.DetailedMessage!==""&&(r+=": "+j.error.DetailedMessage);i.textContent=r;i.classList.remove("operationStatus");i.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",k,{operation:j,deferred:b[c]},this,"tool");a.appendChild(l)}this._setOperationsVisibility()};i.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"};i.prototype.constructor=i;return{OperationsDialog:i}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(g,k,f,c,a){function i(d,b){if(!this._progressPane){this._progressPane=c.node(d);this._operationsDialog=new a.OperationsDialog({triggerNode:this._progressPane,commandRegistry:b});var e=this;this._progressPane.addEventListener("keydown",function(b){(b.charOrCode===" "||b.keyCode===c.KEY.ENTER)&&e._operationsDialog.show()})}}function e(a,b,c,e){this._serviceRegistry=
a;this._serviceRegistration=a.registerService("orion.page.progress",this);this._commandRegistry=c;this._operationsClient=b;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=e}i.prototype={_switchIconTo:function(a){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=a;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(a,b){var c=
{},e;for(e in a)a[e].progressMonitor||(c[e]=a[e]);if(this._isEmpty(c))this._switchIconTo("progressPane_empty"),this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var f="";for(e in c){var i=c[e];if(i.type&&(i.type==="loadstart"||i.type==="progress")){f="running";break}}switch(f){case "running":this._progressPane.title=g["Operations running"];this._progressPane.alt=g["Operations running"];
this._progressPane.setAttribute("aria-valuetext",g["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=g["Some operations finished with warning"];this._progressPane.alt=g["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=g["Some operations finished with error"];this._progressPane.alt=
g["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(c,b)},_isEmpty:function(a){for(var b in a)return!1;return!0}};
i.prototype.constructon=i;e.prototype={init:function(a){if(!this._progressMonitorClass)this._progressMonitorTool=new i(a,this._commandRegistry)},progress:function(a,b,c){var e=this,f=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(b));a.then(function(){if(e._operations[f]){var g=e._operations[f];if(b)g.Name=b;e._lastOperation=g;g.type="loadend";if(c)g.progressMonitor=c;e.writeOperation.bind(e)(f,g,a);g.Location||e._removeOperationFromTheList.bind(e)(f)}},
function(g){if(e._operations[f]){var i=e._operations[f];if(b)i.Name=b;if(c)i.progressMonitor=c;e._lastOperation=i;i.type=g.canceled?"abort":"error";i.error=g;e.writeOperation.bind(e)(f,i,a);i.Location||e._removeOperationFromTheList.bind(e)(f)}},function(g){if(b)g.Name=b;if(c)g.progressMonitor=c;e.writeOperation.bind(e)(f,g,a)});return a},removeOperation:function(a){for(var b in this._operations)if(this._operations[b].Location&&this._operations[b].Location===a){this._removeOperationFromTheList(b);
break}this._operationsClient.removeOperation.bind(this._operationsClient)(a)},_removeOperationFromTheList:function(a){var b=this._operations[a].progressMonitor;delete this._operations[a];delete this._operationDeferrds[a];b?b.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var a in this._operations){var b=this._operations[a];if(b.type&&b.type!=="loadstart"&&b.type!=="progress")(b=this._operations[a].progressMonitor)&&
b.done(),delete this._operations[a],delete this._operationDeferrds[a]}this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},setProgressResult:function(a){this._serviceRegistry.getService("orion.page.message").setProgressResult(a)},showWhile:function(a,b,c){b&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(b);var e=this;a.then(function(){e._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(b){c?e._serviceRegistry.getService("orion.page.message").setProgressMessage(""):
e.setProgressResult.bind(e)(b);return b});return this.progress(a,b)},writeOperation:function(a,b,c){this._operations[a]=b;this._operationDeferrds[a]=c;b.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(a){a.put(b.Location,{Name:b.Name,expires:b.expires})});b.progressMonitor?b.progressMonitor.progress(b.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};e.prototype.constructor=e;return{ProgressService:e}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(g,k){function f(a,c,b){return a[c].apply(a,b)}function c(a){this._location=a}function a(){var a=new k;a.reject(g["No Matching OperationService for location:"]+this._location);return a}function i(a){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=a.getService("orion.core.preference");for(var d=a.getServiceReferences("orion.core.operation"),
b=0;b<d.length;b++){var f=a.getService(d[b]);this._services[b]=f;f=d[b].getProperty("pattern")||".*";f[0]!=="^"&&(f="^"+f);this._patterns[b]=RegExp(f)}this._getService=function(b){if(!b)return this._services[0];for(var a=0;a<this._patterns.length;++a)if(this._patterns[a].test(b))return this._services[a];this._operations.remove(b);return new c(b)}}c.prototype={getOperation:a,getOperations:a,removeCompletedOperations:a,removeOperation:a,cancelOperation:a};c.prototype.constructor=c;i.prototype={getOperations:function(){var a=
new k;if(this._operations)return a.resolve(this._operations),a;var c=this;this._preferenceService.getPreferences("/operations").then(function(b){c._operations=b;a.resolve(c._operations)});return a},getOperation:function(a){return f(this._getService(a),"getOperation",arguments)},removeCompletedOperations:function(){for(var a=[],c=this,b=0;b<this._services.length;b++){var h=this._patterns[b],j=new k;a[b]=j.promise;f(this._services[b],"removeCompletedOperations").then(function(b){return function(a){Array.isArray(a)&&
c.getOperations.bind(c)().then(function(c){for(var d=c.keys(),e=0;e<d.length;e++){var f=d[e];h.test(f)&&a.indexOf(f)<0&&c.remove(f)}b.resolve()})}}(j),function(b){return function(a){b.reject(a)}}(j))}return k.all(a)},removeOperation:function(a){var c=this;return f(this._getService(a),"removeOperation",arguments).then(function(){c.getOperations.bind(c)().then(function(b){b.remove(a)})},function(b){return b},function(b){return b})}};i.prototype.constructor=i;return{OperationsClient:i}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Next:"Next",Previous:"Previous",Replace:"Replace","Replace All":"Replace All",
"Search ${0}":"Search ${0}","Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",
Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes",
"Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Show All":"Show All","Show all the results in one page":"Show all the results in one page","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result","Next Page >":"Next Page >","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results",
"Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results","Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename","My Saved Searches":"My Saved Searches","Save frequently used searches by choosing ${0} shown above.":"Save frequently used searches by choosing ${0} shown above.",
"Save frequently used searches by clicking on the ${0} button above.":"Save frequently used searches by clicking on the ${0} button above.","Files that contain:":"Files that contain:",Search:"Search","All types":"All types","File type":"File type","All ${0} files":"All ${0} files","${0} is already saved":"${0} is already saved","Type a search term":"Type a search term","Type a replace term":"Type a replace term","Case sensitive":"Case sensitive","Sort by":"Sort by","File name":"File name","Path name":"Path name",
Save:"Save","Type a name for the search":"Type a name for the search","Save the current search":"Save the current search","Type filter text":"Type filter text","Scope Search":"Scope Search","Open in Search page for this directory":"Open the Search page for this folder.","${0}. Try your search again.":"${0}. Try your search again.","Click or use delete key to delete the search term":"Click or use delete key to delete the search term","${0} matches":"${0} matches","Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.":"Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.",
"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.":"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>."});
define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,k){function f(c){this._init(c)}f.prototype={_init:function(c){var a=c.parent,f=this,a=k.node(a);if(!a)throw g["no parent"];if(!c.model)throw g["no tree model"];if(!c.renderer)throw g["no renderer"];this._parent=a;this._treeModel=c.model;this._onComplete=c.onComplete;this._renderer=c.renderer;this._showRoot=c.showRoot===void 0?!1:c.showRoot;this._indent=c.indent===void 0?16:c.indent;this._onCollapse=c.onCollapse;
this._labelColumnIndex=c.labelColumnIndex===void 0?0:c.labelColumnIndex;this._id=c.id===void 0?"treetable":c.id;this._tableStyle=c.tableStyle;this._tableElement=c.tableElement||"table";this._tableBodyElement=c.tableBodyElement||"tbody";this._tableRowElement=c.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(a){f._showRoot?(a._depth=0,f._generate([a],0)):f._treeModel.getChildren(a,function(a){f.destroyed||f._generate(a,0)})})},destroy:function(){this.destroyed=!0},_generate:function(c,
a){k.empty(this._parent);var f=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(f);var e=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(e);e.id=this._id;this._tableStyle&&e.classList.add(this._tableStyle);this._renderer.initTable(e,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+
"tbody";c.length===0?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(c,a);e.appendChild(this._bodyElement);f.appendChild(e);this._parent.appendChild(f);this._rowsChanged();this._onComplete&&this._onComplete(this)},_generateChildren:function(c,a,f){for(var e=0;e<c.length;e++){var d=document.createElement(this._tableRowElement);d.id=this._treeModel.getId(c[e]);d._depth=a;d._item=c[e];this._renderer.render(c[e],d);d.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*a+"px";this._renderer.rowCallback&&this._renderer.rowCallback(d,c[e]);f?(this._bodyElement.insertBefore(d,f.nextSibling),f&&(f=d)):this._bodyElement.appendChild(d)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(c,a,f){var e=this._treeModel.getId(c),d;if(e===this._id)this._removeChildRows(e),this._generateChildren(a,0),this._rowsChanged();else{var b=k.node(e);b?(b._item=c,
b&&(f||b._expanded)?(this._removeChildRows(e),a?(b._expanded=!0,this._renderer.updateExpandVisuals(b,!0),this._generateChildren(a,b._depth+1,b),this._rowsChanged()):(d=this,this._renderer.updateExpandVisuals(b,"progress"),a=this._treeModel.getChildren(b._item,function(a){if(!d.destroyed&&(d._renderer.updateExpandVisuals(b,!0),!b._expanded))b._expanded=!0,d._generateChildren(a,b._depth+1,b),d._rowsChanged()}))):this._renderer.updateExpandVisuals(b,!1)):console.log(g["could not find table row "]+e)}},
getItem:function(c){var a=k.node(c);return a&&a._item?a._item:c},toggle:function(c){var a=k.node(c);a&&(a._expanded?this.collapse(c):this.expand(c))},isExpanded:function(c){c=typeof c==="string"?c:this._treeModel.getId(c);return(c=k.node(c))?c._expanded:!1},expand:function(c,a,f){var c=typeof c==="string"?c:this._treeModel.getId(c),e=k.node(c);if(e)if(e._expanded)a&&a.apply(d,f);else{var d=this;this._renderer.updateExpandVisuals(e,"progress");this._treeModel.getChildren(e._item,function(b){if(!d.destroyed){d._renderer.updateExpandVisuals(e,
!0);if(!e._expanded)e._expanded=!0,d._generateChildren(b,e._depth+1,e),d._rowsChanged();a&&a.apply(d,f)}})}},_removeChildRows:function(c){for(var a=c===this._id,f=!1,e=-1,d=[],b=k.$$array(".treeTableRow",this._parent),h=0;h<b.length;h++){var j=b[h];if(f)break;if(a)j._depth>e?d.push(j):f=!0;else if(j.id===c)a=!0,e=j._depth}for(c=0;c<d.length;c++)a=d[c],a.parentNode.removeChild(a)},collapse:function(c){var c=typeof c==="string"?c:this._treeModel.getId(c),a=k.node(c);if(a){if(!a._expanded)return;a._expanded=
!1;this._renderer.updateExpandVisuals(a,!1);this._removeChildRows(c);this._rowsChanged()}this._onCollapse&&this._onCollapse(a._item)},getIndent:function(){return this._indent}};f.prototype.constructor=f;return{TableTree:f}});
define("orion/treeModelIterator",[],function(){var g={};g.TreeModelIterator=function(){function g(f,c){this.firstLevelChildren=f;this.reset();this._init(c)}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 c=this._getChildren(f),c=c&&c.length>0;this.isExpanded&&c&&(c=this.isExpanded(f));return c},_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 c=this._diveIn(this._cursor);
if(!c){if(f&&this._expandable(this._cursor)&&this.forceExpandFunc){var a=this;return this.forceExpandFunc(this._cursor,"first",function(c){c&&a.setCursor(c)})}(c=this._findSibling(this._cursor,!0))&&this.setCursor(c)}return c},_backward:function(f){if(!this._cursor)return null;var c=this._findSibling(this._cursor,!1);c&&c!==this._cursor.parent&&(c=this._drillToLast(c));if(f&&c&&this._expandable(c)&&this.forceExpandFunc&&c!==this._cursor.parent){var a=this;return this.forceExpandFunc(c,"last",function(c){c&&
a.setCursor(c)})}c&&this.setCursor(c);return c},_findSibling:function(f,c){for(var a=this.topLevel(f),g=this._getChildren(f.parent),g=a?this.firstLevelChildren:g,e=0;e<g.length;e++)if(g[e]===f)return e===0&&!c?a?null:f.parent:e===g.length-1&&c?a?null:this._findSibling(f.parent,c):c?g[e+1]:g[e-1];return null},_inParentChain:function(f,c){for(var a=f.parent;a;){if(a===c)return!0;a=a.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,c,a){this.setCursor(c);var g=[];for(g.push(c);;){if(this.iterate(f))g.push(this.cursor());else break;if(a===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,c){var a=this.cursor(),
g=this._scan(!0,f,c);g||(g=this._scan(!1,f,c));this.setCursor(a);return g},iterate:function(f,c){return f?this._forward(c):this._backward(c)},iterateOnTop:function(f,c){var a=this._findSibling(this._getTopLevelParent(this.cursor()),f);a?this.setCursor(a):c&&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 g});
define("orion/explorers/explorerNavHandler",["orion/webui/littlelib","orion/treeModelIterator","orion/uiUtils"],function(g,k,f){var c={},a=navigator.userAgent.indexOf("iPad")!==-1,i=window.navigator.platform.indexOf("Mac")!==-1;c.ExplorerNavHandler=function(){function c(a,b,e){this.explorer=a;this.model=this.explorer.model;this._navDict=b;this._listeners=[];this._selections=[];this._currentColumn=0;a=this._getEventListeningDiv();a.tabIndex=0;a.classList.add("selectionModelContainer");var j=this;this._modelIterator=
new k.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:e.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(b){return j.explorer.renderer.isExpandable(b)}:function(b){return j.isExpandable(b)},forceExpandFunc:this.explorer.forceExpandFunc?function(b,a,c){return j.explorer.forceExpandFunc(b,a,c)}:void 0});this._init(e);(!e||e.setFocus!==!1)&&a.focus();e=function(b){if(f.isFormElement(b.target))return!0;if(j.explorer.preventDefaultFunc&&j.explorer.preventDefaultFunc(b,
j._modelIterator.cursor()))return!0;if(b.keyCode===g.KEY.DOWN)return j.onDownArrow(b);else if(b.keyCode===g.KEY.UP)return j.onUpArrow(b);else if(b.keyCode===g.KEY.RIGHT)return j.onRightArrow(b);else if(b.keyCode===g.KEY.LEFT)return j.onLeftArrow(b);else if(b.keyCode===g.KEY.SPACE)return j.onSpace(b);else if(b.keyCode===g.KEY.ENTER)return j.onEnter(b)};a.addEventListener("keydown",e,!1);this._listeners.push({type:"keydown",listener:e});e=function(){if(j.explorer.onFocus)j.explorer.onFocus(!1);else j.toggleCursor(null,
!1)};a.addEventListener("blur",e,!1);this._listeners.push({type:"blur",listener:e});e=function(){if(j.explorer.onFocus)j.explorer.onFocus(!0);else j.toggleCursor(null,!0)};a.addEventListener("focus",e,!1);this._listeners.push({type:"focus",listener:e});this._parentDiv=a}c.prototype={destroy:function(){this._parentDiv.classList.remove("selectionModelContainer");this.removeListeners()},_init:function(a){this._linearGridMove=!1;if(a)this._selectionPolicy=a.selectionPolicy,this.gridClickSelectionPolicy=
a.gridClickSelectionPolicy||"none",this.preventDefaultFunc=a.preventDefaultFunc,this.postDefaultFunc=a.postDefaultFunc},_ctrlKeyOn:function(a){return i?a.metaKey:a.ctrlKey},removeListeners:function(){if(this._listeners)for(var a=0;a<this._listeners.length;a++)this._parentDiv.removeEventListener(this._listeners[a].type,this._listeners[a].listener,!1)},focus:function(){var a=this._getEventListeningDiv();a&&a.focus()},_getEventListeningDiv:function(a){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv===
"function"?this.explorer.keyEventListeningDiv(a):g.node(this.explorer._parentId)},isExpandable:function(a){return!a?!1:g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(a)))?!0:!1},isExpanded:function(a){return!a?!1:this.explorer.myTree.isExpanded(this.model.getId(a))},refreshSelection:function(a,b){var c=this;this.explorer.selection&&this.explorer.selection.getSelections(function(e){c._clearSelection(b);for(var f=0;f<e.length;f++)c._selections.push(e[f]);c._selections.length>0?
c.cursorOn(c._selections[0],!0,!1,a):c.cursorOn(null,!1,!1,a);if(!(c._shiftSelectionAnchor&&c._inSelection(c._shiftSelectionAnchor)>=0))c._shiftSelectionAnchor=null})},refreshModel:function(a,b,c,e){this._currentColumn=0;this.topIterationNodes=[];this.model=b;this._navDict=a;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(c)this.topIterationNodes=c;this._modelIterator.setTree(this.topIterationNodes);!e&&this.explorer.selection&&(this.toggleCursor(this._modelIterator.cursor(),
!1),this._modelIterator.reset());this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(a){for(var a=this.model.getId(a),b=0;b<this._selections.length;b++)if(a===this.model.getId(this._selections[b]))return b;return-1},_clearSelection:function(a){if(a)for(a=0;a<this._selections.length;a++)this._checkRow(this._selections[a],!0);this._selections=[]},getSelectionPolicy:function(){return this._selectionPolicy},setSelectionPolicy:function(a){if(this._selectionPolicy!==
a)this._selectionPolicy=a,this._selectionPolicy==="cursorOnly"&&this._clearSelection(!0)},setSelection:function(a,b,c){if(this._selectionPolicy==="cursorOnly")b&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(a,!0);else if(this._isRowSelectable(a)){!b||this._selectionPolicy==="singleSelection"?(this._clearSelection(!0),this._checkRow(a,!1),this._selections.push(a),this._lastSelection=a):(b=this._inSelection(a),b>=0?(this._checkRow(a,!0),this._selections.splice(b,1)):(this._checkRow(a,
!1),this._selections.push(a),this._lastSelection=a));if(c)this._shiftSelectionAnchor=this._lastSelection;this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(a,b){a||(a=this.currentModel());var c=this._getGridChildren(a);if(c&&c.length>1||b===0&&c){b!==0&&this.toggleCursor(a,!1);var e=this._currentColumn,f=!0;e+=b;e<0?(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!1)?a=this.currentModel():f=!1),
e=f?c.length-1:this._currentColumn):e>=c.length&&(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!0)?a=this.currentModel():f=!1),e=f?0:this._currentColumn);this._currentColumn=e;b!==0&&this.toggleCursor(a,!0);return!0}return!1},_getGridChildren:function(a){return this._navDict?this._navDict.getGridNavHolder(a):null},getCurrentGrid:function(a){a||(a=this.currentModel());return(a=this._getGridChildren(a))&&a.length>0?a[this._currentColumn]:null},getAriaContainerElement:function(a){for(var b=
this._parentDiv,c;a&&a!==b&&(c=a.getAttribute("role"))!=="grid"&&c!=="tree"&&c!=="treegrid";)a=a.parentNode;return a===b?null:a},toggleCursor:function(a,b){var c=this.getRowDiv(a),e=this.getCurrentGrid(a);e?(c&&(b?c.classList.add("treeIterationCursorRow"):c.classList.remove("treeIterationCursorRow")),e.domNode&&(c=this.getAriaContainerElement(e.domNode),b?(e.domNode.classList.add("treeIterationCursor"),c&&c.setAttribute("aria-activedescendant",e.domNode.id)):e.domNode.classList.remove("treeIterationCursor"))):
c&&(b?c.classList.add("treeIterationCursorRow_Dotted"):c.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(a,b,c,e){var f,g;if(a||b){if(g===this._modelIterator.cursor())return;f=this._modelIterator.cursor();g=a;this._modelIterator.setCursor(g)}else f=this._modelIterator.prevCursor(),g=this._modelIterator.cursor();if(f!==g||b)if(this.toggleCursor(f,!1),!b||g){this.moveColumn(null,0);this.toggleCursor(g,!0);if((a=this.getRowDiv())&&
!e){e=a.parentNode;for(b=document.documentElement;e&&e!==b;){var i=window.getComputedStyle(e,null);if(!i)break;i=i.getPropertyValue("overflow-y");if(i==="auto"||i==="scroll")break;e=e.parentNode}e&&(b=!0,a.offsetTop<=e.scrollTop?(b=!1,c===void 0&&(c=!1)):a.offsetTop+a.offsetHeight>=e.scrollTop+e.clientHeight&&(b=!1,c===void 0&&(c=!0)),b||a.scrollIntoView(!c))}if(this.explorer.onCursorChanged)this.explorer.onCursorChanged(f,g)}},getSelection:function(){return this._selections},getSelectionIds:function(){for(var a=
[],b=0;b<this._selections.length;b++)a.push(this.model.getId(this._selections[b]));return a},getRowDiv:function(a){a=a?a:this._modelIterator.cursor();if(!a)return null;var a=this.model.getId(a),b=this._navDict.getValue(a);return b&&b.rowDomNode?b.rowDomNode:g.node(a)},iterate:function(a,b,c,e){var f=null;if(this.topIterationNodes&&this.topIterationNodes.length!==0)if(e){e=this.currentModel();for((f=this._modelIterator.iterate(a,b))&&this._setCursorOnItem(a,c);f&&f.isNotSelectable;)(f=this._modelIterator.iterate(a,
b))&&this._setCursorOnItem(a,c);f||(this.cursorOn(e,!0,!1,!0),this._setCursorOnItem(a,c))}else(f=this._modelIterator.iterate(a,b))&&this._setCursorOnItem(a,c)},_setCursorOnItem:function(a,b){this.cursorOn(null,!1,a);if(b){var c=this._inSelection(this._modelIterator.prevCursor()),e=this._inSelection(this._modelIterator.cursor());c>=0&&e>=0?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)}},_checkRow:function(a,b){if(this.explorer.renderer._useCheckboxSelection&&
this._selectionPolicy!=="singleSelection"){var c=this.getRowDiv(a);if(c){var e=g.node(this.explorer.renderer.getCheckBoxId(c.id)),f=b?!e.checked:!0;if(f!==e.checked)this.explorer.renderer.onCheck(c,e,f,!0)}}else this._select(a,b)},_select:function(a){a||(a=this._modelIterator.cursor());var b=this.getRowDiv(a);b&&(this._inSelection(a)<0?b.classList.add("checkedRow"):b.classList.remove("checkedRow"))},_onModelGrid:function(a,b){var c=this._getGridChildren(a);if(c)for(var e=0;e<c.length;e++)if(b.target===
c[e].domNode)return!0;return!1},onClick:function(c,b){if(this.isDisabled(this.getRowDiv(c)))g.stop(b);else{var e=g.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)));if(b.target!==e&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(c,b)))if(this.cursorOn(c,!0,!1,!0),a)this.setSelection(c,!0);else if(this._ctrlKeyOn(b))this.setSelection(c,!0,!0);else if(b.shiftKey&&this._shiftSelectionAnchor){if(e=this._modelIterator.scan(this._shiftSelectionAnchor,c)){this._clearSelection(!0);
for(var f=0;f<e.length;f++)this.setSelection(e[f],!0)}}else this.setSelection(c,!1,!0)}},onCollapse:function(a){this._modelIterator.collapse(a)&&this.cursorOn()},onUpArrow:function(a){this.iterate(!1,!1,a.shiftKey,!0);!this._ctrlKeyOn(a)&&!a.shiftKey&&this.setSelection(this.currentModel(),!1,!0);a.preventDefault();return!1},onDownArrow:function(a){this.iterate(!0,!1,a.shiftKey,!0);!this._ctrlKeyOn(a)&&!a.shiftKey&&this.setSelection(this.currentModel(),!1,!0);a.preventDefault();return!1},_shouldMoveColumn:function(a){var b=
this.currentModel(),c=this._getGridChildren(b);return c&&c.length>1?this.isExpandable(b)?this._ctrlKeyOn(a):!0:!1},onLeftArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,-1),a.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&this.isExpanded(b))return this.explorer.myTree.collapse(b),a.preventDefault(),!0;this._modelIterator.topLevel(b)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(b.parent),
this.setSelection(b.parent,!1,!0))},onRightArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,1),a.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&!this.isExpanded(b))return this.explorer.myTree.expand(b),this.explorer.postUserExpand&&this.explorer.postUserExpand(this.model.getId(b)),a.preventDefault(),!1},_isRowSelectable:function(a){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(a):!0},onSpace:function(a){this.setSelection(this.currentModel(),
!0,!0);a.preventDefault()},onEnter:function(a){var b=this.getCurrentGrid(this._modelIterator.cursor());if(b)if(b.widget)if(typeof b.onClick==="function")b.onClick();else typeof b.widget.focus==="function"&&b.widget.focus();else{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(a),!1,!1,!1,0,null);b.domNode.dispatchEvent(c)}else if(b=this._modelIterator.cursor()){if(this.explorer.renderer.getRowActionElement&&(c=this.explorer.renderer.getRowActionElement(this.model.getId(b)),
c.href))this._ctrlKeyOn(a)?window.open(c.href):window.location.href=c.href;if(this.explorer.renderer.performRowAction)return this.explorer.renderer.performRowAction(a,b),a.preventDefault(),!1}},setIsNotSelectable:function(a,b){a.isNotSelectable=b},disableItem:function(a){var b=this.getRowDiv(a);this.isExpandable(a)&&this.isExpanded(a)&&(this._modelIterator.collapse(a),this.explorer.myTree.toggle(b.id));b.classList.remove("checkedRow");b.classList.add("disabledNavRow");this.setIsNotSelectable(a,!0)},
isDisabled:function(a){return a.classList.contains("disabledNavRow")},enableItem:function(a){var b=this.getRowDiv(a);b&&(b.classList.remove("disabledNavRow"),this.setIsNotSelectable(a,!1))}};return c}();c.ExplorerNavDict=function(){function a(c){this._dict={};this._model=c}a.prototype={addRow:function(a,b){this._dict[this._model.getId(a)]={model:a,rowDomNode:b}},getValue:function(a){return this._dict[a]},getGridNavHolder:function(a,b){if(!a)return null;var c=this._model.getId(a);if(this._dict[c]){if(!this._dict[c].gridChildren&&
b)this._dict[c].gridChildren=[];return this._dict[c].gridChildren}return null},initGridNavHolder:function(a){if(!a)return null;a=this._model.getId(a);if(this._dict[a])this._dict[a].gridChildren=null}};return a}();return c});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(g,k,f,c,a,i){var e={};e.Explorer=function(){function d(b,a,c,d){this.registry=b;this.renderer=c;this.selection=a;this.commandService=d;if(this.renderer)this.renderer.explorer=this;this.myTree=null}d.prototype={destroy:function(){this._navHandler&&this._navHandler.destroy();this.model&&this.model.destroy();this.myTree&&
this.myTree.destroy();this.destroyed=!0},changedItem:function(b,a){this.myTree&&this.myTree.refresh.bind(this.myTree)(b,a,!0)},updateCommands:function(b){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(b)},makeNewItemPlaceHolder:function(b,a,c,d){b=this.getRow(b);if(c)return b=b.childNodes[c],b.appendChild(document.createElement("br")),d=document.createElement("span"),d.id=a+"placeHolderRow",b.appendChild(d),{tempNode:d,refNode:d};if(b){var e=document.createElement("tr");
e.id=a+"placeHolderRow";c=document.createElement("td");c.id=a+"placeHolderCol";e.appendChild(c);d?(b.parentNode.insertBefore(e,b.nextSibling),b=parseInt(b.firstChild.style.paddingLeft),c.style.paddingLeft=this.myTree.getIndent()+b+"px"):b.appendChild(e);d=f.node(a+"placeHolderRow");b=f.node(a+"placeHolderCol");if(d&&b)return{tempNode:d,refNode:b}}return null},getRow:function(b){if(b=this.model.getId(b))return f.node(b)},collapseAll:function(){for(var b=this._navHandler.getTopLevelNodes(),a=0;a<b.length;a++)this.myTree.collapse(b[a])},
expandAll:function(b){if(b)this._expandRecursively(b);else if(this._navHandler)for(var b=this._navHandler.getTopLevelNodes(),a=0;a<b.length;a++)this._expandRecursively(b[a])},_expandRecursively:function(b){if(this._navHandler&&this._navHandler.isExpandable(b)){var a=this;this.myTree.expand(b,function(){a.model.getChildren(b,function(b){if(!(b===void 0||b===null))for(var c=b.length,d=0;d<c;d++)a._expandRecursively(b[d])})})}},createTree:function(b,d,e){b=typeof b==="string"?b:b.id||b;this.selection&&
this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=b+"innerTree",i=f.node(g);i&&f.empty(i);if(d)d.rootId=g;this.model=d;this._parentId=b;this._treeOptions=e;if(!e||e&&!e.noSelection)this.selectionPolicy=e?e.selectionPolicy:"",this._navDict=new a.ExplorerNavDict(this.model);this.myTree=new c.TableTree({id:g,model:d,parent:b,onComplete:e?e.onComplete:void 0,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:e?!!e.showRoot:
!1,indent:e?e.indent:void 0,onCollapse:e?e.onCollapse:void 0,navHandlerFactory:e?e.navHandlerFactory:void 0,tableElement:e?e.tableElement:void 0,tableBodyElement:e?e.tableBodyElement:void 0,tableRowElement:e?e.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy==="cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var b=this.getNavHandler(),a=[];
if(b&&this.getNavDict())for(var c=b.getSelection(),d=0;d<c.length;d++){var e=b.getRowDiv(c[d]);e&&e.parentNode&&(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&a.push(e.model))}this.selection.setSelections(a)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:null},initNavHandler:function(){var b=this._treeOptions;if(!b||b&&!b.noSelection){if(!this.getNavHandler())this._navHandler=b&&b.navHandlerFactory&&typeof b.navHandlerFactory.createNavHandler===
"function"?b.navHandlerFactory.createNavHandler(this,this._navDict,b):new a.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:b?b.getChildrenFunc:null,setFocus:b&&b.setFocus,selectionPolicy:b?b.selectionPolicy:null});var c=this;this.model.getRoot(function(a){a instanceof Array?c.getNavHandler().refreshModel(c.getNavDict(),c.model,a):a.children&&a.children instanceof Array&&c.getNavHandler().refreshModel(c.getNavDict(),c.model,a.children);b&&b.setFocus&&c.getNavHandler().cursorOn(null,!1,!1,!0)})}},
_lastHash:null,checkbox:!1};return d}();e.createExplorerCommands=function(a,b){function c(a){return typeof a.getItemCount==="function"?a.getItemCount()>0?b?b(a):!0:!1:!1}var e=new i.Command({tooltip:g["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(b){return c(b)},callback:function(b){b.items.expandAll()}}),f=new i.Command({tooltip:g["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",
groupId:"orion.explorerGroup",visibleWhen:function(b){return c(b)},callback:function(b){b.items.collapseAll()}});a.addCommand(e);a.addCommand(f)};e.ExplorerModel=function(){function a(b,c,d){this.rootPath=b;this.fetchItems=c;this.idPrefix=d||""}a.prototype={destroy:function(){this.destroyed=!0},getRoot:function(b){var a=this;this.fetchItems(this.rootPath).then(function(c){a.root=c;b(c)})},getChildren:function(b,a){b.Children?a(b.Children):b.ChildrenLocation?this.fetchItems(b.ChildrenLocation).then(function(c){b.Children=
c;a(c)}):a([])},getId:function(b){if(b.Location===this.root.Location)return this.rootId;for(var b=b.Location.replace(/[\\\/]/g,""),a=this.idPrefix,c=0;c<b.length;c++)a+=b[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?b.charCodeAt(c):b[c];return a}};return a}();e.ExplorerFlatModel=function(){function a(b,c,d){this.rootPath=b;this.fetchItems=c;this.root=d}a.prototype=new e.ExplorerModel;a.prototype.getRoot=function(b){if(this.root)b(this.root);else{var a=this;this.fetchItems(this.rootPath).then(function(c){a.root=
c;b(c)})}};a.prototype.getChildren=function(b,a){b===this.root?a(this.root):a([])};return a}();e.ExplorerRenderer=function(){function a(b,c){this.explorer=c;this._init(b);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._progressImageClass="core-sprite-progress";this._twistieSpriteClass="modelDecorationSprite"}a.prototype={_init:function(b){if(b){this._useCheckboxSelection=b.checkbox===void 0?!1:b.checkbox;this.selectionPolicy=b.singleSelection?
"singleSelection":"";this._cachePrefix=b.cachePrefix;this.getCheckedFunc=b.getCheckedFunc;this.onCheckedFunc=b.onCheckedFunc;this._highlightSelection=!0;this._treeTableClass=b.treeTableClass||"treetable";if(b.highlightSelection===!1)this._highlightSelection=!1;if(!this.actionScopeId)this.actionScopeId=b.actionScopeId;if(!this.commandService)this.commandService=b.commandService}},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(b,a){this.tableTree=a;this.tableNode=
b;f.empty(b);this._treeTableClass&&b.classList.add(this._treeTableClass);this.renderTableHeader(b)},getActionsColumn:function(b,a,c,d,e){var c=c||"tool",f=document.createElement("td");f.id=a.id+"actionswrapper";d&&f.classList.add(d);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,f,b,this.explorer,c,null,e&&this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(b,!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(b,a){if(this._useCheckboxSelection){var c=document.createElement("td"),d=document.createElement("span");d.id=this.getCheckBoxId(a.id);d.classList.add("core-sprite-check");d.classList.add("selectionCheckmarkSprite");d.rowId=a.id;if(this.getCheckedFunc)d.checked=this.getCheckedFunc(b),d.checked?(this._highlightSelection&&a.classList.add("checkedRow"),d.classList.add("core-sprite-check_on")):
(this._highlightSelection&&a.classList.remove("checkedRow"),d.classList.remove("core-sprite-check_on"));c.appendChild(d);var e=this;d.addEventListener("click",function(b){e.onCheck(a,b.target,b.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(b){return b+"selectedState"},onCheck:function(b,a,c,d,e){(a.checked=c)?a.classList.add("core-sprite-check_on"):a.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(a.rowId,c,d);this.explorer.getNavHandler()&&e&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(b.id).model,
!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var b=this.explorer.getNavHandler().getSelectionIds(),a=this._getUIStatePreferencePath();a&&window.sessionStorage&&(window.sessionStorage[a+"selection"]=JSON.stringify(b))}},_restoreSelections:function(b){var a=this.explorer.getNavDict(),c=this.explorer.getNavHandler();if(c&&a&&c.getSelectionPolicy()!=="cursorOnly"&&(b=window.sessionStorage[b+"selection"],typeof b==="string"&&(b=b.length>0?JSON.parse(b):null),b)){for(var d=[],c=0;c<
b.length;c++){var e=a.getValue(b[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(b){window.sessionStorage[b+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(b){var a=
!1,c=window.sessionStorage[b+"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(b)});a=!0}return!a},_getUIStatePreferencePath:function(){if(this.explorer){var b=this.explorer.getRootPath();if(this._cachePrefix&&b)return"/"+this._cachePrefix+"/"+b.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(b){return b+
"__expand"},updateExpandVisuals:function(b,a){var c=f.node(this.expandCollapseImageId(b.id));c&&(c.classList.remove(this._expandImageClass),c.classList.remove(this._collapseImageClass),c.classList.remove(this._progressImageClass),c.classList.add(a==="progress"?this._progressImageClass:a?this._expandImageClass:this._collapseImageClass))},getExpandImage:function(b,a,c,d){var e=document.createElement("span");e.id=this.expandCollapseImageId(b.id);a.appendChild(e);e.classList.add(this._twistieSpriteClass);
e.classList.add(this._collapseImageClass);if(c){var f=document.createElement("span");a.appendChild(f);f.classList.add(d||"imageSprite");f.classList.add(c)}var g=this;e.onclick=function(){if(!g.explorer.getNavHandler().isDisabled(b)){g.tableTree.toggle(b.id);if(g.tableTree.isExpanded(b.id))g._expanded.push(b.id),g.explorer.postUserExpand&&g.explorer.postUserExpand(b.id);else for(var a in g._expanded)if(g._expanded[a]===b.id){g._expanded.splice(a,1);break}(a=g._getUIStatePreferencePath())&&window.sessionStorage&&
g._storeExpansions(a)}};return e},render:function(b,a){a.classList.add("navRow");this.renderRow(b,a)},rowsChanged:function(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler());(f.$(".sectionTreeTable",this.tableNode.parentNode)||f.$(".treetable",this.tableNode.parentNode))&&f.$$array(".treeTableRow",this.tableNode).forEach(function(a,c){var d=!(c%2)?"darkSectionTreeTableRow":"lightSectionTreeTableRow",e=d==="darkSectionTreeTableRow"?"lightSectionTreeTableRow":
"darkSectionTreeTableRow";a.classList.add(d);a.classList.remove(e)})},updateCommands:function(){if(this.commandService)for(var a=f.$$array(".treeTableRow"),c=0;c<a.length;c++){var d=a[c],e=f.node(d.id+"actionswrapper");this.commandService.destroy(e);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,e,d._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};
return a}();e.SelectionRenderer=function(){function a(b,c){this._init(b);this.explorer=c}a.prototype=new e.ExplorerRenderer;a.prototype.renderTableHeader=function(a){var c=document.createElement("thead"),d=document.createElement("tr");c.classList.add("navTableHeading");this._useCheckboxSelection&&d.appendChild(this.initCheckboxColumn(a));for(var e=0,f=this.getCellHeaderElement(e);f;)f.innerHTML.length>0&&f.classList.add("navColumn"),d.appendChild(f),f=this.getCellHeaderElement(++e);c.appendChild(d);
e>0&&a.appendChild(c)};a.prototype.renderRow=function(a,c){c.verticalAlign="baseline";c.classList.add("treeTableRow");var d=this.explorer.getNavDict();if(d){d.addRow(a,c);var e=this;c.addEventListener("click",function(c){if(e.explorer.getNavHandler())e.explorer.getNavHandler().onClick(a,c)},!1)}if(d=this.getCheckboxColumn(a,c))d.classList.add("checkColumn"),c.appendChild(d);for(var d=0,f=this.getCellElement(d,a,c);f;)c.appendChild(f),d===0?this.getPrimColumnStyle?f.classList.add(this.getPrimColumnStyle(a)):
f.classList.add("navColumn"):this.getSecondaryColumnStyle?f.classList.add(this.getSecondaryColumnStyle()):f.classList.add("secondaryColumn"),f=this.getCellElement(++d,a,c)};a.prototype.getCellHeaderElement=function(){};a.prototype.getCellElement=function(){};return a}();e.SimpleFlatModel=function(){function a(b,c,d){this.items=b;this.getKey=d;this.idPrefix=c;this.root={children:b}}a.prototype=new e.ExplorerModel;a.prototype.getRoot=function(a){a(this.root)};a.prototype.getId=function(a){for(var a=
this.getKey(a).replace(/[\\\/]/g,""),c="",d=0;d<a.length;d++)c+=a[d].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(d):a[d];return this.idPrefix+c};a.prototype.getChildren=function(a,c){a===this.root?c(this.items):c([])};return a}();return e});
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(g,k,f,c,a,i,e,d){function b(a){switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":return!0}return!1}function h(c,d,f,g,h,j,t,u,x){var d=i.clone(d),w;if(d.Directory)w=document.createElement("a"),
w.className="navlinkonpage",w.href=!c?l:(new e(c+"#{,resource,params*}")).expand({resource:d.ChildrenLocation}),d.Name&&w.appendChild(document.createTextNode(d.Name));else{h||(h=a.getOpenWithCommands(f));w=document.createElement("a");w.className="navlink targetSelector";j&&typeof j==="object"&&Object.keys(j).forEach(function(a){w[a]=j[a]});var B=null,y=null;if(B=u?u.holderDom:w)y=document.createElement("span"),y.className="core-sprite-file modelDecorationSprite thumbnail",B.appendChild(y);d.Name&&
w.appendChild(document.createTextNode(d.Name));var H=d.Location;if(t&&typeof t==="object")d.params={},i.mixin(d.params,t);(c=a.getOpenWithCommand(f,d,h))&&(H=c.hrefCallback({items:d}));k.when(g.getFileContentType(d),function(a){if(B){var c=B,e=y;if(a){var f,g=a.imageClass,h=a.image;if(g)f=document.createElement("span"),f.className+=g,f.classList.add("thumbnail");else if(h)f=document.createElement("img"),f.src=h,f.classList.add("thumbnail");f&&c.replaceChild(f,e)}}w.href=H;x&&typeof x.updateFileNode===
"function"&&x.updateFileNode(d,w,b(a))})}return w}function j(a,b,c,d){this.explorer=b;this.commandService=c;this.contentTypeService=d;this.openWithCommands=null;this.actionScopeId=a.actionScopeId;this._init(a);this.target="_self"}var l=new e("#{,resource,params*}");j.prototype=new f.SelectionRenderer;j.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};j.prototype.tableCallback=function(a){a.setAttribute("aria-label",g.Navigator);a.setAttribute("role","presentation")};j.prototype.rowCallback=
function(a){a.setAttribute("role","treeitem")};j.prototype.emptyCallback=function(a){var b=document.createElement("tr"),c=document.createElement("td");c.colSpan=this.oneColumn?1:3;var e=document.createElement("div");e.classList.add("noFile");e.textContent=g.NoFile;var f=document.createElement("span");f.appendChild(document.createTextNode(g.File));d.processDOMNodes(e,[f]);c.appendChild(e);b.appendChild(c);a.appendChild(b)};j.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"}};j.prototype.setTarget=function(a){this.target=a};j.prototype.getFolderImage=function(){if(!this.showFolderImage)return null;var a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};j.prototype.createFolderNode=function(a){var b;this.showFolderLinks?(b=h(this.folderLink||"",a,this.commandService,this.contentTypeService),(a=this.getFolderImage(a))&&b.insertBefore(a,b.firstChild)):
(b=document.createElement("span"),b.textContent=a.Name);return b};j.prototype.updateFileNode=function(){};j.prototype.showFolderLinks=!0;j.prototype.getCellElement=function(b,d,e){switch(b){case 0:var b=document.createElement("td"),f=document.createElement("span");f.id=e.id+"MainCol";f.setAttribute("role","presentation");b.appendChild(f);b.setAttribute("role","presentation");f.className="mainNavColumn";var g;if(d.Directory)this.getExpandImage(e,f),g=this.createFolderNode(d),f.appendChild(g),this.explorer._makeDropTarget(d,
g),this.explorer._makeDropTarget(d,e);else{if(!this.openWithCommands)this.openWithCommands=a.getOpenWithCommands(this.commandService);g=h("",d,this.commandService,this.contentTypeService,this.openWithCommands,{target:this.target},null,null,this);f.appendChild(g)}if(g)g.id=e.id+"NameLink",g.nodeType===1&&(c.addNavGrid(this.explorer.getNavDict(),d,g),g.setAttribute("role","link"),g.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,f,d,this.explorer,
"tool",null,!0);return b;case 1:if(this.oneColumn)return null;e=document.createElement("td");if(d.LocalTimeStamp)e.textContent=(new Date(d.LocalTimeStamp)).toLocaleString();return e;case 2:if(this.oneColumn)return null;e=document.createElement("td");if(!d.Directory&&typeof d.Length==="number")d=parseInt(d.Length,10)/1024,e.textContent=Math.ceil(d).toLocaleString()+" KB";e.style.textAlign="right";return e}};j.prototype.constructor=j;return{NavigatorRenderer:j,isImage:b,createLink:h}});
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(g,k,f,c,a,i,e,d,b){function h(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function j(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new h(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}h.prototype.makeRenderFunction=function(h,j,i,r,q){var p=this.serviceRegistry,n=this.commandRegistry;this.openWithCommands=this.openWithCommands||d.createOpenWithCommands(p,h,n);var t=this;return function(d,p,w,B){b.when(t.openWithCommands,function(b){if(w)f.empty(j),b=document.createElement("div"),b.appendChild(document.createTextNode(g["Search failed."])),j.appendChild(b),typeof r==="function"&&r(j);else{var t=
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)}}}(),G=!1;f.empty(j);if(d&&d.length>0){var D=document.createElement("table");D.setAttribute("role","presentation");for(var s=0;s<d.length;s++){var A=
d[s],v;if(!G&&(G=!0,i))v=D.insertRow(0).insertCell(0),v.textContent=i;v=D.insertRow(-1).insertCell(0);v.colspan=2;q&&q(v);var C={Name:A.name,Directory:A.directory,Location:A.path||A.location},z=null;if(typeof A.LineNumber==="number")z={},z.line=A.LineNumber;if(B&&B.keyword&&!B.nameSearch){var E=a.generateSearchHelper(B),z=z||{};z.find=E.inFileQuery.searchStr;z.regEx=E.inFileQuery.wildCard?!0:void 0}C=e.createLink(k.toUrl("edit/edit.html"),C,n,h,b,{"aria-describedby":(A.folderName?A.folderName:A.path).replace(/[^a-zA-Z0-9_\.:\-]/g,
""),style:{verticalAlign:"middle"}},z);A.LineNumber&&C.appendChild(document.createTextNode(" (Line "+A.LineNumber+")"));v.appendChild(C);t(v,A)}j.appendChild(D);typeof r==="function"&&r(j)}!G&&p&&(b=c.formatMessage(g["No matches found for ${0}"],p),f.empty(j),j.appendChild(document.createTextNode(b)),typeof r==="function"&&r(j))}})}};j.prototype={search:function(b,c,d){var e=function(b){for(var d=[],e=0;e<b.response.docs.length;e++){var f=b.response.docs[e],g=f.Location,h=a.path2FolderName(f.Path?
f.Path:f.Location,f.Name),j=h?h:g;(c?j.indexOf(c)>=0:1)&&d.push({name:f.Name,path:g,folderName:h,directory:f.Directory,lineNumber:f.LineNumber})}return d};if(this._crawler&&b.nameSearch)this._crawler.searchName(b,function(a){d(e(a),b.keyword,null,b)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(b),"Searching "+b.keyword).then(function(a){var c=b.keyword,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);d(e(a),c,null,b)},function(a){d(null,
null,a,null)})}catch(f){typeof f==="string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(b,function(a){d(e(a),null,null,b)}):typeof f==="string"&&f.indexOf("search")>-1&&!b.nameSearch?(new i.SearchCrawler(this.registry,this._fileService,b,{childrenLocation:this.getChildrenLocation()})).search(function(a){d(e(a),null,null,b)}):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 d="",e=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);b&&a&&a.Parents&&a.Parents.length>0?e=b.index==="last"?a.Parents[a.Parents.length-1]:a.Parents[0]:a&&a.Directory&&a.Location&&a.Parents&&(e=a);if(e)this.setLocationbyURL(e.Location),d=e.Name,this._childrenLocation=e.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),
d=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation;e=f.node("search");d||(d="");if(e&&e.placeholder){e.value="";var h=c.formatMessage(g["Search ${0}"],d);e.placeholder=h.length>30?h.substring(0,27)+"...":c.formatMessage(g["Search ${0}"],d)}if(e&&e.title)e.title=g["Type a keyword or wild card to search in "]+d},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}}};j.prototype.constructor=j;return{Searcher:j}});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(g){function k(f,c){c||(c="orion.page.selection");this._serviceRegistry=f;g.attach(this);this._serviceRegistration=f.registerService(c,this);this._selections=null}k.prototype={getSelection:function(f){var c=this._getSingleSelection();typeof f==="function"&&f(c);return c},getSelections:function(f){var c=Array.isArray(this._selections)?this._selections.slice():[];typeof f==="function"&&f(c);return c},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(f){var c=this._selections;this._selections=Array.isArray(f)?f.length>0?f.slice():null:f?[f]:null;c!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};k.prototype.constructor=k;return{Selection:k}});
define("orion/dialogs",[],function(){function g(g){this._serviceRegistry=g;this._serviceRegistration=g.registerService("orion.page.dialog",this)}g.prototype={confirm:function(g,f){f(window.confirm(g))},openFiles:function(){}};g.prototype.constructor=g;return{DialogService:g}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(g){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(k){if(!k)return!1;if(k==="/workspace")return!0;var f=new URL(g.toUrl("workspace"),window.location.href);return(new URL(k,window.location.href)).href.indexOf(f.href)===0}}});
define("orion/sites/siteUtils",["require","orion/fileUtils","orion/URITemplate"],function(g,k,f){return{generateEditSiteHref:function(c){var a=g.toUrl("sites/site.html");return(new f(a+"#{,resource,params*}")).expand({resource:k.makeRelative(c.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",ConvertToSelfHostingTitle:"Locate Required Folders",SelectRequiredFoldersSingle:"Locate the following required folder in your workspace.",SelectRequiredFolders:"Locate the following required folders in your workspace.",LocateFolderTitle:"Locate ${0}",FolderPrompt:"${0} (${1}):",orionClientLabel:"Orion client 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 ${0}",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",Sites:"Sites",Mappings:"Mappings","SitesExplorer.NoSitesText":"You have no sites. Click ${0} to create a site."});define("orion/sites/nls/messages",["orion/i18n!orion/sites/nls/messages","orion/sites/nls/root/messages"],function(g,k){var f={root:k};Object.keys(g).forEach(function(c){typeof f[c]==="undefined"&&(f[c]=g[c])});return f});
define("orion/sites/siteClient",["i18n!orion/sites/nls/messages","require","orion/Deferred","orion/fileClient"],function(g,k,f,c){function a(a,b,c){var d=a[b],e=new f;if(typeof d!=="function")throw g["Service method missing: "]+b;d.apply(a,c).then(function(a){e.resolve(a)},function(a){e.reject(a)});return e}function i(a,b){return new c.FileClient(a,function(a){return(a=a.getProperty("top"))&&a.indexOf(b)===0})}function e(a,b,c){this._serviceRegistry=a;this._siteService=b;this._selfHost=c.getProperty("canSelfHost");
this._selfHostConfig=c.getProperty("selfHostingConfig");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 i(this._serviceRegistry,this._getFilePattern())};this._canSelfHost=function(){return this._selfHost}}function d(b,c){b[c]=function(){return a(this._getService(),
c,Array.prototype.slice.call(arguments))}}function b(a,b,c){for(var d=a.getServiceReferences("orion.site"),f=[],i=[],k=[],p=0;p<d.length;p++){var n=d[p].getProperty(b),n=n[0]!=="^"?"^"+n:n;f.push(d[p]);i.push(RegExp(n));k.push(a.getService(d[p]))}c=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return 0;for(var c=0;c<i.length;c++)if(i[c].test(a))return c;throw g["No Matching SiteService for "]+b+": "+a;}(c);return new e(a,k[c],f[c])}e.prototype={getSelfHostingConfig:function(){return this._selfHostConfig},
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,i){return e.isFileMapped(a,b).then(function(a){a||i.push({Source:c,Target:g,FriendlyPath:c});a=new f;a.resolve();return a})}var e=this,g="/"+b.Name,i;if(a){if(a.HostingStatus.Status==="started")a.HostingStatus.Status="stopped";i=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 k=b.Name+" site";i=e.toInternalForm(b.Location).then(function(a){var b=[];return d(g,a,b).then(function(){return e.createSiteConfiguration(k,c,b,null,{Status:"started"}).then(function(a){return a})})})}return i.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){d(e.prototype,
a)});e.prototype.constructor=e;return{forLocation:function(a,c){return b(a,"pattern",c)},forFileLocation:function(a,c){return b(a,"filePattern",c)},getFileClient:i,SiteClient:e}});
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(g,k,f,c,a,i,e,d){function b(a){return a instanceof Array?a:[a]}function h(a){return function(b){if(b instanceof Array&&b.length===1&&!(a instanceof Array))return b[0]}}var j=c.Command,l=d.formatMessage;return{createSiteServiceCommands:function(b,d,e){var e=e||{},h=new c.Command({name:g.Create,tooltip:g["Create a new site configuration"],
id:"orion.site.create",parameters:new f.ParametersDescription([new f.CommandParameter("name","text",g.Name)]),visibleWhen:function(){return!0},callback:function(c){var d=c.items,f=b.getService(d),d=i.getFileClient(b,d.getProperty("filePattern")),g=c.parameters&&c.parameters.valueFor("name"),c=b.getService("orion.page.progress");(c?c.progress(d.loadWorkspaces(),"Loading workspaces"):d.loadWorkspaces()).then(function(b){(b=b&&b[0]&&b[0].Id)&&g&&f.createSiteConfiguration(g,b).then(function(b){e.createCallback(a.generateEditSiteHref(b),
b)},e.errorCallback)})}});d.addCommand(h)},createSiteCommands:function(c,d){var f=c.getService("orion.page.dialog"),k=c.getService("orion.page.progress"),p=new j({name:g.Edit,tooltip:g["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(b){return a.generateEditSiteHref(b.items instanceof Array?b.items[0]:b.items)}});d.addCommand(p);p=new j({name:g.Start,tooltip:g["Start the site"],
imageClass:"core-sprite-start",id:"orion.site.start",visibleWhen:function(a){return b(a).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"})},callback:function(a){var d=b(a.items),f=a.userData;if(f.site&&d.length>1)throw Error("userData.site requires a single site configuration to act upon");d=d.map(function(a){var b=f.site||{};b.HostingStatus={Status:"started"};a=a.Location;return i.forLocation(c,a).updateSiteConfiguration(a,b)});k.showWhile(e.all(d)).then(h(a.items)).then(f.startCallback,
f.errorCallback)}});d.addCommand(p);var n=function(a,b){var d=a?b:{};d.HostingStatus={Status:"stopped"};var e=b.Location;return i.forLocation(c,e).updateSiteConfiguration(e,d)},p=new j({name:g.Stop,tooltip:g["Stop the site"],imageClass:"core-sprite-stop",id:"orion.site.stop",visibleWhen:function(a){return b(a).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="started"})},callback:function(a){var c=b(a.items),d=a.userData;if(d.site&&c.length>1)throw Error("userData.site requires a single site configuration to act upon");
c=c||[d.site];c=c.map(n.bind(null,!!d.site));k.showWhile(e.all(c)).then(h(a.items)).then(d.stopCallback,d.errorCallback)}});d.addCommand(p);p=new j({name:g.Delete,tooltip:g["Delete the site configuration"],imageClass:"core-sprite-delete",id:"orion.site.delete",visibleWhen:function(a){return b(a).length>0},callback:function(a){var d=b(a.items),j=a.userData,k=d.length===1?l(g.ConfirmDeleteSingle,d[0].Name):l(g.ConfirmDeleteMultiple,d.length);f.confirm(k,function(b){b&&(b=d.map(function(a){var b=a.HostingStatus&&
a.HostingStatus.Status!=="stopped"?n(!1,a):a;return e.when(b).then(function(){var b=a.Location;return i.forLocation(c,b).deleteSiteConfiguration(b)})}),e.all(b).then(h(a.items)).then(j.deleteCallback,j.errorCallback))})}});d.addCommand(p)},createViewOnSiteCommands:function(a,b){var c=a.getService("orion.core.file");b.addCommand(new j({name:g["Add to site"],tooltip:g["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 i.forFileLocation(a,d.Location).mapOnSiteAndStart(e,d,b[0].Id)}).then(b.userData.addToCallback,b.userData.errorCallback)}}));b.addCommand(new j({name:g.View,tooltip:g["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 i.forFileLocation(a,c.Location).getURLOnSite(b,c)}}))}}});
define("orion/section","orion/webui/littlelib,orion/selection,orion/commandRegistry,orion/commonHTMLFragments,orion/objects,orion/selection".split(","),function(g,k,f,c,a,i){function e(a,d){var e=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!d.id)throw Error("Missing required argument: id");this.id=d.id;if(!d.title)throw Error("Missing required argument: title");var f=d.useAuxStyle?["sectionWrapper",
"sectionWrapperAux","toolComposite"]:["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");a.appendChild(this.domNode);for(var i=0;i<f.length;i++)this.domNode.classList.add(f[i]);this.domNode.id=d.id;if(d.canHide)this.twistie=document.createElement("span"),this.twistie.classList.add("modelDecorationSprite"),this.twistie.classList.add("layoutLeft"),this.twistie.classList.add("sectionTitleTwistie"),this.domNode.style.cursor="pointer",this.domNode.appendChild(this.twistie),this.domNode.tabIndex=
0,this.domNode.addEventListener("click",function(a){(a.target===e.titleNode||a.target===e.twistie)&&e._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(a){a.keyCode===g.KEY.ENTER&&(a.target===e.domNode||a.target===e.titleNode||a.target===e.twistie)&&e._changeExpandedState()},!1);if(d.iconClass){var k=document.createElement("span");k.classList.add("sectionIcon");this.domNode.appendChild(k);f=Array.isArray(d.iconClass)?d.iconClass:[d.iconClass];f.forEach(function(a){k.classList.add(a)})}d.headerClass&&
(f=Array.isArray(d.headerClass)?d.headerClass:[d.headerClass],f.forEach(function(a){this.domNode.classList.add(a)}.bind(this)));this.titleNode=document.createElement("div");this.titleNode.id=d.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=d.title;if(typeof d.getItemCount==="function")f=document.createElement("div"),f.classList.add("layoutLeft"),
f.classList.add("sectionItemCount"),this.domNode.appendChild(f),f.textContent=d.getItemCount(this);this._progressNode=document.createElement("div");this._progressNode.id=d.id+"Progress";this._progressNode.classList.add("sectionProgress");this._progressNode.classList.add("sectionTitle");this._progressNode.classList.add("layoutLeft");this._progressNode.style.visibility="hidden";this._progressNode.textContent="...";this.domNode.appendChild(this._progressNode);f=document.createElement("div");f.id=d.id+
"FilterSearchBox";this.domNode.appendChild(f);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=d.id+"ToolActionsArea";this._toolActionsNode.classList.add("layoutRight");this._toolActionsNode.classList.add("sectionActions");this.domNode.appendChild(this._toolActionsNode);this.actionsNode=document.createElement("ul");this.actionsNode.id=d.id+"ActionArea";this.actionsNode.classList.add("layoutRight");this.actionsNode.classList.add("commandList");this.actionsNode.classList.add("sectionActions");
this.domNode.appendChild(this.actionsNode);this.selectionNode=document.createElement("ul");this.selectionNode.id=d.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("commandList");this.selectionNode.classList.add("sectionActions");this.domNode.appendChild(this.selectionNode);d.slideout&&(f=c.slideoutHTMLFragment(d.id),i=document.createRange(),i.selectNode(this.domNode),f=i.createContextualFragment(f),this.domNode.appendChild(f));this._contentParent=
document.createElement("div");this._contentParent.id=this.id+"Content";this._contentParent.role="region";this._contentParent.classList.add("sectionTable");this._contentParent.setAttribute("aria-labelledby",this.titleNode.id);a.appendChild(this._contentParent);d.content&&this.setContent(d.content);this.hidden=d.hidden;if(typeof d.onExpandCollapse==="function")this._onExpandCollapse=d.onExpandCollapse;this._preferenceService=d.preferenceService;this._contentParent.style.display="none";this.domNode.classList.add("sectionWrapperClosed");
if(this._preferenceService){var r=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(r.id);if(a!==void 0)r.hidden=!a;if(!r.hidden)r._contentParent.style.display="block",r.domNode.classList.remove("sectionWrapperClosed");r._updateExpandedState(!r.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block",this.domNode.classList.remove("sectionWrapperClosed");this._updateExpandedState(!this.hidden,!1)}this._commandService=d.commandService;this._lastMonitor=
0;this._loading={}}function d(a){this._section=a;this._id=++a._lastMonitor}e.prototype={setTitle:function(a){this.titleNode.textContent=a},getHeaderElement:function(){return this.domNode},getTitleElement:function(){return this.titleNode},getActionElement:function(){return this._toolActionsNode},setContent:function(a){typeof a==="string"?this._contentParent.innerHTML=a:(this._contentParent.innerHTML="",this._contentParent.appendChild(a))},getContentElement:function(){return this._contentParent},embedExplorer:function(b,
c,d){this._contentParent.innerHTML="";if(!b.parent)b.parent=c;this._contentParent.appendChild(b.parent);b.section=this;a.mixin(b,{createActionSections:function(){this.actionsSections&&this.actionsSections.forEach(function(a){if(!g.node(a)){var b=document.createElement("ul");b.id=a;b.classList.add("commandList");b.classList.add("layoutRight");this.section.actionsNode.appendChild(b)}}.bind(this))},getCommandsVisible:function(){return this.section.actionsNode.style.visibility!=="hidden"},setCommandsVisible:function(a){this.section.actionsNode.style.visibility=
a?"":"hidden";var b=a?null:"cursorOnly";this.renderer.selectionPolicy=b;var c=this.getNavHandler();c&&c.setSelectionPolicy(b);a?this.updateCommands():this.actionsSections&&this.actionsSections.forEach(function(a){g.node(a)&&this.commandRegistry.destroy(a)}.bind(this))},destroy:function(){Object.getPrototypeOf(this).destroy.call(this);var a=this;this.actionsSections&&(this.actionsSections.forEach(function(b){delete a[b]}),delete this.actionsSections)},updateCommands:function(a){this.section.actionsNode&&
this.getCommandsVisible()&&(this.createActionSections(),Object.getPrototypeOf(this).updateCommands.call(this,a))},loaded:function(){var a=this;if(!this.selection&&!d)this.serviceRegistry||this.registry?(this.selection=new i.Selection(this.serviceRegistry||this.registry,this.parent.id+"Selection"),this.selection.addEventListener("selectionChanged",function(b){a.updateCommands(b.selections)})):window.console.error("Could not create a Selection for the explorer because of lack of serviceRegistry");var b=
this.registerCommands();!b||!b.then?a.updateCommands():b.then(function(){a.updateCommands()})}});if(b.renderer)b.renderer.section=this,a.mixin(b.renderer,{getCellHeaderElement:function(a){(a=Object.getPrototypeOf(this).getCellHeaderElement.call(this,a))&&this.section.setTitle(a.innerHTML);return null}})},createProgressMonitor:function(){return new d(this)},_setMonitorMessage:function(a,c){this._progressNode.style.visibility="visible";this._loading[a]=c;var d="",e;for(e in this._loading)d!==""&&(d+=
"\n"),d+=this._loading[e];this._progressNode.title=d},_monitorDone:function(a){delete this._loading[a];var a="",c;for(c in this._loading)a!==""&&(a+="\n"),a+=this._loading[c];this._progressNode.title=a;if(a==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){this.hidden?(this._contentParent.style.display="block",this.domNode.classList.remove("sectionWrapperClosed"),this.hidden=!1):(this._contentParent.style.display="none",this.domNode.classList.add("sectionWrapperClosed"),
this.hidden=!0);this._updateExpandedState(!this.hidden,!0)},_updateExpandedState:function(a,c){var d=this.twistie,e=this.id;d&&(d.classList.add(a?this._expandImageClass:this._collapseImageClass),d.classList.remove(a?this._collapseImageClass:this._expandImageClass));this._preferenceService&&c&&this._preferenceService.getPreferences("/window/views").then(function(c){c.put(e,a)});this._onExpandCollapse&&this._onExpandCollapse(a,this)}};e.prototype.constructor=e;d.prototype={begin:function(a){this.status=
a;this._section._setMonitorMessage(this.id,a)},worked:function(a){this.status=a;this._section._setMonitorMessage(this.id,a)},done:function(a){this.status=a;this._section._monitorDone(this.id)}};d.prototype.constructor=d;return{Section:e}});
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(g,k,f,c,a,i,e,d,b,h,j,l,m,o,r){var q,p,k=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,d){var e=this;d||(d=new c);b||(b=[]);a.length>0?a[0].getSiteConfigurations().then(function(c){var f={};f.siteService=a[0];f.siteConfigurations=c?c.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);e._getSiteConfigurations(a.slice(1),b,d)}):d.resolve(b);return d};a.prototype.display=function(){var a=this,b=this.registry.getService("orion.page.message"),d=new c;b.showWhile(d,g["Loading..."]);var f=this.registry.getServiceReferences("orion.site");
this.siteClients=[];for(var h=0;h<f.length;h++){var i=f[h],j=this.registry.getService(i);this.siteClients.push(new l.SiteClient(this.registry,j,i))}var k=this.commandService;this._getSiteConfigurations(this.siteClients).then(function(c){a.renderer=new q({registry:a.registry,commandService:a.commandService,actionScopeId:"sdsd",cachePrefix:"SitesExplorer",checkbox:!1},a);k.registerCommandContribution(a.pageActionsWrapperId,"orion.site.create",100);k.registerCommandContribution(a.defaultActionWrapperId,
"orion.site.start",20);k.registerCommandContribution(a.defaultActionWrapperId,"orion.site.stop",30);k.registerCommandContribution(a.defaultActionWrapperId,"orion.site.delete",40,null,!1);for(var g=!1,h=0;h<c.length;h++)if(c[h].siteConfigurations&&c[h].siteConfigurations.length>0){g=!0;break}if(g)for(h=0;h<c.length;h++){g=c[h].siteService._id;if(c.length>1)new e.Section(document.getElementById(a.parentId),{id:g+"_Section",title:c[h].siteService._name,content:'<div id="'+g+'_Node" class="mainPadding siteGroup"></list>',
canHide:!0});else{var i=document.createElement("div");i.setAttribute("role","region");document.getElementById(a.parentId).appendChild(i);var j=document.createElement("div");j.id=g+"_Node";j.classList.add("mainPadding");i.appendChild(j)}a.createTree(g+"_Node",new p(c[h].siteConfigurations),{setFocus:!1,noSelection:!0})}else a.renderNoSites(document.getElementById(a.parentId),f[0]);a._updatePageActions(a.registry,f[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=!1,d=0;d<b.length;d++){var e=b[d].siteService._id+"_Node";r.empty(r.node(e));b[d].siteConfigurations&&b[d].siteConfigurations.length>0&&(c=!0,a.createTree(e,new p(b[d].siteConfigurations),{setFocus:!1,noSelection:!0}))}c||(b=a.registry.getServiceReferences("orion.site"),
a.renderNoSites(document.getElementById(a.parentId),b[0]))})};a.prototype.renderNoSites=function(a,b){var c=document.createElement("div");c.className="sitesPanel sectionWrapper sectionTitle";var d=document.createElement("span");this.commandService.renderCommands(this.pageActionsWrapperId,d,b,this,"button",this.getRefreshHandler());c.appendChild(d);var e=document.createElement("span");e.textContent=g["SitesExplorer.NoSitesText"];r.processDOMNodes(e,[d]);c.appendChild(e);a.appendChild(c)};return a}();
q=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.render=function(a,b){var c=document.createElement("div");b.appendChild(c);c=document.createElement("div");c.className="sectionWrapper toolComposite sitesPanel";b.appendChild(c);var d=document.createElement("div");d.className="sectionAnchor sectionTitle layoutLeft";c.appendChild(d);var e=document.createElement("span");
d.appendChild(e);var d=h.generateEditSiteHref(a),f=document.createElement("a");f.href=d;e.appendChild(f);f.appendChild(document.createTextNode(a.Name));e=document.createElement("div");e.className="layoutRight sectionActions";e.id="siteActionsArea";c.appendChild(e);this.commandService.renderCommands("DefaultActionWrapper",e,a,this.explorer,"button",this.explorer.getRefreshHandler());c=document.createElement("div");c.className="sectionTable sectionTableItem";b.appendChild(c);e=document.createElement("div");
e.className="stretch";c.appendChild(e);c=document.createElement("div");e.appendChild(c);d=a.HostingStatus;typeof d==="object"?d.Status==="started"?(e=document.createElement("a"),e.textContent=d.URL,e.href=d.URL,c.appendChild(e),d=document.createElement("span"),d.textContent=g.Started,r.processDOMNodes(d,[e]),c.appendChild(d)):(e=d.Status.substring(0,1).toUpperCase()+d.Status.substring(1),c.appendChild(document.createTextNode(e))):c.appendChild(document.createTextNode(g.Unknown))};return a}();p=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 k});
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(g,k,f,c,a,i,e,d,b,h,j,l,m,o,r){k.startup().then(function(g){var k=g.serviceRegistry,g=g.preferences;new h.DialogService(k);var l=new e.OperationsClient(k),
t=new f.StatusReportingService(k,l,"statusPane","notifications","notificationArea"),u=new b.Selection(k),x=new a.CommandRegistry({});new c.ProgressService(k,l,x);l=new i.FileClient(k);l=new d.Searcher({serviceRegistry:k,commandService:x,fileService:l});j.generateBanner("orion-sites",k,x,g,l);j.setPageTarget({task:r.Sites});g=new o(k,u,x,"table");(function(){var a=t.setProgressResult.bind(t);m.createSiteServiceCommands(k,x,{createCallback:function(a){window.location=a},errorHandler:a});m.createSiteCommands(k,
x)})();g.display()})});