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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/*

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (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). 

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - _initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.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 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and 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(h,i){typeof define==="function"&&define.amd?define("orion/Deferred",i):typeof exports==="object"?module.exports=i():(h.orion=h.orion||{},h.orion.Deferred=i())})(this,function(){function h(){for(var j;j=c.shift()||b.shift();)j();a=!1}function i(j,k){(k?b:c).push(j);a||(a=!0,k?setTimeout(h,0):h())}function f(a){return function(){a.apply(null,arguments)}}function d(){}function e(){var a=Error("Cancel");a.name="Cancel";return a}function g(){function a(){for(var j;j=m.shift();){var e=j.deferred,
g=c==="resolved"?"resolve":"reject";if(typeof j[g]==="function")try{var o=j[g](b);o&&typeof o.then==="function"?(e.cancel=o.cancel||d,o.then(f(e.resolve),f(e.reject),e.progress)):e.resolve(o)}catch(t){e.reject(t)}else e[g](b)}}var b,c,m=[],o=this;this.reject=function(e){c||(c="rejected",b=e,m.length&&i(a));return o.promise};this.resolve=function(e){c||(c="resolved",b=e,m.length&&i(a));return o.promise};this.progress=function(a){c||m.forEach(function(j){j.progress&&j.progress(a)});return o.promise};
this.cancel=function(){c||o.reject(e())};this.then=function(b,k,e){var b={resolve:b,reject:k,progress:e,deferred:new g},d=b.deferred,f=!1,h=function(){f||(f=!0,i(function(){var a=d.cancel===h?o.cancel:d.cancel;typeof a==="function"&&a()},!0))};d.cancel=h;m.push(b);c&&i(a,!0);return d.promise};this.promise=Object.create(Object.prototype,{then:{value:o.then},cancel:{get:function(){return o.cancel},set:function(a){o.cancel=a}}})}var c=[],b=[],a=!1;g.all=function(a,b){function c(a,j){n||(f[a]=j,--d===
0&&q.resolve(f))}function e(a,j){if(!n){if(b)try{c(a,b(j));return}catch(d){j=d}q.reject(j)}}var d=a.length,f=[],n=!1,q=new g;q.then(null,function(){n=!0;a.forEach(function(a){a.cancel&&a.cancel()})});d===0?q.resolve(f):a.forEach(function(a,j){a.then(c.bind(null,j),e.bind(null,j))});return q.promise};g.when=function(a,b,c,e){var d;if(!(a&&typeof a.then==="function"))d=new g,d.resolve(a),a=d.promise;return a.then(b,c,e)};return g});
define("orion/EventTarget",[],function(){function h(){this._namedListeners={}}h.prototype={dispatchEvent:function(i){if(!i.type)throw Error("unspecified type");var f=this._namedListeners[i.type];f&&f.forEach(function(d){try{typeof d==="function"?d(i):d.handleEvent(i)}catch(e){typeof console!=="undefined"&&console.log(e)}});return!i.defaultPrevented},addEventListener:function(i,f){if(typeof f==="function"||f.handleEvent)this._namedListeners[i]=this._namedListeners[i]||[],this._namedListeners[i].push(f)},
removeEventListener:function(i,f){var d=this._namedListeners[i];if(d)for(var e=0;e<d.length;e++)if(d[e]===f){d.length===1?delete this._namedListeners[i]:d.splice(e,1);break}}};h.prototype.constructor=h;h.attach=function(i){var f=new h;i.dispatchEvent=f.dispatchEvent.bind(f);i.addEventListener=f.addEventListener.bind(f);i.removeEventListener=f.removeEventListener.bind(f)};return h});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(h,i){function f(b,a,j){this._properties=j||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function d(b,a,j){this._serviceId=b;this._serviceReference=a;this._internalRegistry=j}function e(b,a){function j(j){return function(){var k;try{if(!a())throw Error("Service was unregistered");var c=b[j].apply(b,Array.prototype.slice.call(arguments));if(c&&typeof c.then==="function")return c;
else k=new h,k.resolve(c)}catch(e){k=new h,k.reject(e)}return k.promise}}for(var k in b)typeof b[k]==="function"&&(this[k]=j(k))}function g(b,a){this.type=b;this.serviceReference=a}function c(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new i;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var j=b._entries[a];if(!j)throw Error("already unregistered");var k=j.reference;b._serviceEventTarget.dispatchEvent(new g("unregistering",
k));b._entries[a]=null;k.getProperty("objectClass").forEach(function(a){for(var j=b._namedReferences[a],c=0;c<j.length;c++)if(j[c]===k){j.length===1?delete b._namedReferences[a]:j.splice(c,1);break}})},modifyService:function(a){a=b._entries[a];if(!a)throw Error("already unregistered");b._serviceEventTarget.dispatchEvent(new g("modified",a.reference))}}}f.prototype={getPropertyKeys:function(){var b=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&b.push(a);return b},getProperty:function(b){return this._properties[b]}};
f.prototype.constructor=f;d.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("already unregistered");return this._serviceReference},setProperties:function(b){var a=this._serviceReference._properties;this._serviceReference._properties=b||{};b["service.id"]=this._serviceId;b.objectClass=a.objectClass;b["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};
d.prototype.constructor=d;c.prototype={getService:function(b){var a;if(typeof b==="string")(b=this._namedReferences[b])&&b.some(function(j){a=this._entries[j.getProperty("service.id")].service;return!!a},this);else if(b=this._entries[b.getProperty("service.id")])a=b.service;return a||null},getServiceReferences:function(b){if(b)return this._namedReferences[b]?this._namedReferences[b]:[];var a=[];this._entries.forEach(function(j){j&&a.push(j.reference)});return a},registerService:function(b,a,j){if(typeof a===
"undefined"||a===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var k=this._entries.length,c=new f(k,b,j),m=this._namedReferences;b.forEach(function(a){m[a]=m[a]||[];m[a].push(c)});b=new e(a,this._internalRegistry.isRegistered.bind(null,k));this._entries.push({reference:c,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new g("registered",c));return new d(k,c,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,
a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};c.prototype.constructor=c;return{ServiceRegistry:c}});
define("orion/xhr",["orion/Deferred"],function(h){function i(f,d,e,g){var c=typeof e.response!=="undefined"?e.response:e.responseText,b;try{b=e.status}catch(a){b=0}f={args:d,response:c,responseText:typeof c==="string"?c:null,status:b,url:f,xhr:e};if(typeof g!=="undefined")f.error=g;return f}return function(f,d,e){var e=e||{},g=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,c=new h,b=e.headers||{},a=e.log||!1,j;typeof b["X-Requested-With"]==="undefined"&&(b["X-Requested-With"]="XMLHttpRequest");
if(typeof e.data!=="undefined"&&(f==="POST"||f==="PUT"))j=e.data;g.onprogress=function(a){a.xhr=g;c.progress(a)};g.onreadystatechange=function(){if(g.readyState===4){var j=i(d,e,g),b=g.status;200<=b&&b<400?c.resolve(j):(a&&typeof console!=="undefined"&&console.log(Error(g.statusText)),c.reject(j))}};try{g.open(f,d,!0);if(typeof e.responseType==="string")g.responseType=e.responseType;if(typeof e.timeout==="number")if(typeof g.timeout==="number")g.timeout=e.timeout,g.addEventListener("timeout",function(){c.reject(i(d,
e,g,"Timeout exceeded"))});else{var k=setTimeout(function(){c.reject(i(d,e,g,"Timeout exceeded"))},e.timeout);c.then(clearTimeout.bind(null,k),clearTimeout.bind(null,k))}Object.keys(b).forEach(function(a){g.setRequestHeader(a,b[a])});g.send(j)}catch(l){c.reject(i(d,e,g,l))}return c.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(h,i,f){function d(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function e(a,b){return{get:function(c,e){if(b===0)return null;var d=localStorage.getItem(a+c);if(d===null)return null;d=JSON.parse(d);return e||b===-1||d._expires&&d._expires>(new Date).getTime()?(delete d._expires,d):null},set:function(c,e){if(b!==0){if(b!==-1)e._expires=(new Date).getTime()+1E3*b;
if(Object.keys(e).length===0)localStorage.removeItem(a+c);else{var d=JSON.stringify(e);localStorage.setItem(a+c,d);delete e._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function g(a){this._currentPromises={};this._cache=new e("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var b=a.getServiceReferences("orion.core.preference.provider");if(b.length>0)this._service=a.getService(b[0])}return!!this._service}}function c(a){this._location=
a;this._currentPromise=null;this._cache=new e("/orion/preferences/default",3600)}function b(){this._cache=new e("/orion/preferences/local",-1)}function a(a,k){this._userProvider=new g(a);this._localProvider=new b;k=k||"defaults.pref";k.indexOf("://")===-1&&(k=h.toUrl(k));this._defaultsProvider=new c(k);this._serviceRegistration=a.registerService("orion.core.preference",this)}d.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var c=this._stores[b];this._dirty.indexOf(c)!==-1&&
a.push(this._providers[b].put(this._name,c))}this._dirty=[];return i.all(a)},_scheduleFlush:function(a){this._dirty.indexOf(a)===-1&&this._dirty.push(a);if(!this._flushPending)this._flushPending=!0,window.setTimeout(function(){if(this._flushPending)this._flushPending=!1,this._flush()}.bind(this),0)},_getCached:function(){if(!this._cached){this._cached={};for(var a=0;a<this._stores.length;++a){var b=this._stores[a],c;for(c in b)b.hasOwnProperty(c)&&typeof this._cached[c]==="undefined"&&(this._cached[c]=
b[c])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(this._stores.length!==0){var c=this._stores[0];if(c[a]!==b)c[a]=b,this._cached=null,this._scheduleFlush(c)}},remove:function(a){for(var b=0;b<this._stores.length;++b){var c=this._stores[b];if(c.hasOwnProperty(a))return delete c[a],this._cached=null,this._scheduleFlush(c),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]=
{},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var b=this,c=[],e=0;e<this._providers.length;++e)c.push(this._providers[e].get(this._name,a).then(function(a){return function(c){b._stores[a]=c}}(e)));return i.all(c).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};g.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var c=new i,e=null;
b?this._cache.remove(a):e=this._cache.get(a);if(e!==null)c.resolve(e);else{this._currentPromises[a]=c;var d=this;this._service.get(a).then(function(b){d._cache.set(a,b);delete d._currentPromises[a];c.resolve(b)},function(b){b.status===404?(b={},d._cache.set(a,b),delete d._currentPromises[a],c.resolve(b)):(delete d._currentPromises[a],c.resolve(d._cache.get(a,!0)||{}))})}return c},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)}};c.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;
var c=new i,e=null;b?this._cache.remove(a):e=this._cache.get(a);if(e!==null)c.resolve(e);else{this._currentPromise=c;var d=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);d._cache.set(a,b[a]||{});d._currentPromise=null;c.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(d._cache.set(a,{}),d._currentPromise=null,c.resolve({})):(d._currentPromise=null,b=d._cache.get(a,!0),b!==null?c.resolve(b[a]||{}):c.resolve({}))})}return c},
put:function(){var a=new i;a.resolve();return a}};b.prototype={get:function(a){var b=new i,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var c=new i;this._cache.set(a,b);c.resolve();return c}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(b,c,e){if(!c||typeof c!=="number"||c>7||c<1)e=c,c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",e,!1);if((a.USER_SCOPE&c)!==0)return"/orion/preferences/user"+
b;else if((a.LOCAL_SCOPE&c)!==0)return"/orion/preferences/local"+b;return"/orion/preferences/default"+b},getPreferences:function(b,c){if(!c||typeof c!=="number"||c>7||c<1)c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var e=[];a.USER_SCOPE&c&&this._userProvider.available()&&e.push(this._userProvider);a.LOCAL_SCOPE&c&&e.push(this._localProvider);a.DEFAULT_SCOPE&c&&e.push(this._defaultsProvider);var g=new d(b,e);return g.sync().then(function(){return g})},getSetting:function(a,b,c){for(var e,d=0;d<a.length;d++)if(a[d].label===
b)for(var g=0;g<a[d].data.length;g++)if(a[d].data[g].label===c){e=a[d].data[g].value;break}return e}};return{PreferencesService:a}});
(function(){function h(a){if(typeof a!=="string")throw new TypeError;}function i(a){return a?a.split("&"):[]}function f(a){return a.length===0?"":a.join("&")}function d(a){var b=/([^=]*)(?:=?)(.*)/.exec(a),a=b[1]?decodeURIComponent(b[1]):"",b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function e(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function g(a,b){var c="",e=[],j=0;return{next:function(){if(c!==a.query)c=a.query,e=i(c);if(j<e.length){var k=d(e[j++]);
switch(b){case "keys":return k[0];case "values":return k[1];case "keys+values":return[k[0],k[1]];default:throw new TypeError;}}throw w;}}}function c(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function b(a){var b=[];a.split("/").forEach(function(a){a===".."?b.pop():a!=="."&&b.push(a)});return b.join("/")}function a(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function j(c,e){if(typeof c!=="string")throw new TypeError;var c=a(c),j=m.exec(c);
if(!j)return null;var d={};d.scheme=j[1]||"";if(d.scheme&&!s.test(d.scheme))return null;var k=j[2];if(k&&(k=o.exec(k),d.userinfo=k[1],d.host=k[2],d.port=k[3],d.port&&!n.test(d.port)))return null;d.path=j[3];d.query=j[4];d.fragment=j[5];if(!d.scheme&&e&&(d.scheme=e.scheme,!d.host&&e.host))d.userinfo=e.userinfo,d.host=e.host,d.port=e.port,d.pathRelative=!0;if(d.pathRelative)if(d.path){if(d.path[0]!=="/")j=/^(.*\/)[^\/]*$/.exec(e.path)[1]||"/",d.path=j+d.path}else d.path=e.path;if(d.scheme)d.scheme=
d.scheme.toLowerCase();if(d.port)d.port=/[1-9]\d*$/.exec(d.port)[0];if(d.host&&d.path)d.path=b(d.path);return d}function k(a,b){var e;if(b){b=b.href||b;e=j(b);if(!e||!e.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:e})}e=j(a,e);if(!e)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:e,writable:!0});var d=new c(this);Object.defineProperty(this,"query",{get:function(){return this._url?d:null},enumerable:!0})}
try{if(typeof window.URL==="function"&&window.URL.length!==0&&(new window.URL("http://www.w3.org")).protocol==="http:")return}catch(l){}var m=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,o=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,s=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,n=/^\d*$/,q=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,p=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,t=/^([^?#\s]*)$/,x=/^([^\s]*)$/,z=/^\S*$/,r=/([^:]*):?(.*)/,w=typeof StopIteration!=="undefined"?StopIteration:
Error("Stop Iteration"),v={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(c.prototype,{get:{value:function(a){h(a);var b;i(this._url.query).some(function(c){c=d(c);if(c[0]===a)return b=c[1],!0});return b},enumerable:!0},set:{value:function(a,b){h(a);h(b);var c=i(this._url.query);c.some(function(j,k){var g=d(j);if(g[0]===a)return g[1]=b,c[k]=e(g),!0})||c.push(e([a,b]));this._url.query=f(c)},enumerable:!0},has:{value:function(a){h(a);return i(this._url.query).some(function(b){if(d(b)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){h(a);var b=i(this._url.query),c=b.filter(function(b){return d(b)[0]!==a});return c.length!==b.length?(this._url.query=f(c),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,b){if(typeof a!=="function")throw new TypeError;var c=g(this._url,"keys+values");try{for(;;){var e=c.next();a.call(b,e[1],e[0],this)}}catch(d){if(d!==w)throw d;}},enumerable:!0},keys:{value:function(){return g(this._url,
"keys")},enumerable:!0},values:{value:function(){return g(this._url,"values")},enumerable:!0},items:{value:function(){return g(this._url,"keys+values")}},size:{get:function(){return i(this._url.query).length},enumerable:!0},getAll:{value:function(a){h(a);var b=[];i(this._url.query).forEach(function(c){c=d(c);c[0]===a&&b.push(c[1])});return b},enumerable:!0},append:{value:function(a,b){h(a);h(b);var c=i(this._url.query);c.push(e([a,b]));this._url.query=f(c)},enumerable:!0}});Object.defineProperties(k.prototype,
{href:{get:function(){var a;if(this._url){a=this._url;var b=a.scheme?a.scheme+":":"";a.host&&(b+="//",a.userinfo&&(b+=a.userinfo+"@"),b+=a.host,a.port&&(b+=":"+a.port));b+=a.path;a.query&&(b+="?"+a.query);a.fragment&&(b+="#"+a.fragment);a=b}else a=this._input;return a},set:function(a){h(a);this._input=a;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(a){h(a);if(this._url&&(a=a.slice(-1)===":"?a.substring(0,a.length-1):a,s.test(a)))this._url.scheme=a.toLowerCase()},enumerable:!0},_userinfo:{get:function(){return this._url?this._url.userinfo:""},set:function(a){h(a);if(this._url)this._url.userinfo=a}},username:{get:function(){if(!this._url)return"";var a=r.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){h(a);if(this._url){var b=r.exec(this._userinfo),a=[encodeURIComponent(a||"")];
b[2]&&a.push(b[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=r.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){h(a);if(this._url){var b=[r.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")}},enumerable:!0},host:{get:function(){var a="";this._url&&this._url.host&&(a+=this._url.host,this._url.port&&(a+=":"+this._url.port));return a},set:function(a){h(a);if(this._url&&(a=p.exec(a)))this._url.host=
a[1],this._url.port=/[1-9]\d*$/.exec(a[2])[0]},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){h(a);if(this._url&&q.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===v[this.protocol]&&(a="");return a},set:function(a){h(a);if(this._url&&n.exec(a))this._url.port=/[1-9]\d*$/.exec(a)[0]},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(a){h(a);if(this._url&&t.exec(a))this._url.host&&
a&&a[0]!=="/"&&(a="/"+a),this._url.path=a?b(a):""},enumerable:!0},search:{get:function(){return this._url&&this._url.query?"?"+this._url.query:""},set:function(a){h(a);if(this._url&&(a&&a[0]==="?"&&(a=a.substring(1)),x.exec(a)))this._url.query=a},enumerable:!0},hash:{get:function(){return this._url&&this._url.fragment?"#"+this._url.fragment:""},set:function(a){h(a);if(this._url&&(a&&a[0]==="#"&&(a=a.substring(1)),z.exec(a)))this._url.fragment=a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&
(Object.defineProperty(k,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(k,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=k})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(h,i){function f(a,b){var c=Object.keys(a),e=Object.keys(b);if(c.length!==e.length)return!1;c.sort();e.sort();for(var d=0,g=c.length;d<g;d++){var f=c[d];if(f!==e[d])return!1;var n=a[f],f=b[f];if(n!==f&&JSON.stringify(n)!==JSON.stringify(f))return!1}return!0}function d(a){if(a.indexOf("://")===-1)try{return(new URL(a,location.href)).href}catch(b){}return a}function e(a){var b=null;return{key:function(c){return(b=
b||Object.keys(a))[c]},getItem:function(b){return a[b]},setItem:function(c,e){a[c]=e;b=null},removeItem:function(c){delete a[c];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}}}function g(a,b){return{type:a,plugin:b}}function c(a,b,c){function e(a,b,d){if(!y)return(new h).reject(Error("plugin not connected"));var j=C++,g=new h;g.then(null,function(a){v==="active"&&a instanceof Error&&a.name==="Cancel"&&c.postMessage({id:j,cancel:a.message||"Cancel"},
y)});D[String(j)]=g;c.postMessage({id:j,serviceId:a,method:b,params:d},y);return g.promise}function d(a){var b={};if(a.methods&&(a.methods.forEach(function(c){b[c]=function(){var b=Array.prototype.slice.call(arguments);return v==="active"?e(a.serviceId,c,b):p.start({"transient":!0}).then(function(){return e(a.serviceId,c,b)})}}),b.addEventListener&&b.removeEventListener)){var c=new i;b.dispatchEvent=c.dispatchEvent.bind(c);var j=b.addEventListener;b.addEventListener=function(a,b){c._namedListeners[a]||
j(a);c.addEventListener(a,b)};var g=b.removeEventListener;b.removeEventListener=function(a,b){c.removeEventListener(a,b);c._namedListeners[a]&&g(a)}}return b}function o(b){var c=JSON.parse(JSON.stringify(b.properties));c.__plugin__=a;b=b.names||b.type||[];Array.isArray(b)||(b=[b]);c.objectClass=b;return c}function s(a){var b=d(a),e=o(a),e=c.registerService(a.names||a.type,b,e);u[a.serviceId]={registration:e,proxy:b}}function n(){c.persist(a,{created:t,headers:x,services:z,autostart:r,lastModified:w})}
function q(a){var b;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var e=a.params[0];E({headers:e.headers,services:e.services}).then(function(){A.resolve(p)})}else if("dispatchEvent"===a.method){var d=u[a.serviceId].proxy;d.dispatchEvent.apply(d,a.params)}else if("progress"===a.method)b=D[String(a.requestId)],b.progress.apply(b,a.params);else if("timeout"===a.method)A&&A.reject(a.error);else throw Error("Bad response method: "+a.method);else if(b=D[String(a.id)],delete D[String(a.id)],
a.error){var j=c.handleServiceError(p,a.error);b.reject(j)}else b.resolve(a.result)}catch(g){console.log("Plugin._responseHandler "+g)}}var p=this,b=b||{},t=b.created||(new Date).getTime(),x=b.headers||{},z=b.services||[],r=b.autostart,w=b.lastModified||0,v="installed",B,A,y,u={},C=0,D={},E;this._persist=n;this._resolve=function(){v="resolved";c.dispatchEvent(new g("resolved",p))};this._getAutostart=function(){return r};this._getCreated=function(){return t};this.getLocation=function(){return a};this.getHeaders=
function(){return JSON.parse(JSON.stringify(x))};this.getName=function(){var a=this.getHeaders();return a?a.name||"":null};this.getVersion=function(){var a=this.getHeaders();return a?a.version||"0.0.0":null};this.getLastModified=function(){return w};this.getServiceReferences=function(){var a=[];Object.keys(u).forEach(function(b){a.push(u[b].registration.getReference())});return a};this.getState=function(){return v};this.start=function(b){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));
if(B)return B.promise.then(this.start.bind(this,b));if(v==="active")return(new h).resolve();if(!b||!b["transient"]){var e=b&&b.lazy?"lazy":"started";e!==r&&(r=e,n())}e=c.getState();if(e!=="starting"&&e!=="active")return b["transient"]?(new h).reject(Error("start transient error")):(new h).resolve();if(v==="installed")try{this._resolve()}catch(d){return(new h).reject(d)}v==="resolved"&&z.forEach(function(a){s(a)});if(b&&b.lazy)return v!=="starting"&&(v="starting",c.dispatchEvent(new g("lazy activation",
p))),(new h).resolve();var j=new h;B=j;v="starting";c.dispatchEvent(new g("starting",p));A=new h;y=c.connect(a,q);A.then(function(){A=null;v="active";c.dispatchEvent(new g("started",p));B=null;j.resolve()},function(){A=null;v="stopping";c.dispatchEvent(new g("stopping",p));Object.keys(u).forEach(function(a){u[a].registration.unregister();delete u[a]});c.disconnect(y);y=null;v="resolved";B=null;c.dispatchEvent(new g("stopped",p));j.reject(Error("plugin activation error"))});return j.promise};this.stop=
function(a){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(B)return B.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==r)r="stopped",n();if(v!=="active"&&v!=="starting")return(new h).resolve();B=a=new h;v="stopping";c.dispatchEvent(new g("stopping",p));Object.keys(u).forEach(function(a){u[a].registration.unregister();delete u[a]});y&&(c.disconnect(y),y=null);v="resolved";B=null;c.dispatchEvent(new g("stopped",p));a.resolve();return a.promise};
E=function(b){if(v==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(!b)return w===0&&(w=(new Date).getTime(),n()),c.loadManifest(a).then(E);var e=x,d=z,j=r;x=b.headers||{};z=b.services||{};r=b.autostart||r;b.lastModified?w=b.lastModified:(w=(new Date).getTime(),n());if(f(x,e)&&f(z,d)&&r===j)return(new h).resolve();if(v==="active"||v==="starting"){var l=[];Object.keys(z).forEach(function(a){var b=z[a];l.push(a);var c=u[a];if(c){if(f(b.methods,Object.keys(c.proxy))){var a=o(b),
e=c.registration.getReference(),d={};e.getPropertyKeys().forEach(function(a){d[a]=e.getProperty(a)});f(a,d)||c.registration.setProperties(a);return}c.registration.unregister();delete u[a]}s(b)});Object.keys(u).forEach(function(a){l.indexOf(a)===-1&&(u[a].registration.unregister(),delete u[a])})}v==="active"&&(c.disconnect(y),A=new h,y=c.connect(a,q),A.then(function(){A=null},function(){A=null;v="stopping";c.dispatchEvent(new g("stopping"),p);Object.keys(u).forEach(function(a){u[a].registration.unregister();
delete u[a]});c.disconnect(y);y=null;v="resolved";c.dispatchEvent(new g("stopped",p))}));return(new h).resolve()};this.update=function(a){return E(a).then(function(){c.dispatchEvent(new g("updated",p))})};this.uninstall=function(){if(v==="uninstalled")return(new h).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 g("uninstalled",
p));return(new h).resolve()}}var b=/^http[s]?/i;return{Plugin:c,PluginRegistry:function(a,j){function k(a){var b=a.source;s.some(function(c){if(b===c.target){if(typeof c.useStructuredClone==="undefined")c.useStructuredClone=typeof a.data!=="string";c.handler(c.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var j=j||{},l=j.storage||localStorage;l.getItem||(l=e(l));var m="installed",f=[],s=[],n=new i,q={},p={registerService:a.registerService.bind(a),connect:function(a,b,c){function e(a){a=
Error(a);a.name="timeout";b({method:"timeout",error:a})}var d={handler:b,url:a},g=setTimeout(e.bind(null,"Load timeout for: "+a),c||15E3),k=document.createElement("iframe");k.name=a+"_"+(new Date).getTime();if(!j.visible)k.style.display="none",k.style.visibility="hidden";k.src=a;k.onload=function(){clearTimeout(g);setTimeout(e.bind(null,"Plugin handshake timeout for: "+a),5E3)};k.sandbox="allow-scripts allow-same-origin";document.body.appendChild(k);d.target=k.contentWindow;d.close=function(){k&&
(document.body.removeChild(k),k=null)};s.push(d);return d},disconnect:function(a){for(var b=0;b<s.length;b++)if(a===s[b]){s.splice(b,1);try{a.close()}catch(c){}break}},removePlugin:function(a){for(var b=0;b<f.length;b++)if(a===f[b]){f.splice(b,1);break}l.removeItem("plugin."+a.getLocation())},persist:function(a,b){l.setItem("plugin."+a,JSON.stringify(b))},postMessage:function(a,b){b.target.postMessage(b.useStructuredClone?a:JSON.stringify(a),b.url)},dispatchEvent:function(a){try{n.dispatchEvent(a)}catch(b){console&&
console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new h,c=p.connect(a,function(a){c&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],p.disconnect(c),c=null,b.resolve(a)):"timeout"===a.method&&(p.disconnect(c),c=null,b.reject(a.error)))});return b.promise},getState:function(){return m},handleServiceError:function(a,c){if(c&&c.status===401){var e=a.getHeaders(),d=a.getName()||a.getLocation(),j=document.createElement("span");j.appendChild(document.createTextNode("Authentication required for: "+
d+"."));if(e.login)j.appendChild(document.createTextNode(" ")),d=document.createElement("a"),d.target="_blank",d.textContent="Login",d.href=e.login,b.test(d.href)?(j.appendChild(d),j.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+e.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(j)}}if(c.__isError){var k=c,c=Error(k.message);Object.keys(k).forEach(function(a){c[a]=k[a]});delete c.__isError}return c}};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=p.getState;this.init=function(){if(!(m==="starting"||m==="active"||m==="stopping")){addEventListener("message",k,!1);for(var a=[],b=0,e=l.length;b<e;b++)a.push(l.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(l.getItem(a));a.created&&f.push(new c(b,a,p))}});
f.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});j.plugins&&Object.keys(j.plugins).forEach(function(a){a=d(a);if(!this.getPlugin(a)){var b=j.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||j.defaultAutostart||"lazy";f.push(new c(a,b,p))}}.bind(this));m="starting"}};this.start=function(){m!=="starting"&&this.init();if(m!=="starting")return(new h).reject("Cannot start framework. Framework is already "+m+".");var a=[],b=(new Date).getTime();f.forEach(function(c){var e=
c._getAutostart();c.getLastModified()===0?a.push(c.update().then(function(){if("started"===e)return c.start({"transient":!0});if("lazy"===e)return c.start({lazy:!0,"transient":!0});c._resolve()})):"started"===e?a.push(c.start({"transient":!0})):"lazy"===e?(a.push(c.start({lazy:!0,"transient":!0})),b>c.getLastModified()+864E5&&c.update()):c._resolve()});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){m="active"})};this.stop=function(){if(m!=="starting"&&m!=="active")return(new h).reject("Cannot stop registry. Registry is already "+
m+".");m="stopping";var a=[];f.forEach(function(b){a.push(b.stop({"transient":!0}))});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",k);m="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new h).reject("Cannot uninstall registry")};this.installPlugin=function(a,b){var a=d(a),e=this.getPlugin(a);if(e)return(new h).resolve(e);if(q[a])return q[a];if(b)return e=new c(a,b,p),f.push(e),
e._persist(),p.dispatchEvent(new g("installed",e)),(new h).resolve(e);var j=p.loadManifest(a).then(function(b){e=new c(a,b,p);f.push(e);e._persist();delete q[a];p.dispatchEvent(new g("installed",e));return e},function(b){delete q[a];throw b;});return q[a]=j};this.getPlugins=function(){return f.slice()};this.getPlugin=function(a){var b=null,a=d(a);f.some(function(c){if(a===c.getLocation())return b=c,!0});return b};this.addEventListener=n.addEventListener.bind(n);this.removeEventListener=n.removeEventListener.bind(n);
this.resolvePlugins=function(){var a=!0;f.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function h(d,e){function g(c){var e=c.getProperty("service.id"),d=this.addingService(c);d&&(b[e]=c,a[e]=d)}function c(c){var e=c.getProperty("service.id"),d=a[e];delete b[e];delete a[e];this.removedService(c,d)}this.serviceRegistry=d;var b={},a={},j=i,k,l;this.close=function(){if(j!==f)throw"Already closed";j=i;d.removeEventListener("registered",k);d.removeEventListener("unregistering",l);l=k=null;var a=this;this.getServiceReferences().forEach(function(b){c.call(a,
b)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){return b.length?Object.keys(b).map(function(a){return b[a]}):null};this.open=function(){if(j!==i)throw"Already open";j=f;var a=this;k=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(e)!==-1&&(g.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};l=function(b){b.serviceReference.getProperty("objectClass").indexOf(e)!==
-1&&c.call(a,b.serviceReference)};d.addEventListener("registered",k);d.addEventListener("unregistering",l);d.getServiceReferences(e).forEach(function(b){g.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var i=0,f=1;h.prototype={addingService:function(d){return this.serviceRegistry.getService(d)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return h});
define("orion/config",["orion/Deferred","orion/serviceTracker"],function(h,i){var f,d,e,g,c,b="pid";f=function(a,c,e){function d(a,b,e){b.forEach(function(d,j){try{var g=a[j].getProperty("__plugin__"),l=g&&c.getPlugin(g);(!g||l&&l.getState()==="active")&&b[j].updated(e)}catch(n){typeof console!=="undefined"&&console.log(n)}})}i.call(this,a,"orion.cm.managedservice");var g={},f={},n=function(c){var d=[];c.plugin.getServiceReferences().forEach(function(c){if(c.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var g=c.getProperty(b),c=a.getService(c);g&&c&&(g=(g=e._find(g))&&g.getProperties(),d.push(c.updated(g)))}});return h.all(d)};this.addingService=function(c){var e=c.getProperty(b),d=a.getService(c);if(!e||!d)return null;g[e]||(g[e]=[]);f[e]||(f[e]=[]);g[e].push(c);f[e].push(d);return d};this.onServiceAdded=function(a,c){var j=a.getProperty(b),j=e._find(j);d([a],[c],j&&j.getProperties())};this.onOpen=function(){c.addEventListener("started",n)};this.onClose=function(){c.removeEventListener("started",
n)};this.notifyUpdated=function(a){var b=a.getPid();d(g[b]||[],f[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();d(g[a]||[],f[a]||[],null)};this.removedService=function(a,c){var e=a.getProperty(b),d=g[e],j=f[e];d.length>1?d.splice(d.indexOf(a),1):delete g[e];j.length>1?j.splice(j.indexOf(c),1):delete f[e]}};d=function(){function a(b,c,d){this.store=new e(this,d);this.configAdmin=new g(this,this.store);this.tracker=new f(b,c,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(b){a.tracker.open();return b})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();g=function(){function a(b,c){this.factory=b;this.store=c}a.prototype={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var a="/cm/configurations";
e=function(){function e(d,j){this.factory=d;this.prefsService=j;this.configs=Object.create(null);this.pref=null;var g=this;this.initPromise=this.prefsService.getPreferences(a).then(function(a){g.pref=a;a.keys().forEach(function(e){if(!g.configs[e]){var d=a.get(e);typeof d==="object"&&d!==null&&Object.keys(d).length>0&&(d[b]=e,g.configs[e]=new c(g.factory,g,d))}})})}e.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var b=this._find(a);
b||(b=new c(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,b=[];this.pref.keys().forEach(function(c){(c=a._find(c))&&c.getProperties()!==null&&b.push(c)});return b},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,b){this.pref.put(a,b.getProperties(!0)||{})}};return e}();c=function(){function a(b){for(var c={},e=Object.keys(b),d=0;d<e.length;d++){var j=e[d],g=b[j];c[j]=g instanceof Array?g.slice():g}return c}function c(e,d,g){this.factory=
e;this.store=d;if(g!==null&&typeof g==="object")this.pid=g[b],e=a(g),delete e[b],this.properties=e;else if(typeof g==="string")this.pid=g,this.properties=null;else throw Error("Invalid pid/properties "+g);}c.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(c){this._checkRemoved();var e=null;if(this.properties&&(e=a(this.properties),!c))e[b]=this.pid;return e},remove:function(){this._checkRemoved();
this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=!0},update:function(c){this._checkRemoved();c=a(c);delete c[b];this.properties=c;this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return c}();return{ConfigurationAdminFactory:d}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(h,i,f,d,e,g){var c;return{startup:function(){if(c)return c;c=new i;var b=new f.ServiceRegistry,a=new d.PreferencesService(b);return a.getPreferences("/plugins").then(function(d){var k={plugins:{}};d.keys().forEach(function(a){var b=h.toUrl(a);k.plugins[b]=d[a]});var l=new e.PluginRegistry(b,k);return l.start().then(function(){if(b.getServiceReferences("orion.core.preference.provider").length>
0)return a.getPreferences("/plugins",a.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=h.toUrl(a);l.getPlugin(a)||b.push(l.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return i.all(b,function(a){console.log(a)})})}).then(function(){return(new g.ConfigurationAdminFactory(b,l,a)).getConfigurationAdmin().then(b.registerService.bind(b,"orion.cm.configadmin"))}).then(function(){var a=b.getService("orion.core.auth");
if(a){var c=a.getUser().then(function(b){if(b)localStorage.setItem("lastLogin",(new Date).getTime());else return a.getAuthForm(window.location.href).then(function(a){setTimeout(function(){window.location=a},0)})}),e=localStorage.getItem("lastLogin");if(!e||e<(new Date).getTime()-9E5)return c}}).then(function(){var e={serviceRegistry:b,preferences:a,pluginRegistry:l};c.resolve(e);return e})})}}});
define("orion/webui/littlelib",[],function(){function h(b,a){a||(a=document);return a.querySelectorAll(b)}function i(b,a){var c=b.compareDocumentPosition(a);return b===a||Boolean(c&16)}function f(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var c=f(b.childNodes[a]);if(c)return c}return null}function d(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=b.childNodes.length-1;a>=0;a--){var c=d(b.childNodes[a]);if(c)return c}return null}function e(b,
a){if(b.nodeType===3){var c=g.exec(b.nodeValue);c&&c.length>1&&a(b,c)}if(b.hasChildNodes())for(c=0;c<b.childNodes.length;c++)e(b.childNodes[c],a)}var g=/\$\{([^\}]+)\}/,c=[];return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:h,$$array:function(b,a){return Array.prototype.slice.call(h(b,a))},node:function(b){var a=b;typeof b==="string"&&(a=document.getElementById(b));return a},contains:i,bounds:function(b){b=b.getBoundingClientRect();return{left:b.left+document.body.scrollLeft,top:b.top+
document.body.scrollTop,width:b.width,height:b.height}},empty:function(b){for(;b.hasChildNodes();)b.removeChild(b.firstChild)},firstTabbable:f,lastTabbable:d,stop:function(b){window.document.all?b.keyCode=0:(b.preventDefault(),b.stopPropagation())},processTextNodes:function(b,a){e(b,function(b,c){b.parentNode.replaceChild(document.createTextNode(a[c[1]]||c[1]),b)})},processDOMNodes:function(b,a){e(b,function(b,c){var e=a[c[1]];if(e){var d=document.createRange(),g=c.index;d.setStart(b,g);d.setEnd(b,
g+c[0].length);d.deleteContents();d.insertNode(e)}})},addAutoDismiss:function(b,a){c.length===0&&document.addEventListener("click",function(a){for(var b=[],e=0;e<c.length;e++){var d=c[e].dismiss,g=!1,f;if(c[e].excludeNodes.every(function(b){return b&&(g=document.compareDocumentPosition(document,b)!==1)&&i(b,a.target)?(f=b,!1):!0})){try{d()}catch(n){typeof console!=="undefined"&&console&&console.error(n&&n.message)}g=document.compareDocumentPosition(document,f)!==1}g&&b.push(c[e])}c=b},!0);c.push({excludeNodes:b,
dismiss:a})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
(function(){function h(e,d,c,b,a,j){d[e]&&(c.push(e),(d[e]===!0||d[e]===1)&&b.push(a+e+"/"+j))}function i(e,d,c,b,a){d=b+d+"/"+a;require._fileExists(e.toUrl(d+".js"))&&c.push(d)}function f(e,d,c){for(var b in d)d.hasOwnProperty(b)&&(!e.hasOwnProperty(b)||c)?e[b]=d[b]:typeof d[b]==="object"&&f(e[b],d[b],c)}var d=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(e){var g=e.config?e.config():{};return{version:"2.0.1+",load:function(c,b,a,e){e=e||{};if(e.locale)g.locale=e.locale;
var k=d.exec(c),l=k[1],m=k[4],o=k[5],s=m.split("-"),n=[],q={},p,t="";if(k[5])l=k[1],c=l+o;else{o=k[4];m=g.locale;if(!m)m=g.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();s=m.split("-")}if(e.isBuild){n.push(c);i(b,"root",n,l,o);for(p=0;p<s.length;p++)e=s[p],t+=(t?"-":"")+e,i(b,t,n,l,o);b(n,function(){a()})}else b([c],function(c){var e=[],d;h("root",c,e,n,l,o);for(p=0;p<s.length;p++)d=s[p],t+=(t?"-":"")+d,h(t,c,e,n,l,o);b(n,function(){var d,
j,g;for(d=e.length-1;d>-1&&e[d];d--){g=e[d];j=c[g];if(j===!0||j===1)j=b(l+g+"/"+o);f(q,j)}a(q)})})}}})})();
define("orion/i18n",[],function(){return{load:function(h,i,f,d){var d=d||{},e=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,g=e.exec(h);if(g)if(i.defined(h))f(i(h));else if(d.isBuild||d.isTest)f({});else{var c=g[1],b=g[3]?g[2]:"",a=g[3]||g[2];i(["orion/bootstrap"],function(j){j.startup().then(function(j){var l=j.serviceRegistry,j=l.getServiceReferences("orion.i18n.message");if(b)j.some(function(a){return h===a.getProperty("name")?(l.getService(a).getMessageBundle().then(function(a){f(a)},function(){f({})}),
!0):!1})||f({});else{var m={},o;j.forEach(function(j){var k=j.getProperty("name");if((g=e.exec(k))&&c===g[1]&&a===(g[3]||g[2]))if(b=g[3]?g[2]:""){if((j=d.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&j.toLowerCase().indexOf(b.toLowerCase())===0)m[b]=!0,i.specified(k)||define(k,["orion/i18n!"+k],function(a){return a})}else o=j});i.specified(h)?f(m):o?l.getService(o).getMessageBundle().then(function(a){Object.keys(m).forEach(function(b){typeof a[b]==="undefined"&&
(a[b]=m[b])});define(h,[],a);f(a)},function(){define(h,[],m);f(m)}):(define(h,[],m),f(m))}})})}else f(null)}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor","Filter bindings":"Filter bindings","Orion Editor":"Orion Editor","View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer",
"Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it","Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown",
" is already a favorite.":" is already a favorite.","Add to the favorites list":"Add to the favorites list","Make Favorite":"Make Favorite","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 "," has been added to the favorites list.":" has been added to the favorites list.",Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Bugs","Privacy Policy":"Privacy",
"Terms of Use":"Terms","Copyright Agent":"Copyright","Orion Logo":"Orion Logo","Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"I20130625-1555","Add this page to the favorites list":"Add this page to the favorites list","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?","Orion Home":"Orion Home","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",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","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?","You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.",
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","Open in new tab":"Open in new tab","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."});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("text",["module"],function(h){var i,f,d=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],e=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,g=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c=typeof location!=="undefined"&&location.href,b=c&&location.protocol&&location.protocol.replace(/\:/,""),a=c&&location.hostname,j=c&&(location.port||void 0),k=[],l=h.config&&h.config()||{};i={version:"2.0.5",strip:function(a){if(a){var a=a.replace(e,""),b=a.match(g);b&&(a=b[1])}else a="";return a},
jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:l.createXhr||function(){var a,b,c;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(b=0;b<3;b+=1){c=d[b];try{a=new ActiveXObject(c)}catch(e){}if(a){d=[c];break}}return a},parseName:function(a){var b,
c,e=!1,d=a.indexOf(".");b=a.indexOf("./")===0||a.indexOf("../")===0;d!==-1&&(!b||d>1)?(b=a.substring(0,d),c=a.substring(d+1,a.length)):b=a;a=c||b;d=a.indexOf("!");d!==-1&&(e=a.substring(d+1)==="strip",a=a.substring(0,d),c?c=a:b=a);return{moduleName:b,ext:c,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,b,c,e){var d,j;d=i.xdRegExp.exec(a);if(!d)return!0;a=d[2];d=d[3];d=d.split(":");j=d[1];d=d[0];return(!a||a===b)&&(!d||d.toLowerCase()===c.toLowerCase())&&(!j&&!d||j===e)},finishLoad:function(a,
b,c,e){c=b?i.strip(c):c;l.isBuild&&(k[a]=c);e(c)},load:function(e,d,g,k){if(k.isBuild&&!k.inlineText)g();else{l.isBuild=k.isBuild;var f=i.parseName(e),k=f.moduleName+(f.ext?"."+f.ext:""),h=d.toUrl(k),t=l.useXhr||i.useXhr;!c||t(h,b,a,j)?i.get(h,function(a){i.finishLoad(e,f.strip,a,g)},function(a){g.error&&g.error(a)}):d([k],function(a){i.finishLoad(f.moduleName+"."+f.ext,f.strip,a,g)})}},write:function(a,b,c){if(k.hasOwnProperty(b)){var e=i.jsEscape(k[b]);c.asModule(a+"!"+b,"define(function () { return '"+
e+"';});\n")}},writeFile:function(a,b,c,e,d){var b=i.parseName(b),j=b.ext?"."+b.ext:"",g=b.moduleName+j,k=c.toUrl(b.moduleName+j)+".js";i.load(g,c,function(){var b=function(a){return e(k,a)};b.asModule=function(a,b){return e.asModule(a,k,b)};i.write(a,g,b,d)},d)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)f=require.nodeRequire("fs"),i.get=function(a,b){var c=f.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));b(c)};else if(l.env===
"xhr"||!l.env&&i.createXhr())i.get=function(a,b,c,e){var d=i.createXhr(),j;d.open("GET",a,!0);if(e)for(j in e)e.hasOwnProperty(j)&&d.setRequestHeader(j.toLowerCase(),e[j]);if(l.onXhr)l.onXhr(d,a);d.onreadystatechange=function(){var e;if(d.readyState===4)e=d.status,e>399&&e<600?(e=Error(a+" HTTP status: "+e),e.xhr=d,c(e)):b(d.responseText)};d.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")i.get=function(a,b){var c,e,d=new java.io.File(a),j=java.lang.System.getProperty("line.separator"),
d=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(d),"utf-8")),g="";try{c=new java.lang.StringBuffer;(e=d.readLine())&&e.length()&&e.charAt(0)===65279&&(e=e.substring(1));for(c.append(e);(e=d.readLine())!==null;)c.append(j),c.append(e);g=String(c.toString())}finally{d.close()}b(g)};return i});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(h,i,f){return{slideoutHTMLFragment:function(d){var e=document.createElement("div");e.innerHTML=f;var g=i.$("#slideContainer",e);g.id=d+g.id;g=i.$("#pageCommandParameters",e);g.id=d+g.id;g=i.$("#pageCommandDismiss",e);g.id=d+g.id;return e.innerHTML}}});
define("orion/util",[],function(){var h=navigator.userAgent,i=parseFloat(h.split("MSIE")[1])||void 0,f=parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0,d=h.indexOf("Opera")!==-1,e=parseFloat(h.split("Chrome/")[1])||void 0,g=h.indexOf("Safari")!==-1&&!e,c=parseFloat(h.split("WebKit/")[1])||void 0,b=h.indexOf("Android")!==-1,a=h.indexOf("iPad")!==-1,h=h.indexOf("iPhone")!==-1,j=a||h,k=navigator.platform.indexOf("Mac")!==-1,l=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==
-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return b[(c<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:i,isFirefox:f,isOpera:d,isChrome:e,isSafari:g,isWebkit:c,isAndroid:b,isIPad:a,isIPhone:h,isIOS:j,isMac:k,isWindows:l,isLinux:m,platformDelimiter:l?"\r\n":"\n"}});
define("orion/keyBinding",["orion/util"],function(h){function i(d,e,g,c,b,a){this.type=a||"keydown";this.keyCode=typeof d==="string"&&this.type==="keydown"?d.toUpperCase().charCodeAt(0):d;this.mod1=e!==void 0&&e!==null?e:!1;this.mod2=g!==void 0&&g!==null?g:!1;this.mod3=c!==void 0&&c!==null?c:!1;this.mod4=b!==void 0&&b!==null?b:!1}function f(d){this.keys=d}i.prototype={getKeys:function(){return[this]},match:function(d,e){if(e!==void 0){if(e!==0)return!1}else if(d instanceof Array){if(d.length>1)return!1;
d=d[0]}return d.type!==this.type?!1:this.keyCode===d.keyCode||this.keyCode===String.fromCharCode(h.isOpera?d.which:d.charCode!==void 0?d.charCode:d.keyCode)?this.mod1!==(h.isMac?d.metaKey:d.ctrlKey)?!1:this.type==="keydown"&&this.mod2!==d.shiftKey?!1:this.mod3!==d.altKey?!1:h.isMac&&this.mod4!==d.ctrlKey?!1:!0:!1},equals:function(d){return!d?!1:this.keyCode!==d.keyCode?!1:this.mod1!==d.mod1?!1:this.mod2!==d.mod2?!1:this.mod3!==d.mod3?!1:this.mod4!==d.mod4?!1:this.type!==d.type?!1:!0}};f.prototype=
{getKeys:function(){return this.keys.slice(0)},match:function(d,e){var g=this.keys;if(e!==void 0)return e>g.length?!1:g[e].match(d)?e===g.length-1?!0:e+1:!1;else{d instanceof Array||(d=[d]);if(d.length>g.length)return!1;var c;for(c=0;c<d.length;c++)if(!g[c].match(d[c]))return!1;return c===g.length?!0:c}},equals:function(d){if(!d.keys)return!1;if(d.keys.length!==this.keys.length)return!1;for(var e=0;e<d.keys.length;e++)if(!d.keys[e].equals(this.keys[e]))return!1;return!0}};return{KeyBinding:i,KeyStroke:i,
KeySequence:f}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(h,i){function f(d){this._init(d)}f.prototype={_init:function(d){this._dropdownNode=i.node(d.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=i.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=d.populate;var e=this;this._triggerNode.addEventListener("click",function(d){e.toggle()&&i.stop(d)},!1);this._triggerNode.tagName.toLowerCase()===
"span"&&this._triggerNode.addEventListener("keydown",function(d){if(d.keyCode===i.KEY.ENTER||d.keyCode===i.KEY.SPACE)e.toggle(),i.stop(d)},!1);this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},toggle:function(){return this._triggerNode.classList.contains("dropdownTriggerOpen")?this.close():this.open()},open:function(){this._populate&&(this.empty(),this._populate(this._dropdownNode));var d=this.getItems();if(d.length>0){if(!this._hookedAutoDismiss){var e=i.$$(".dropdownSubMenu",
this._dropdownNode);i.addAutoDismiss([this._triggerNode].concat(Array.prototype.slice.call(e)),this.close.bind(this));this._hookedAutoDismiss=!0}this._triggerNode.classList.add("dropdownTriggerOpen");this._dropdownNode.classList.add("dropdownMenuOpen");this._positionDropdown();d[0].focus();return!0}return!1},_positionDropdown:function(){this._dropdownNode.style.left="";var d=i.bounds(this._dropdownNode),e=i.bounds(this._boundingNode(this._triggerNode));if(d.left+d.width>e.left+e.width)this._dropdownNode.style.right=
0},_boundingNode:function(d){return d.style.right!==""||d.style.position==="absolute"||!d.parentNode||!d.parentNode.style?d:this._boundingNode(d.parentNode)},close:function(d){this._triggerNode.classList.remove("dropdownTriggerOpen");this._dropdownNode.classList.remove("dropdownMenuOpen");d&&this._triggerNode.focus();return!0},getItems:function(){var d=[],e=this;i.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(g){g.parentNode.parentNode===e._dropdownNode&&
d.push(g)});return d},empty:function(){var d=this;i.$$array("li",this._dropdownNode).forEach(function(e){e.parentNode===d._dropdownNode&&e.parentNode.removeChild(e)})},_dropdownKeyDown:function(d){if(d.keyCode===i.KEY.UP||d.keyCode===i.KEY.DOWN||d.keyCode===i.KEY.RIGHT||d.keyCode===i.KEY.ENTER||d.keyCode===i.KEY.LEFT){var e=this.getItems(),g=document.activeElement;if(e.length&&e.length>0&&g){var c=e.indexOf(g);c<0&&(c=e.indexOf(g.parentNode));c>=0&&(d.keyCode===i.KEY.UP&&c>0?(c--,e[c].focus()):d.keyCode===
i.KEY.DOWN&&c<e.length-1?(c++,e[c].focus()):d.keyCode===i.KEY.ENTER||d.keyCode===i.KEY.RIGHT?g.classList.contains("dropdownTrigger")&&g.dropdown&&g.dropdown.open():d.keyCode===i.KEY.LEFT&&g.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),i.stop(d))}}else d.keyCode===i.KEY.ESCAPE&&(this.close(!0),i.stop(d))}};f.prototype.constructor=f;return{Dropdown:f}});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<span class="dropdownArrowDown"></span></button><ul class="dropdownMenu"></ul>'});
define("text!orion/webui/submenutriggerbutton.html",[],function(){return'<li class="dropdownSubMenu"><span class="dropdownTrigger dropdownMenuItem" role="menuitem" tabindex="0">${ButtonText}<span class="dropdownArrowRight"></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(h,i){function f(d){this._init(d)}f.prototype={_init:function(d){this._node=i.node(d.node);if(!this._node)throw"no dom node for tooltip found";this._position=d.position||["right","above","below","left"];this._text=d.text;this._hideDelay=d.hideDelay===void 0?200:d.hideDelay;this._tailSize=d.tailSize||10;this._trigger=d.trigger||"mouseover";this._afterShowing=d.afterShowing;this._afterHiding=d.afterHiding;var e=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",function(c){c.target===e._node&&(e.show(),i.stop(c))},!1);else if(this._trigger==="mouseover"){this._showDelay=d.showDelay===void 0?500:d.showDelay;d=["mouseout","click"];this._node.addEventListener("mouseover",function(c){i.contains(e._node,c.target)&&(e.show(),i.stop(c))},!1);for(var g=0;g<d.length;g++)this._node.addEventListener(d[g],function(c){i.contains(e._node,c.target)&&e.hide()},!1)}},_makeTipNode:function(){if(!this._tip){this._tip=
document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("span");this._tipInner.classList.add("tooltip");this._text&&this._tipInner.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);document.body.appendChild(this._tip);var d=this;i.addAutoDismiss([this._tip,this._node],function(){d.hide()});if(this._trigger==="mouseover")this._tipInner.role="tooltip",this._tipInner.id="tooltip"+(new Date).getTime().toString(),
this._node.setAttribute("aria-describedby",this._tipInner.id),this._tip.addEventListener("mouseover",function(){if(d._timeout)window.clearTimeout(d._timeout),d._timeout=null;d._tip.addEventListener("mouseout",function(e){i.contains(d._tip,e.target)&&(d.hide(),i.stop(e))},!1)},!1)}return this._tip},_positionTip:function(d,e){this._makeTipNode();d==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var g=this._node,c;for(c=i.bounds(g);g&&!c.width&&!c.height;g=g.parentNode)c=
i.bounds(g);var g=i.bounds(this._tipInner),b;switch(d){case "above":b=c.top-g.height-this._tailSize-1;c=c.left-this._tailSize;break;case "below":b=c.top+c.height+this._tailSize+1;c=c.left-this._tailSize;break;case "left":b=c.top-this._tailSize/2;c=c.left-g.width-this._tailSize-1;break;default:b=c.top-this._tailSize/2,c=c.left+c.width+this._tailSize+1}var a=i.bounds(document.documentElement);if(b+g.height>a.height)if(e)b=a.height-g.height-1;else return!1;if(c+g.width>a.width)if(e)c=a.width-g.width-
1;else return!1;if(c<0)if(e)c=4;else return!1;if(b<0)if(e)b=4;else return!1;if(!this._tail&&(this._tail=document.createElement("span"),this._tail.classList.add("tooltipTailFrom"+d),d==="above"||d==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner),d==="left"))this._tail.style.left=g.width+"px";this._tip.style.top=b+"px";this._tip.style.left=c+"px";this._tip.style.width=g.width+"px";this._tip.style.height=g.height+"px";return!0},contentContainer:function(){this._makeTipNode();
return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var d=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var e=!1,g=0;!e&&g<d._position.length;)e=d._positionTip(d._position[g]),g++;e||d._positionTip(d._position[0],!0);d._tip.classList.add("tooltipShowing");d._afterShowing&&d._afterShowing()},this._showDelay)}},hide:function(d){if(this._timeout)window.clearTimeout(this._timeout),
this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(d===void 0)d=this._hideDelay;var e=this;this._timeout=window.setTimeout(function(){e._tip.classList.remove("tooltipShowing");e._tip.removeAttribute("style");e._afterHiding&&e._afterHiding()},d)}},destroy:function(){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip)document.body.removeChild(this._tip),this._tail=this._tipInner=this._tip=null}};f.prototype.constructor=f;return{Tooltip:f}});
define("orion/commands","require,orion/util,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip".split(","),function(h,i,f,d,e,g,c,b){function a(a,b){for(var c in b)if(b[c]&&b[c].keyBinding&&b[c].command&&b[c].keyBinding.match(a)){var e=b[c],d=e.keyBinding;if(!d.domScope||f.contains(f.node(d.domScope),a.target)){var j=e.invocation;if(j){var g=e.command;if(g.hrefCallback){f.stop(a);
c=g.hrefCallback.call(j.handler||window,j);c.then?c.then(function(a){window.open(a)}):window.open(c);break}else if(g.onClick||g.callback){f.stop(a);window.setTimeout(function(){(g.onClick||g.callback).call(j.handler||window,j)},0);break}}}}}function j(a,b,c){b.classList.add("commandImage");var e;a.imageClass?a.addImageClassToElement?b.classList.add(a.imageClass):(e=document.createElement("span"),b.appendChild(e),e.classList.add(a.spriteClass),e.classList.add(a.imageClass)):(e=new Image,e.alt=a.name,
e.name=c,e.id=c,e.src=a.image,b.appendChild(e));return e}function k(a,b,c,e,d){this.commandRegistry=d;this.handler=a;this.items=b;this.userData=c;this.command=e;if(e.parameters)this.parameters=e.parameters.makeCopy();this.id=e.id}function l(a){this._init(a)}var m=null,o={};window.document.addEventListener("keydown",function(b){b=b||window.event;if(function(a){if(i.isMac){if(a.metaKey&&!a.altKey)return!a.shiftKey&&!a.ctrlKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===
90)?!0:!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return a["char"].length>0;else if(a.charCode||a.keyCode)switch(a=a.charCode||a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return a>=32&&a<112||a>123}return!1}(b)){if(b.target.contentEditable==="true")return;var c=b.target.nodeName.toLowerCase();if(c==="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(c===
"textarea")return}c={};if(m){var e,d,j;d=Object.keys(o);for(e=0;e<d.length;e++)j=d[e],c[j]=o[j];var g=m();d=Object.keys(g);for(e=0;e<d.length;e++)j=d[e],c[j]=g[j]}else c=o;a(b,c)},!1);k.prototype={collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var b=new k(this.handler,this.items,this.userData,this.command,this.commandRegistry);b.domNode=this.domNode;b.domParent=this.domParent;if(a)b.parameters=a.makeCopy();else if(this.parameters)b.parameters=
this.parameters.makeCopy();return b}};k.prototype.constructor=k;l.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||h.toUrl("images/none.png");this.imageClass=a.imageClass;this.addImageClassToElement=a.addImageClassToElement;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},populateChoicesMenu:function(a,
b,c,e,d){this.getChoices(b,c,e).forEach(function(c){if(c.name){var e=document.createElement("li");a.appendChild(e);var j=document.createElement("span");j.tabIndex=0;j.role="menuitem";j.classList.add("dropdownMenuItem");var g=document.createTextNode(c.name);j.appendChild(g);e.appendChild(j);j.choice=c;j.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);j.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&
a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1)}else d._generateMenuSeparator(a)})},getChoices:function(a,b,c){return this.choiceCallback?this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||this.image!==h.toUrl("images/none.png")}};l.prototype.constructor=l;return{Command:l,CommandInvocation:k,createDropdownMenu:function(a,b,c,g,k,l){a=f.node(a);if(!a)throw"no parent node was specified";
var m=document.createRange();m.selectNode(a);m=m.createContextualFragment(e);f.processTextNodes(m,{ButtonText:b});a.appendChild(m);a=a.lastChild;m=a.previousSibling;g?m.classList.add(g):(m.classList.add("orionButton"),m.classList.add("commandButton"));if(k){if(!l)m.textContent="",m.setAttribute("aria-label",b);j({spriteClass:"commandSprite",imageClass:k},m,b);m.classList.add("orionButton")}m.dropdown=new d.Dropdown({dropdown:a,populate:c});a.dropdown=m.dropdown;return{menuButton:m,menu:a,dropdown:m.dropdown}},
createCheckedMenuItem:function(a,b,e,d){a=f.node(a);if(!a)throw"no parent node was specified";var j=document.createRange();j.selectNode(a);j=j.createContextualFragment(c);f.processTextNodes(j,{ItemText:b});a.appendChild(j);a=f.$(".checkedMenuItem",a.lastChild);a.checked=e;a.addEventListener("change",d,!1)},createCommandItem:function(a,c,e,d,g,k,l){var f,k=k||!c.name&&c.hasImage();if(c.hrefCallback)f=document.createElement("a"),f.id=d,k&&c.hasImage()?j(c,f,d):(f.className="commandLink",f.appendChild(document.createTextNode(c.name))),
l=c.hrefCallback.call(e.handler,e),l.then?l.then(function(a){f.href=a}):f.href=l?l:"#";else{f=document.createElement("button");f.className="orionButton";k?c.hasImage()?(j(c,f,d),c.name&&f.setAttribute("aria-label",c.name)):(f.classList.add("commandButton"),f.classList.add("commandMissingImageButton"),f.appendChild(document.createTextNode(c.name))):(f.classList.add("commandButton"),d=document.createTextNode(c.name),f.appendChild(d));var m=l||c.callback;if(m)c.onClick=m,f.addEventListener("click",function(){m.call(e.handler,
e)},!1)}a.nodeName.toLowerCase()==="ul"?(l=document.createElement("li"),a.appendChild(l),a=l):f.classList.add("commandMargins");a.appendChild(f);if(c.tooltip)f.commandTooltip=new b.Tooltip({node:f,text:c.tooltip,position:["above","below","right","left"]});g&&(o[c.id]={keyBinding:g,command:c,invocation:e});return f},createCommandMenuItem:function(a,c,e,d,j){var g,k=a.dropdown;if(c.hrefCallback)g=document.createElement("a"),g.appendChild(document.createTextNode(c.name)),j=c.hrefCallback.call(e.handler,
e),j.then?j.then(function(a){g.href=a}):g.href=j?j:"#";else{g=document.createElement("span");g.tabIndex=0;g.appendChild(document.createTextNode(c.name));var l=j||c.callback;if(l)c.onClick=l,g.addEventListener("click",function(){k.close(!0);l.call(e.handler,e)},!1)}if(c.tooltip)g.commandTooltip=new b.Tooltip({node:g,text:c.tooltip,position:["right","left","above","below"]});g.className="dropdownMenuItem";g.role="menuitem";j=document.createElement("li");a.appendChild(j);j.appendChild(g);d&&(o[c.id]=
{keyBinding:d,command:c,invocation:e});return g},setKeyBindingProvider:function(a){m=a},localKeyBindings:o,_testMethodProcessKey:a}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,i){function f(e){var d="",c=navigator.platform.indexOf("Mac")!==-1;e.mod1&&(d+=c?"Cmd+":"Ctrl+");e.mod2&&(d+="Shift+");e.mod3&&(d+="Alt+");e.mod4&&c&&(d+="Ctrl+");if(e.alphaKey)return d+e.alphaKey;if(e.type==="keypress")return d+e.keyCode;for(var b in i.KEY)if(typeof(i.KEY[b]==="number")&&i.KEY[b]===e.keyCode)return d+b;var a;switch(e.keyCode){case 59:a=e.mod2?":":";";break;case 61:a=e.mod2?"+":"=";break;case 188:a=
e.mod2?"<":",";break;case 190:a=e.mod2?">":".";break;case 191:a=e.mod2?"?":"/";break;case 192:a=e.mod2?"~":"`";break;case 219:a=e.mod2?"{":"[";break;case 220:a=e.mod2?"|":"\\";break;case 221:a=e.mod2?"}":"]";break;case 222:a=e.mod2?'"':"'"}return a?d+a:e.keyCode>=112&&e.keyCode<=123?d+"F"+(e.keyCode-111):d+String.fromCharCode(e.keyCode)}function d(e){var d=window.navigator.platform.indexOf("Mac")!==-1;return d&&e.metaKey||!d&&e.ctrlKey}return{getUserKeyString:function(e){for(var d="",e=e.getKeys(),
c=0;c<e.length;c++)c!==0&&(d+=" "),d+=f(e[c]);return d},getUserText:function(e,d,c,b,a,j,k,l,f){var h=!1,k=function(k){return function(l){if(!h){var p=i.node(e),t=p.value;if(p)if(k&&l.keyCode===i.KEY.ESCAPE){if(c)d.style.display="inline";h=!0;p.parentNode.removeChild(p);j&&j()}else if(!(k&&l.keyCode!==i.KEY.ENTER)){if(t.length===0||!f&&t===b){if(c)d.style.display="inline"}else a(t);h=!0;p.parentNode&&p.parentNode.removeChild(p);j&&j()}}}},s=document.createElement("input");s.id=e;s.value=b||"";d.parentNode.insertBefore(s,
d.nextSibling);s.classList.add("userEditBoxPrompt");if(c)d.style.display="none";s.addEventListener("keydown",k(!0),!1);s.addEventListener("blur",k(!1),!1);window.setTimeout(function(){s.focus();if(b){var a=i.node(e),c=l?b.indexOf(l):-1;if(c>0)if(a.createTextRange)a=a.createTextRange(),a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",c),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,c);else{if(a.selectionStart!==void 0)a.selectionStart=0,a.selectionEnd=c}else a.select()}},
0)},openInNewWindow:d,followLink:function(e,g){g&&d(g)?window.open(e):window.location=e},createButton:function(e,d){var c=document.createElement("button");c.className="orionButton commandButton commandMargins";c.addEventListener("click",function(b){d();i.stop(b)},!1);e&&c.appendChild(document.createTextNode(e));return c},createDropdownButton:function(){}}});
define("orion/PageUtil",[],function(){var h=/^(?:[a-zA-Z0-9-_.!~*'()#;,\/?:@&=+$\[\]]|%[0-9A-F][0-9A-F])*$/,i=/^http[s]?/i;return{matchResourceParameters:function(f){var f=f||window.location.toString(),d={resource:""},e=f.indexOf("#");if(e!==-1&&(f=f.substring(e+1),f.length!==0)){f=f.split(",");Object.defineProperty(d,"resourceRaw",{value:f[0]});d.resource=decodeURIComponent(f[0]);if(!d.resource.match(h))d.resource=encodeURI(d.resource).replace(/%5B/g,"[").replace(/%5D/g,"]");for(e=1;e<f.length;e++){var g=
/([^=]*)(=?)(.*)/.exec(f[e]),c=decodeURIComponent(g[1]||""),g=decodeURIComponent(g[3]||"");c!==""&&c!=="resource"&&(d[c]=g)}}return d},validateURLScheme:function(f,d){var e=f;if(f.indexOf("://")===-1){var g=document.createElement("a");g.href=f;e=g.href}g=!1;return(g=d?d.some(function(c){return RegExp("^"+c+":","i").test(e)}):i.test(e))?f:(console.log("Illegal URL Scheme: '"+f+"'"),"")}}});
define("orion/explorers/navigationUtils",[],function(){function h(f,d){if(!i&&f)f.push({domNode:d}),d.tabIndex=-1,d.style.outline="none"}var i=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(f,d,e){f&&(f=f.getGridNavHolder(d,!0))&&h(f,e)},generateNavGrid:h,removeNavGrid:function(f,d){if(f)for(var e=0;e<f.length;e++)if(f[e].domNode===d){f.splice(e,1);break}}}});
define("orion/commandRegistry","require,orion/commands,orion/uiUtils,orion/PageUtil,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip,orion/explorers/navigationUtils".split(","),function(h,i,f,d,e,g,c,b,a,j,k){function l(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function m(a,b){this.token=a;this.parameterName=b}function o(a,b,c,e,d){this.name=a;this.type=b;this.label=c;this.value=e;this.lines=d||1}function s(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=b&&b.clientCollect}l.prototype={_init:function(a){this._selectionService=a.selection;var b=this;i.setKeyBindingProvider(function(){return b._activeBindings})},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&
this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var c=this._urlBindings[b].urlBinding.match(a);if(c){var e=this._urlBindings[b],d=e.command,j=e.invocation;if(j&&j.parameters&&d.callback){j.parameters.setValue(c.parameterName,c.parameterValue);var g=this;window.setTimeout(function(){g._invoke(j)},0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(a,b,c,e){b?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(b):1)&&a.callback&&this._invoke(new i.CommandInvocation(c,
b,null,a,this),e):(b=this._urlBindings[a])&&b.command&&b.command.callback&&this._invoke(b.invocation,e)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,b,c))},confirm:function(a,b,c,e,d,j){var g=!1;if(this._parameterCollector&&!d){var k=this;this._parameterCollector.close();if(this._parameterCollector.open(a,
function(a,d){var j=document.createElement("span");j.classList.add("parameterPrompt");j.textContent=b;a.appendChild(j);j=document.createElement("button");j.addEventListener("click",function(){g=!0;k._parameterCollector.close()},!1);d.appendChild(j);j.appendChild(document.createTextNode(c));j.className="dismissButton";var l=document.createElement("button");l.addEventListener("click",function(){g=!1;k._parameterCollector.close()},!1);d.appendChild(l);l.appendChild(document.createTextNode(e));l.className=
"dismissButton";return j},function(){j(g)}))return}g=window.confirm(b);j(g)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,b){return this._collectAndInvoke(a.makeCopy(b),!1)},_collectAndInvoke:function(a,b){if(a)if(this._parameterCollector&&a.parameters&&a.parameters.hasParameters()&&(b||a.parameters.shouldCollectParameters())){var c=!1;a.parameters.updateParameters(a);
if(a.parameters.shouldCollectParameters()&&(c=this._parameterCollector.collectParameters(a),!c)){var e=new j.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),c=e.contentContainer();c.classList.add("parameterPopup");var d=window.document.activeElement,g=this._parameterCollector.getFillFunction(a,function(){d&&d.focus();e.destroy()})(c);e.show();window.setTimeout(function(){g.focus();g.select()},0);c=!0}c||a.command.callback.call(a.handler||window,a)}else a.command.callback.call(a.handler||
window,a);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(a){function b(a){var c=a.invocation;if(c)if(a=a.command,a.hrefCallback)c=a.hrefCallback.call(c.handler||window,c),c.then?c.then(function(a){window.open(a)}):window.open(c);else if(a.onClick||a.callback)(a.onClick||a.callback).call(c.handler||window,c)}function c(a){return function(){b(a)}}var e=
{},d,j,g=[],k;for(k in this._activeBindings)(j=this._activeBindings[k])&&j.keyBinding&&j.command&&g.push(j);g.sort(function(a,b){return a.command.name.localeCompare(b.command.name)});for(k=0;k<g.length;k++)j=g[k],j.keyBinding.scopeName?(e[j.keyBinding.scopeName]||(e[j.keyBinding.scopeName]=[]),e[j.keyBinding.scopeName].push(j)):(d=f.getUserKeyString(j.keyBinding),a.createItem(d,j.command.name,c(j)));for(var l in e)e[l].length&&e[l].length>0&&(a.createHeader(l),e[l].forEach(function(b){d=f.getUserKeyString(b.keyBinding);
a.createItem(d,b.command.name,c(b))}))},addCommand:function(a){this._commandList[a.id]=a;var b=this._pendingBindings[a.id];if(b){var c=this;b.forEach(function(b){c._addBinding(a,b.type,b.binding,b.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,b,c,e,d,j,g,k){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));if(a[b]){if(e)a[b].title=e;if(c)a[b].position=c;if(g)a[b].imageClass=
g;if(k)a[b].tooltip=k;a[b].emptyGroupMessage=j}else a[b]={title:e,position:c,emptyGroupMessage:j,imageClass:g,tooltip:k,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){b&&b.split("/").forEach(function(b){if(b.length>1)a[b]||(a[b]={position:0,children:{}}),a=a[b].children});return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,
b,c,e,d,j,g){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));a[b]={position:c};j&&((c=this._commandList[b])?this._addBinding(c,"key",j,d):this._addPendingBinding(b,"key",j,d));g&&((c=this._commandList[b])?this._addBinding(c,"url",g,d):this._addPendingBinding(b,"url",g,d));a.sortedContributions=null},_addBinding:function(a,b,c,e){if(!a.id)throw Error("No command id: "+a);b==="key"?this._activeBindings[a.id]=
{command:a,keyBinding:c,bindingOnly:e}:b==="url"&&(this._urlBindings[a.id]={command:a,urlBinding:c,bindingOnly:e})},_addPendingBinding:function(a,b,c,e){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:b,binding:c,bindingOnly:e})},_checkForTrailingSeparator:function(a,b,c){var d;if(b==="tool"||b==="button")if((d=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&d.classList.contains("commandSeparator"))return c?(a.removeChild(d),!1):!0;if(b===
"menu"&&(a=e.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(d=a[a.length-1],c)d.parentNode.parentNode.removeChild(d.parentNode);else return!0;return!1},renderCommands:function(a,b,c,d,j,g,k){if(typeof a!=="string")throw"a scope id for rendering must be specified";b=e.node(b);if(!b)throw"no parent";var l=this._contributionsByScopeId[a];if(!c&&l){var c=l.localSelectionService||this._selectionService,f=this;c&&c.getSelections(function(c){f.renderCommands(a,
b,c,d,j,g)})}else l&&(this._render(this._contributionsByScopeId[a],b,c,d,j||"button",g,k),this._checkForTrailingSeparator(b,j,!0))},destroy:function(a){a=e.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var b=a.firstChild;b.commandTooltip&&b.commandTooltip.destroy();b.emptyGroupTooltip&&b.emptyGroupTooltip.destroy();this.destroy(b);a.removeChild(b)}},_render:function(a,b,c,e,d,g,l){var f=a.sortedContributions;if(!f){var f=[],m=!1,h;for(h in a)if(!a.hasOwnProperty||a.hasOwnProperty(h)){var o=
a[h];if(o&&typeof o.position==="number")o.id=h,f.push(o),m=!0}if(m)f.sort(function(a,b){return a.position-b.position}),a.sortedContributions=f}var s=0,u=this;f.forEach(function(a){var f,m;if(!a.imageClass)a.imageClass=null;if(a.children&&Object.getOwnPropertyNames(a.children).length>0){f=a.children;var h;if(d==="tool"||d==="button")if(a.title)h=u._createDropdownMenu(b,a.title,null,null,a.imageClass,a.tooltip),l&&k.generateNavGrid(l,h.menuButton),window.setTimeout(function(){u._render(a.children,h.menu,
c,e,"menu",g,l);u._checkForTrailingSeparator(h.menu,"menu",!0);if(h.menu.childNodes.length===0)if(a.emptyGroupMessage){if(!h.menuButton.emptyGroupTooltip)h.menuButton.emptyGroupTooltip=new j.Tooltip({node:h.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else l&&k.removeNavGrid(l,h.menuButton),h.menu.parentNode&&h.menu.parentNode.removeChild(h.menu),h.destroyButton&&h.destroyButton.parentNode&&h.destroyButton.parentNode.removeChild(h.destroyButton);
else h.menuButton.style.visibility="visible"},0);else{var o;b.childNodes.length>0&&!u._checkForTrailingSeparator(b,d)&&(o=u.generateSeparatorImage(b));u._render(f,b,c,e,d,g,l);b.childNodes.length>0&&b.childNodes[b.childNodes.length-1]!==o&&(o=u.generateSeparatorImage(b))}else if(a.title){if(o=u._createDropdownMenu(b,a.title,!0,null,null,a.imageClass))u._render(f,o.menu,c,e,"menu",g,l),o.menu.childNodes.length===0&&o.destroyButton&&b.removeChild(o.destroyButton)}else b.childNodes.length>0&&u._generateMenuSeparator(b),
u._render(f,b,c,e,d,g,l),u._generateMenuSeparator(b)}else{var n=u._commandList[a.id];f=n?!0:!1;var v=null,v=null;if(n){m=new i.CommandInvocation(e,c,g,n,u);m.domParent=b;o=f&&(n.visibleWhen?n.visibleWhen(c):!0);if(u._activeBindings[n.id]&&u._activeBindings[n.id].keyBinding)v=u._activeBindings[n.id],v.invocation=o?m:null,v.bindingOnly&&(f=!1);if(u._urlBindings[n.id]&&u._urlBindings[n.id].urlBinding)v=u._urlBindings[n.id],v.invocation=o?m:null,v.bindingOnly&&(f=!1);f=f&&o}if(f)n.choiceCallback?(d===
"tool"||d==="button"?(f=b,o=!1,b.nodeName.toLowerCase()==="ul"&&(f=document.createElement("li"),b.appendChild(f))):(f=b,o=!0),u._createDropdownMenu(f,n.name,o,function(a){n.populateChoicesMenu(a,c,e,g,u)}.bind(n),n.imageClass,n.tooltip||n.title)):(m.handler=m.handler||this,m.domParent=b,o=function(){u._invoke(m)},d==="menu"?f=i.createCommandMenuItem(b,n,m,null,o):(f=d+n.id+s,f=i.createCommandItem(b,n,m,f,null,d==="tool",o)),k.generateNavGrid(l,f),m.domNode=f,s++)}})},_createDropdownMenu:function(a,
c,d,k,l,f){a=e.node(a);if(!a||!e.contains(document.body,a))return null;var m,h=a;if(d)f=document.createRange(),f.selectNode(a),f=f.createContextualFragment(b),e.processTextNodes(f,{ButtonText:c}),a.appendChild(f),m=a.lastChild,a=m.lastChild,c=a.previousSibling,c.dropdown=new g.Dropdown({dropdown:a,populate:k}),a.dropdown=c.dropdown;else if(a.nodeName.toLowerCase()==="ul"&&(h=document.createElement("li"),a.appendChild(h),m=h),a=null,l&&(a="dropdownButtonWithIcon",f=f||c),f=l?f||c:f,k=i.createDropdownMenu(h,
c,k,a,l),c=k.menuButton,a=k.menu,f)c.commandTooltip=new j.Tooltip({node:c,text:f,position:["above","below","right","left"]});return{menuButton:c,menu:a,dropdown:c.dropdown,destroyButton:m}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var c=document.createElement("span");c.classList.add("dropdownSeparator");b.appendChild(c);a.appendChild(b)}},generateSeparatorImage:function(a){var b;b=a.nodeName.toLowerCase()===
"ul"?document.createElement("li"):document.createElement("span");a.appendChild(b);b.classList.add("core-sprite-sep");b.classList.add("imageSprite");b.classList.add("commandSeparator");return b}};l.prototype.constructor=l;m.prototype={match:function(a){a=d.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};m.prototype.constructor=m;o.prototype={optionsRequested:function(){return this.optionsRequested}};o.prototype.constructor=o;s.prototype=
{_storeParameters:function(a){this.parameterTable=null;if(a){var b=this.parameterTable={};a.forEach(function(a){b[a.name]=a})}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:
null},setValue:function(a,b){var c=this.parameterTable[a];if(c)c.value=b},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=[];this.forEach(function(b){b=new o(b.name,b.type,b.label,b.value,b.lines);a.push(b)});var b=new s(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};s.prototype.constructor=
s;return{CommandRegistry:l,URLBinding:m,ParametersDescription:s,CommandParameter:o}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(h,i,f){function d(e,d){this._activeContainer=null;this._getElementsFunction=e;this._toolbarLayoutFunction=d}d.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(e,d,c){typeof e==="string"&&(e=f.node(e));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===e)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(e))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=c;var b=d(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!b)return!1;this._activeElements.focusNode=b;e=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(e.length===0){d=this._activeElements.dismissArea||
this._activeElements.parameterArea;e=document.createElement("button");e.id="closebox";e.className="imageSprite core-sprite-close dismissButton";e.title=h.Close;d.appendChild(e);var a=this;e.addEventListener("click",function(){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(b)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){b.focus();b.select&&b.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(e,d){f.$$array("input",d).forEach(function(c){c.type==="checkbox"?e.parameters.setValue(c.parameterName,c.checked):c.type!=="button"&&e.parameters.setValue(c.parameterName,c.value.trim())});f.$$array("textArea",d).forEach(function(c){e.parameters.setValue(c.parameterName,c.value.trim())});e.command.callback&&e.command.callback.call(e.handler,e)},collectParameters:function(e){return e.parameters?
(e.domNode&&e.domNode.classList.add("commandMarker"),this.open(e.domNode||e.domParent,this.getFillFunction(e))):!1},getFillFunction:function(e,d){var c=this;return function(b,a){var j=null,k=function(){d&&d();c.close()},l=function(a){a.keyCode===f.KEY.ENTER&&c._collectAndCall(e,b);if(a.keyCode===f.KEY.ESCAPE||a.keyCode===f.KEY.ENTER)k(),f.stop(a)};e.parameters.forEach(function(a){var c=null;if(a.label)c=document.createElement("label"),c.classList.add("parameterInput"),c.setAttribute("for",a.name+
"parameterCollector"),c.textContent=a.label,b.appendChild(c);var e=a.name+"parameterCollector",d=c||b;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)c=document.createElement("textarea"),c.rows=a.lines,c.type="textarea",c.id=e,d.appendChild(c),l=function(a){a.keyCode===f.KEY.ESCAPE&&(k(),f.stop(a))};else if(a.type==="boolean"){if(c=document.createElement("input"),c.type="checkbox",c.id=e,d.appendChild(c),a.value)c.checked=!0}else if(c=document.createElement("input"),c.type=a.type,c.id=e,
d.appendChild(c),a.value)c.value=a.value;c.classList.add("parameterInput");c.setAttribute("speech","speech");c.setAttribute("x-webkit-speech","x-webkit-speech");c.parameterName=a.name;j||(j=c);c.addEventListener("keydown",l,!1)});var m=a;if(!m)m=document.createElement("span"),m.className="layoutRight parametersDismiss",b.appendChild(m);var i=function(a,b){var c=document.createElement("button");b.appendChild(c);a&&c.appendChild(document.createTextNode(a));c.classList.add("dismissButton");return c};
if(e.parameters.hasOptionalParameters())e.parameters.optionsRequested=!1,i(h.More,m).addEventListener("click",function(){e.parameters.optionsRequested=!0;c._collectAndCall(e,b);k()},!1);i(h.Submit,m).addEventListener("click",function(){c._collectAndCall(e,b);k()},!1);m=i(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");m.title=h.Close;m.addEventListener("click",function(){k()},!1);return j}}};d.prototype.constructor=d;return{CommandParameterCollector:d}});
define("orion/editor/regex",[],function(){return{escape:function(h){return h.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(h){return(h=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(h))?{pattern:h[1],flags:h[2]}:null}}});
define("orion/contentTypes",[],function(){function h(e,c){function b(a,b,c,e){var c=b.filename.indexOf(c)>=0,d=b.extension.indexOf(e)>=0;if(c||d)if(!a||c&&a.extension.indexOf(e)>=0)return b;return a}for(var a=e&&e.split(".").pop(),d=null,k=0;k<c.length;k++){var l=c[k];b(d,l,e,a)===l&&(d=l)}return d}function i(g){this.serviceRegistry=g;this.map=function(c){function b(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var c=c.getServiceReferences(d).concat(c.getServiceReferences(e)),
a={},j=0;j<c.length;j++)for(var g=b(c[j].getProperty("contentTypes")),l=0;l<g.length;l++){var f=g[l];a[f.id]||(a[f.id]={id:f.id,name:f.name,image:f.image,"extends":f["extends"],extension:b(f.extension),filename:b(f.filename)})}return a}(g);g.registerService(f,this)}var f="orion.core.contenttypes",d="orion.core.contenttype",e="orion.file.contenttype";i.prototype={getContentTypes:function(){var e=this.getContentTypesMap(),c=[],b;for(b in e)e.hasOwnProperty(b)&&c.push(e[b]);return c},getContentTypesMap:function(){return this.map},
getFileContentType:function(e){return h(e.Name,this.getContentTypes())},getFilenameContentType:function(e){return h(e,this.getContentTypes())},getContentType:function(e){return this.map[e]||null},isExtensionOf:function(e,c){e=typeof e==="string"?this.getContentType(e):e;c=typeof c==="string"?this.getContentType(c):c;if(!e||!c)return!1;if(e.id===c.id)return!0;else for(var b=e,a={};b&&(b=this.getContentType(b["extends"]));){if(b.id===c.id)return!0;if(a[b.id])throw Error("Cycle: "+b.id);a[b.id]=!0}return!1},
isSomeExtensionOf:function(e,c){for(var b=0;b<c.length;b++)if(this.isExtensionOf(e,c[b]))return!0;return!1}};return{ContentTypeService:i,getFilenameContentType:h}});
define("orion/URITemplate",[],function(){function h(a){this._text=a}function i(a,b){if(b==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(b==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]");if(b==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function f(a,b,c){for(var e=[],d=0;d<a.length;d++)typeof a[d]!=="undefined"&&
e.push(i(a[d],b));return e.join(c)}function d(a,b,c,e){for(var d=Object.keys(a),g=[],f=0;f<d.length;f++)typeof a[d[f]]!=="undefined"&&g.push(i(d[f],b)+c+i(a[d[f]],b));return g.join(e)}function e(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=c[a[0]])?a=a.substring(1):this._operator=c.NUL;for(var e=[],d=a.split(","),g=0;g<d.length;g++){var f=d[g].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 g(a){for(var b=[],c=0,d=a.indexOf("{",c);d!==-1;){b.push(new h(a.substring(c,d)));c=a.indexOf("}",d+1);if(c===-1)throw Error("Invalid template: "+a);b.push(new e(a.substring(d+1,c)));c+=1;d=a.indexOf("{",c)}b.push(new h(a.substring(c)));this._templateComponents=b}var c={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.prototype={expand:function(){return encodeURI(this._text)}};e.prototype={expand:function(a){for(var b=[],c=
0;c<this._varSpecList.length;c++){var e=this._varSpecList[c],g=e.name,h=a[g],s=typeof h;if(s!=="undefined"&&h!==null){var n=b.length===0?this._operator.first:this._operator.sep;if(s==="string")this._operator.named&&(n+=i(g,"U+R"),n+=h.length===0?this._operator.ifemp:"="),e.prefix!==-1&&e.prefix<h.length&&(h=h.substring(0,e.prefix)),n+=i(h,this._operator.allow);else if(Array.isArray(h))e.explode?n+=f(h,this._operator.allow,this._operator.sep):(this._operator.named&&(n+=i(g,"U+R"),n+=h.length===0?this._operator.ifemp:
"="),n+=f(h,this._operator.allow,","));else if(s==="object")e.explode?n+=d(h,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(n+=i(g,"U+R"),n+=Object.keys(h).length===0?this._operator.ifemp:"="),n+=d(h,this._operator.allow,",",","));else throw Error("bad param type: "+g+" : "+s);b.push(n)}}return b.join("")}};g.prototype={expand:function(a){for(var b=[],c=0;c<this._templateComponents.length;c++)b.push(this._templateComponents[c].expand(a));return b.join("")}};return g});
define("orion/i18nUtil",["require","orion/Deferred"],function(h,i){function f(e){if(e=localStorage.getItem("orion/messageBundle/"+e))if(e=JSON.parse(e),e._expires&&e._expires>(new Date).getTime())return delete e._expires,e;return null}var d={};return{getMessageBundle:function(e){function g(){h(["i18n!"+e],function(a){if(a){var b=e;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}c.resolve(a)})}if(d[e])return d[e];var c=new i;d[e]=
c;var b=f(e);if(b)return c.resolve(b),c;try{h([e],g)}catch(a){h(["orion/i18n!"+e],g)}return c},formatMessage:function(e){var d=arguments;return e.replace(/\$\{([^\}]+)\}/g,function(c,b){return d[(b<<0)+1]})}}});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(h,i,f,d,e){function g(){return(new URL(h.toUrl("orion/../"),window.location.href)).href.slice(0,-1)}function c(b,a){var c=b.getServiceReferences(a||"orion.page.link"),k=f.matchResourceParameters(window.location.href),l={OrionHome:g(),Location:k.resource},m=[];c.forEach(function(a){var b={};a.getPropertyKeys().forEach(function(c){b[c]=a.getProperty(c)});if(b.uriTemplate&&
b.nls&&(b.name||b.nameKey)){var c=new i;e.getMessageBundle(b.nls).then(function(a){var e=new d(b.uriTemplate),e=window.decodeURIComponent(e.expand(l)),e=f.validateURLScheme(e);b.href=e;b.textContent=b.nameKey?a[b.nameKey]:b.name;c.resolve(b)});m.push(c)}else if(b.uriTemplate&&b.name){var j=new d(b.uriTemplate),j=window.decodeURIComponent(j.expand(l)),j=f.validateURLScheme(j);b.href=j;b.textContent=b.name;m.push((new i).resolve(b))}});return i.all(m)}return{createPageLinks:function(b,a){return c(b,
a).then(function(a){a.sort(function(a,b){var c=a.textContent&&a.textContent.toLowerCase(),e=b.textContent&&b.textContent.toLowerCase();return c<e?-1:c>e?1:0});return a.map(function(a){var b=a.href,a=a.textContent,c=document.createElement("a");c.href=b;c.target="_self";c.classList.add("targetSelector");c.textContent=a;return c})})},getPageLinksInfo:c,getOrionHome:g}});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim,orion/PageLinks".split(","),function(h,i,f,d,e,g,c,b,a){var j={},k=a.getOrionHome();j._cloneItemWithoutChildren=function o(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=o(a[c]));return b};j._getOpenWithNavCommandExtensions=function(a){function b(a,c){for(var e=a.getServiceReferences("orion.navigate.openWith"),
d=[],j=0;j<e.length;j++){var g=e[j];g.getProperty("editor")===c.id&&(g=g.getProperty("contentType"),g instanceof Array?d=d.concat(g):g!==null&&typeof g!=="undefined"&&d.push(g))}return d}for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],e=0;e<b.length;e++){var d=b[e],j=d.getProperty("id");c.push({id:j,name:d.getProperty("name"),nameKey:d.getProperty("nameKey"),nls:d.getProperty("nls"),uriTemplate:d.getProperty("orionTemplate")||d.getProperty("uriTemplate")})}return c}(),
e=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),d=[],j=0;j<c.length;j++){var g=c[j],k=e&&e.editor===g.id,l=b(a,g);l.length&&d.push({properties:{name:g.name||g.id,nameKey:g.nameKey,id:"eclipse.openWithCommand."+g.id,tooltip:g.name,tooltipKey:g.nameKey,contentType:l,uriTemplate:g.uriTemplate,nls:g.nls,forceSingleItem:!0,isEditor:k?"default":"editor"},service:{}})}return d};j._makeValidator=function(a,
b,c,d){function j(a,b,c,e){var d=c.match,g;if(b.indexOf("|")>=0)return g=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),j(a,g,c,e)?!0:j(a,b,c,e);else if(b.indexOf(":")>=0)return g=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[g]?j(a[g],b,c,e):!1;else{a:{g=!1;var k;if(typeof a[b]!=="undefined"){if(typeof d==="undefined")k=a[b],g=!0;else if(typeof d==="string"){if(!typeof(a[b]==="string")){c=!1;break a}if(c.variableName){if(d=RegExp(d).exec(a[b]))g=d[0],k=c.variableMatchPosition===
"before"?a[b].substring(0,d.index):c.variableMatchPosition==="after"?a[b].substring(d.index+g.length):c.variableMatchPosition==="only"?g:a[b],g=!0}else{c=RegExp(d).test(a[b]);break a}}else a[b]===d&&(k=a[b],g=!0);if(g&&c.variableName&&(e[c.variableName]=k,e.itemCached=a,c.replacements))for(a=0;a<c.replacements.length;a++)b=!1,c.replacements[a].pattern?e[c.variableName]=e[c.variableName].replace(RegExp(c.replacements[a].pattern),c.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+
c.replacements[a]);c=g}else c=!1}return c}}return{info:a,validationFunction:function(b){typeof d==="function"&&(b=d.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 g=0;g<b.length;g++){var k;a:{var l=b[g],f=c;if(this.info.validationProperties)for(k=0;k<this.info.validationProperties.length;k++){var h=this.info.validationProperties[k];if(typeof h.source!=="undefined"){if(!j(l,h.source,h,this)){k=
!1;break a}}else{window.console.log("Invalid validationProperties in "+a.id+".  No source property specified.");k=!1;break a}}if(this.info.contentType&&f){h=!1;if(l=e.getFilenameContentType(l.Name,f))for(k=0;k<this.info.contentType.length;k++)if(l.id===this.info.contentType[k]){h=!0;break}k=h}else k=!0}if(!k)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);if(this.info.validationProperties)for(c=
0;c<this.info.validationProperties.length;c++){var e=this.info.validationProperties[c];e.source&&e.variableName&&(this.itemCached===a&&this[e.variableName]||j(a,e.source,e,this),a[e.variableName]?window.console.log("Variable name "+e.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[e.variableName]=this[e.variableName])}b.OrionHome=k;a=new g(this.info.uriTemplate);return window.decodeURIComponent(a.expand(b))}return null}}};j._createCommandOptions=
function(a,b,e,d,g,k){function l(c,f){var h=j._makeValidator(a,e,d,k);c.visibleWhen=h.validationFunction.bind(h);if(g)if(h.generatesURI.bind(h)())c.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return h.getURI.bind(h)(a)};else{var i=a;c.callback=function(a){var d;if(i.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,d=j._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){d=[];for(var g=0;g<a.items.length;g++)d.push(j._cloneItemWithoutChildren(a.items[g]))}else d=
j._cloneItemWithoutChildren(a.items);if(e)var k=e.getService("orion.page.progress");b.run?k?k.progress(b.run(d),"Running command: "+c.name):b.run(d):e&&(k?k.progress(e.getService(b).run(d),"Running command: "+c.name):e.getService(b).run(d))}}f.resolve(c)}var f=new i;a.nls?c.getMessageBundle(a.nls).then(function(b){l({name:a.nameKey?b[a.nameKey]:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltipKey?b[a.tooltipKey]:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},f)}):l({name:a.name,image:a.image,
id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},f);return f};j.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var e=a._commandList[c];e.isEditor&&b.push(e)}return b};var l;j.createAndPlaceFileCommandsExtension=function(a,b,c,e,d,g){var k=!!g;return j.createFileCommands(a,null,g?"all":void 0,k).then(function(a){b._addedOpenWithCommands=k;var j=!1,g=!1;a.forEach(function(a){b.addCommand(a);d&&!j&&(j=!0,b.addCommandGroup(c,"eclipse.fileCommandExtensions",
1E3,null,d));d&&!g&&(g=!0,b.addCommandGroup(c,"eclipse.openWith",1E3,"Open With",d+"/eclipse.fileCommandExtensions"));this.isEditor?b.registerCommandContribution(c,a.id,e+this.index,d?d+"/eclipse.fileCommandExtensions/eclipse.openWith":null):b.registerCommandContribution(c,a.id,e+this.index,d?d+"/eclipse.fileCommandExtensions":null)});return{}})};j.createFileCommands=function(a,b,c,e){var c=c===void 0?"global":c,e=e===void 0?!0:e,d=a.getServiceReferences("orion.navigate.command"),g=[];if(c==="all"||
c==="global")for(var k=0;k<d.length;k++)if(d[k].getProperty("id")!=="orion.navigateFromMetadata"){for(var h=a.getService(d[k]),r={},w=d[k].getPropertyKeys(),v=0;v<w.length;v++)r[w[v]]=d[k].getProperty(w[v]);(c==="all"||r.forceSingleItem&&r.showGlobally)&&g.push({properties:r,service:h})}return i.when(function(){var c=a.getService("orion.core.contenttypes")||b;return l||i.when(c.getContentTypes(),function(a){return l=a})}(),function(){g=e?g.concat(j._getOpenWithNavCommandExtensions(a,l)):g;var b=g.map(function(b){var c=
b.properties;return j._createCommandOptions(c,b.service,a,l,!0).then(function(a){a=new f.Command(a);if(c.isEditor)a.isEditor=c.isEditor;return a})});return i.all(b,function(a){return{_error:a}}).then(function(a){return a})})};j.createOpenWithCommands=function(a,b,c){return c&&c._addedOpenWithCommands?(new i).resolve(j.getOpenWithCommands(c)):j.createFileCommands(a,b,"none",!0)};return j});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(h,i){function f(d){this._init(d)}f.prototype={_init:function(d){var e=i.node(d.container);if(!e)throw"no parent container";this._container=e;e.classList.remove("currentLocation");this._id=d.id||"eclipse.breadcrumbs";this._resource=d.resource||null;this._rootSegmentName=d.rootSegmentName;this._workspaceRootSegmentName=d.workspaceRootSegmentName;this._workspaceRootURL=d.workspaceRootURL;this._makeHref=d.makeHref;this.path="";this.measure();
this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var d;if(this._resource&&this._resource.Parents){d=document.createElement("a");var e=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(d,e):d.href=h.toUrl("navigate/table.html")+"#"+e}else d=document.createElement("span");i.empty(d);d.appendChild(document.createTextNode(this._workspaceRootSegmentName));return d}return null},MAX_LENGTH:500,INCLUDE_FIRST_SECTION:!0,segments:[],
buildSegment:function(d){var e=document.createElement("a");e.classList.add("breadcrumb");e.appendChild(document.createTextNode(d));return e},addSegmentHref:function(d,e){this._makeHref?this._makeHref(d,e.Location,e):d.href=h.toUrl("navigate/table.html")+"#"+e.ChildrenLocation},buildSegments:function(d,e){if(this._resource.Parents){var g=this._resource.Parents.slice(0),c,b;g&&(g=g.slice(0),e==="reverse"&&(g=g.reverse().slice(0)),g.forEach(function(a){d?(b=d,d=null):b=a.Name;c=this.buildSegment(b);
this.path+=a.Name;this.addSegmentHref(c,a);c.include=!1;this.segments.push(c)}.bind(this)))}},addDivider:function(){var d=document.createElement("span");d.appendChild(document.createTextNode(" / "));this.path+="/";d.classList.add("breadcrumbSeparator");this.append(d)},refresh:function(){(this.crumbs=i.node(this._id))?i.empty(this.crumbs):(this.crumbs=document.createElement("span"),this.crumbs.id=this._id,this._container.appendChild(this.crumbs),this.dirty=document.createElement("span"),this.dirty.id=
"dirty",this.dirty.className="modifiedFileMarker",this._container.appendChild(this.dirty));this.crumbs.style.width="auto";this.crumbs.style.visibility="visible";this.crumbs.parentNode.className="currentLocation";this.crumbs.parentNode.style.width="auto"},append:function(d){this.crumbs.appendChild(d)},addTitle:function(d,e){var g=e||document.title;this.crumbs.childNodes.length===0&&(d=document.createElement("span"),d.appendChild(document.createTextNode(g)),d.classList.add("breadcrumb"),d.classList.add("currentLocation"),
this.append(d))},finalSegment:function(d,e){d=document.createElement("span");e?d.appendChild(document.createTextNode(e)):d.appendChild(document.createTextNode(this._resource.Name));d.classList.add("currentLocation");this.path+=this._resource.Name;this.append(d)},firstSegment:function(d){if(d)this.append(d),this._resource&&this._resource.Parents?(d.classList.add("breadcrumb"),this.addDivider()):(d.href="",d.classList.add("currentLocation"))},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(d){d.include===
!0&&(this.append(d),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var d=this.segments.slice(0).reverse();d.forEach(function(e){this.append(e);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?e.include=!0:this.INCLUDE_FIRST_SECTION=!1}.bind(this));this.segments=d.reverse()}},measure:function(){this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var d=this.getNavigatorWorkspaceRootSegment(),e=this._rootSegmentName;
if(e)this.addTitle(d,e);else if(this.finalSegment(d,e),this._resource&&this._resource.Parents&&(this.buildSegments(e,"reverse"),this.measureSegments(),this.firstSegment(d)),this.crumbs.offsetWidth>=this.MAX_LENGTH)this.INCLUDE_FIRST_SECTION=!1},render:function(){this.refresh();var d=this.getNavigatorWorkspaceRootSegment(),e=this._rootSegmentName;e?this.addTitle(d,e):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(d),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(d,
e)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};f.prototype.constructor=f;return{BreadCrumbs:f}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(h,i){function f(d){this._init(d)}f.prototype={_init:function(d){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=i.node(d.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(d.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.node(d.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=d.vertical;
this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(d.toggle)this._thumb=document.createElement("div"),this.$node.appendChild(this._thumb),this._thumb.classList.add("splitThumb"),this._thumb.classList.add("splitThumbLayout");this._closeByDefault=d.closeByDefault;this._initializeFromStoredSettings();this._closed?(this._closed=!1,this._thumbDown()):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)},toggleSidePanel:function(){this._thumbDown()},openSidePanel:function(){this._closed||this._thumbDown()},addResizeListener:function(d){this._resizeListeners.push(d)},_initializeFromStoredSettings:function(){var d=localStorage.getItem(this._prefix+"/toggleState");this._closed=d?d==="closed":this._closeByDefault?
!0:!1;if(this._vertical)if(d=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=parseInt(d,10);else{if(this._closeByDefault)this._splitTop=150}else if(d=localStorage.getItem(this._prefix+"/xPosition"))this._splitLeft=parseInt(d,10);else if(this._closeByDefault)this._splitLeft=150},_adjustToSplitPosition:function(d){var e=i.bounds(this.$node),g=i.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=e.height;if(d||!this._splitTop)this._splitTop=e.top,localStorage.setItem(this._prefix+
"/yPosition",this._splitTop);d=this._splitTop;this.$node.parentNode.style.position==="relative"&&(d=this._splitTop-g.top);this.$sideNode.style.height=d+"px";this.$sideNode.style.bottom=d-1+"px";this.$sideNode.style.display="block";this.$node.style.top=d+"px"}else{this._splitWidth=e.width;if(d||!this._splitLeft)this._splitLeft=e.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);d=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(d=this._splitLeft-g.left);this.$sideNode.style.width=
d+"px";this.$sideNode.style.right=d-1+"px";this.$sideNode.style.display="block";this.$node.style.left=d+"px"}this._resize()},_resize:function(d){var d=d||0,e=i.bounds(this.$node.parentNode),g=i.bounds(this.$node);this._vertical?this.$mainNode.style.height=e.height-(g.top-e.top+g.height)+"px":this.$mainNode.style.width=e.width-(g.left-e.left+g.width)+"px";var c=this;window.setTimeout(function(){c._notifyResizeListeners(c.$mainNode)},d);window.setTimeout(function(){c._notifyResizeListeners(c.$sideNode)},
d)},_notifyResizeListeners:function(d){for(var e=0;e<this._resizeListeners.length;e++)this._resizeListeners[e](d)},_thumbDown:function(){this._closed?(this._closed=!1,this._addAnimation(),this._vertical?(this.$sideNode.style.height=this._splitTop+"px",this.$node.style.top=this._splitTop+"px"):(this.$sideNode.style.width=this._splitLeft+"px",this.$node.style.left=this._splitLeft+"px")):(this._closed=!0,this._addAnimation(),this._vertical?(this.$sideNode.style.top=0,this.$node.style.top="1px"):(this.$sideNode.style.width=
0,this.$node.style.left="1px"));this._resize(this._animationDelay);this._removeAnimation();localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null)},_removeAnimation:function(){var d=this;window.setTimeout(function(){d.$sideNode.classList.remove("sidePanelLayoutAnimation");d.$mainNode.classList.remove("mainPanelLayoutAnimation");d.$node.classList.remove("splitLayoutAnimation");d._thumb.classList.remove("splitLayoutAnimation")},this._animationDelay)},_addAnimation:function(){this.$sideNode.classList.add("sidePanelLayoutAnimation");
this.$mainNode.classList.add("mainPanelLayoutAnimation");this.$node.classList.add("splitLayoutAnimation");this._thumb&&this._thumb.classList.add("splitLayoutAnimation")},_mouseDown:function(d){if(d.target===this._thumb)return i.stop(d),this._thumbDown(d);if(!this._tracking)this.$node.classList.add("splitTracking"),this.$mainNode.classList.add("panelTracking"),this.$sideNode.classList.add("panelTracking"),this._tracking=this._mouseMove.bind(this),window.addEventListener("mousemove",this._tracking),
i.stop(d)},_mouseMove:function(d){if(this._tracking){var e=i.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=d.clientY;if(this._splitTop<e.top+5)this._splitTop=e.top+5;else if(this._splitTop>e.top+e.height-5)this._splitTop=e.top+e.height-5;var g=this._splitTop;this.$node.parentNode.style.position==="relative"&&(g=this._splitTop-e.top);this.$node.style.top=g+"px"}else{this._splitLeft=d.clientX;if(this._splitLeft<e.left+5)this._splitLeft=e.left+5;else if(this._splitLeft>e.left+e.width-
5)this._splitLeft=e.left+e.width-5;g=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(g=this._splitLeft-e.left);this.$node.style.left=g+"px"}this._adjustToSplitPosition(!0);i.stop(d)}},_mouseUp:function(d){if(this._tracking)window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),i.stop(d)}};f.prototype.constructor=f;return{Splitter:f}});
define("orion/fileUtils",["require","i18n!orion/nls/messages","orion/URL-shim"],function(h){return{makeRelative:function(h){if(!h)return h;var f=window.location.protocol+"//"+window.location.host;return h.indexOf(f)===0?h.substring(f.length):h},isAtRoot:function(i){if(!i)return!1;if(i==="/workspace")return!0;var f=new URL(h.toUrl("workspace"),window.location.href);return(new URL(i,window.location.href)).href.indexOf(f.href)===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(h,i,f){function d(e){this._favorites=[];f.attach(this);this._init(e);this._initializeFavorites()}d.prototype={_init:function(e){this._registry=e.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(e){for(var e=Array.isArray(e)?
e:[e],d=0;d<e.length;d++){var c=e[d],b=c.ChildrenLocation?c.ChildrenLocation:c.Location,b=i.makeRelative(b);this.addFavorite(c.Name,b,c.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(e){this.addFavorite(e,e,!1,!0)},addFavorite:function(e,d,c){this._favorites.push({name:e,path:d,directory:c,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(e){for(var d in this._favorites)if(this._favorites[d].path===
e){this._favorites.splice(d,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(e,d){var c=!1,b;for(b in this._favorites)if(this._favorites[b].path===e){var a=this._favorites[b];if(a.name!==d)a.name=d,c=!0}c&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(e){for(var d in this._favorites)if(this._favorites[d].path===e)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(e){var d;
if(!e)return this._favorites;var c="";for(d=0;d<e.length;d++){var b=e.charAt(d);c+=b==="*"?".*":b==="?"?".?":this._SPECIAL_CHARS.indexOf(b)>=0?"\\"+b:b}c+=".*";e=RegExp(c);c=[];for(d in this._favorites)this._favorites[d].name.search(e)===0&&c.push(this._favorites[d]);return c},_initializeFavorites:function(){var e=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var c,d=d.get("navigate");typeof d==="string"&&(d=JSON.parse(d));if(d)for(c in d)d[c].isFavorite=
!0,e._favorites.push(d[c]);e._favorites.sort(e._sorter);e._notifyListeners()})},_storeFavorites:function(){var d=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(g){g.put("navigate",d)})},_sorter:function(d,g){var c=d.name.toLowerCase(),b=g.name.toLowerCase();return c>b?1:c<b?-1:0},getFavorites:function(){return{navigator:this._favorites}}};d.prototype.constructor=d;return{FavoritesService:d}});
define("orion/widgets/themes/ThemePreferences",[],function(){function h(h,f){this._preferences=h;this._themeData=f;var d=f.getThemeStorageInfo(),e=h.listenForChangedSettings(d.storage,2,function(d){d.key===e&&this.apply()}.bind(this))}h.prototype={_initialize:function(h,f,d){var e=d.get(h.styleset);e||(e=f.getStyles(),d.put(h.styleset,JSON.stringify(e)));(f=d.get("selected"))&&(f=JSON.parse(f));if(!f||f[h.selectedKey]===void 0)f=f||{},f[h.selectedKey]=h.defaultTheme,d.put("selected",JSON.stringify(f))},
apply:function(){this.setTheme()},getTheme:function(h){var f=this._themeData,d=f.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(e){this._initialize(d,f,e);var g=JSON.parse(e.get("selected")),e=JSON.parse(e.get(d.styleset)),c;if(e)for(var b=0;b<e.length;b++)if(e[b].name===g[d.selectedKey]){c=e[b];break}h({style:c,styles:e})}.bind(this))},setTheme:function(h,f){var d=this._themeData,e=d.getThemeStorageInfo();this._preferences.getPreferences(e.storage,2).then(function(g){this._initialize(e,
d,g);var c=JSON.parse(g.get("selected"));h||(h=c[e.selectedKey]);c[e.selectedKey]=h;g.put("selected",JSON.stringify(c));f?g.put(e.styleset,JSON.stringify(f)):f=JSON.parse(g.get(e.styleset));for(g=0;g<f.length;g++)if(f[g].name===c[e.selectedKey]){d.processSettings(f[g]);break}}.bind(this))},setFontSize:function(h){var f=this._themeData,d=f.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(e){this._initialize(d,f,e);var g=JSON.parse(e.get("selected")),c=JSON.parse(e.get(d.styleset)),
b;if(c)for(var a=0;a<c.length;a++)c[a].fontSize=h,c[a].name===g[d.selectedKey]&&(b=c[a]);e.put(d.styleset,JSON.stringify(c));f.processSettings(b)}.bind(this))}};return{ThemePreferences:h}});
define("orion/editor/eventTarget",[],function(){function h(){}h.addMixin=function(i){var f=h.prototype,d;for(d in f)f.hasOwnProperty(d)&&(i[d]=f[d])};h.prototype={addEventListener:function(h,f,d){if(!this._eventTypes)this._eventTypes={};var e=this._eventTypes[h];e||(e=this._eventTypes[h]={level:0,listeners:[]});e.listeners.push({listener:f,useCapture:d})},dispatchEvent:function(h){var f=h.type;this._dispatchEvent("pre"+f,h);this._dispatchEvent(f,h);this._dispatchEvent("post"+f,h)},_dispatchEvent:function(h,
f){var d=this._eventTypes?this._eventTypes[h]:null;if(d){var e=d.listeners;try{if(d.level++,e)for(var g=0,c=e.length;g<c;g++)if(e[g]){var b=e[g].listener;typeof b==="function"?b.call(this,f):b.handleEvent&&typeof b.handleEvent==="function"&&b.handleEvent(f)}}finally{if(d.level--,d.compact&&d.level===0){for(g=e.length-1;g>=0;g--)e[g]||e.splice(g,1);e.length===0&&delete this._eventTypes[h];d.compact=!1}}}},isListening:function(h){return!this._eventTypes?!1:this._eventTypes[h]!==void 0},removeEventListener:function(h,
f,d){if(this._eventTypes){var e=this._eventTypes[h];if(e){for(var g=e.listeners,c=0,b=g.length;c<b;c++){var a=g[c];if(a&&a.listener===f&&a.useCapture===d){e.level!==0?(g[c]=null,e.compact=!0):g.splice(c,1);break}}g.length===0&&delete this._eventTypes[h]}}}};return{EventTarget:h}});
define("orion/editor/textTheme",["require","orion/editor/eventTarget","orion/util"],function(h,i,f){function d(d){d=d||{};this._document=d.document||document}var e={};d.getTheme=function(g){var g=g||"default",c=e[g];c||(c=e[g]=new d);return c};d.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(d,c){var b=this,a=b._themeClass;b._themeClass=d;this._load(d,c,function(){b.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:b.getThemeClass()})})},onThemeChanged:function(d){return this.dispatchEvent(d)},
buildStyleSheet:function(d,c){function b(b,c,e){c&&(a.push("."+d+" ."+b+" {"),a.push("\t"+(e?"background-color":"color")+": "+c+";"),a.push("}"))}var a=[];a.push("");a.push("."+d+" {");c.fontFamily&&a.push("\tfont-family: "+c.fontFamily+";");c.fontSize&&a.push("\tfont-size: "+c.fontSize+";");c.fontSize&&a.push("\tcolor: "+c.text+";");a.push("}");a.push("."+d+".textview {");c.background&&a.push("\tbackground-color: "+c.background+";");a.push("}");b("ruler.annotations",c.annotationRuler,!0);b("ruler.lines",
c.annotationRuler,!0);b("ruler.folding",c.annotationRuler,!0);b("ruler.overview",c.overviewRuler,!0);b("rulerLines",c.lineNumber,!1);b("rulerLines.even",c.lineNumberEven,!1);b("rulerLines.odd",c.lineNumberOdd,!1);b("annotationLine.currentLine",c.currentLine,!0);b("entity-name-tag",c.keyword,!1);b("entity-other-attribute-name",c.attribute,!1);b("string-quoted",c.string,!1);b("line_caret",c.currentLine,!0);b("token_keyword",c.keyword,!1);b("token_string",c.string,!1);b("token_singleline_comment",c.comment,
!1);b("token_multiline_comment",c.comment,!1);b("token_doc_comment",c.comment,!1);b("token_doc_html_markup",c.comment,!1);return a.join("\n")},_createStyle:function(d,c,b,a){var e=this._document,d="orion-theme-"+d,k=e.getElementById(d);if(k){if(a||k.firstChild.data===c)return;k.removeChild(k.firstChild);k.appendChild(e.createTextNode(c))}else a?(k=f.createElement(e,"link"),k.rel="stylesheet",k.type="text/css",k.href=c,k.addEventListener("load",function(){b()})):(k=f.createElement(e,"style"),k.appendChild(e.createTextNode(c))),
k.id=d,(e.getElementsByTagName("head")[0]||e.documentElement).appendChild(k);a||b()},_load:function(d,c,b){if(d)if(typeof c==="string")this._createStyle(d,c,b);else if(c=c.href,c.substring(c.length-4)!==".css"&&(c+=".css"),/^\//.test(c)||/[a-zA-Z0-9]+:\/\//i.test(c)||!h.toUrl)this._createStyle(d,c,b,!0);else{var a=this;h(["text!"+c],function(c){a._createStyle(d,c,b,!1)})}else b()}};i.EventTarget.addMixin(d.prototype);return{TextTheme:d}});
define("orion/widgets/themes/ThemeClass",[],function(){function h(h){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=h;this.classString="."+h+"{ "}h.prototype.className=null;h.prototype.classString=void 0;h.prototype.style=void 0;h.prototype.closeString=" }\n";h.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:h}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(h){function i(){}i.prototype.navbar="#333";i.prototype.button="#777777";i.prototype.location="#EFEFEF";i.prototype.selection="FEC";i.prototype.sidepanel="#FBFBFB";i.prototype.mainpanel="white";i.prototype.navtext="#bfbfbf";i.prototype.content="#3087B3";i.prototype.search="#444";i.prototype.toolpanel="white";i.prototype.writeNavigationStyle=function(){var f="",d=[],e=new h.ThemeClass("orionPage");
e.style.backgroundColor="#fdfdfd";e.style.width="100%";e.style.height="100%";d.push(e);e=new h.ThemeClass("topRowBanner");e.style.margin="0";e.style.border="0";e.style.backgroundColor=this.navbar;e.style.height="15px";e.style.padding="10px";e.style.paddingRight="3px";d.push(e);e=new h.ThemeClass("a");e.style.textDecoration="none";e.style.color=this.content;d.push(e);e=new h.ThemeClass("navlink");e.style.display="inline-block";e.style.padding="2px";e.style.color=this.content;d.push(e);e=new h.ThemeClass("primaryNav");
e.style.color=this.navtext;e.style.fontSize="8pt";e.style.fontWeight="normal";e.style.paddingTop="0";e.style.verticalAlign="baseline";d.push(e);e=new h.ThemeClass("primaryNav a");e.style.fontSize="8pt";e.style.color=this.navtext;e.style.marginRight="6px";e.style.marginLeft="6px";e.style.verticalAlign="baseline";e.style.textDecoration="none";d.push(e);e=new h.ThemeClass("primaryNav a:hover");e.style.color="#bfbfbf";e.style.cursor="hand";e.style.color="white";e.style.fontWeight="normal";d.push(e);for(var g in d)f+=
d[g].toString();return f};i.prototype.writeLocationStyle=function(){var f="",d=[],e=new h.ThemeClass("titleArea");e.style.margin="0";e.style.paddingTop="5px";e.style.border="0";e.style.background=this.location;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+"), color-stop(100%,"+this.location+"))";e.style.borderBottom="1px solid "+this.location;e.style.minHeight="20px";d.push(e);e=new h.ThemeClass("breadcrumb");e.style.fontSize="8pt";e.style.textDecoration=
"none";e.style.color="#f1f1f2;";e.style.paddingTop="2px";d.push(e);e=new h.ThemeClass("a.breadcrumb:hover");e.style.textDecoration="none";e.style.borderBottom="1px dotted";e.style.color="#F58B0F";e.style.cursor="pointer";d.push(e);e=new h.ThemeClass("breadcrumbSeparator");e.style.fontSize="8pt";e.style.textDecoration="none";e.style.color="#f1f1f2";e.style.fontWeight="bold";d.push(e);e=new h.ThemeClass("currentLocation");e.style.fontWeight="bold";e.style.fontSize="8pt";e.style.color="#f1f1f2";e.style.textDecoration=
"none";e.style.textWrap="normal";e.style.lineHeight="10pt";d.push(e);e=new h.ThemeClass("a.currentLocation:hover");e.style.fontWeight="bold";e.style.fontSize="10pt";e.style.color="#666666";e.style.textDecoration="none";e.style.borderBottom="0";d.push(e);e=new h.ThemeClass("navlinkonpage");e.style.color=this.content;d.push(e);e=new h.ThemeClass("progressPane_running");e.style.background="url(../images/progress_running_dark.gif) no-repeat center";e.style.width="16px";e.style.height="16px";d.push(e);
for(var g in d)f+=d[g].toString();return f};i.prototype.writeButtonStyle=function(){var f="",d=[],e=new h.ThemeClass("commandButton");e.style.color="#666";e.style.border="1px solid #dedede";e.style.backgroundColor="#ddd";e.style.textAlign="center";e.style.verticalAlign="baseline";e.style.cursor="pointer";e.style.display="inline-block";e.style.padding="5px 6px";e.style.borderRadius="3px";e.style.lineHeight="12px";e.style.fontSize="8pt";e.style.userSelect="none";d.push(e);e=new h.ThemeClass("commandButton:over");
e.style.backgroundColor="#e6e6e6";e.style.border="1px solid #808080";d.push(e);e=new h.ThemeClass("commandMenu");e.style.color="#222";e.style.display="inline-block";e.style.verticalAlign="baseline";e.style.margin="0";e.style.fontSize="8pt";e.style.fontWeight="normal";e.style.border="1px solid #dedede";e.style.backgroundColor="#efefef";e.style.cursor="pointer";e.style.borderRadius="1px";d.push(e);e=new h.ThemeClass("commandMenuItem");e.style.border="0";e.style.padding="0";e.style.margin="0";d.push(e);
for(var g in d)f+=d[g].toString();return f};i.prototype.writeMainStyle=function(){var f="",d=[],e=new h.ThemeClass("searchbox");e.style.backgroundImage="url(../images/core_sprites.png)";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="4px -297px";e.style.width="12px";e.style.height="12px";e.style.backgroundColor=this.search;e.style.border="1px solid "+this.search;e.style.fontSize="11px";e.style.width="15em";e.style.height="16px";e.style.borderRadius="10px";e.style.color="#999";e.style.padding=
"0";e.style.paddingLeft="20px";e.style.marginLeft="5px";e.style.marginTop="6px !important";e.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";d.push(e);e=new h.ThemeClass("searchbox:focus");e.style.color="white";e.style.outline="none";d.push(e);e=new h.ThemeClass("checkedRow");e.style.cssText="background-color:"+this.selection+" !important;";d.push(e);e=new h.ThemeClass("navbar-item-selected");e.style.background=this.selection;e.style.color=
this.content;d.push(e);e=new h.ThemeClass("auxpane");e.style.border="0";e.style.background=this.sidepanel;e.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";e.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";d.push(e);e=new h.ThemeClass("mainpane");e.style.background=this.mainpanel;e.style.border=0;d.push(e);e=new h.ThemeClass("mainToolbar");e.style.background=this.toolpanel;
e.style.height="34px";e.style.borderBottom="1px solid #ebebeb";e.style.paddingTop="2px";d.push(e);for(var g in d)f+=d[g].toString();return f};i.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};i.prototype.getSheet=function(f){f.navbar.value?(this.navbar=f.navbar.value,this.button=f.button.value,this.location=f.location.value,this.selection=f.selection.value,this.sidepanel=
f.sidepanel.value,this.mainpanel=f.mainpanel.value,this.navtext=f.navtext.value,this.search=f.search.value,this.content=f.content.value,this.toolpanel=f.toolpanel.value):(this.navbar=f.navbar,this.button=f.button,this.location=f.location,this.selection=f.selection,this.sidepanel=f.sidepanel,this.mainpanel=f.mainpanel,this.navtext=f.navtext,this.search=f.search,this.content=f.content,this.toolpanel=f.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};
return{ThemeSheetWriter:i}});
define("orion/widgets/themes/container/ThemeData",["orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(h,i){function f(){}function d(){this.styles=[];var d=new f;d.name="Orion";d.navbar="#333";d.button="#EFEFEF";d.location="#efefef";d.selection="FEC";d.sidepanel="#FBFBFB";d.mainpanel="white";d.toolpanel="white";d.navtext="#bfbfbf";d.content="#3087B3";d.search="#444";d.breadcrumb="#3087B3";d.separator="#333";this.styles.push(d);d=new f;d.name="Green Zone";d.navbar=
"seagreen";d.button="lavender";d.location="darkseagreen";d.selection="moccasin";d.sidepanel="aliceblue";d.mainpanel="white";d.toolpanel="white";d.navtext="#FBFBFB";d.content="darkgreen";d.search="darkgreen";d.breadcrumb="#3087B3";d.separator="seagreen";this.styles.push(d);d=new f;d.name="Pretty In Pink";d.navbar="plum";d.button="lavender";d.location="pink";d.selection="lavender";d.sidepanel="seashell";d.mainpanel="white";d.toolpanel="white";d.navtext="#FBFBFB";d.content="mediumorchid";d.search="violet";
d.breadcrumb="#3087B3";d.separator="plum";this.styles.push(d);d=new f;d.name="Blue Monday";d.navbar="cornflowerblue";d.button="lavender";d.location="skyblue";d.selection="lavender";d.sidepanel="aliceblue";d.mainpanel="white";d.toolpanel="white";d.navtext="#FBFBFB";d.content="royalblue";d.search="royalblue";d.breadcrumb="#3087B3";d.separator="cornflowerblue";this.styles.push(d);d=new f;d.name="Vanilla Skies";d.navbar="sandybrown";d.button="lemmonchiffon";d.location="cornsilk";d.selection="lemonchiffon";
d.sidepanel="white";d.mainpanel="white";d.toolpanel="white";d.navtext="lemonchiffon";d.content="chocolate";d.search="moccasin";d.breadcrumb="#3087B3";d.separator="sandybrown";this.styles.push(d);d=new f;d.name="Beetlejuice";d.navbar="indigo";d.button="slateblue";d.location="darkslateblue";d.selection="silver";d.sidepanel="lavender";d.mainpanel="white";d.toolpanel="white";d.navtext="#FBFBFB";d.content="mediumslateblue";d.search="#444";d.breadcrumb="#3087B3";d.separator="indigo";this.styles.push(d);
d=new f;d.name="Red";d.navbar="#CD2127";d.button="#777777";d.location="#D85F56";d.selection="lightcoral";d.sidepanel="#EFDAB2";d.mainpanel="#FDFADD";d.toolpanel="#FDFADD";d.navtext="#FBFBFB";d.content="darkred";d.search="#D85F56";d.breadcrumb="darkred";d.separator="#CD2127";this.styles.push(d)}function e(){return this.styles}f.prototype.name="Orion";f.prototype.navbar="#333";f.prototype.button="#EFEFEF";f.prototype.location="#333";f.prototype.breadcrumb="#3087B3";f.prototype.separator="#333";f.prototype.selection=
"FEC";f.prototype.sidepanel="#FBFBFB";f.prototype.mainpanel="white";f.prototype.toolpanel="white";f.prototype.navtext="#bfbfbf";f.prototype.content="#3087B3";f.prototype.search="#444";d.prototype.styles=[];d.prototype.getStyles=e;d.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion",selectedKey:"selected"}};d.prototype.getViewData=function(){for(var d={top:10,left:10,width:350,height:350,shapes:[{type:"RECTANGLE",name:"Navigation Bar",x:10,y:10,
width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:"Navigation Text",label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:"Search Box",x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:"Tool Panel",x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",name:"Selection Bar",x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},
{type:"RECTANGLE",name:"Location",x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:"Navigation Text",label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:"Content",label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:"Content",label:"/",x:78,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif",order:9},{type:"TEXT",name:"Content",label:"Location",
x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:"Main Panel",x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:"Button",x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:"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:"Section Text",label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:"Line Color",x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:"Line Color",x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:"Line Color",x1:20,y1:100,x2:140,y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:"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:"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"}]},c=0;c<3;c++)d.shapes.push({type:"TEXT",name:"content",label:"org.eclipse.orion.content",x:170,y:127+20*c,fill:"#3087B3",family:"content"});for(c=0;c<3;c++)d.shapes.push({type:"TEXT",name:"content",label:"Item",x:25,y:115+20*c,fill:"#3087B3",family:"content"});for(c=0;c<3;c++)d.shapes.push({type:"TRIANGLE",name:"twisty",x1:160,y1:121+c*20,x2:165,y2:124+c*20,x3:160,y3:127+c*20,family:"navbar",fill:"#333"});
d.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return d};d.prototype.processSettings=function(d){var c=new i.ThemeSheetWriter;(new h.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",c.getSheet(d))};return{ThemeData:d,getStyles:e}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <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","Populating favorites...":"Populating favorites...",Favorite:"Favorite","Searching...":"Searching...","Searching for occurrences of":'Searching for occurrences of: "${0}"',
name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","</a>":"</a>",">":">","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:",
"Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination","Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'."});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(h,i,f,d){function e(d){this._displaySignOut=!0;this._init(d)}e.prototype={_init:function(d){this._dropdownNode=f.node(d.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=d.dropdown;this._serviceRegistry=d.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices={};this._noSeparator=d.noSeparator;this._dropDownItemClass=
d.dropDownItemClass;this._keyAssistClass=d.keyAssistClass;if(d.signOut!==void 0)this._displaySignOut=d.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(d){var c=0,b;for(b in d)d.hasOwnProperty(b)&&c++;return c},_makeMenuItem:function(d,c){var b=document.createElement("span");b.role="menuitem";
b.tabIndex=0;var a=document.createTextNode(d);b.appendChild(a);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&b.classList.add(this._dropDownItemClass):b.classList.add("dropdownMenuItem");b.addEventListener("click",c,!1);b.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&c()},!1);return b},_renderAuthenticatedService:function(d){var c=this,b=this.authenticatedServices[d].authService;if(b&&b.logout&&this._displaySignOut){var a=document.createElement("li"),
e=this._makeMenuItem(h["Sign Out"],function(){b.logout().then(function(){c.addUserItem(d,b,c.authenticatedServices[d].label);localStorage.removeItem(d);localStorage.removeItem("lastLogin");for(var a=localStorage.length-1;a>=0;a--){var e=localStorage.key(a);e&&e.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(e)}b.getAuthForm(window.location.href).then(function(a){window.location=a})})});a.appendChild(e);this._dropdownNode.appendChild(a)}},renderServices:function(){function e(a){b[a]||
(b[a]=c.createDocumentFragment());return b[a]}var c=document,b=[];d.getPageLinksInfo(this._serviceRegistry,"orion.page.link.user").then(function(a){this._dropdown?this._dropdown.empty():this._dropdownNode&&f.empty(this._dropdownNode);a.forEach(function(a){var b=e(typeof a.category==="number"?a.category:1),d=c.createElement("li"),j=c.createElement("a");j.role="menuitem";typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&j.classList.add(this._dropDownItemClass):j.classList.add("dropdownMenuItem");
j.href=a.href;j.textContent=a.textContent;d.appendChild(j);b.appendChild(d)}.bind(this));if(this.keyAssistFunction){var a=document.createElement("li"),d=this._makeMenuItem(h["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass==="string"?this._keyAssistClass!==""&&d.classList.add(this._keyAssistClass):d.classList.add("key-assist-menuitem");a.appendChild(d);e(0).appendChild(a)}var k=this;b.sort(function(a,b){return a-b}).forEach(function(a,c){if(c<b.length-1&&!this._noSeparator){var d=
document.createElement("li");d.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");d.appendChild(e);a.appendChild(d)}k._dropdownNode.appendChild(a)}.bind(this));if(this.isSingleService())for(var l in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(l)&&this._renderAuthenticatedService(l,0)}.bind(this))},setKeyAssist:function(d){this.keyAssistFunction=d;this.renderServices()},addUserItem:function(d,c,b,a){a?(this.unauthenticatedServices[d]&&
delete this.unauthenticatedServices[d],this.authenticatedServices[d]={authService:c,label:b,data:a}):(this.authenticatedServices[d]&&delete this.authenticatedServices[d],this.unauthenticatedServices[d]=this.unauthenticatedServices[d]?{authService:c,label:b,pending:this.unauthenticatedServices[d].pending}:{authService:c,label:b});this.renderServices()}};e.prototype.constructor=e;return{UserMenu:e}});
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?"});
define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages","orion/crawler/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(h,i,f,d,e,g){function c(a,b,c){var d="";c&&(d="^");if(d=f.parse("/"+d+a.searchStr+"/"))c=d.pattern,d=d.flags,d.indexOf("i")===-1&&!b.caseSensitive&&(d+="i"),a.regExp={pattern:c,flags:d},a.wildCard=!0}var b={ALL_FILE_TYPE:"*.*"};b.doSearch=function(a,c,d,e){if(a){var g=!0;d==="*"&&(d="");d===""&&(g=e&&e.type!==b.ALL_FILE_TYPE);if(g){d!==""&&b.addRecentSearch(c,
d,e?e.regEx:!1);var a=a.createSearchParams(d,!1,!1,e),f=b.generateSearchHref(a);b.getOpenSearchPref(c,function(a){a?window.open(f):window.location=f})}}else window.alert(h["Can't search: no search service is available"])};b.generateSearchHelper=function(a,d){var e=a.keyword,g=e,f={};a.fileType&&a.fileType!==b.ALL_FILE_TYPE&&e===""&&(g="*."+a.fileType);if(a.regEx)f.searchStr=e,c(f,a,d);else{var h=e.indexOf("*")>-1,i=e.indexOf("?")>-1;h&&(e=e.split("*").join(".*"));i&&(e=e.split("?").join("."));!h&&
!i&&!a.nameSearch?(f.searchStr=a.caseSensitive?e.split("\\").join(""):e.split("\\").join("").toLowerCase(),f.wildCard=!1):(f.searchStr=a.caseSensitive?e:e.toLowerCase(),c(f,a,d),f.wildCard=!0)}f.searchStrLength=f.searchStr.length;return{params:a,inFileQuery:f,displayedSearchTerm:g}};b.convertSearchParams=function(a){if(a.rows!==void 0)a.rows=parseInt(a.rows,10);if(a.start!==void 0)a.start=parseInt(a.start,10);if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive===
"string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.nameSearch==="string")a.nameSearch=a.nameSearch.toLowerCase()==="true"};b.copySearchParams=function(a,b){var c={},d;for(d in a)if(a[d]!==void 0&&a[d]!==null&&(b||d!=="replace"))c[d]=a[d];return c};b.generateSearchHref=function(a){var c=i.toUrl("search/search.html"),a=b.copySearchParams(a,!0),d=a.resource;a.resource=void 0;return(new g(c+"#{,resource,params*}")).expand({resource:d,params:a})};b.generateFindURLBinding=function(a,
b,c,d){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof d==="string"?d:void 0,atLine:typeof c==="number"?c:void 0};return","+(new g("{,params*}")).expand({params:a})};b.convertFindURLBinding=function(a){if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive==="string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.atLine==="string")a.atLine=parseInt(a.atLine,10)};b.replaceRegEx=function(a,
b,c){return a.replace(RegExp(b.pattern,b.flags),c)};b.replaceStringLiteral=function(a,c,d){c=f.parse("/"+c+"/gim");return b.replaceRegEx(a,c,d)};b.searchOnelineLiteral=function(a,b,c){var d;d=0;for(var e=!1,g=[];;)if(d=b.indexOf(a.searchStr,d),d<0)break;else{g.push({startIndex:d,length:a.searchStrLength});e=!0;if(c)break;d+=a.searchStrLength}return e?g:null};b.findRegExp=function(a,b,c,d){if(!b)return null;c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var e=null;return(e=RegExp(b,
c).exec(a.substring(d)))&&{startIndex:e.index+d,length:e[0].length}};b.searchOnelineRegEx=function(a,c,d){for(var e=0,g=!1,f=[];;)if(e=b.findRegExp(c,a.regExp.pattern,a.regExp.flags,e)){f.push(e);g=!0;if(d)break;e=e.startIndex+e.length}else break;return g?f:null};b.generateNewContents=function(a,c,d,e,g,f){if(e&&c){if(!a)d.contents=[];for(var h=0;h<c.length;h++){for(var i=c[h],q=!1,p=!1,t=[],x,z=0,r=0;r<e.children.length;r++)if(e.children[r].lineNumber-1===h){z=r;for(q=0;q<e.children[r].matches.length;q++)e.children[r+
q].checked!==!1&&t.push(q);p=t.length>0;x=e.children[r].matches;q=!0;break}if(q){if(p){t=b.replaceCheckedMatches(i,g,x,t,f);i=t.replacedStr;for(q=0;q<e.children[z].matches.length;q++)e.children[z+q].newMatches=t.newMatches}else for(q=0;q<e.children[z].matches.length;q++)e.children[z+q].newMatches=e.children[z+q].matches;a?d.contents[h]=i:d.contents.push(i)}else a||d.contents.push(i)}}};b.generateMatchContext=function(a,b,c){var d=[],e=a*2+1,g;b.length<=e?(g=0,a=b.length-1):(g=c-a,g<0?(g=0,a=g+e-1):
(a=c+a,a>b.length-1&&(a=b.length-1,g=a-e+1)));for(e=g;e<=a;e++)d.push({context:b[e],current:e===c});return d};b.splitFile=function(a){for(var b=0,c=0,d=0,e=0,g=[];;){b!==-1&&b<=d&&(b=a.indexOf("\r",d));c!==-1&&c<=d&&(c=a.indexOf("\n",d));if(c===-1&&b===-1){g.push(a.substring(e));break}var f=1;b!==-1&&c!==-1?b+1===c?(f=2,d=c+1):d=(b<c?b:c)+1:d=b!==-1?b+1:c+1;g.push(a.substring(e,d-f));e=d}return g};b.searchWithinFile=function(a,c,d,e,g,f){d=b.splitFile(d);if(g)c.contents=d;if(c){c.children=[];for(var h=
e=0;h<d.length;h++){var i=d[h];if(i&&i.length>0){var q=f?i:i.toLowerCase();if(q=a.wildCard?b.searchOnelineRegEx(a,q):b.searchOnelineLiteral(a,q)){var p,t=h+1;if(g)for(var x=0;x<q.length;x++)p=x+1,p={parent:c,checked:c.checked,type:"detail",matches:q,lineNumber:t,matchNumber:p,name:i,location:c.location+"-"+t+"-"+p},c.children.push(p);else p={parent:c,context:b.generateMatchContext(2,d,h),checked:c.checked,type:"detail",matches:q,lineNumber:t,name:i,location:c.location+"-"+t},c.children.push(p);e+=
q.length}}}c.totalMatches=e}};b.replaceCheckedMatches=function(a,b,c,d,e){for(var g=0,f="",h=[],i=0;i<c.length;i++){g!==c[i].startIndex&&(f+=a.substring(g,c[i].startIndex));if(c[i].length)e=c[i].length;for(var g=!1,p=0;p<d.length;p++)if(d[p]===i){g=!0;break}g?(h.push({startIndex:f.length,length:b.length}),f+=b):(h.push({startIndex:f.length,length:e}),f+=a.substring(c[i].startIndex,c[i].startIndex+e));g=c[i].startIndex+e}g<a.length&&(f+=a.substring(g));return{replacedStr:f,newMatches:h}};b.fullPathNameByMeta=
function(a){var b=a.length,c="";if(b>0)for(b-=1;b>-1;b--)c=c+(c===""?"":"/")+a[b].Name;return c};b.path2FolderName=function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};b._storeRecentSearch=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b);c&&window.setTimeout(function(){c.dispatchEvent({type:"recentSearchesChanged"})}.bind(this),20)})};b.addRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var g,
e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e){for(g in e)if(e[g].name===c)return;e.length>=20&&e.splice(19,e.length-20+1)}else e=[];e.splice(0,0,{name:c,regEx:d});b._storeRecentSearch(a,e)})};b.removeRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var g,e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e)for(g in e)if(e[g].name===c){e.splice(g,1);b._storeRecentSearch(a,
e,d);break}})};b.getSearches=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&c&&c(a)})};b.getMixedSearches=function(a,c,d,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var g=a.get("recentSearch");typeof g==="string"&&(g=JSON.parse(g));c&&(a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(d){var c=b.parseQueryStr(a.query);
g.some(function(a){return c.searchStrTitle===a.name})||g.push({name:c.searchStrTitle,label:a.name})}else g.push({name:null,label:a.name,value:a.query})}));g&&e&&e(g)})};b.getOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");b(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?!0:!1:!1)})};b.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",
{openInNewTab:b})})};return b});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(h,i,f,d,e,g){function c(b,a,c,e){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=e&&e.searchOnName;this._buildSkeletonOnly=e&&e.buildSkeletonOnly;this._fetchChildrenCallBack=e&&e.fetchChildrenCallBack;this._searchParams=c;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:d.generateSearchHelper(c);this._location=e&&e.location;this._childrenLocation=e&&e.childrenLocation?e.childrenLocation:this._location}c.prototype.search=function(b){var a=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=b;a.getContentTypes().then(function(a){this.contentTypesCache=a;this._visitRecursively(this._childrenLocation).then(function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,
docs:this.fileLocations}})}.bind(this))}.bind(this))};c.prototype.searchName=function(b,a){if(b)this.searchHelper=d.generateSearchHelper(b,!0);if(a)this.onSearchNameComplete=a;var c=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var e=0;e<this.fileSkeleton.length;e++){var g=this.fileSkeleton[e].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,g,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,g,!0))if(c.push(this.fileSkeleton[e]),
c.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:c.length,docs:c}})}};c.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contenttypes"),d=this;b();c.getContentTypes().then(function(b){d.contentTypesCache=b;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=!1;a();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};c.prototype._searchCompleted=function(){console.log("Search Completed.")};
c.prototype._searchFiles=function(){var b=[],a;if(this.fileLocations.length>0){a=this;for(var c=0;c<a.fileLocations.length;c++)b.push(a._sniffSearch(a.fileLocations[c]))}return g.all(b)};c.prototype._sort=function(b){b.sort(function(a,b){var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0})};c.prototype._onFileType=function(b){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===d.ALL_FILE_TYPE?!0:b.extension.indexOf(this.searchHelper.params.fileType)>=
0:!0};c.prototype._visitRecursively=function(b){var a=[],c=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);var d=c.registry.getService("orion.page.progress");return(d?d.progress(c.fileClient.fetchChildren(b),"Crawling search for children of "+b):c.fileClient.fetchChildren(b)).then(function(b){for(var d=0;d<b.length;d++)if(b[d].Directory!==void 0&&b[d].Directory===!1)if(c._searchOnName)a.push(c._buildSingleSkeleton(b[d]));else if(c._buildSkeletonOnly)a.push(c._buildSingleSkeleton(b[d]));
else{var f=e.getFilenameContentType(b[d].Name,c.contentTypesCache);f&&(f["extends"]==="text/plain"||f.id==="text/plain")&&c._onFileType(f)&&a.push(c._sniffSearch(b[d]))}else b[d].Location&&a.push(c._visitRecursively(b[d].ChildrenLocation));return g.all(a)})};c.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,b,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,
b,!0)};c.prototype._reportSingleHit=function(b){b.LastModified=b.LocalTimeStamp;this.fileLocations.push(b);this._hitCounter++;this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};c.prototype._sniffSearch=function(b){this._totalCounter++;var a=this;if(this.searchHelper.params.keyword==="")this._reportSingleHit(b),this.registry.getService("orion.page.message").setProgressResult({Message:f.formatMessage(h["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(a.fileClient.read(b.Location),"Reading file "+b.Location).then(function(c){a._hitOnceWithinFile(c)&&a._reportSingleHit(b);a.registry.getService("orion.page.message").setProgressResult({Message:f.formatMessage(h["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)})},function(a){console.error("Error loading file content: "+a.message)})};c.prototype._buildSingleSkeleton=function(b){this._totalCounter++;
this.fileSkeleton.push(b);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();b=new g;b.resolve(this._totalCounter);return b};c.prototype.constructor=c;return{SearchCrawler:c}});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(h,i,f,d){function e(){}e.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'<div class="dialog" role="dialog"><div class="dialogTitle"><span id="title" class="dialogTitleText layoutLeft"></span><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" id="closeDialog"></button></div><div id="dialogContent" class="dialogContent layoutBlock"></div><div id="buttons" class="dialogButtons"></div></div>',_initialize:function(){var d=
document.body;this.$frameParent=d;this.$$modalExclusions=this.$$modalExclusions||[];var c=document.createRange();c.selectNode(d);c=c.createContextualFragment(this.CONTAINERTEMPLATE);d.appendChild(c);this.$frame=d.lastChild;this.title&&f.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=f.$("#closeDialog",this.$frame);var b=this;this.$close.addEventListener("click",function(){b.hide()},!1);this.$parent=f.$(".dialogContent",this.$frame);c=document.createRange();c.selectNode(this.$parent);
d=c.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(d,this.messages);this.$parent.appendChild(d);this.$buttonContainer=f.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE?b.hide():a.keyCode===f.KEY.ENTER&&typeof b._defaultCallback==="function"&&b._defaultCallback()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent);this.modal&&this._makeModal()},
_makeButtons:function(){if(this.$buttonContainer&&Array.isArray(this.buttons)){var e=this;this.buttons.forEach(function(c){var b=d.createButton(c.text,c.callback);if(c.id)b.id=c.id,e["$"+b.id]=b;if(c.isDefault)e._defaultCallback=c.callback,e._defaultButton=b;e.$buttonContainer.appendChild(b)})}},_makeModal:function(){var d=this;this.$frame.addEventListener("blur",function(a){d.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var b=!f.contains(d.$frame,a.target);if(b)for(var c=0;c<
d.$$modalExclusions.length;c++)if(f.contains(d.$$modalExclusions[c],a.target)){b=!1;break}b&&(window.setTimeout(function(){(d.$lastFocusedElement||d.$parent).focus()},0),f.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var c=this.$frameParent.childNodes,b=!1;this._addedBackdrop=[];for(var a=0;a<c.length;a++){for(var e=0;e<this.$$modalExclusions.length;e++)if(f.contains(this.$$modalExclusions[e],c[a])){b=
!0;break}!b&&c[a]!==d.$frame&&c[a].classList&&!c[a].classList.contains("tooltipContainer")&&(e=c[a],e.classList.contains("modalBackdrop")||(e.classList.add("modalBackdrop"),this._addedBackdrop.push(e)))}(c=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.TAB){var b=d._getFirstFocusField();b&&b!==a.target&&b.focus();f.stop(a)}},!1)},_addChildDialog:function(d){this.$$modalExclusions.push(d.$frame||d.$parent)},_bindElements:function(d){for(var c=
0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},hide:function(){typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0));this.$frame.classList.remove("dialogShowing");typeof this._afterHiding==="function"&&this._afterHiding();var d=this;this.keepAlive||window.setTimeout(function(){d.destroy()},
0)},show:function(d){typeof this._beforeShowing==="function"&&this._beforeShowing();var c=f.bounds(this.$frame),b=f.bounds(document.documentElement),a;d?(a=f.bounds(d),d=a.top+a.height+4,a=a.left+4,d+c.height>b.height&&(d=Math.max(0,b.height-c.height-4)),a+c.width>b.width&&(a=Math.max(0,b.width-c.width-4))):(a=Math.max(0,(b.width-c.width)/2),d=Math.max(0,(b.height-c.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=d+"px";this.$frame.style.left=a+"px";this.$frame.classList.add("dialogShowing");
typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return f.firstTabbable(this.$parent)||this._defaultButton||f.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(d){d.classList.remove("modalBackdrop")});this.$frameParent.removeEventListener("focus",this._modalListener,!0);this.$frameParent.removeEventListener("click",
this._modalListener,!0);this.$frameParent.removeChild(this.$frame);this.$parent=this.$frame=void 0}};e.prototype.constructor=e;return{Dialog: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(h,i,f,d,e,g,c){function b(a){this._init(a)}b.prototype=new c.Dialog;b.prototype.TEMPLATE='<div role="search"><div><label id="fileNameMessage" for="fileName">${Type the name of a file to open (? = any character, * = any string):}</label></div><div><input id="fileName" type="text" class="setting-control" style="width:90%;"/></div><div id="progress" style="padding: 2px 0 0; width: 100%;"><img src="'+d.toUrl("../../../images/progress_running.gif")+
'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="favresults" style="max-height:400px; height:auto; overflow-y:auto;"></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';b.prototype._init=function(a){this.title=a.title||h["Find File Named"];this.modal=!0;this.messages=h;this._searcher=a.searcher;this._progress=a.progress;this._onHide=a.onHide;this._contentTypeService=new f.ContentTypeService(this._searcher.registry);
if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=a.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=a.initialText;this._message=a.message;this._nameSearch=!0;if(a.nameSearch!==void 0)this._nameSearch=a.nameSearch;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(h["Missing required argument: fileService"]);this._searchRenderer=a.searchRenderer;if(!this._searchRenderer||
typeof this._searchRenderer.makeRenderFunction!=="function")throw Error(h["Missing required argument: searchRenderer"]);this._favService=a.favoriteService;if(!this._favService)throw Error(h["Missing required argument: favService"]);this._initialize()};b.prototype._bindToDom=function(a){var b=this;b.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",h.Search);this.$fileName.addEventListener("input",function(){b._time=+new Date;b._timeoutId&&clearTimeout(b._timeoutId);
b._timeoutId=setTimeout(b.checkSearch.bind(b),0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===e.KEY.ENTER){var c=e.$("a",b.$results);c&&(e.stop(a),window.open(c.href),b.hide())}},!1);a.addEventListener("keydown",function(a){var c,d,f,g,h;if(a.keyCode===e.KEY.DOWN||a.keyCode===e.KEY.UP)d=e.$$array("a",b.$results),c=e.$$array("a",b.$favresults),f=document.activeElement,h=d.indexOf(f),g=c.indexOf(f),a.keyCode===e.KEY.DOWN?g>=0?(g<c.length-1?c[g+1]:d.length>0?d[0]:c[0]).focus():
h>=0?(h<d.length-1?d[h+1]:c.length>0?c[0]:d[0]).focus():(d.length>0||c.length>0)&&(-1<c.length-1?c[0]:d[0]).focus():g>=0?(f=b.$fileName,(g>0?c[g-1]:f).focus()):h>=0?(f=b.$fileName,(h>0?d[h-1]:c.length>0?c[c.length-1]:f).focus()):d.length>0?d[d.length-1].focus():c.length>0&&c[c.length-1].focus(),e.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);this.populateFavorites();setTimeout(function(){if(b._forceUseCrawler||!b._fileService.getService(b._searcher.getSearchLocation()).search){var a=
b._searchOnRoot?b._searcher.getSearchRootLocation():b._searcher.getChildrenLocation(),a=new i.SearchCrawler(b._searcher.registry,b._fileService,"",{searchOnName:!0,location:a});b._searcher.setCrawler(a);a.buildSkeleton(function(){b.$crawlingProgress.style.display="inline";b.$progress.appendChild(document.createTextNode(h["Building file skeleton..."]))},function(){b.$crawlingProgress.style.display="none";b.$progress.removeChild(b.$progress.lastChild)})}},0);this._message&&(this.$fileNameMessage.removeChild(this.$fileNameMessage.firstChild),
this.$fileNameMessage.appendChild(document.createTextNode(this._message)));if(this._initialText)this.$fileName.value=this._initialText,this.doSearch()};b.prototype.populateFavorites=function(){var a=document.createElement("div");a.appendChild(document.createTextNode(h["Populating favorites&#x2026;"]));e.empty(this.$favresults);this.$favresults.appendChild(a);this._progress?this._progress.progress(this._favService.getFavorites(),"Getting favorites").then(this.showFavorites()):this._favService.getFavorites().then(this.showFavorites());
this._favService.addEventListener("favoritesChanged",this.showFavorites())};b.prototype.showFavorites=function(){var a=this;return function(b){if(b.navigator)b=b.navigator;a._searchRenderer.makeRenderFunction(a._contentTypeService,a.$favresults,!1,a.decorateResult.bind(a),a.showFavoritesImage)(b);if(b&&b.length>0)b=document.createElement("div"),b.style.borderBottom="1px dashed #BBBBBB",b.style.padding="5px",a.$favresults.appendChild(b)}};b.prototype.showFavoritesImage=function(a){var b=new Image;
b.classList.add("modelDecorationSprite");b.classList.add("core-sprite-favorite");b.src=d.toUrl("images/none.png");b.title=h.Favorite;a.appendChild(b);b.style.verticalAlign="middle"};b.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var a=(new Date).getTime();a-this._time>this._searchDelay?(this._time=a,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};b.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var b=this._searcher.createSearchParams(a,
this._nameSearch,this._searchOnRoot),c=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));this.currentSearch=c;var d=document.createElement("div");d.appendChild(document.createTextNode(this._nameSearch?h["Searching..."]:g.formatMessage(h["Searching for occurrences of"],a)));e.empty(this.$results);this.$results.appendChild(d);this._searcher.search(b,!1,function(){c===this.currentSearch&&c.apply(null,arguments)}.bind(this))}};b.prototype.decorateResult=
function(a){for(var b=this,a=e.$$array("a",a),c=0;c<a.length;c++){var d=a[c];d.addEventListener("mouseup",function(a){a.button===0&&!a.ctrlKey&&!a.metaKey&&b.hide()},!1);d.addEventListener("keyup",function(a){a.keyCode===e.KEY.ENTER&&b.hide()},!1)}};b.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};b.prototype._afterHiding=function(){this._onHide&&this._onHide()};b.prototype.constructor=b;return{OpenResourceDialog:b}});define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner">\n\t<\!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\>\n\t<\!-- Top row:  Logo + discovery links + search + user --\>\n\t<div id="staticBanner" class="layoutBlock topRowBanner"> <\!-- primaryNav --\>\n\t\t<a id="home" class="layoutLeft "></a>\n\t\t<nav id="primaryNav" class="bannerLeftArea" role="navigation">\n\t\t\t<div class="centralNavigation" id="centralNavigation" tabindex="0" role="button" style="margin-top:0;"></div>\n\t\t</nav>\n\t\t<div class="clear navigationBreadcrumb bannerMiddleArea" >\n\t\t\t<div id="location" class="currentLocation"></div>\n\t\t</div>\n\t\t<div class="bannerRightArea">\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search" style="display:none;">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;display:none;"></div>\n\t\t\t<div id="userMenu" class="spacingRight layoutRight" style="color:#ccc;">\n\t\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger">\n\t\t\t\t\t<span class="dropdownArrowEmpty"></span>\n\t\t\t\t</span>\n\t\t\t\t<ul id="userDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div id="notificationArea" class="notificationHide">\n\t\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t\t<div class="layoutRight"><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" type="button" id="closeNotifications"></span></div>\n\t</div>\n</header>'});
define("text!orion/banner/footer.html",[],function(){return'<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<\!-- Requires some js code to bind the NLS variables  --\>\n\t<div class="logoFooter commandSprite core-sprite-orion-logo"></div>\n\t<div class="footerBlock">${Orion is in Beta. Please try it out but BEWARE your data may be lost.}</div>\n\t<div class="footerRightBlock">\n\t\t<ul>\n\t\t\t<\!-- <li><a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">${FAQ}</a></li --\>\n\t\t\t<li><a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=3.0" target="_blank">${Report a Bug}</a>\n\t\t\t<li><a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a></li>\n\t\t</ul>\n\t</div>\n</footer>'});
define("text!orion/banner/toolbar.html",[],function(){return'<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>\n<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>\n<ul class="layoutLeft commandList pageActions" id="navActions"></ul>\n<div class="layoutLeft" style="padding-left:7px;padding-right:7px;margin-top:2px;" id="filterBox" style="visibility:hidden;">\n</div>\n<div class="layoutRight" style="padding-left:7px;margin-left:4px;margin-top:6px;" id="settingsTab" style="visibility:hidden;">\n\t<button class="layoutRight core-sprite-wrench imageSprite" id="settingsAction" aria-live="off" style="visibility:hidden;"></button>\n</div>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>'});
define("orion/objects",[],function(){return{mixin:function(h){Array.prototype.slice.call(arguments,1).forEach(function(i){for(var f=Object.keys(i),d=0;d<f.length;d++){var e=f[d];h[e]=i[e]}})}}});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(h,i){function f(d,e,f){this.CLEAR_PANEL=f!==null?f:!0;this.OPEN="false";f="";d.nodeType?this.node=d:(f=d+"_",d=document.getElementById(d),this.node=d.nodeType?d:document.createElement("span"));this.node.innerHTML=this.templateString;this.navLabelId=f+"navigationlabel";document.getElementById("navigationlabel").id=this.navLabelId;this.arrowId=f+"dropDownArrow";document.getElementById("dropDownArrow").id=this.arrowId;
this.navDropDownId=f+"navdropdown";document.getElementById("navdropdown").id=this.navDropDownId;if(e.icon)this.node.className=this.node.className+" "+e.icon,this.node.onclick=this.click.bind(this);else{if(e.label)d=document.getElementById(this.navLabelId),d.textContent=e.label,d.onclick=this.click.bind(this);if(e.caret)document.getElementById(this.arrowId).className=e.caret}this._dropdownNode=i.node(this.navDropDownId);this._triggerNode=i.node(this.navLabelId)}h.mixin(f.prototype,{templateString:'<div id="navigationlabel" class="navigationLabel dropdownTrigger" ></div><span id="dropDownArrow" class="dropDownArrow"></span><div class="dropDownContainer" id="navdropdown" style="display:none;"></div>',
click:function(){var d=document.getElementById(this.navDropDownId);d.style.display==="none"?this.updateContent(this.getContentNode(),function(){d.style.display="";this._positionDropdown();this.handle=i.addAutoDismiss([this.node,d],this.clearPanel.bind(this))}.bind(this)):this.CLEAR_PANEL&&this.clearPanel()},clearPanel:function(){document.getElementById(this.navDropDownId).style.display="none"},addContent:function(d){document.getElementById(this.navDropDownId).innerHTML=d},getContentNode:function(){return document.getElementById(this.navDropDownId)},
updateContent:function(d,e){e()},toggleLabel:function(d){document.getElementById(this.navLabelId).style.display=d?"":"none";document.getElementById(this.arrowId).style.display=d?"":"none"},_positionDropdown:function(){this._dropdownNode.style.left="";var d=i.bounds(this._dropdownNode),e=i.bounds(this._boundingNode(this._triggerNode));if(d.left+d.width>e.left+e.width)this._dropdownNode.style.right=0},_boundingNode:function(d){return d.style.right!==""||d.style.position==="absolute"||!d.parentNode||
!d.parentNode.style?d:this._boundingNode(d.parentNode)},destroy:function(){if(this.node)i.empty(this.node),this.node=this.select=null}});return f});
define("orion/widgets/input/GroupedContent",["orion/objects","orion/webui/littlelib"],function(h){function i(){}h.mixin(i.prototype,{templateString:'<div style="float:left;"><section><span style="color:#333;padding:15px;">Main Pages</span><nav><ul id="navigationlinks"></ul></nav></section></div><div class="groupedContentDivider"></div><div style="float:left;"><section><span style="color:#333;padding:15px;">Related Links</span><nav><ul id="relatedLinks"></ul></nav></section></div>',getContentPane:function(){return this.templateString}});
return i});define("orion/customGlobalCommands",[],function(){return{}});
define("orion/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize Strings from JavaScript files in this folder","Choose a Folder":"Choose a Folder",
"Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Make Favorite":"Make Favorite","Delete the selected files or folders":"Delete the selected files or folders","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?",
"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.","Export as zip":"Export as zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"New File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"New Folder","Folder name:":"Folder name:",
"Create a new folder":"Create a new folder","Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file",
"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.",
"Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.","Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Import local file...":"Import local file...",
"Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP from...","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP to...","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location",Exporting:"Exporting to ${0}","Pasting ${0}":"Pasting ${0}","Copy to":"Copy to",
"Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location","Copy Items":"Copy Items","Copy the selected items to the copy/paste buffer":"Copy the selected items to the copy/paste buffer","Paste Items":"Paste Items","Paste items from the copy/paste buffer":"Paste items from the copy/paste buffer",
"Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With","Loading ":"Loading ",New:"New",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system","Create new content":"Create new content",Favorites:"Favorites","Import from HTTP...":"Import from HTTP...","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:",
"Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.","You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.","Unzip ${0}?":"Unzip ${0}?",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding."});
define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(h,i,f){function d(c,b,a){if(!c[b])throw b+h[" is not supported in this file system"];return c[b].apply(c,a)}function e(c,b,a,f){if(!c.readBlob)throw h["source file service does not support binary read"];if(!a.writeBlob)throw h["target file service does not support binary write"];if(b[b.length-1]!=="/")return d(c,"readBlob",[b]).then(function(b){return d(a,"writeBlob",[f,b])});var g=f.substring(0,
f.length-1),l=decodeURIComponent(g.substring(g.lastIndexOf("/")+1)),g=g.substring(0,g.lastIndexOf("/")+1);return d(a,"createFolder",[g,l]).then(function(){},function(){}).then(function(){return d(c,"fetchChildren",[b]).then(function(b){for(var d=[],g=0;g<b.length;++g){var k=b[g].Location,h=k;b[g].Directory&&(h=k.substring(0,k.length-1));h=decodeURIComponent(h.substring(h.lastIndexOf("/")+1));h=f+encodeURIComponent(h);b[g].Directory&&(h+="/");d[g]=e(c,k,a,h)}return i.all(d)})})}function g(c,b){function a(a){var b=
new i;b.reject(h["No Matching FileService for location:"]+a);return b}var d=c.getServiceReferences("orion.core.file"),e=d;if(b)for(var e=[],g=0;g<d.length;++g)b(d[g])&&e.push(d[g]);for(var m=[],o=[],s=[],n=[],q={fetchChildren:function(){var a=new i;a.resolve(n);return a},createWorkspace:function(){var a=new i;a.reject(h["no file service"]);return a},loadWorkspaces:function(){var a=new i;a.reject(h["no file service"]);return a},loadWorkspace:function(){var a=new i;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:h["File Servers"],Location:"/",Children:n,ChildrenLocation:"/"})},100);return a},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},d=0;d<e.length;++d)n[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:e[d].getProperty("top"),ChildrenLocation:e[d].getProperty("top"),Name:e[d].getProperty("Name")},g=e[d].getProperty("pattern")||".*",g[0]!=="^"&&(g="^"+g),m[d]=RegExp(g),o[d]=c.getService(e[d]),s[d]=e[d].getProperty("Name"),
e[d].getProperty("NameKey")&&e[d].getProperty("nls")&&f.getMessageBundle(e[d].getProperty("nls")).then(function(a,b){n[a].Name=b[e[a].getProperty("NameKey")];s[a]=b[e[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return o[0]?0:-1;for(var b=0;b<m.length;++b)if(m[b].test(a))return b;throw h["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?q:o[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?q.Name:s[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?q.Location:n[a].Location}}g.prototype={getService:function(c){return this._getService(c)},fileServiceName:function(c){return this._getServiceName(c)},fileServiceRootURL:function(c){return this._getServiceRootURL(c)},fetchChildren:function(c){return d(this._getService(c),"fetchChildren",arguments)},createWorkspace:function(c){return d(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return d(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(c){return d(this._getService(c),"loadWorkspace",arguments)},createProject:function(c,b,a,e){return d(this._getService(c),"createProject",arguments)},createFolder:function(c,b){return d(this._getService(c),"createFolder",arguments)},createFile:function(c,b){return d(this._getService(c),"createFile",arguments)},deleteFile:function(c){return d(this._getService(c),"deleteFile",arguments)},
moveFile:function(c,b,a){var f=this._getService(c),g=this._getService(b);if(f===g)return d(f,"moveFile",arguments);var h=c[c.length-1]==="/",i=b;i[i.length-1]!=="/"&&(i+="/");if(a)i+=encodeURIComponent(a);else{var o=c;h&&(o=o.substring(0,o.length-1));i+=o.substring(o.lastIndexOf("/")+1)}h&&i[i.length-1]!=="/"&&(i+="/");return e(f,c,g,i).then(function(){return d(f,"deleteFile",[c])})},copyFile:function(c,b,a){var f=this._getService(c),g=this._getService(b);if(f===g)return d(f,"copyFile",arguments);
var h=c[c.length-1]==="/",i=b;i[i.length-1]!=="/"&&(i+="/");if(a)i+=encodeURIComponent(a);else{var o=c;h&&(o=o.substring(0,o.length-1));i+=o.substring(o.lastIndexOf("/")+1)}h&&i[i.length-1]!=="/"&&(i+="/");return e(f,c,g,i)},read:function(c,b){return d(this._getService(c),"read",arguments)},write:function(c,b,a){return d(this._getService(c),"write",arguments)},remoteImport:function(c,b){return d(this._getService(c),"remoteImport",arguments)},remoteExport:function(c,b){return d(this._getService(c),
"remoteExport",arguments)},search:function(c){return d(this._getService(c.resource),"search",arguments)}};g.prototype.constructor=g;return{FileClient:g}});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/keyBinding,orion/commandRegistry,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/keyBinding,orion/breadcrumbs,orion/webui/littlelib,orion/webui/splitter,orion/webui/dropdown,orion/webui/tooltip,orion/favorites,orion/contentTypes,orion/URITemplate,orion/PageUtil,orion/widgets/themes/ThemePreferences,orion/widgets/themes/container/ThemeData,orion/Deferred,orion/widgets/UserMenu,orion/PageLinks,orion/webui/dialogs/OpenResourceDialog,text!orion/banner/banner.html,text!orion/banner/footer.html,text!orion/banner/toolbar.html,orion/widgets/input/DropDownMenu,orion/widgets/input/GroupedContent,orion/util,orion/customGlobalCommands,orion/fileClient".split(","),function(h,
i,f,d,e,g,c,b,a,j,k,l,m,o,s,n,q,p,t,x,z,r,w,v,B,A,y,u,C,D,E,G,H){function J(a,b){if(a.getLabel)return a.getLabel();else{var c=new r;c.resolve(b.properties.name);return c}}function S(a){l.node("progressPane").setAttribute("aria-label",h["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function T(a,b){var c=a.getServiceReferences("orion.core.auth");Q=[];for(var d=I.createMenuGenerator.apply(this,arguments),e=0;e<c.length;e++){var f=
c[e],g=a.getService(f);J(g,f).then(function(a){g.getKey().then(function(b){Q.push(b);g.getUser().then(function(c){d.addUserItem(b,g,a,c)},function(c,e){d.addUserItem(b,g,a,e)});window.addEventListener("storage",function(){P[b]!==localStorage.getItem(b)&&(P[b]=localStorage.getItem(b),g.getUser().then(function(c){d.addUserItem(b,g,a,c)},function(){d.addUserItem(b,g,a)}))},!1)})})}}function M(a,c,d,e,f){var j=arguments,k,h=a&&a.getServiceReferences("orion.page.link.related");h&&h.length!==0&&r.when(function(){if(k)return k;
var b=a.getService("orion.core.contenttypes");b||(b=new q.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return k=a})}(),function(){var l;if(I.beforeGenerateRelatedLinks.apply(this,j)){for(var i=[],m=0;m<h.length;m++){var o={},t,n=h[m].getPropertyKeys();for(t=0;t<n.length;t++)o[n[t]]=h[m].getProperty(n[t]);if(o.id){var p=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(c)){var b=new g.CommandInvocation(c,c,null,a,e);I.addRelatedLinkCommand(a,
b)}else typeof f==="function"&&(l||(l=f()),r.when(l,function(b){b&&c===R&&(!a.visibleWhen||a.visibleWhen(b))&&I.addRelatedLinkCommand(a,new g.CommandInvocation(b,b,null,a,e))}))},s=null;t=null;if(d.indexOf(o.id)<0)if((o.nls&&o.nameKey||o.name)&&o.uriTemplate)t=b._createCommandOptions(o,h[m],a,k,!0),i.push(t),t.then(function(a){a=new g.Command(a);p(a)});else{if(!s&&(s=e.findCommand(o.id))){p(s);continue}if(!s){var x=a.getServiceReferences("orion.navigate.command");for(t=0;t<x.length;t++)if(x[t].getProperty("id")===
o.id){for(var o={},n=x[t].getPropertyKeys(),q=0;q<n.length;q++)o[n[q]]=x[t].getProperty(n[q]);t=b._createCommandOptions(o,x[t],a,k,!0);i.push(t);t.then(function(a){s=new g.Command(a);p(s)});break}}}}}r.all(i,function(a){return a}).then(function(){I.afterGenerateRelatedLinks.apply(this,j)})}})}function U(a){var b=l.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function N(a){var b={},c=null;typeof a==="string"&&(a=l.node(a));a||(a=l.node("pageActions"));for(var d=a;d&&
d.classList;){if(d.classList.contains("toolComposite")){c=d;break}d=d.parentNode}if(a.classList.contains("commandMarker"))b.commandNode=a;if(c&&(b.slideContainer=l.$(".slideParameters",c),b.parameterArea=l.$(".parameters",c),b.dismissArea=l.$(".parametersDismiss",c),b.notifications=l.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=l.$(".toolbarTarget",c.parentNode),b.toolbarTarget)))a=l.bounds(c),b.toolbarTargetY=a.height+1;return b}function O(a){if(a.toolbarTarget&&a.toolbarTargetY){var b=
0,c;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&(c=l.bounds(a.notifications),b+=c.height);a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(c=l.bounds(a.slideContainer),b+=c.height);b>0&&(b+=8);a.toolbarTarget.style.top=a.toolbarTargetY+b+"px";a.toolbarTarget.style.bottom=0}}var e=function(a){var b=document.createElement("a");b.href=a;return b.href}(i.toUrl("auth/NotifyAuthentication.html")),P={},I={createMenuGenerator:G.createMenuGenerator||
function(a,b){if(l.node("userMenu")){var c=l.node("userDropdown"),d=new o.Dropdown({dropdown:c}),c=new w.UserMenu({dropdownNode:c,dropdown:d,serviceRegistry:a}),d=l.node("userTrigger");new s.Tooltip({node:d,text:h.Options,position:["below","left"]});var d=document.getElementById("userTrigger"),e=d.className;e+=" imageSprite core-sprite-silhouette";d.className=e;c.setKeyAssist(b);return c}},beforeGenerateRelatedLinks:G.beforeGenerateRelatedLinks||function(){var a=l.node("relatedLinks");l.empty(a);
return!0},addRelatedLinkCommand:G.addRelatedLinkCommand||function(a,b){var c=l.node("relatedLinks");g.createCommandMenuItem(c,a,b).classList.remove("dropdownMenuItem")},afterGenerateRelatedLinks:G.afterGenerateRelatedLinks||function(){},afterSetPageTarget:G.afterSetPageTarget||function(){},generateNavigationMenu:G.generateNavigationMenu||function(){var a=document.getElementById("centralNavigation");new s.Tooltip({node:a,text:"Navigation Menu",position:["right"]});var a=new C("centralNavigation",{label:"Develop",
icon:"commandSprite core-sprite-hamburger"}),b=new D;a.addContent(b.getContentPane())},afterGenerateBanner:G.afterGenerateBanner||function(){}},Q=[],R,L=[],F,K=null;return{addSettings:function(a){(new C("settingsTab",{label:"Develop",icon:"imageSprite core-sprite-wrench"},!1)).updateContent=a.updateContent.bind(a)},generateBanner:function(b,e,j,k,o,t,p){function s(){this.create();this._filterString=""}function q(a){a.registerService("orion.cm.managedservice",{updated:function(a){for(var a=a&&a["links.newtab"]!==
"undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=l.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}(new x.ThemePreferences(k,new z.ThemeData)).apply();var r=l.node(b);if(!r)throw h["could not find banner parent, id was "]+b;var w=document.createRange();w.selectNode(r);w=w.createContextualFragment(A);l.processTextNodes(w,h);r.firstChild?r.insertBefore(w,r.firstChild):r.appendChild(w);r=l.node("home");r.href=i.toUrl("navigate/table.html");r.setAttribute("aria-label",
h["Orion Home"]);l.node("progressPane").src=i.toUrl("images/none.png");if(r=l.node("pageToolbar"))r.classList.add("toolbarLayout"),r.innerHTML=u+f.slideoutHTMLFragment("mainToolbar");(r=l.node("closeNotifications"))&&r.setAttribute("aria-label",h["Close notification"]);if(r=l.node("footer"))r.innerHTML=y,l.processTextNodes(r,h);j.setParameterCollector(new c.CommandParameterCollector(N,O));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&(a=e.getService("orion.page.message"))&&
a.setProgressMessage("")},!1);I.generateNavigationMenu.apply(this,arguments);var C=l.node("navigationlinks");C&&v.createPageLinks(e,"orion.page.link").then(function(a){a.forEach(function(a){var b=document.createElement("li");b.appendChild(a);C.appendChild(b)})});if(r=l.$(".split")){var w=l.$(".sidePanelLayout"),G=l.$(".mainPanelLayout");if(w&&G)K={side:w,main:G},K.splitter=new m.Splitter({node:r,sidePanel:w,mainPanel:G,toggle:!0,closeByDefault:r.style&&r.style.left==="0%"}),r=new g.Command({name:h["Toggle side panel"],
tooltip:h["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){K.splitter.toggleSidePanel()}}),j.addCommand(r),j.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new d.KeyBinding("o",!0)),p&&K.splitter.addResizeListener(function(a){p&&a===G&&(a=p.getTextView())&&a.resize()})}r=new g.Command({name:h["Make Favorite"],tooltip:h["Add to the favorites list"],imageClass:"core-sprite-favorite",id:"orion.makeFavorite",visibleWhen:function(a){a=Array.isArray(a)?
a:[a];if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!a[b].Location)return!1;return!0},callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=e.getService("orion.core.favorite"),c=e.getService("orion.page.progress"),d=function(a){return function(d){d?e.getService("orion.page.message").setMessage(a.Name+h[" is already a favorite."],2E3):c.progress(b.makeFavorites(a),"Making favorite "+a.Name)}},f=0;f<a.length;f++){var g=a[f];c.progress(b.hasFavorite(g.ChildrenLocation||g.Location),
"Checking favorite "+g.Name).then(d(g))}}});j.addCommand(r);var D=!1,F=function(a,b,c){if(!D){var d=b.getService("orion.core.favorite"),e=b.getService("orion.page.progress");d||(d=new n.FavoritesService({serviceRegistry:b}),d=b.getService("orion.core.favorite"));var f=new B.OpenResourceDialog({searcher:a,progress:e,searchRenderer:a.defaultRenderer,favoriteService:d,onHide:function(){D=!1;c&&c.getTextView()&&c.getTextView().focus()}});window.setTimeout(function(){D=!0;f.show()},0)}},r=new g.Command({name:h["Find File Named..."],
tooltip:h["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){F(o,e,p)}});j.addCommand(r);j.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new d.KeyBinding("f",!0,!0));r=new g.Command({name:h["Toggle banner and footer"],tooltip:h["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=l.node("banner"),b=l.node("footer"),c=l.$(".content-fixedHeight");a.style.visibility==="hidden"?(a.style.visibility=
"visible",b.style.visibility="visible",c.classList.remove("content-fixedHeight-maximized")):(a.style.visibility="hidden",b.style.visibility="hidden",c.classList.add("content-fixedHeight-maximized"));p&&p.getTextView()&&p.getTextView().resize();return!0}});j.addCommand(r);j.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new d.KeyBinding("m",!0,!0));r=new g.Command({name:h["System Configuration Details"],tooltip:h["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return i.toUrl("help/about.html")}});
j.addCommand(r);j.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new d.KeyBinding(112,!0,!0));r=new g.Command({name:h["Background Operations"],tooltip:h["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return i.toUrl("operations/list.html")}});j.addCommand(r);j.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new d.KeyBinding("o",!0,!0));s.prototype={create:function(){var a=this._keyAssistDiv=
document.createElement("div");a.id="keyAssist";a.style.display="none";a.classList.add("keyAssistFloat");a.setAttribute("role","menu");var b=this._keyAssistInput=document.createElement("input");b.classList.add("keyAssistInput");b.type="text";b.placeholder=h["Filter bindings"];a.appendChild(b);var c=this._keyAssistContents=document.createElement("div");c.classList.add("keyAssistContents");if(E.isIOS||E.isAndroid)c.style.overflowY="auto";a.appendChild(c);var d=this._keyAssistTable=document.createElement("table");
d.tabIndex=0;d.classList.add("keyAssistList");c.appendChild(d);document.body.appendChild(a);b.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));d.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));b.addEventListener("input",function(){this.filterChanged()}.bind(this));c.addEventListener(E.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===l.KEY.ESCAPE&&this.hide()}.bind(this));
l.addAutoDismiss([a],function(){this.hide()}.bind(this))},createContents:function(){l.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;this._idCount=this._keyAssistContents.scrollTop=0;if(p&&p.getTextView()){var b=p.getTextView(),c=b.getActions(!0).filter(function(a){return(a=b.getActionDescription(a))&&a.name});c.sort(function(a,c){return b.getActionDescription(a).name.localeCompare(b.getActionDescription(c).name)});this.createHeader(h.Editor);for(var d=function(a){return function(){b.focus();
return b.invokeAction(a)}},e={},f,g=0;g<c.length;g++)for(var k=c[g],i=b.getActionDescription(k),m=b.getKeyBindings(k),o=0;o<m.length;o++){f=m[o];var t=a.getUserKeyString(f);f.scopeName?(e[f.scopeName]||(e[f.scopeName]=[]),e[f.scopeName].push({bindingString:t,name:i.name,execute:d(k)})):this.createItem(t,i.name,d(k))}for(var n in e)if(e[n].length){this.createHeader(n);for(c=0;c<e[n].length;c++)f=e[n][c],this.createItem(f.bindingString,f.name,f.execute)}}this.createHeader(h.Global);j.showKeyBindings(this)},
createItem:function(a,b,c){if(this._filterString){var d=this._filterString.toLowerCase(),e;d!==this._filterString?(d=this._filterString,e=function(a){return a}):e=function(a){return a.toLowerCase()};if(e(b).indexOf(d)===-1&&e(a).indexOf(d)===-1&&e(this._lastHeader).indexOf(d)===-1)return}var f=this._keyAssistTable.insertRow(-1);f.id="keyAssist-keyBinding-"+this._idCount++;f.setAttribute("role","menuitem");f._execute=c;f.classList.add("keyAssistItem");f.addEventListener("click",function(a){this._selectedRow=
f;this.execute();a.preventDefault()}.bind(this));c=f.insertCell(-1);c.classList.add("keyAssistName");c.appendChild(document.createTextNode(b));c=f.insertCell(-1);c.classList.add("keyAssistAccel");c.appendChild(document.createTextNode(a))},createHeader:function(a){this._lastHeader=a;var b=this._keyAssistTable.insertRow(-1);b.classList.add("keyAssistSection");var b=b.insertCell(-1),c=document.createElement("h2");c.appendChild(document.createTextNode(a));b.appendChild(c)},execute:function(){window.setTimeout(function(){this.hide();
var a=this._selectedRow;this._selectedRow=null;a&&a._execute&&a._execute()}.bind(this),0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var a=this._keyAssistInput.value;if(this._filterString!==a)this._filterString=a,this.createContents()}.bind(this),100)},hide:function(){var a=document.activeElement,b=this._keyAssistDiv,a=b===a||(b.compareDocumentPosition(a)&16)!==0;b.style.display="none";a&&document.compareDocumentPosition(this._previousActiveElement)!==
1&&this._previousActiveElement.focus();this._previousActiveElement=null},isVisible:function(){return this._keyAssistDiv.style.display==="block"},select:function(a){var b=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(b.length===0)this._selectedIndex=-1;else{var c=this._selectedIndex;c+=a?1:-1;c%=b.length;c<0&&(c=b.length-1);if(this._selectedIndex!==-1)a=b[this._selectedIndex],a.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=c;if(this._selectedIndex!==-1){this._selectedRow=
a=b[this._selectedIndex];a.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",a.id);this._keyAssistTable.focus();var b=a.getBoundingClientRect(),d=this._keyAssistContents,e=d.getBoundingClientRect();a.offsetTop<d.scrollTop?c===0?d.scrollTop=0:a.scrollIntoView(!0):b.bottom>e.bottom&&a.scrollIntoView(!1)}}},show:function(){this._previousActiveElement=document.activeElement;this.createContents();this._keyAssistContents.style.height=Math.floor(this._keyAssistDiv.parentNode.clientHeight*
0.75)+"px";this._keyAssistDiv.style.display="block";this._keyAssistInput.value=this._filterString;this._keyAssistInput.focus();this._keyAssistInput.select()},_keyDown:function(a){if(a.keyCode===40)this.select(!0);else if(a.keyCode===38)this.select(!1);else if(a.keyCode===13)this.execute();else return;a.preventDefault()},_scrollWheel:function(a){var b=0,b=E.isIE||E.isOpera?-a.wheelDelta:E.isFirefox?a.detail*40:-a.wheelDeltaY,c=this._keyAssistContents,d=c.scrollTop;c.scrollTop+=b;if(d!==c.scrollTop)return a.preventDefault&&
a.preventDefault(),!1}};var J=new s,H=new g.Command({name:h["Show Keys"],tooltip:h["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){J.isVisible()?J.hide():J.show();return!0}});j.addCommand(H);j.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new d.KeyBinding(191,!1,!0));r=function(){p.getTextView().setKeyBinding(new d.KeyBinding(191,!1,!0,!E.isMac,E.isMac),H.id);p.getTextView().setAction(H.id,H.callback,H)};p&&(p.getTextView()?
r():p.addEventListener("TextViewInstalled",r));U(j);T(e,H.callback);S(e);window.addEventListener("hashchange",function(){j.processURL(window.location.href)},!1);window.setTimeout(function(){q(e)},0);I.afterGenerateBanner.apply(this,arguments)},getToolbarElements:N,getMainSplitter:function(){return K},layoutToolbarElements:O,setPageTarget:function(a){var b,c,d=a.breadcrumbRootName,e=a.serviceRegistry;a.target?(a.searchService&&a.searchService.setLocationByMetaData(a.target),a.fileService&&!a.breadcrumbTarget&&
(c=d?d+" ":"",c+=a.fileService.fileServiceName(a.target.Location),d=null),b=a.name||a.target.Name,R=a.target,M(e,a.target,L,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(d=d||a.task||a.name),b=a.name,M(e,{NoTarget:""},L,a.commandService,a.makeAlternate));(F=a.title)||(F=b?b+" - "+a.task:a.task);window.document.title=F;I.afterSetPageTarget.apply(this,arguments);if(b=l.node("location")){l.empty(b);var f=e&&new H.FileClient(e),e=a.breadcrumbTarget||a.target,f=f&&e&&e.Location?f.fileServiceRootURL(e.Location):
null;new k.BreadCrumbs({container:b,resource:e,rootSegmentName:d,workspaceRootSegmentName:c,workspaceRootURL:f,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){if(F)F.charAt(0)==="*"&&!a&&(F=F.substring(1)),a&&F.charAt(0)!=="*"&&(F="*"+F),window.document.title=F;var b=l.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){L=a},notifyAuthenticationSite:e}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(h){return{detectValidURL:function(i){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,d=f.exec(i),e=[],g=0;d;){if(d.length===3&&d[2].length>0){var c=new URL(d[2]);c.protocol!==":"&&h.validateURLScheme(c.href)&&(d.index>g&&e.push({segmentStr:i.substring(g,d.index)}),e.push({segmentStr:d[1].length>0?d[1]:d[2],urlStr:d[2]}),g=d.index+d[0].length)}d=f.exec(i)}if(g===0)return null;g<i.length-1&&e.push({segmentStr:i.substring(g)});return e},processURLSegments:function(h,
f){f.forEach(function(d){if(d.urlStr){var e=document.createElement("a");e.href=d.urlStr;e.appendChild(document.createTextNode(d.segmentStr))}else e=document.createElement("span"),e.textContent=d.segmentStr;h.appendChild(e)})}}});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands","orion/PageUtil","orion/urlUtils"],function(h,i,f,d,e){function g(b,a,c,d,e){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.message",this);this._operationsClient=a;this.notificationContainerDomId=e;this.domId=c;this.progressDomId=d||c;this._hookedClose=!1;this._timer=null}var c;g.prototype={_init:function(){var b=i.node("closeNotifications");if(b&&!this._hookedClose)this._hookedClose=!0,
b.addEventListener("click",function(){window.clearTimeout(this._timer);this.setProgressMessage("")}.bind(this))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=f.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(b,a,c){this._init();this.currentMessage=b;var d=i.node(this.domId);if(typeof c==="boolean"){var e=d.getAttribute("aria-live");d.setAttribute("aria-live",c?"polite":"off");window.setTimeout(function(){b===
this.currentMessage&&(i.empty(d),d.appendChild(document.createTextNode(b)),window.setTimeout(function(){d.setAttribute("aria-live",e)},100))}.bind(this),100)}else i.empty(d),d.appendChild(document.createTextNode(b));typeof a==="number"&&window.setTimeout(function(){b===this.currentMessage&&(i.empty(d),d.appendChild(document.createTextNode("")))}.bind(this),a)},setErrorMessage:function(b){this.currentMessage=b;this._init();var a=b.responseText||b.message||b;if(typeof a==="string")try{a=JSON.parse(a)}catch(c){}var b=
a.Message||a,d="red";if(a.Severity)switch(a.Severity){case "Warning":d="#FFCC00";break;case "Error":d="red";break;case "Info":case "Ok":d="green"}a=document.createElement("span");a.style.color=d;a.appendChild(document.createTextNode(b));b=i.node(this.domId);i.empty(b);b.appendChild(a)},setProgressMessage:function(b){this._init();this.currentMessage=b;var a=document.createElement("span");a.classList.add("imageSprite");a.classList.add("progressIcon");a.classList.add("core-sprite-progress");var c=i.node(this.progressDomId);
i.empty(c);c.appendChild(a);c.appendChild(document.createTextNode(b));a=i.node(this.notificationContainerDomId);a.classList.remove("notificationHide");if(b&&b.length>0)a.classList.add("progressNormal"),a.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else a.classList.remove("notificationShow"),a.classList.add("notificationHide")},setProgressResult:function(b){this.currentMessage=b;var a=b.responseText||b;if(typeof a===
"string")try{a=JSON.parse(a)}catch(c){}this._init();var d=a.Message||a,f="core-sprite-information",g="progressInfo",h=document.createElement("span");h.classList.add("imageSprite");h.classList.add("progressIcon");b=[];if(a.Severity)switch(a.Severity){case "Warning":f="core-sprite-warning";g="progressWarning";b.push("progressInfo");b.push("progressError");b.push("progressNormal");break;case "Error":f="core-sprite-error";g="progressError";b.push("progressWarning");b.push("progressInfo");b.push("progressNormal");
break;default:b.push("progressWarning"),b.push("progressError"),b.push("progressNormal")}b.push("notificationHide");h.classList.add(f);var s=i.node(this.progressDomId),f=i.node(this.notificationContainerDomId);i.empty(s);s.appendChild(h);if(a.HTML)a=document.createElement("span"),a.innerHTML=d,s.appendChild(a);else{if(h=e.detectValidURL(d))d=document.createDocumentFragment(),e.processURLSegments(d,h),Array.prototype.forEach.call(i.$$("a",d),function(a){a.target="_blank"});else{if(a.Severity!=="Warning"&&
a.Severity!=="Error")this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),5E3);d=document.createTextNode(d)}s.appendChild(d)}if(g&&this.progressDomId!==this.domId){f.classList.add(g);for(g=0;g<b.length;g++)f.classList.remove(b[g])}f.classList.add("notificationShow")},showWhile:function(b,a){var c=this;if(a){c.setProgressMessage(a);var d=function(){a===c.currentMessage&&c.setProgressMessage("")};b.then(d,d)}return b},
_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(b,a){return new c(this,++this._lastProgressId,b,a)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var b="",a=!0,c;for(c in this._progressMonitors)this._progressMonitors[c].status&&(a||(b+=", "),b+=this._progressMonitors[c].status,a=!1);this.setProgressMessage(b)}else this.setProgressMessage("")},_beginProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._progressMonitors.length++;
this._renderOngoingMonitors()},_workedProgressMonitor:function(b){this._progressMonitors[b.progressId]=b;this._renderOngoingMonitors()},_doneProgressMonitor:function(b){delete this._progressMonitors[b.progressId];this._progressMonitors.length--;b.status?this.setProgressResult(b.status):this._renderOngoingMonitors()}};g.prototype.constructor=g;c=function(b,a,c,d){this.statusService=b;this.progressId=a;if(c){this.deferred=c;this.begin(d);var e=this;c.then(function(){e.done.bind(e)()},function(){e.done.bind(e)()})}};
c.prototype.begin=function(b){this.status=b;this.statusService._beginProgressMonitor(this)};c.prototype.done=function(b){this.status=b;this.statusService._doneProgressMonitor(this)};c.prototype.worked=function(b){this.status=b;this.statusService._workedProgressMonitor(this)};c.prototype.constructor=c;return{StatusReportingService:g,ProgressMonitor:c}});
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(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(h,i,f,d){function e(){}e.prototype={_initialize:function(e,c,b,a,j){this._tooltip=new d.Tooltip({node:e,hideDelay:j||0,afterShowing:this._afterShowingFunction(c).bind(this),afterHiding:b,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";e=document.createRange();e.selectNode(this.$parent);e=e.createContextualFragment(this.TEMPLATE);
this.messages&&f.processTextNodes(e,h);this.$parent.appendChild(e);var k=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE&&k.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},_afterShowingFunction:function(d){return function(){d&&d.bind(this)();if(!this.customFocus){var c=
f.firstTabbable(this.$parent);c&&c.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};e.prototype.constructor=e;return{PopupDialog:e}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(h,i,f,d){var e={};(function(){var g=!1;e.updateNavTools=function(c,b,a,d,e,l){var i=f.node(d);if(i)b.destroy(i);else throw h["could not find toolbar "]+d;b.renderCommands(d,i,l,a,"button");if(e&&(d=f.node(e)))b.destroy(d),b.renderCommands(e,d,null,a,"button");g||(g=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",function(c){var d=f.node(e);
d&&(b.destroy(d),b.renderCommands(e,d,c.selections,a,"button"))}))};e.createOperationsCommands=function(c,b,a){function e(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var f=new d.Command({name:h["Remove Completed"],tooltip:h["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){b.loadOperations.bind(b)()})},visibleWhen:function(){return!0}});c.addCommand(f);
f=new d.Command({name:h.Remove,tooltip:h["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(c){for(var c=Array.isArray(c.items)?c.items:[c.items],d=0;d<c.length;d++){var e=c[d];a.removeOperation.bind(a)(e.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!e(a);for(var b in a)if(e(a[b]))return!1;return!0}});c.addCommand(f);
f=new d.Command({name:h.Cancel,tooltip:h["Cancel operations from the operations list."],imageClass:"core-sprite-stop",id:"eclipse.cancelOperation",callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=0;b<a.length;b++){var c=a[b];c.deferred&&c.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return e(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!e(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;return!0}});c.addCommand(f)}})();
return e});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(h,i,f,d,e){function g(c){this._options=c}g.prototype=new d.PopupDialog;g.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>';g.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.commandRegistry;e.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};g.prototype._bindToDom=function(){this.$allOperationsLink.href=i.toUrl("operations/list.html");this._setOperationsVisibility()};g.prototype.setOperations=function(c,b){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(c)for(var a in c)this._myOperations.push(c[a]),this._operationsDeferreds.push(b[a]);this._renderOperations()};g.prototype.parseProgressResult=function(c){if(!c)return{};c=c.responseText||c;try{c=JSON.parse(c)}catch(b){}var a={Message:c.Message||c,Severity:c.Severity};if(c.DetailedMessage&&c.DetailedMessage!==a.Message)a.DetailedMessage=c.DetailedMessage;return a};g.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};g.prototype._renderOperationsTable=function(c,b,a){f.empty(c);for(var d=0;d<b.length;d++){var e=b[d],g=document.createElement("tr"),i=document.createElement("td");i.style.paddingLeft="5px";i.style.paddingRight="5px";i.textContent=e.Name;g.appendChild(i);var o=document.createElement("div");i.appendChild(o);i=document.createElement("span");i.style.paddingRight="5px";i.classList.add("imageSprite");switch(e.type){case "Warning":i.classList.add("core-sprite-warning");i.setAttribute("aria-label",
h["Operation resulted in a warning."]);break;case "error":i.classList.add("core-sprite-error");i.setAttribute("aria-label",h["Operation resulted in an error."]);break;case "loadstart":case "progress":i.classList.add("core-sprite-start");i.setAttribute("aria-label",h["Operation is running."]);break;case "abort":i.classList.add("core-sprite-stop");i.setAttribute("aria-label",h["Operation is canceled."]);break;case "load":case "loadend":i.classList.add("core-sprite-ok"),i.setAttribute("aria-label","Operation ok.")}o.appendChild(i);
i=document.createElement("span");i.classList.add("operationStatus");i.textContent=e.Name;o.appendChild(i);if(e.error){var s=e.error.Message||e.error;e.error.DetailedMessage&&e.error.DetailedMessage!==""&&(s+=": "+e.error.DetailedMessage);i.textContent=s;i.classList.remove("operationStatus");i.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",o,{operation:e,deferred:a[d]},this,"tool");c.appendChild(g)}this._setOperationsVisibility()};g.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"};g.prototype.constructor=g;return{OperationsDialog:g}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(h,i,f,d,e){function g(b,a){if(!this._progressPane){this._progressPane=d.node(b);this._operationsDialog=new e.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var c=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===d.KEY.ENTER)&&c._operationsDialog.show()})}}function c(b,a,c,d){this._serviceRegistry=
b;this._serviceRegistration=b.registerService("orion.page.progress",this);this._commandRegistry=c;this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=d}g.prototype={_switchIconTo:function(b){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=b;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(b,a){var c=
{},d;for(d in b)b[d].progressMonitor||(c[d]=b[d]);if(this._isEmpty(c))this._switchIconTo("progressPane_empty"),this._progressPane.title=h.Operations,this._progressPane.alt=h.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var e="";for(d in c){var f=c[d];if(f.type&&(f.type==="loadstart"||f.type==="progress")){e="running";break}}switch(e){case "running":this._progressPane.title=h["Operations running"];this._progressPane.alt=h["Operations running"];
this._progressPane.setAttribute("aria-valuetext",h["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=h["Some operations finished with warning"];this._progressPane.alt=h["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",h["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=h["Some operations finished with error"];this._progressPane.alt=
h["Some operations finished with error"];this._progressPane.setAttribute("aria-valuetext",h["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=h.Operations,this._progressPane.alt=h.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(c,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};
g.prototype.constructon=g;c.prototype={init:function(b){if(!this._progressMonitorClass)this._progressMonitorTool=new g(b,this._commandRegistry)},progress:function(b,a,c){var d=this,e=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(a));b.then(function(){if(d._operations[e]){var f=d._operations[e];if(a)f.Name=a;d._lastOperation=f;f.type="loadend";if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b);f.Location||d._removeOperationFromTheList.bind(d)(e)}},
function(f){if(d._operations[e]){var g=d._operations[e];if(a)g.Name=a;if(c)g.progressMonitor=c;d._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;d.writeOperation.bind(d)(e,g,b);g.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(a)f.Name=a;if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b)});return b},removeOperation:function(b){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===b){this._removeOperationFromTheList(a);
break}this._operationsClient.removeOperation.bind(this._operationsClient)(b)},_removeOperationFromTheList:function(b){var a=this._operations[b].progressMonitor;delete this._operations[b];delete this._operationDeferrds[b];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var b in this._operations){var a=this._operations[b];if(a.type&&a.type!=="loadstart"&&a.type!=="progress")(a=this._operations[b].progressMonitor)&&
a.done(),delete this._operations[b],delete this._operationDeferrds[b]}this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},setProgressResult:function(b){this._serviceRegistry.getService("orion.page.message").setProgressResult(b)},showWhile:function(b,a){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);var c=this;b.then(function(){c._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){c.setProgressResult.bind(c)(a);
return a});return this.progress(b,a)},writeOperation:function(b,a,c){this._operations[b]=a;this._operationDeferrds[b]=c;a.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(b){b.put(a.Location,{Name:a.Name,expires:a.expires})});a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};c.prototype.constructor=c;return{ProgressService:c}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(h,i){function f(c,b,a){return c[b].apply(c,a)}function d(c){this._location=c}function e(){var c=new i;c.reject(h["No Matching OperationService for location:"]+this._location);return c}function g(c){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=c.getService("orion.core.preference");for(var b=c.getServiceReferences("orion.core.operation"),
a=0;a<b.length;a++){var e=c.getService(b[a]);this._services[a]=e;e=b[a].getProperty("pattern")||".*";e[0]!=="^"&&(e="^"+e);this._patterns[a]=RegExp(e)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];return new d(a)}}d.prototype={getOperation:e,getOperations:e,removeCompletedOperations:e,removeOperation:e,cancelOperation:e};d.prototype.constructor=d;g.prototype={getOperations:function(){var c=
new i;if(this._operations)return c.resolve(this._operations),c;var b=this;this._preferenceService.getPreferences("/operations").then(function(a){b._operations=a;c.resolve(b._operations)});return c},getOperation:function(c){return f(this._getService(c),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],b=this,a=0;a<this._services.length;a++){var d=this._patterns[a],e=new i;c[a]=e.promise;f(this._services[a],"removeCompletedOperations").then(function(a){return function(c){Array.isArray(c)&&
b.getOperations.bind(b)().then(function(b){for(var e=b.keys(),f=0;f<e.length;f++){var g=e[f];d.test(g)&&c.indexOf(g)<0&&b.remove(g)}a.resolve()})}}(e),function(a){return function(b){a.reject(b)}}(e))}return i.all(c)},removeOperation:function(c){var b=this;return f(this._getService(c),"removeOperation",arguments).then(function(){b.getOperations.bind(b)().then(function(a){a.remove(c)})},function(a){return a},function(a){return a})}};g.prototype.constructor=g;return{OperationsClient:g}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Replace:"Replace","Replace All":"Replace All","Search ${0}":"Search ${0}",
"Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",
Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes",
"Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Show All":"Show All","Show all the results in one page":"Show all the results in one page","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result","Next Page >":"Next Page >","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results",
"Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results","Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename","My Saved Searches":"My Saved Searches","Save frequently used searches by choosing ${0} shown above.":"Save frequently used searches by choosing ${0} shown above.",
"Files that contain:":"Files that contain:",Search:"Search","All types":"All types","File type":"File type","All ${0} files":"All ${0} files","Type a search term":"Type a search term","Type a replace term":"Type a replace term","Case sensitive":"Case sensitive","Sort by":"Sort by","File name":"File name","Path name":"Path name",Save:"Save","Type a name for the search":"Type a name for the search","Save the current search":"Save the current search","Type filter text":"Type filter text","Scope Search":"Scope Search",
"Open in Search page for this directory":"Open in Search page for this directory","${0}. Try your search again.":"${0}. Try your search again.","Click or use delete key to delete the search term":"Click or use delete key to delete the search term"});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,i){function f(d){this._init(d)}f.prototype={_init:function(d){var e=d.parent,f=this,e=i.node(e);if(!e)throw h["no parent"];if(!d.model)throw h["no tree model"];if(!d.renderer)throw h["no renderer"];this._parent=e;this._treeModel=d.model;this._renderer=d.renderer;this._showRoot=d.showRoot===void 0?!1:d.showRoot;this._indent=d.indent===void 0?16:d.indent;this._onCollapse=d.onCollapse;this._labelColumnIndex=
d.labelColumnIndex===void 0?0:d.labelColumnIndex;this._id=d.id===void 0?"treetable":d.id;this._tableStyle=d.tableStyle;this._tableElement=d.tableElement||"table";this._tableBodyElement=d.tableBodyElement||"tbody";this._tableRowElement=d.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(c){f._showRoot?(c._depth=0,f._generate([c],0)):f._treeModel.getChildren(c,function(b){f._generate(b,0)})})},_generate:function(d,e){i.empty(this._parent);var f=document.createElement("div");this._renderer.wrapperCallback&&
this._renderer.wrapperCallback(f);var c=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(c);c.id=this._id;this._tableStyle&&c.classList.add(this._tableStyle);this._renderer.initTable(c,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+"tbody";this._generateChildren(d,e);c.appendChild(this._bodyElement);f.appendChild(c);
this._parent.appendChild(f);this._rowsChanged()},_generateChildren:function(d,e,f){for(var c=0;c<d.length;c++){var b=document.createElement(this._tableRowElement);b.id=this._treeModel.getId(d[c]);this._renderer.rowCallback&&this._renderer.rowCallback(b);b._depth=e;b._item=d[c];this._renderer.render(d[c],b);b.childNodes[this._labelColumnIndex].style.paddingLeft=this._indent*e+"px";f?(this._bodyElement.insertBefore(b,f.nextSibling),f&&(f=b)):this._bodyElement.appendChild(b)}},_rowsChanged:function(){this._renderer.rowsChanged&&
this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(d,e,f){var c=this._treeModel.getId(d),b;if(c===this._id)this._removeChildRows(c),this._generateChildren(e,0),this._rowsChanged();else{var a=i.node(c);a?(a._item=d,a&&(f||a._expanded)?(a._expanded=!0,this._removeChildRows(c),this._renderer.updateExpandVisuals(a,!0),e?(this._generateChildren(e,a._depth+1,a),this._rowsChanged()):(b=this,e=this._treeModel.getChildren(a._item,function(c){b._generateChildren(c,
a._depth+1,a);b._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(h["could not find table row "]+c)}},getItem:function(d){var e=i.node(d);return e&&e._item?e._item:d},toggle:function(d){var e=i.node(d);e&&(e._expanded?(this.collapse(d),this._renderer.updateExpandVisuals(e,!1)):(this.expand(d),this._renderer.updateExpandVisuals(e,!0)))},isExpanded:function(d){return(d=i.node(d))?d._expanded:!1},expand:function(d,e,f){var d=typeof d==="string"?d:this._treeModel.getId(d),c=i.node(d);
if(c&&!c._expanded){c._expanded=!0;var b=this;this._renderer.updateExpandVisuals(c,!0);this._treeModel.getChildren(c._item,function(a){b._generateChildren(a,c._depth+1,c);b._rowsChanged();e&&e.apply(b,f)})}},_removeChildRows:function(d){for(var e=d===this._id,f=!1,c=-1,b=[],a=i.$$array(".treeTableRow",this._parent),j=0;j<a.length;j++){var h=a[j];if(f)break;if(e)h._depth>c?b.push(h):f=!0;else if(h.id===d)e=!0,c=h._depth}for(d=0;d<b.length;d++)e=b[d],e.parentNode.removeChild(e)},collapse:function(d){var d=
typeof d==="string"?d:this._treeModel.getId(d),e=i.node(d);if(e){if(!e._expanded)return;e._expanded=!1;this._renderer.updateExpandVisuals(e,!1);this._removeChildRows(d);this._rowsChanged()}this._onCollapse&&this._onCollapse(e._item)}};f.prototype.constructor=f;return{TableTree:f}});
define("orion/treeModelIterator",[],function(){var h={};h.TreeModelIterator=function(){function h(f,d){this.firstLevelChildren=f;this.reset();this._init(d)}h.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 d=this._getChildren(f),d=d&&d.length>0;this.isExpanded&&d&&(d=this.isExpanded(f));return d},_expandable:function(f){return!f?!0:this.isExpandable?this.isExpandable(f):!1},_diveIn:function(f){return this._expanded(f)?(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 d=this._diveIn(this._cursor);
if(!d){if(f&&this._expandable(this._cursor)&&this.forceExpandFunc){var e=this;return this.forceExpandFunc(this._cursor,"first",function(d){d&&e.setCursor(d)})}(d=this._findSibling(this._cursor,!0))&&this.setCursor(d)}return d},_backward:function(f){if(!this._cursor)return null;var d=this._findSibling(this._cursor,!1);d&&d!==this._cursor.parent&&(d=this._drillToLast(d));if(f&&d&&this._expandable(d)&&this.forceExpandFunc&&d!==this._cursor.parent){var e=this;return this.forceExpandFunc(d,"last",function(d){d&&
e.setCursor(d)})}d&&this.setCursor(d);return d},_findSibling:function(f,d){for(var e=this.topLevel(f),g=this._getChildren(f.parent),g=e?this.firstLevelChildren:g,c=0;c<g.length;c++)if(g[c]===f)return c===0&&!d?e?null:f.parent:c===g.length-1&&d?e?null:this._findSibling(f.parent,d):d?g[c+1]:g[c-1];return null},_inParentChain:function(f,d){for(var e=f.parent;e;){if(e===d)return!0;e=e.parent}return!1},_getTopLevelParent:function(f){if(this.topLevel(f))return f;for(f=f.parent;f;){if(this.topLevel(f))return f;
f=f.parent}return null},_onCollapse:function(f){return this._expanded(f.parent)?f:this._onCollapse(f.parent)},_scan:function(f,d,e){this.setCursor(d);var g=[];for(g.push(d);;){if(this.iterate(f))g.push(this.cursor());else break;if(e===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,d){var e=this.cursor(),
g=this._scan(!0,f,d);g||(g=this._scan(!1,f,d));this.setCursor(e);return g},iterate:function(f,d){return f?this._forward(d):this._backward(d)},iterateOnTop:function(f,d){var e=this._findSibling(this._getTopLevelParent(this.cursor()),f);e?this.setCursor(e):d&&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 h}();return h});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator"],function(h,i,f){var h={},d=navigator.userAgent.indexOf("iPad")!==-1,e=window.navigator.platform.indexOf("Mac")!==-1;h.ExplorerNavHandler=function(){function g(c,b,a){this.explorer=c;this.model=this.explorer.model;this._navDict=b;this._listeners=[];this._selections=[];this._currentColumn=0;var d=this._getEventListeningDiv();d.tabIndex=0;d.classList.add("selectionModelContainer");
var e=this;this._modelIterator=new f.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:a.getChildrenFunc,isExpandable:this.explorer.renderer.isExpandable?function(a){return e.explorer.renderer.isExpandable(a)}:function(a){return e.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return e.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(a);(!a||a.setFocus!==!1)&&d.focus();c=function(a){if(a.target===d){if(e.explorer.preventDefaultFunc&&e.explorer.preventDefaultFunc(a,
e._modelIterator.cursor()))return!0;if(a.keyCode===i.KEY.DOWN)return e.onDownArrow(a);else if(a.keyCode===i.KEY.UP)return e.onUpArrow(a);else if(a.keyCode===i.KEY.RIGHT)return e.onRightArrow(a);else if(a.keyCode===i.KEY.LEFT)return e.onLeftArrow(a);else if(a.keyCode===i.KEY.SPACE)return e.onSpace(a);else if(a.keyCode===i.KEY.ENTER)return e.onEnter(a)}};d.addEventListener("keydown",c,!1);this._listeners.push({type:"keydown",listener:c});c=function(){if(e.explorer.onFocus)e.explorer.onFocus(!1);else e.toggleCursor(null,
!1)};d.addEventListener("blur",c,!1);this._listeners.push({type:"blur",listener:c});c=function(){if(e.explorer.onFocus)e.explorer.onFocus(!0);else e.toggleCursor(null,!0)};d.addEventListener("focus",c,!1);this._listeners.push({type:"focus",listener:c});this._parentDiv=d}g.prototype={_init:function(c){this._linearGridMove=!1;if(c)this._selectionPolicy=c.selectionPolicy,this.gridClickSelectionPolicy=c.gridClickSelectionPolicy||"none",this.preventDefaultFunc=c.preventDefaultFunc,this.postDefaultFunc=
c.postDefaultFunc},_ctrlKeyOn:function(c){return e?c.metaKey:c.ctrlKey},removeListeners:function(){if(this._listeners)for(var c=0;c<this._listeners.length;c++)this._parentDiv.removeEventListener(this._listeners[c].type,this._listeners[c].listener,!1)},focus:function(){var c=this._getEventListeningDiv();c&&c.focus()},_getEventListeningDiv:function(c){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv==="function"?this.explorer.keyEventListeningDiv(c):i.node(this.explorer._parentId)},
isExpandable:function(c){return!c?!1:i.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)))?!0:!1},isExpanded:function(c){return!c?!1:this.explorer.myTree.isExpanded(this.model.getId(c))},refreshSelection:function(c){var b=this;this.explorer.selection&&this.explorer.selection.getSelections(function(a){b._clearSelection();for(var d=0;d<a.length;d++)b._selections.push(a[d]);b._selections.length>0&&b.cursorOn(b._selections[0],!0,!1,c)})},refreshModel:function(c,b,a,d){this._currentColumn=
0;this.topIterationNodes=[];this.model=b;this._navDict=c;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(a)this.topIterationNodes=a;this._modelIterator.setTree(this.topIterationNodes);!d&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(c){for(var c=this.model.getId(c),b=0;b<this._selections.length;b++)if(c===this.model.getId(this._selections[b]))return b;
return-1},_clearSelection:function(c){if(c)for(c=0;c<this._selections.length;c++)this._checkRow(this._selections[c],!0);this._selections=[]},setSelection:function(c,b){if(this._selectionPolicy==="cursorOnly")b&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(c,!0);else if(this._isRowSelectable(c)){if(!b||this._selectionPolicy==="singleSelection")this._clearSelection(!0),this._checkRow(c,!1),this._selections.push(c),this._lastSelection=c;else{var a=this._inSelection(c);a>=0?(this._checkRow(c,
!0),this._selections.splice(a,1)):(this._checkRow(c,!1),this._selections.push(c),this._lastSelection=c)}this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(c,b){c||(c=this.currentModel());var a=this._getGridChildren(c);if(a&&a.length>1||b===0&&a){b!==0&&this.toggleCursor(c,!1);var d=this._currentColumn,e=!0;d+=b;d<0?(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!1)?c=this.currentModel():e=!1),
d=e?a.length-1:this._currentColumn):d>=a.length&&(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!0)?c=this.currentModel():e=!1),d=e?0:this._currentColumn);this._currentColumn=d;b!==0&&this.toggleCursor(c,!0);return!0}return!1},_getGridChildren:function(c){return this._navDict?this._navDict.getGridNavHolder(c):null},getCurrentGrid:function(c){c||(c=this.currentModel());return(c=this._getGridChildren(c))&&c.length>0?c[this._currentColumn]:null},getAriaContainerElement:function(c){for(var b=
this._parentDiv,a;c&&c!==b&&(a=c.getAttribute("role"))!=="grid"&&a!=="tree"&&a!=="treegrid";)c=c.parentNode;return c===b?null:c},toggleCursor:function(c,b){var a=this.getRowDiv(c),d=this.getCurrentGrid(c);d?(a&&(b?a.classList.add("treeIterationCursorRow"):a.classList.remove("treeIterationCursorRow")),d.domNode&&(a=this.getAriaContainerElement(d.domNode),b?(d.domNode.classList.add("treeIterationCursor"),a&&a.setAttribute("aria-activedescendant",d.domNode.id)):d.domNode.classList.remove("treeIterationCursor"))):
a&&(b?a.classList.add("treeIterationCursorRow_Dotted"):a.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(c,b,a,d){var a=a===void 0?!1:a,e,f;if(c||b){if(f===this._modelIterator.cursor())return;e=this._modelIterator.cursor();f=c;this._modelIterator.setCursor(f)}else e=this._modelIterator.prevCursor(),f=this._modelIterator.cursor();if(e!==f||b)if(this.toggleCursor(e,!1),!b||f)if(this.moveColumn(null,0),this.toggleCursor(f,
!0),(c=this.getRowDiv())&&!d&&!this._visible(c)&&c.scrollIntoView(!a),this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,f)},getSelection:function(){return this._selections},getSelectionIds:function(){for(var c=[],b=0;b<this._selections.length;b++)c.push(this.model.getId(this._selections[b]));return c},getRowDiv:function(c){c=c?c:this._modelIterator.cursor();if(!c)return null;var c=this.model.getId(c),b=this._navDict.getValue(c);return b&&b.rowDomNode?b.rowDomNode:i.node(c)},iterate:function(c,
b,a){this.topIterationNodes.length!==0&&this._modelIterator.iterate(c,b)&&(this.cursorOn(null,!1,c),a&&this.setSelection(this.currentModel(),!0))},_checkRow:function(c,b){if(this.explorer.renderer._useCheckboxSelection){var a=this.getRowDiv(c);if(a){var d=i.node(this.explorer.renderer.getCheckBoxId(a.id)),e=b?!d.checked:!0;if(e!==d.checked)this.explorer.renderer.onCheck(a,d,e,!0)}}else this._select(c,b)},_vpWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},
_vpHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},_getToolBarHeight:function(c){return(c=i.node(c))?i.bounds(c).height:0},_visible:function(c){if(c.offsetWidth===0||c.offsetHeight===0)return!1;var b=0;b+=this._getToolBarHeight("staticBanner");b+=this._getToolBarHeight("titleArea");b+=this._getToolBarHeight("pageToolbar");var a=this._getEventListeningDiv(!0).getClientRects()[0],d=this._vpHeight();this._vpWidth();for(var b=a.top>b?a.top:
b,a=a.bottom<d?a.bottom:d,c=c.getClientRects(),d=0,e=c.length;d<e;d++){var f=c[d];if(f.top>=b&&f.top<=a&&f.bottom>=b&&f.bottom<=a)return!0}return!1},_select:function(c){c||(c=this._modelIterator.cursor());var b=this.getRowDiv(c);b&&(this._inSelection(c)<0?b.classList.add("checkedRow"):b.classList.remove("checkedRow"))},_onModelGrid:function(c,b){var a=this._getGridChildren(c);if(a)for(var d=0;d<a.length;d++)if(b.target===a[d].domNode)return!0;return!1},onClick:function(c,b){var a=i.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)));
if(b.target!==a&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(c,b)))if(this.cursorOn(c,!0,!1,!0),d)this.setSelection(c,!0);else if(this._ctrlKeyOn(b))this.setSelection(c,!0);else if(b.shiftKey&&this._lastSelection){if(a=this._modelIterator.scan(this._lastSelection,c)){this._clearSelection(!0);for(var e=0;e<a.length;e++)this.setSelection(a[e],!0)}}else this.setSelection(c,!1)},onCollapse:function(c){this._modelIterator.collapse(c)&&this.cursorOn()},onUpArrow:function(c){this.iterate(!1,
!1,c.shiftKey);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1);c.preventDefault();return!1},onDownArrow:function(c){this.iterate(!0,!1,c.shiftKey);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1);c.preventDefault();return!1},_shouldMoveColumn:function(c){var b=this.currentModel(),a=this._getGridChildren(b);return a&&a.length>1?this.isExpandable(b)?this._ctrlKeyOn(c):!0:!1},onLeftArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,
-1),c.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&this.isExpanded(b))return this.explorer.myTree.collapse(b),c.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))},onRightArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,1),c.preventDefault(),!0;var b=this._modelIterator.cursor();
if(!b)return!1;if(this.isExpandable(b)&&!this.isExpanded(b))return this.explorer.myTree.expand(b),c.preventDefault(),!1},_isRowSelectable:function(c){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(c):!0},onSpace:function(c){this.setSelection(this.currentModel(),!0);c.preventDefault()},onEnter:function(c){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 a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(c),!1,!1,!1,0,null);b.domNode.dispatchEvent(a)}else if(this.explorer.renderer.getRowActionElement&&(b=this._modelIterator.cursor()))if(b=this.explorer.renderer.getRowActionElement(this.model.getId(b)),b.href)this._ctrlKeyOn(c)?window.open(b.href):window.location.href=b.href}};return g}();h.ExplorerNavDict=function(){function d(c){this._dict={};this._model=c}d.prototype={addRow:function(c,
b){this._dict[this._model.getId(c)]={model:c,rowDomNode:b}},getValue:function(c){return this._dict[c]},getGridNavHolder:function(c,b){if(!c)return null;var a=this._model.getId(c);if(this._dict[a]){if(!this._dict[a].gridChildren&&b)this._dict[a].gridChildren=[];return this._dict[a].gridChildren}return null},initGridNavHolder:function(c){if(!c)return null;c=this._model.getId(c);if(this._dict[c])this._dict[c].gridChildren=null}};return d}();return h});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands,orion/commandRegistry".split(","),function(h,i,f,d,e,g){var c={};c.Explorer=function(){function b(a,b,c,d){this.registry=a;this.renderer=c;this.selection=b;this.commandService=d;this.myTree=null}b.prototype={changedItem:function(a,b){this.myTree&&this.myTree.refresh.bind(this.myTree)(a,b,!0)},updateCommands:function(a){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(a)},
makeNewItemPlaceHolder:function(a,b,c){a=this.getRow(a);if(c)return a=a.childNodes[c],a.appendChild(document.createElement("br")),c=document.createElement("span"),c.id=b+"placeHolderRow",a.appendChild(c),{tempNode:c,refNode:c};if(a){c=document.createElement("tr");c.id=b+"placeHolderRow";var d=document.createElement("td");d.id=b+"placeHolderCol";c.appendChild(d);a.appendChild(c);c=f.node(b+"placeHolderRow");a=f.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=
this.model.getId(a))return f.node(a)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this.myTree.collapse(a[b])},expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler)for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this._expandRecursively(a[b])},_expandRecursively:function(a){if(this._navHandler&&this._navHandler.isExpandable(a)){var b=this;this.myTree.expand(a,function(){b.model.getChildren(a,function(a){if(!(a===
void 0||a===null))for(var c=a.length,d=0;d<c;d++)b._expandRecursively(a[d])})})}},createTree:function(a,b,c){a=typeof a==="string"?a:a.id||a;this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=a+"innerTree",h=f.node(g);h&&f.empty(h);if(b)b.rootId=g;this.model=b;this._parentId=a;this._treeOptions=c;if(!c||c&&!c.noSelection)this.selectionPolicy=c?c.selectionPolicy:"",this._navDict=new e.ExplorerNavDict(this.model);this.myTree=new d.TableTree({id:g,
model:b,parent:a,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:c?!!c.showRoot:!1,indent:c?c.indent:void 0,onCollapse:c?c.onCollapse:void 0,navHandlerFactory:c?c.navHandlerFactory:void 0,tableElement:c?c.tableElement:void 0,tableBodyElement:c?c.tableBodyElement:void 0,tableRowElement:c?c.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy==="cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},
refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),b=[];if(a&&this.getNavDict())for(var c=a.getSelection(),d=0;d<c.length;d++){var e=a.getRowDiv(c[d]);e&&e.parentNode&&(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&b.push(e.model))}this.selection.setSelections(b)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:null},initNavHandler:function(){var a=this._treeOptions;if(!a||a&&!a.noSelection){if(!this.getNavHandler())this._navHandler=
a&&a.navHandlerFactory&&typeof a.navHandlerFactory.createNavHandler==="function"?a.navHandlerFactory.createNavHandler(this,this._navDict,a):new e.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:a?a.getChildrenFunc:null,setFocus:a&&a.setFocus,selectionPolicy:a?a.selectionPolicy:null});var b=this;this.model.getRoot(function(c){c instanceof Array?b.getNavHandler().refreshModel(b.getNavDict(),b.model,c):c.children&&c.children instanceof Array&&b.getNavHandler().refreshModel(b.getNavDict(),b.model,
c.children);a&&a.setFocus&&b.getNavHandler().cursorOn(null,!1,!1,!0)})}},_lastHash:null,checkbox:!1};return b}();c.createExplorerCommands=function(b,a){function c(b){return typeof b.getItemCount==="function"?b.getItemCount()>0?a?a(b):!0:!1:!1}var d=new g.Command({tooltip:h["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.expandAll()}}),e=new g.Command({tooltip:h["Collapse all"],
imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.collapseAll()}});b.addCommand(d);b.addCommand(e)};c.ExplorerModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.idPrefix=c||""}b.prototype={destroy:function(){},getRoot:function(a){var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})},getChildren:function(a,b){a.Children?b(a.Children):a.ChildrenLocation?
this.fetchItems(a.ChildrenLocation).then(function(c){a.Children=c;b(c)}):b([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;for(var a=a.Location.replace(/[\\\/]/g,""),b=this.idPrefix,c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return b}};return b}();c.ExplorerFlatModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.root=c}b.prototype=new c.ExplorerModel;b.prototype.getRoot=function(a){if(this.root)a(this.root);else{var b=
this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})}};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return b}();c.ExplorerRenderer=function(){function b(a,b){this.explorer=b;this._init(a);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite"}b.prototype={_init:function(a){if(a){this._useCheckboxSelection=a.checkbox===void 0?!1:a.checkbox;this.selectionPolicy=a.singleSelection?
"singleSelection":"";this._cachePrefix=a.cachePrefix;this.getCheckedFunc=a.getCheckedFunc;this.onCheckedFunc=a.onCheckedFunc;this._highlightSelection=!0;this._treeTableClass=a.treeTableClass||"treetable";if(a.highlightSelection===!1)this._highlightSelection=!1;if(!this.actionScopeId)this.actionScopeId=a.actionScopeId;if(!this.commandService)this.commandService=a.commandService}},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(a,b){this.tableTree=b;f.empty(a);this._treeTableClass&&
a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){var c=c||"tool",f=document.createElement("td");f.id=b.id+"actionswrapper";d&&f.classList.add(d);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,f,a,this.explorer,c,null,e&&this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(a,!0):null):window.console.log("Warning, no command service or action scope was specified.  No commands rendered.");
return f},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),d=document.createElement("span");d.id=this.getCheckBoxId(b.id);d.classList.add("core-sprite-check");d.classList.add("selectionCheckmarkSprite");d.rowId=b.id;if(this.getCheckedFunc)d.checked=this.getCheckedFunc(a),d.checked?(this._highlightSelection&&b.classList.add("checkedRow"),d.classList.add("core-sprite-check_on")):
(this._highlightSelection&&b.classList.remove("checkedRow"),d.classList.remove("core-sprite-check_on"));c.appendChild(d);var e=this;d.addEventListener("click",function(a){e.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,d,e){(b.checked=c)?b.classList.add("core-sprite-check_on"):b.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(b.rowId,c,d);this.explorer.getNavHandler()&&e&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,
!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),b=this._getUIStatePreferencePath();b&&window.sessionStorage&&(window.sessionStorage[b+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){a=window.sessionStorage[a+"selection"];typeof a==="string"&&(a=a.length>0?JSON.parse(a):null);var b;if(a&&this.explorer.getNavDict()){var c=[];for(b=0;b<a.length;b++){var d=this.explorer.getNavDict().getValue(a[b]);if(d&&d.rowDomNode&&
d.model&&(c.push(d.model),this._highlightSelection&&d.rowDomNode.classList.add("checkedRow"),d=f.node(this.getCheckBoxId(d.rowDomNode.id))))d.checked=!0,d.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(c),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(a){var b=!1,c=window.sessionStorage[a+
"expanded"];typeof c==="string"&&(c=c.length>0?JSON.parse(c):null);var d;if(c)for(d=0;d<c.length;d++)if(f.node(c[d])){this._expanded.push(c[d]);var e=this;this.tableTree.expand(c[d],function(){e._restoreSelections(a)});b=!0}return!b},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&a)return"/"+this._cachePrefix+"/"+a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(a){return a+"__expand"},updateExpandVisuals:function(a,
b){var c=f.node(this.expandCollapseImageId(a.id));c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(a,b,c,d){var e=document.createElement("span");e.id=this.expandCollapseImageId(a.id);b.appendChild(e);e.classList.add(this._twistieSpriteClass);e.classList.add(this._collapseImageClass);if(c){var f=document.createElement("span");b.appendChild(f);f.classList.add(d||"imageSprite");f.classList.add(c)}var g=
this;e.onclick=function(){g.tableTree.toggle(a.id);if(g.tableTree.isExpanded(a.id))g._expanded.push(a.id);else for(var b in g._expanded)if(g._expanded[b]===a.id){g._expanded.splice(b,1);break}(b=g._getUIStatePreferencePath())&&window.sessionStorage&&g._storeExpansions(b)};return e},render:function(a,b){b.classList.add("navRow");this.renderRow(a,b)},rowsChanged:function(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler())},updateCommands:function(){if(this.commandService)for(var a=
f.$$array(".treeTableRow"),b=0;b<a.length;b++){var c=a[b],d=f.node(c.id+"actionswrapper");this.commandService.destroy(d);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,d,c._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return b}();c.SelectionRenderer=function(){function b(a,b){this._init(a);this.explorer=b}b.prototype=new c.ExplorerRenderer;
b.prototype.renderTableHeader=function(a){var b=document.createElement("thead"),c=document.createElement("tr");b.classList.add("navTableHeading");this._useCheckboxSelection&&c.appendChild(this.initCheckboxColumn(a));for(var d=0,e=this.getCellHeaderElement(d);e;)e.innerHTML.length>0&&e.classList.add("navColumn"),c.appendChild(e),e=this.getCellHeaderElement(++d);b.appendChild(c);d>0&&a.appendChild(b)};b.prototype.renderRow=function(a,b){b.verticalAlign="baseline";b.classList.add("treeTableRow");var c=
this.explorer.getNavDict();if(c){c.addRow(a,b);var d=this;b.addEventListener("click",function(b){if(d.explorer.getNavHandler())d.explorer.getNavHandler().onClick(a,b)},!1)}if(c=this.getCheckboxColumn(a,b))c.classList.add("checkColumn"),b.appendChild(c);for(var c=0,e=this.getCellElement(c,a,b);e;)b.appendChild(e),c===0?this.getPrimColumnStyle?e.classList.add(this.getPrimColumnStyle()):e.classList.add("navColumn"):this.getSecondaryColumnStyle?e.classList.add(this.getSecondaryColumnStyle()):e.classList.add("secondaryColumn"),
e=this.getCellElement(++c,a,b)};b.prototype.getCellHeaderElement=function(){};b.prototype.getCellElement=function(){};return b}();c.SimpleFlatModel=function(){function b(a,b,c){this.items=a;this.getKey=c;this.idPrefix=b;this.root={children:a}}b.prototype=new c.ExplorerModel;b.prototype.getRoot=function(a){a(this.root)};b.prototype.destroy=function(){};b.prototype.getId=function(a){for(var a=this.getKey(a).replace(/[\\\/]/g,""),b="",c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):
a[c];return this.idPrefix+b};b.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return b}();return c});
define("orion/explorers/navigatorRenderer","i18n!orion/navigate/nls/messages,orion/Deferred,orion/webui/littlelib,orion/explorers/explorer,orion/explorers/navigationUtils,orion/extensionCommands,orion/contentTypes".split(","),function(h,i,f,d,e,g){function c(a,b,c,d,e,f,h){var n;if(b.Directory)n=document.createElement("a"),n.className="navlinkonpage",n.href=a+"#"+b.ChildrenLocation,n.appendChild(document.createTextNode(b.Name));else{e||(e=g.getOpenWithCommands(c));if(!f)for(a=0;a<e.length;a++)e[a].isEditor===
"default"&&(f=e[a]);n=document.createElement("a");n.className="navlink targetSelector";h&&typeof h==="object"&&Object.keys(h).forEach(function(a){n[a]=h[a]});n.appendChild(document.createTextNode(b.Name));for(var q=b.Location,p=!1,a=0;a<e.length;a++)if(c=e[a],c.visibleWhen(b)){q=c.hrefCallback({items:b});p=!0;break}i.when(d.getFileContentType(b),function(a){var c;if(c=!p)if(c=f){a:{switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":c=
!0;break a}c=!1}c=!c}c&&(q=f.hrefCallback({items:b}));c=n;var d=b.Location,e;switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":e=document.createElement("img");e.src=d;e.classList.add("thumbnail");break;default:a&&a.image?(e=document.createElement("img"),e.src=a.image,e.classList.add("thumbnail")):(e=document.createElement("span"),e.className="core-sprite-file_model modelDecorationSprite")}c.firstChild?c.insertBefore(e,c.firstChild):
c.appendChild(e);n.href=q})}return n}function b(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"}b.prototype=new d.SelectionRenderer;b.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};b.prototype.tableCallback=function(a){a.setAttribute("aria-label",h.Navigator);a.setAttribute("role","presentation")};b.prototype.rowCallback=function(a){a.setAttribute("role","treeitem")};
b.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"}};b.prototype.setTarget=function(a){this.target=a};b.prototype.createFolderNode=function(a){var b;this.showFolderLinks?b=c(this.folderLink||"",a,this.commandService,this.contentTypeService):(b=document.createElement("span"),b.textContent=a.Name);return b};b.prototype.showFolderLinks=!0;b.prototype.getCellElement=function(a,b,d){switch(a){case 0:var a=
document.createElement("td"),f=document.createElement("span");f.id=d.id+"MainCol";f.setAttribute("role","presentation");a.appendChild(f);a.setAttribute("role","presentation");f.className="mainNavColumn";var h;if(b.Directory)this.getExpandImage(d,f),h=this.createFolderNode(b),f.appendChild(h),this.explorer._makeDropTarget(b,h),this.explorer._makeDropTarget(b,d);else{if(!this.openWithCommands){this.openWithCommands=g.getOpenWithCommands(this.commandService);for(h=0;h<this.openWithCommands.length;h++)if(this.openWithCommands[h].isEditor===
"default")this.defaultEditor=this.openWithCommands[h]}h=c("",b,this.commandService,this.contentTypeService,this.openWithCommands,this.defaultEditor,{target:this.target});f.appendChild(h)}if(h)h.id=d.id+"NameLink",h.nodeType===1&&(e.addNavGrid(this.explorer.getNavDict(),b,h),h.setAttribute("role","link"),h.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,f,b,this.explorer,"tool",null,!0);return a;case 1:if(this.oneColumn)return null;d=document.createElement("td");
if(b.LocalTimeStamp)d.textContent=(new Date(b.LocalTimeStamp)).toLocaleString();return d;case 2:if(this.oneColumn)return null;d=document.createElement("td");if(!b.Directory&&typeof b.Length==="number")b=parseInt(b.Length,10)/1024,d.textContent=Math.ceil(b).toLocaleString()+" KB";d.style.textAlign="right";return d}};b.prototype.constructor=b;return{NavigatorRenderer:b,createLink:c}});
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(h,i,f,d,e,g,c,b,a){function j(a,b){this.serviceRegistry=a;this.commandRegistry=b;this.openWithCommands=null}function k(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new j(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}j.prototype.makeRenderFunction=function(e,g,j,k,n){var q=this.serviceRegistry,p=this.commandRegistry;this.openWithCommands=this.openWithCommands||b.createOpenWithCommands(q,e,p);var t=this;return function(b,q,r){a.when(t.openWithCommands,function(a){if(r)f.empty(g),a=document.createElement("div"),a.appendChild(document.createTextNode(h["Search failed."])),g.appendChild(a),typeof k==="function"&&k(g);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)}}}(),B=!1;f.empty(g);if(b&&b.length>0){var A=document.createElement("table");A.setAttribute("role","presentation");for(var y=0;y<b.length;y++){var u=
b[y],C;if(!B&&(B=!0,j))C=A.insertRow(0).insertCell(0),C.textContent=j;C=A.insertRow(-1).insertCell(0);C.colspan=2;n&&n(C);var D={Name:u.name,Directory:u.directory,Location:u.path||u.location},D=c.createLink(i.toUrl("navigate/table.html"),D,p,e,a,null,{"aria-describedby":(u.folderName?u.folderName:u.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""),style:{verticalAlign:"middle"}});u.LineNumber&&D.appendChild(document.createTextNode(" (Line "+u.LineNumber+")"));C.appendChild(D);t(C,u)}g.appendChild(A);typeof k===
"function"&&k(g)}!B&&q&&(a=d.formatMessage(h["No matches found for ${0}"],q),f.empty(g),g.appendChild(document.createTextNode(a)),typeof k==="function"&&k(g))}})}};k.prototype={search:function(a,b,c){var d=function(a){for(var b=[],c=0;c<a.response.docs.length;c++){var d=a.response.docs[c];b.push({name:d.Name,path:d.Location,folderName:e.path2FolderName(d.Path?d.Path:d.Location,d.Name),directory:d.Directory,lineNumber:d.LineNumber})}return b};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,
function(a){c(d(a),null)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(a),"Searching "+a.keyword).then(function(b){var e=a.keyword,e=e.substring(e.indexOf("}")+1),e=e.substring(e.indexOf(":")+1);c(d(b),e)},function(a){c(null,null,a)})}catch(f){typeof f==="string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(a){c(d(a),null)}):typeof f==="string"&&f.indexOf("search")>-1&&!a.nameSearch?(new g.SearchCrawler(this.registry,this._fileService,
a,{childrenLocation:this.getChildrenLocation()})).search(function(a){c(d(a),null)}):this.registry.getService("orion.page.message").setErrorMessage(f)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=a},handleError:function(a,b){console.error(a);f.empty(b);b.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,b){var c="",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),c=e.Name,this._childrenLocation=e.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),c=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation;e=f.node("search");c||(c="");if(e&&e.placeholder){e.value="";var g=d.formatMessage(h["Search ${0}"],c);e.placeholder=g.length>30?g.substring(0,27)+"...":d.formatMessage(h["Search ${0}"],
c)}if(e&&e.title)e.title=h["Type a keyword or wild card to search in "]+c},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=a},getSearchLocation:function(){return this._searchLocation?this._searchLocation:this._fileService.fileServiceRootURL()},getSearchRootLocation:function(){return this._searchRootLocation?this._searchRootLocation:this._fileService.fileServiceRootURL()},getChildrenLocation:function(){return this._childrenLocation?
this._childrenLocation:this._fileService.fileServiceRootURL()},createSearchParams:function(a,b,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return b?{resource:c,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:a}:{resource:c,sort:d&&d.sort?d.sort:"Path asc",rows:d&&d.rows?d.rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.fileType:void 0,keyword:a,replace:d?d.replace:void 0}}};k.prototype.constructor=k;return{Searcher:k}});
define("orion/sites/siteUtils",["require","orion/fileUtils","orion/URITemplate"],function(h,i,f){return{generateEditSiteHref:function(d){var e=h.toUrl("sites/site.html");return(new f(e+"#{,resource,params*}")).expand({resource:i.makeRelative(d.Location)})}}});
define("orion/sites/nls/root/messages",{OK:"OK","Name:":"Name:",Path:"Path","Mount at (server path)":"Mount at (server path)","Mappings:":"Mappings:","Hostname hint:":"Hostname hint:","Status:":"Status:","Not a valid name":"Not a valid name","Not a valid hostname":"Not a valid hostname","Convert to Self-Hosting":"Convert to Self-Hosting","Enable the site configuration to launch an Orion server running your local client code":"Enable the site configuration to launch an Orion server running your local client code",
Save:"Save","Save the site configuration":"Save the site configuration","Choose folder...":"Choose folder\u2026","Choose Orion Source Folder":"Choose Orion Source Folder",SelectRepoSourceFolder:"Select the folder where you checked out the ${0} repository:","Loading...":"Loading...",Add:"Add","Add a directory mapping to the site configuration":"Add a directory mapping to the site configuration","There are unsaved changes. Do you still want to navigate away?":"There are unsaved changes. Do you still want to navigate away?",
"There are unsaved changes.":"There are unsaved changes.","Service method missing: ":"Service method missing: ","No Matching SiteService for ":"No Matching SiteService for ",Create:"Create","Create a new site configuration":"Create a new site configuration",Edit:"Edit","Edit the site configuration":"Edit the site configuration",Delete:"Delete","Delete the site configuration":"Delete the site configuration",ConfirmDeleteSingle:"Are you sure you want to delete the site configuration '${0}'?",ConfirmDeleteMultiple:"Are you sure you want to delete these ${0} site configurations?",
ViewOnSiteTitle:"View on Site",ViewOnSiteCaption:"Choose a site configuration to view '${0}' on.","Add to site":"Add to site","Add the file to this site":"Add the file to this site",View:"View","View the file on the site":"View the file on the site",Started:"Started at",Unknown:"Unknown",Name:"Name",Actions:"Actions",Status:"Status",URL:"URL","New Site":"New Site",WorkspaceFile:"Workspace file: ${0}",WorkspaceFolder:"Workspace folder: ${0}",WorkspaceResourceNotFound:"Workspace resource not found: ${0}",
ExternalLinkTo:"External link to ${0}","Move Up":"Move Up","Move Down":"Move Down",HostHint:"HostHint",Start:"Start",Stop:"Stop","Optional; used to determine the URL where a started site can be accessed.":"Optional; used to determine the URL where a started site can be accessed.","Changes you make here won't affect the running site.":"Changes you make here won't affect the running site.",Stopped:"Stopped","Started at ":"Started at ",EnterPortNumber:"Enter the HTTP port number that the Orion server is running on (default is ${0}):",
SitesCommandScope:"Sites"});define("orion/sites/nls/messages",["orion/i18n!orion/sites/nls/messages","orion/sites/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/sites/siteClient",["i18n!orion/sites/nls/messages","require","orion/Deferred","orion/fileClient"],function(h,i,f,d){function e(a,b,c){var d=a[b],e=new f;if(typeof d!=="function")throw h["Service method missing: "]+b;d.apply(a,c).then(function(a){e.resolve(a)},function(a){e.reject(a)});return e}function g(a,b){return new d.FileClient(a,function(a){return(a=a.getProperty("top"))&&a.indexOf(b)===0})}function c(a,b,c){this._serviceRegistry=a;this._siteService=b;this._selfHost=c.getProperty("canSelfHost");
this._sitePattern=c.getProperty("sitePattern");this._filePattern=c.getProperty("filePattern");this._name=c.getProperty("name");this._id=c.getProperty("id");this._getService=function(){return this._siteService};this._getFilePattern=function(){return this._filePattern};this._getFileClient=function(){return g(this._serviceRegistry,this._getFilePattern())};this._canSelfHost=function(){return this._selfHost}}function b(a,b){a[b]=function(){return e(this._getService(),b,Array.prototype.slice.call(arguments))}}
function a(a,b,d){for(var e=a.getServiceReferences("orion.site"),f=[],g=[],i=[],q=0;q<e.length;q++){var p=e[q].getProperty(b),p=p[0]!=="^"?"^"+p:p;f.push(e[q]);g.push(RegExp(p));i.push(a.getService(e[q]))}d=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return 0;for(var c=0;c<g.length;c++)if(g[c].test(a))return c;throw h["No Matching SiteService for "]+b+": "+a;}(d);return new c(a,i[d],f[d])}c.prototype={isFileMapped:function(a,b){if(!a){var c=new f;c.resolve(!1);return c}return this.getURLOnSite(a,
b).then(function(a){return a!==null})},mapOnSiteAndStart:function(a,b,c){function d(c,g,h){return e.isFileMapped(a,b).then(function(a){a||h.push({Source:c,Target:g,FriendlyPath:c});a=new f;a.resolve();return a})}var e=this,g="/"+b.Name,h;if(a){if(a.HostingStatus.Status==="started")a.HostingStatus.Status="stopped";h=e.toInternalForm(b.Location).then(function(b){return d(g,b,a.Mappings).then(function(){return e.updateSiteConfiguration(a.Location,a).then(function(a){return e.updateSiteConfiguration(a.Location,
{HostingStatus:{Status:"started"}})})})})}else{var i=b.Name+" site";h=e.toInternalForm(b.Location).then(function(a){var b=[];return d(g,a,b).then(function(){return e.createSiteConfiguration(i,c,b,null,{Status:"started"}).then(function(a){return a})})})}return h.then(function(a){return e.getURLOnSite(a,b)})}};"createSiteConfiguration,getSiteConfigurations,deleteSiteConfiguration,loadSiteConfiguration,updateSiteConfiguration,toFileLocation,toInternalForm,getMappingObject,getMappingProposals,updateMappingsDisplayStrings,parseInternalForm,isSelfHostingSite,convertToSelfHosting,getURLOnSite".split(",").forEach(function(a){b(c.prototype,
a)});c.prototype.constructor=c;return{forLocation:function(b,c){return a(b,"pattern",c)},forFileLocation:function(b,c){return a(b,"filePattern",c)},getFileClient:g,SiteClient:c}});
define("orion/sites/siteCommands","i18n!orion/sites/nls/messages,require,orion/commandRegistry,orion/commands,orion/sites/siteUtils,orion/sites/siteClient,orion/Deferred,orion/i18nUtil".split(","),function(h,i,f,d,e,g,c,b){function a(a){return a instanceof Array?a:[a]}function j(a){return function(b){if(b instanceof Array&&b.length===1&&!(a instanceof Array))return b[0]}}var k=d.Command,l=b.formatMessage;return{createSiteServiceCommands:function(a,b,c){var c=c||{},i=new d.Command({name:h.Create,tooltip:h["Create a new site configuration"],
id:"orion.site.create",parameters:new f.ParametersDescription([new f.CommandParameter("name","text",h.Name)]),visibleWhen:function(){return!0},callback:function(b){var d=b.items,f=a.getService(d),d=g.getFileClient(a,d.getProperty("filePattern")),h=b.parameters&&b.parameters.valueFor("name"),b=a.getService("orion.page.progress");(b?b.progress(d.loadWorkspaces(),"Loading workspaces"):d.loadWorkspaces()).then(function(a){(a=a&&a[0]&&a[0].Id)&&h&&f.createSiteConfiguration(h,a).then(function(a){c.createCallback(e.generateEditSiteHref(a),
a)},c.errorCallback)})}});b.addCommand(i)},createSiteCommands:function(b,d){var f=b.getService("orion.page.dialog"),i=b.getService("orion.page.progress"),q=new k({name:h.Edit,tooltip:h["Edit the site configuration"],imageClass:"core-sprite-edit",id:"orion.site.edit",visibleWhen:function(a){a instanceof Array&&a.length===1&&(a=a[0]);return a.HostingStatus},hrefCallback:function(a){return e.generateEditSiteHref(a.items instanceof Array?a.items[0]:a.items)}});d.addCommand(q);q=new k({name:h.Start,tooltip:h["Start the site"],
imageClass:"core-sprite-start",id:"orion.site.start",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"})},callback:function(d){var e=a(d.items),f=d.userData;if(f.site&&e.length>1)throw Error("userData.site requires a single site configuration to act upon");e=e.map(function(a){var c=f.site||{};c.HostingStatus={Status:"started"};a=a.Location;return g.forLocation(b,a).updateSiteConfiguration(a,c)});i.showWhile(c.all(e)).then(j(d.items)).then(f.startCallback,
f.errorCallback)}});d.addCommand(q);q=new k({name:h.Stop,tooltip:h["Stop the site"],imageClass:"core-sprite-stop",id:"orion.site.stop",visibleWhen:function(b){return a(b).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="started"})},callback:function(d){var e=a(d.items),f=d.userData;if(f.site&&e.length>1)throw Error("userData.site requires a single site configuration to act upon");e=e.map(function(a){var c=f.site||{};c.HostingStatus={Status:"stopped"};a=a.Location;return g.forLocation(b,
a).updateSiteConfiguration(a,c)});i.showWhile(c.all(e)).then(j(d.items)).then(f.stopCallback,f.errorCallback)}});d.addCommand(q);q=new k({name:h.Delete,tooltip:h["Delete the site configuration"],imageClass:"core-sprite-delete",id:"orion.site.delete",visibleWhen:function(b){b=a(b);return b.length>0?b.every(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"}):!1},callback:function(d){var e=a(d.items),i=d.userData,k=e.length===1?l(h.ConfirmDeleteSingle,e[0].Name):l(h.ConfirmDeleteMultiple,
e.length);f.confirm(k,function(a){a&&(a=e.map(function(a){a=a.Location;return g.forLocation(b,a).deleteSiteConfiguration(a)}),c.all(a).then(j(d.items)).then(i.deleteCallback,i.errorCallback))})}});d.addCommand(q)},createViewOnSiteCommands:function(a,b){var c=a.getService("orion.core.file");b.addCommand(new k({name:h["Add to site"],tooltip:h["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 g.forFileLocation(a,d.Location).mapOnSiteAndStart(e,d,b[0].Id)}).then(b.userData.addToCallback,b.userData.errorCallback)}}));b.addCommand(new k({name:h.View,tooltip:h["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 g.forFileLocation(a,c.Location).getURLOnSite(b,c)}}))}}});
define("orion/selection",["orion/EventTarget","orion/Deferred"],function(h){function i(f,d){d||(d="orion.page.selection");this._serviceRegistry=f;h.attach(this);this._serviceRegistration=f.registerService(d,this);this._selections=null}i.prototype={getSelection:function(f){var d=this._getSingleSelection();typeof f==="function"&&f(d);return d},getSelections:function(f){var d=Array.isArray(this._selections)?this._selections.slice():[];typeof f==="function"&&f(d);return d},_getSingleSelection:function(){return this._selections&&
this._selections.length>0?this._selections[0]:null},setSelections:function(f){var d=this._selections;this._selections=Array.isArray(f)?f.length>0?f.slice():null:f?[f]:null;d!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};i.prototype.constructor=i;return{Selection:i}});
define("orion/sites/viewOnSiteTree","i18n!orion/sites/nls/messages,orion/i18nUtil,orion/Deferred,orion/commandRegistry,orion/globalCommands,orion/selection,orion/sites/siteUtils,orion/sites/siteClient,orion/sites/siteCommands,orion/webui/treetable,orion/webui/littlelib".split(","),function(h,i,f,d,e,g,c,b,a,j,k){var l=i.formatMessage,m=j.TableTree,o=function(){function a(b,c){this._siteService=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)this._siteService.getSiteConfigurations().then(function(c){a.children=c;b(c)});else return b([])},getId:function(a){return a===this._root||a===this._id?this._id:a.Id}};return a}(),s=function(){function a(b){this._commandService=b.commandRegistry;this._options=b}a.prototype={initTable:function(a){a.classList.add("treetable")},render:function(a,b){b.className+="treeTableRow addsitesTableRow";var d=document.createElement("td");d.id=b.id+"col1";var e=document.createElement("td");
e.id=b.id+"col4";var f=c.generateEditSiteHref(a),g=document.createElement("a");g.href=f;d.appendChild(g);g.textContent=a.Name;f=document.createElement("span");f.style.padding="0 10px 0 10px";d.appendChild(f);g=a.HostingStatus;typeof g==="object"?g.Status==="started"?(f.appendChild(document.createTextNode(h.Started)),f=document.createElement("a"),f.href=g.URL,f.textContent=g.URL,d.appendChild(f)):(g=g.Status.substring(0,1).toUpperCase()+g.Status.substring(1),f.appendChild(document.createTextNode(g))):
f.appendChild(document.createTextNode(h.Unknown));f=document.createElement("span");f.id=b.id+"actionswrapper";f.classList.add("sectionTableItemActions");e.appendChild(f);var i=this._options;this._commandService.renderCommands(i.actionScopeId,f,a,null,"tool",{startCallback:i.startCallback,stopCallback:i.stopCallback,deleteCallback:i.deleteCallback,errorCallback:function(a){i.serviceRegistry.getService("orion.page.message").setProgressResult(a)}});b.appendChild(d);b.appendChild(e)},rowsChanged:function(){k.$$array(".treeTableRow").forEach(function(a,
b){var c=b%2?"darkTreeTableRow":"lightTreeTableRow",d=c==="darkTreeTableRow"?"lightTreeTableRow":"darkTreeTableRow";a.classList.add(c);a.classList.remove(d)})},labelColumnIndex:0};return a}(),n=function(){function a(b,c){function d(a,b){this.SiteConfiguration=a;this.Id="ViewOnSite"+a.Id;this.IsFileRunningOn=b}var e=[];e.push({Id:"newsite",Placeholder:!0});for(var f=0;f<b.length;f++)e.push(new d(b[f],c[f]));return e}function b(a,c,d){return a.isFileMapped(c,d).then(function(a){var b=c.HostingStatus&&
c.HostingStatus.Status==="started";return c&&d&&b&&a})}function c(a,b,d){o.call(this,a,b);this._file=d}c.prototype={getRoot:o.prototype.getRoot,getId:o.prototype.getId,getChildren:function(a,b){a.children?b(a.children):a===this._root?c.createViewOnSiteModelItems(this._siteService,this._file).then(function(c){a.children=c;b(c)}):b([])}};c.createViewOnSiteModelItems=function(c,d){return c.getSiteConfigurations().then(function(e){return f.all(e.map(function(a){return b(c,a,d)})).then(function(b){return a(e,
b)})})};return c}(),q=function(){function a(b){s.apply(this,Array.prototype.slice.call(arguments));this.serviceRegistry=b.serviceRegistry;this._commandService=b.commandRegistry;this.file=b.file;this.addToCallback=b.addToCallback;this.errorCallback=b.errorCallback}a.prototype={initTable:function(a,b){this.tableTree=b;a.classList.add("treetable");a.classList.add("viewOnSiteTable");var c=document.createElement("thead"),d=document.createElement("th");c.appendChild(d);var e=document.createElement("th");
c.appendChild(e);d.textContent=h.Name;e.textContent=h.Actions;a.appendChild(c)},render:function(a,b){var c=a.SiteConfiguration;b.classList.add("treeTableRow");b.classList.add("sitesTableRow");a.Placeholder&&b.classList.add("newSiteRow");var d=document.createElement("td");d.id=b.id+"col1";a.Placeholder&&d.classList.add("newSiteCol");var e=document.createElement("td");e.id=b.id+"col2";d.textContent=a.Placeholder?h["New Site"]:c.Name;c=document.createElement("span");c.id=b.id+"actionswrapper";e.appendChild(c);
this._commandService.renderCommands("viewOnSiteScope",c,a,null,"button",{file:this.file,addToCallback:this.addToCallback,errorCallback:this.errorCallback});b.appendChild(d);b.appendChild(e)},rowsChanged:s.prototype.rowsChanged,labelColumnIndex:0};return a}();return function(){function a(c){var d=c.serviceRegistry,f=c.commandRegistry,g=d.getService("orion.page.progress"),i=this.siteService=b.forFileLocation(d,c.fileLocation),j=c.fileClient.read(c.fileLocation,!0);g&&g.progress(j,"Reading file metadata "+
c.fileLocation);j.then(function(a){c.siteService=i;c.model=new n(i,c.id,a);c.file=this.file=a;f.registerCommandContribution("viewOnSiteScope","orion.site.add-to",10);f.registerCommandContribution("viewOnSiteScope","orion.site.view-on-link",20);e.setPageTarget({task:h.ViewOnSiteTitle,target:a,serviceRegistry:d,commandService:f});var b=this;c.addToCallback=function(){b.refresh()};c.errorCallback=function(a){c.serviceRegistry.getService("orion.page.message").setErrorMessage(a)};c.renderer=new q(c);if(c.label)document.getElementById(c.label).textContent=
l(h.ViewOnSiteCaption,a.Name);a=this.model=c.model||new o(i,c.id);this.treeWidget=new m({id:c.id,parent:c.parent,model:a,showRoot:!1,renderer:c.renderer||new s(c)})}.bind(this))}a.prototype={refresh:function(){var a=this;n.createViewOnSiteModelItems(a.siteService,a.file).then(function(b){a.treeWidget.refresh(a.model._id,b,!0)})}};return a}()});
define('built-view.js',"orion/bootstrap,orion/status,orion/progress,orion/commandRegistry,orion/fileClient,orion/operationsClient,orion/searchClient,orion/globalCommands,orion/sites/siteUtils,orion/sites/siteCommands,orion/sites/viewOnSiteTree,orion/PageUtil,orion/webui/littlelib".split(","),function(h,i,f,d,e,g,c,b,a,j,k,l,m){h.startup().then(function(a){function h(){var a=l.matchResourceParameters().file;a&&(x&&m.empty(document.getElementById("table")),x=new k({id:"view-on-site-table",parent:"table",
label:"viewOnSiteCaption",serviceRegistry:n,commandRegistry:p,fileClient:t,fileLocation:a}),j.createViewOnSiteCommands(n,p))}var n=a.serviceRegistry,a=a.preferences,q=new g.OperationsClient(n);new i.StatusReportingService(n,q,"statusPane","notifications","notificationArea");var p=new d.CommandRegistry({});new f.ProgressService(n,q,p);var t=new e.FileClient(n),q=new c.Searcher({serviceRegistry:n,commandService:p,fileService:t}),x;window.addEventListener("hashchange",h());h();b.generateBanner("orion-viewSites",
n,p,a,q)})});