/**
 * @license RequireJS i18n 2.0.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/i18n for details
 */

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

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

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

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

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

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

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

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

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

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

/**
 * @license RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/requirejs/text for details
 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/*

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation
 RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/requirejs/text for details

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


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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:  IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

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

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

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

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


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


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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - _initial API and implementation

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

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

 Contributors: IBM Corporation - initial API and implementation
 RequireJS i18n 2.0.2 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/requirejs/i18n for details

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(){function h(b,d,e,c,a,k){d[b]&&(e.push(b),(d[b]===!0||d[b]===1)&&c.push(a+b+"/"+k))}function i(b,d,e,c,a){d=c+d+"/"+a;require._fileExists(b.toUrl(d+".js"))&&e.push(d)}function f(b,d,e){for(var c in d)d.hasOwnProperty(c)&&(!b.hasOwnProperty(c)||e)?b[c]=d[c]:typeof d[c]==="object"&&f(b[c],d[c],e)}var d=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(b){var g=b.config?b.config():{};return{version:"2.0.1+",load:function(b,c,a,k){k=k||{};if(k.locale)g.locale=k.locale;
var j=d.exec(b),l=j[1],m=j[4],n=j[5],r=m.split("-"),o=[],p={},q,t="";if(j[5])l=j[1],b=l+n;else{n=j[4];m=g.locale;if(!m)m=g.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase();r=m.split("-")}if(k.isBuild){o.push(b);i(c,"root",o,l,n);for(q=0;q<r.length;q++)k=r[q],t+=(t?"-":"")+k,i(c,t,o,l,n);c(o,function(){a()})}else c([b],function(b){var j=[],e;h("root",b,j,o,l,n);for(q=0;q<r.length;q++)e=r[q],t+=(t?"-":"")+e,h(t,b,j,o,l,n);c(o,function(){var e,
k,d;for(e=j.length-1;e>-1&&j[e];e--){d=j[e];k=b[d];if(k===!0||k===1)k=c(l+d+"/"+n);f(p,k)}a(p)})})}}})})();
define("orion/i18n",[],function(){return{load:function(h,i,f,d){var d=d||{},b=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,g=b.exec(h);if(g){if(!i.defined||i.defined(h))try{f(i(h));return}catch(e){}if(d.isBuild||d.isTest)f({});else if(i.specified&&!i.specified("orion/bootstrap"))f({});else{var c=g[1],a=g[3]?g[2]:"",k=g[3]||g[2];i(["orion/bootstrap"],function(j){j.startup().then(function(j){var e=j.serviceRegistry,j=e.getServiceReferences("orion.i18n.message");if(a)j.some(function(a){return h===a.getProperty("name")?
(e.getService(a).getMessageBundle().then(function(a){f(a)},function(){f({})}),!0):!1})||f({});else{var n={},r;j.forEach(function(j){var e=j.getProperty("name");if((g=b.exec(e))&&c===g[1]&&k===(g[3]||g[2]))if(a=g[3]?g[2]:""){if((j=d.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&j.toLowerCase().indexOf(a.toLowerCase())===0)n[a]=!0,(!i.specified||!i.specified(e))&&define(e,["orion/i18n!"+e],function(a){return a})}else r=j});!i.specified||!i.specified(h)?r?
e.getService(r).getMessageBundle().then(function(a){Object.keys(n).forEach(function(c){typeof a[c]==="undefined"&&(a[c]=n[c])});define(h,[],a);f(a)},function(){define(h,[],n);f(n)}):(define(h,[],n),f(n)):f(n)}})})}}else f(null)}}});
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});
(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 e;e=b.shift();)e();g=!1}function i(e){b.push(e);g||(g=!0,setTimeout(h,0))}function f(b){return function(){b.apply(void 0,arguments)}}function d(){function e(){for(var a;a=m.shift();){var c=a.deferred,e=l==="fulfilled"?"resolve":"reject";if(typeof a[e]==="function")try{var k=(0,a[e])(j),d=k&&(typeof k===
"object"||typeof k==="function")&&k.then;if(typeof d==="function")if(k===c.promise)c.reject(new TypeError);else{var n=k.cancel;typeof n==="function"?c._protected(b).parentCancel=n.bind(k):delete c._protected(b).parentCancel;d.call(k,f(c.resolve),f(c.reject),f(c.progress))}else c.resolve(k)}catch(g){c.reject(g)}else c[e](j)}}function c(a){delete g.parentCancel;l="rejected";j=a;m.length&&i(e)}function a(b){function k(a){return function(c){f||(f=!0,a(c))}}var f=!1;delete g.parentCancel;try{var h=b&&
(typeof b==="object"||typeof b==="function")&&b.then;if(typeof h==="function")if(b===n)c(new TypeError);else{l="assumed";var w=b&&b.cancel;if(typeof w!=="function"){var A=new d,b=A.promise;try{h(A.resolve,A.reject,A.progress)}catch(v){A.reject(v)}w=b.cancel;h=b.then}j=b;h.call(b,k(a),k(c));g.parentCancel=w.bind(b)}else l="fulfilled",j=b,m.length&&i(e)}catch(B){k(c)(B)}}function k(){var a=g.parentCancel;if(a)delete g.parentCancel,a();else if(!l)a=Error("Cancel"),a.name="Cancel",c(a)}var j,l,m=[],n=
this,g={};Object.defineProperty(this,"_protected",{value:function(a){if(a!==b)throw Error("protected");return g}});this.resolve=function(c){l||a(c);return n};this.reject=function(a){l||c(a);return n};this.progress=function(a){l||m.forEach(function(c){if(c.progress)try{c.progress(a)}catch(b){}});return n.promise};this.cancel=function(){g.parentCancel?setTimeout(k,0):k();return n};this.then=function(a,c,j){a={resolve:a,reject:c,progress:j,deferred:new d};m.push(a);a.deferred._protected(b).parentCancel=
n.promise.cancel.bind(n);(l==="fulfilled"||l==="rejected")&&i(e);return a.deferred.promise};this.promise={then:n.then,cancel:n.cancel}}var b=[],g=!1;d.all=function(b,c){function a(a,c){m||(l[a]=c,--j===0&&n.resolve(l))}function k(b,j){if(!m){if(c)try{a(b,c(j));return}catch(k){j=k}n.reject(j)}}var j=b.length,l=[],m=!1,n=new d;n.then(void 0,function(){m=!0;b.forEach(function(a){a.cancel&&a.cancel()})});j===0?n.resolve(l):b.forEach(function(c,b){c.then(a.bind(void 0,b),k.bind(void 0,b))});return n.promise};
d.when=function(b,c,a,k){var j;if(!(b&&typeof b.then==="function"))j=new d,j.resolve(b),b=j.promise;return b.then(c,a,k)};return d});
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(b){typeof console!=="undefined"&&console.log(b)}});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 b=0;b<d.length;b++)if(d[b]===f){d.length===1?delete this._namedListeners[i]:d.splice(b,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(c,a,b){this._properties=b||{};this._properties["service.id"]=c;this._properties.objectClass=a;this._properties["service.names"]=a}function d(c,a,b){this._serviceId=c;this._serviceReference=a;this._internalRegistry=b}function b(c,a){function b(j){return function(){var b;try{if(!a())throw Error("Service was unregistered");var k=c[j].apply(c,Array.prototype.slice.call(arguments));if(k&&typeof k.then==="function")return k;
else b=new h,b.resolve(k)}catch(e){b=new h,b.reject(e)}return b.promise}}for(var j in c)typeof c[j]==="function"&&(this[j]=b(j))}function g(c,a){this.type=c;this.serviceReference=a}function e(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new i;var c=this;this._internalRegistry={isRegistered:function(a){return c._entries[a]?!0:!1},unregisterService:function(a){var b=c._entries[a];if(!b)throw Error("Service has already been unregistered: "+a);var j=b.reference;c._serviceEventTarget.dispatchEvent(new g("unregistering",
j));c._entries[a]=null;j.getProperty("objectClass").forEach(function(a){for(var b=c._namedReferences[a],k=0;k<b.length;k++)if(b[k]===j){b.length===1?delete c._namedReferences[a]:b.splice(k,1);break}})},modifyService:function(a){var b=c._entries[a];if(!b)throw Error("Service not found while trying to send modified event: "+a);c._serviceEventTarget.dispatchEvent(new g("modified",b.reference))}}}f.prototype={getPropertyKeys:function(){var c=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&
c.push(a);return c},getProperty:function(c){return this._properties[c]}};f.prototype.constructor=f;d.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("Service has already been unregistered: "+this._serviceId);return this._serviceReference},setProperties:function(c){var a=this._serviceReference._properties;this._serviceReference._properties=c||{};c["service.id"]=this._serviceId;
c.objectClass=a.objectClass;c["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};d.prototype.constructor=d;e.prototype={getService:function(c){var a;if(typeof c==="string")(c=this._namedReferences[c])&&c.some(function(c){a=this._entries[c.getProperty("service.id")].service;return!!a},this);else if(c=this._entries[c.getProperty("service.id")])a=c.service;return a||null},getServiceReferences:function(c){if(c)return this._namedReferences[c]?this._namedReferences[c]:
[];var a=[];this._entries.forEach(function(c){c&&a.push(c.reference)});return a},registerService:function(c,a,e){if(typeof a==="undefined"||a===null)throw Error("invalid service");typeof c==="string"?c=[c]:Array.isArray(c)||(c=[]);var j=this._entries.length,l=new f(j,c,e),m=this._namedReferences;c.forEach(function(a){m[a]=m[a]||[];m[a].push(l)});c=new b(a,this._internalRegistry.isRegistered.bind(null,j));this._entries.push({reference:l,service:c});c=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new g("registered",
l));return new d(j,l,c)},addEventListener:function(c,a){this._serviceEventTarget.addEventListener(c,a)},removeEventListener:function(c,a){this._serviceEventTarget.removeEventListener(c,a)}};e.prototype.constructor=e;return{ServiceRegistry:e}});
define("orion/xhr",["orion/Deferred"],function(h){function i(f,d,b,g){var e=typeof b.response!=="undefined"?b.response:b.responseText,c;try{c=b.status}catch(a){c=0}f={args:d,response:e,responseText:typeof e==="string"?e:null,status:c,url:f,xhr:b};if(typeof g!=="undefined")f.error=g;return f}return function(f,d,b){var b=b||{},g=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,e=new h,c=b.headers||{},a=b.log||!1,k;typeof c["X-Requested-With"]==="undefined"&&(c["X-Requested-With"]="XMLHttpRequest");
if(typeof b.data!=="undefined"&&(f==="POST"||f==="PUT"))k=b.data;var j=!1,l=!1;e.promise.then(void 0,function(a){j=!0;!l&&a instanceof Error&&a.name==="Cancel"&&g.abort()});g.onabort=function(){l=!0;if(!j){var a=Error("Cancel");a.name="Cancel";e.reject(a)}};g.onload=function(){var c=i(d,b,g);200<=g.status&&g.status<400?e.resolve(c):(e.reject(c),a&&typeof console!=="undefined"&&console.log(Error(g.statusText)))};g.onerror=function(){var c=i(d,b,g);e.reject(c);a&&typeof console!=="undefined"&&console.log(Error(g.statusText))};
g.onprogress=function(a){a.xhr=g;e.progress(a)};try{g.open(f,d,!0);if(typeof b.responseType==="string")g.responseType=b.responseType;if(typeof b.timeout==="number")if(typeof g.timeout==="number")g.timeout=b.timeout,g.addEventListener("timeout",function(){e.reject(i(d,b,g,"Timeout exceeded"))});else{var m=setTimeout(function(){e.reject(i(d,b,g,"Timeout exceeded"))},b.timeout);e.promise.then(clearTimeout.bind(null,m),clearTimeout.bind(null,m))}Object.keys(c).forEach(function(a){g.setRequestHeader(a,
c[a])});g.send(k||null)}catch(n){e.reject(i(d,b,g,n))}return e.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(h,i,f){function d(a,c){this._name=a;this._providers=c;this._flushPending=!1;this._cached=null;this._stores=[];this._pendingDeletes=[];this._dirty=[]}function b(a,c){return{get:function(b,e){if(c===0)return null;var d=localStorage.getItem(a+b);if(d===null)return null;d=JSON.parse(d);return e||c===-1||d._expires&&d._expires>(new Date).getTime()?(delete d._expires,d):null},set:function(b,e){if(c!==0){if(c!==-1)e._expires=(new Date).getTime()+
1E3*c;if(Object.keys(e).length===0)localStorage.removeItem(a+b);else{var d=JSON.stringify(e);localStorage.setItem(a+b,d);delete e._expires}}},remove:function(c){localStorage.removeItem(a+c)}}}function g(a){this._currentPromises={};this._cache=new b("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var c=a.getServiceReferences("orion.core.preference.provider");if(c.length>0)this._service=a.getService(c[0])}return!!this._service}}function e(a){this._location=
a;this._currentPromise=null;this._cache=new b("/orion/preferences/default",3600)}function c(){this._cache=new b("/orion/preferences/local",-1)}function a(a,b){this._userProvider=new g(a);this._localProvider=new c;b=b||"defaults.pref";b.indexOf("://")===-1&&(b=h.toUrl(b));this._defaultsProvider=new e(b);this._serviceRegistration=a.registerService("orion.core.preference",this)}d.prototype={_flush:function(){for(var a=[],c=0;c<this._stores.length;++c){var b=this._stores[c];this._dirty.indexOf(b)!==-1&&
a.push(this._providers[c].put(this._name,b));if(this._pendingDeletes[c]&&this._pendingDeletes[c].length>0){for(b=0;b<this._pendingDeletes[c].length;b++)a.push(this._providers[c].remove(this._name,this._pendingDeletes[c][b]));delete this._pendingDeletes[c]}}this._dirty=[];return i.all(a)},_scheduleFlush:function(a){a&&this._dirty.indexOf(a)===-1&&this._dirty.push(a);if(!this._flushPending)this._flushPending=!0,window.setTimeout(function(){if(this._flushPending)this._flushPending=!1,this._flush()}.bind(this),
0)},_getCached:function(){if(!this._cached){this._cached={};for(var a=0;a<this._stores.length;++a){var c=this._stores[a],b;for(b in c)c.hasOwnProperty(b)&&typeof this._cached[b]==="undefined"&&(this._cached[b]=c[b])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,c){if(this._stores.length!==0){var b=this._stores[0];if(b[a]!==c)b[a]=c,this._cached=null,this._scheduleFlush(b)}},remove:function(a){for(var c=0;c<
this._stores.length;++c){var b=this._stores[c];if(b.hasOwnProperty(a))return delete b[a],this._pendingDeletes[c]||(this._pendingDeletes[c]=[]),this._pendingDeletes[c].push(a),this._cached=null,this._scheduleFlush(),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]={},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var c=this,b=[],e=0;e<this._providers.length;++e)b.push(this._providers[e].get(this._name,
a).then(function(a){return function(b){c._stores[a]=b}}(e)));return i.all(b).then(function(){c._cached=null;c._getCached()})},flush:function(){this._flush()}};g.prototype={get:function(a,c){if(this._currentPromises[a])return this._currentPromises[a];var b=new i,e=null;c?this._cache.remove(a):e=this._cache.get(a);if(e!==null)b.resolve(e);else{this._currentPromises[a]=b;var d=this;this._service.get(a).then(function(c){d._cache.set(a,c);delete d._currentPromises[a];b.resolve(c)},function(c){c.status===
404?(c={},d._cache.set(a,c),delete d._currentPromises[a],b.resolve(c)):(delete d._currentPromises[a],b.resolve(d._cache.get(a,!0)||{}))})}return b},put:function(a,c){this._cache.set(a,c);return this._service.put(a,c)},remove:function(a,c){var b=this._cache.get(a);delete b[c];this._cache.set(a,b);return this._service.remove(a,c)}};e.prototype={get:function(a,c){if(this._currentPromise)return this._currentPromise;var b=new i,e=null;c?this._cache.remove(a):e=this._cache.get(a);if(e!==null)b.resolve(e);
else{this._currentPromise=b;var d=this;f("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(c){c=JSON.parse(c.response);d._cache.set(a,c[a]||{});d._currentPromise=null;b.resolve(c[a]||{})},function(c){c.xhr.status===401||c.xhr.status===404?(d._cache.set(a,{}),d._currentPromise=null,b.resolve({})):(d._currentPromise=null,c=d._cache.get(a,!0),c!==null?b.resolve(c[a]||{}):b.resolve({}))})}return b},put:function(){var a=new i;a.resolve();return a},remove:function(a,c){var b=
this._cache.get(a);delete b[c];this.put(a,b)}};c.prototype={get:function(a){var c=new i,a=this._cache.get(a);a!==null?c.resolve(a):c.resolve({});return c},put:function(a,c){var b=new i;this._cache.set(a,c);b.resolve();return b},remove:function(a,c){var b=this._cache.get(a);delete b[c];this.put(a,b)}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(c,b,e){if(!b||typeof b!=="number"||b>7||b<1)e=b,b=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;window.addEventListener("storage",
e,!1);if((a.USER_SCOPE&b)!==0)return"/orion/preferences/user"+c;else if((a.LOCAL_SCOPE&b)!==0)return"/orion/preferences/local"+c;return"/orion/preferences/default"+c},getPreferences:function(c,b){if(!b||typeof b!=="number"||b>7||b<1)b=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|a.USER_SCOPE;var e=[];a.USER_SCOPE&b&&this._userProvider.available()&&e.push(this._userProvider);a.LOCAL_SCOPE&b&&e.push(this._localProvider);a.DEFAULT_SCOPE&b&&e.push(this._defaultsProvider);var m=new d(c,e);return m.sync().then(function(){return m})},
getSetting:function(a,c,b){for(var e,d=0;d<a.length;d++)if(a[d].label===c)for(var g=0;g<a[d].data.length;g++)if(a[d].data[g].label===b){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 c=/([^=]*)(?:=?)(.*)/.exec(a),a=c[1]?decodeURIComponent(c[1]):"",c=c[2]?decodeURIComponent(c[2]):"";return[a,c]}function b(a){var c=encodeURIComponent(a[0]);a[1]&&(c+="="+encodeURIComponent(a[1]));return c}function g(a,c){var b="",e=[],j=0;return{next:function(){if(b!==a.query)b=a.query,e=i(b);if(j<e.length){var k=d(e[j++]);
switch(c){case "keys":return k[0];case "values":return k[1];case "keys+values":return[k[0],k[1]];default:throw new TypeError;}}throw H;}}}function e(a){Object.defineProperty(this,"_url",{get:function(){return a._url}})}function c(a){return a?/[1-9]\d*$/.exec(a)[0]:""}function a(a){var c=[];a.split("/").forEach(function(a){a===".."?c.pop():a!=="."&&c.push(a)});return c.join("/")}function k(a){return a.replace(/\s/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function j(b,e){if(typeof b!==
"string")throw new TypeError;var b=k(b),j=r.exec(b);if(!j)return null;var d={};d.scheme=j[1]||"";if(d.scheme&&!p.test(d.scheme))return null;var l=j[2];if(l&&(l=o.exec(l),d.userinfo=l[1],d.host=l[2],d.port=l[3],d.port&&!q.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=c(d.port);if(d.host&&d.path)d.path=a(d.path);return d}function l(a,c){var b;if(c){c=c.href||c;b=j(c);if(!b||!b.scheme)throw new SyntaxError;Object.defineProperty(this,"_baseURL",{value:b})}b=j(a,b);if(!b)throw new SyntaxError;Object.defineProperty(this,"_input",{value:a,writable:!0});Object.defineProperty(this,"_url",{value:b,writable:!0});var d=new e(this);Object.defineProperty(this,"query",{get:function(){return this._url?
d:null},enumerable:!0})}try{var m;if(typeof window.URL==="function"&&window.URL.length!==0&&(m=new window.URL("http://www.w3.org?q")).protocol==="http:"&&m.query)return}catch(n){}var r=/^(?:([^:\/?#]+):)?(?:\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/,o=/^(?:(.*)@)?(\[[^\]]*\]|[^:]*)(?::(.*))?$/,p=/^([a-zA-Z](?:[a-zA-Z0-9+-.])*)$/,q=/^\d*$/,t=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)$/,w=/^(\[[^\]\/?#\s]*\]|[^:\/?#\s]*)(?::(\d*))?$/,A=/^([^?#\s]*)$/,v=/^([^\s]*)$/,B=/^\S*$/,x=/([^:]*):?(.*)/,H=typeof StopIteration!==
"undefined"?StopIteration:Error("Stop Iteration"),G={"ftp:":"21","gopher:":"70","http:":"80","https:":"443","ws:":"80","wss:":"443"};Object.defineProperties(e.prototype,{get:{value:function(a){h(a);var c;i(this._url.query).some(function(b){b=d(b);if(b[0]===a)return c=b[1],!0});return c},enumerable:!0},set:{value:function(a,c){h(a);h(c);var e=i(this._url.query);e.some(function(j,k){var l=d(j);if(l[0]===a)return l[1]=c,e[k]=b(l),!0})||e.push(b([a,c]));this._url.query=f(e)},enumerable:!0},has:{value:function(a){h(a);
return i(this._url.query).some(function(c){if(d(c)[0]===a)return!0})},enumerable:!0},"delete":{value:function(a){h(a);var c=i(this._url.query),b=c.filter(function(c){return d(c)[0]!==a});return b.length!==c.length?(this._url.query=f(b),!0):!1},enumerable:!0},clear:{value:function(){this._url.query=""},enumerable:!0},forEach:{value:function(a,c){if(typeof a!=="function")throw new TypeError;var b=g(this._url,"keys+values");try{for(;;){var e=b.next();a.call(c,e[1],e[0],this)}}catch(d){if(d!==H)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 c=[];i(this._url.query).forEach(function(b){b=d(b);b[0]===a&&c.push(b[1])});return c},enumerable:!0},append:{value:function(a,c){h(a);h(c);var e=i(this._url.query);e.push(b([a,c]));this._url.query=
f(e)},enumerable:!0}});Object.defineProperties(l.prototype,{href:{get:function(){var a;if(this._url){a=this._url;var c=a.scheme?a.scheme+":":"";a.host&&(c+="//",a.userinfo&&(c+=a.userinfo+"@"),c+=a.host,a.port&&(c+=":"+a.port));c+=a.path;a.query&&(c+="?"+a.query);a.fragment&&(c+="#"+a.fragment);a=c}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,a===""||p.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=x.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){h(a);if(this._url){var c=
x.exec(this._userinfo),a=[encodeURIComponent(a||"")];c[2]&&a.push(c[2]);this._userinfo=a.join(":")}},enumerable:!0},password:{get:function(){if(!this._url)return"";var a=x.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){h(a);if(this._url){var c=[x.exec(this._userinfo)[1]||""];a&&c.push(encodeURIComponent(a));this._userinfo=c.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=w.exec(a)))this._url.host=a[1],this._url.port=c(a[2])},enumerable:!0},hostname:{get:function(){return this._url?this._url.host:""},set:function(a){h(a);if(this._url&&t.exec(a))this._url.host=a},enumerable:!0},port:{get:function(){var a=this._url?this._url.port||"":"";a&&a===G[this.protocol]&&(a="");return a},set:function(a){h(a);if(this._url&&q.exec(a))this._url.port=c(a)},enumerable:!0},pathname:{get:function(){return this._url?this._url.path:""},set:function(c){h(c);
if(this._url&&A.exec(c))this._url.host&&c&&c[0]!=="/"&&(c="/"+c),this._url.path=c?a(c):""},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)),v.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)),B.exec(a)))this._url.fragment=a},enumerable:!0}});
if((m=window.URL||window.webkitURL)&&m.createObjectURL)Object.defineProperty(l,"createObjectURL",{value:m.createObjectURL.bind(m),enumerable:!1}),Object.defineProperty(l,"revokeObjectURL",{value:m.revokeObjectURL.bind(m),enumerable:!1});window.URL=l})();define("orion/URL-shim",function(){});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget","orion/URL-shim"],function(h,i){function f(a,c){var b=Object.keys(a),e=Object.keys(c);if(b.length!==e.length)return!1;b.sort();e.sort();for(var d=0,j=b.length;d<j;d++){var k=b[d];if(k!==e[d])return!1;var g=a[k],k=c[k];if(g!==k&&JSON.stringify(g)!==JSON.stringify(k))return!1}return!0}function d(a){if(a.indexOf("://")===-1)try{return(new URL(a,location.href)).href}catch(c){}return a}function b(a){var c=null,b={key:function(b){return(c=
c||Object.keys(a))[b]},getItem:function(c){return a[c]},setItem:function(b,e){a[b]=e;c=null},removeItem:function(b){delete a[b];c=null},clear:function(){(c=c||Object.keys(a)).forEach(function(c){delete a[c]}.bind(this));c=null}};Object.defineProperty(b,"length",{get:function(){return(c=c||Object.keys(a)).length}});return b}function g(a,c){if(c&&c instanceof XMLHttpRequest){var b,e;try{b=c.status,e=c.statusText}catch(d){b=0,e=""}return{status:b||0,statusText:e}}return c}function e(a){var c=a?JSON.parse(JSON.stringify(a,
g)):a;if(a instanceof Error)c.__isError=!0,c.message=c.message||a.message,c.name=c.name||a.name;return c}function c(a,c){this.type=a;this.plugin=c}function a(a,c){this.__objectId=a;this.__methods=c}function k(b,d,j){function k(a){E&&j.postMessage(a,E)}function g(c){if(!E)return(new h).reject(Error("plugin not connected"));c.id=String(R++);var b=new h;L[c.id]=b;b.then(null,function(a){s==="active"&&a instanceof Error&&a.name==="Cancel"&&k({requestId:c.id,method:"cancel",params:a.message?[a.message]:
[]})});var e=Object.prototype.toString;c.params.forEach(function(j,d){if(e.call(j)==="[object Object]"&&!(j instanceof a)){var k,l;for(k in j)e.call(j[k])==="[object Function]"&&(l=l||[],l.push(k));if(l){var m=P++;M[m]=j;k=function(){delete M[m]};b.then(k,k);c.params[d]=new a(m,l)}}});j.postMessage(c,E);return b.promise}function p(a,c){a||a===0?k({id:a,result:null,error:c}):console.log(c)}function q(a,c,b,j){j.forEach(function(a,c){if(a&&typeof a.__objectId!=="undefined"){var b={};a.__methods.forEach(function(c){b[c]=
function(){return g({objectId:a.__objectId,method:c,params:Array.prototype.slice.call(arguments)})}});j[c]=b}});var d=typeof a===void 0?null:{id:a,result:null,error:null};try{var l=b.apply(c,j);if(d)l&&typeof l.then==="function"?(K[a]=l,l.then(function(c){delete K[a];d.result=c;k(d)},function(c){if(K[a])delete K[a],d.error=e(c),k(d)},function(){k({responseId:a,method:"progress",params:Array.prototype.slice.call(arguments)})})):(d.result=l,k(d))}catch(m){if(d)d.error=e(m),k(d)}}function t(a){try{if(a.method){var c=
a.method,b=a.params||[];if("serviceId"in a){var e=S[a.serviceId];e||p(a.id,"service not found");c in e?q(a.id,e,e[c],b):p(a.id,"method not found")}else if("objectId"in a){var d=M[a.objectId];d||p(a.id,"object not found");c in d?q(a.id,d,d[c],b):p(a.id,"method not found")}else if("requestId"in a){var k=K[a.requestId];k&&c==="cancel"&&k.cancel&&k.cancel.apply(k,b)}else if("responseId"in a){var l=L[a.responseId];l&&c==="progress"&&l.progress&&l.progress.apply(l,b)}else if("plugin"===a.method){var m=
a.params[0];N({headers:m.headers,services:m.services}).then(function(){y&&y.resolve(x)})}else if("timeout"===a.method)y&&y.reject(a.error);else throw Error("Bad method: "+a.method);}else{var g=L[String(a.id)];delete L[String(a.id)];if(a.error){var f=j.handleServiceError(x,a.error);g.reject(f)}else g.resolve(a.result)}}catch(o){console.log("Plugin._messageHandler "+o)}}function w(c){var b={};if(c.methods&&(c.methods.forEach(function(a){b[a]=function(){var b={serviceId:c.serviceId,method:a,params:Array.prototype.slice.call(arguments)};
return s==="active"?g(b):x.start({"transient":!0}).then(function(){return g(b)})}}),b.addEventListener&&b.removeEventListener)){var e=new i,d=P++;M[d]={handleEvent:e.dispatchEvent.bind(e)};var j=new a(d,["handleEvent"]),k=b.addEventListener;b.addEventListener=function(a,c){e._namedListeners[a]||k(a,j);e.addEventListener(a,c)};var l=b.removeEventListener;b.removeEventListener=function(a,c){e.removeEventListener(a,c);e._namedListeners[a]||l(a,j)}}return b}function A(a){var c=JSON.parse(JSON.stringify(a.properties));
c.__plugin__=b;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);c.objectClass=a;return c}function v(a){var c=w(a),b=A(a),b=j.registerService(a.names||a.type,c,b);F[a.serviceId]={registration:b,proxy:c}}function B(){j.persist(b,{created:H,headers:G,services:D,autostart:u,lastModified:z})}var x=this,d=d||{},H=d.created||(new Date).getTime(),G=d.headers||{},D=d.services||[],u=d.autostart,z=d.lastModified||0,s="installed",C,y,E,O,F={},R=0,P=0,K={},L={},M={},S={},N;this._persist=B;this._resolve=function(){s=
"resolved";j.dispatchEvent(new c("resolved",x))};this._getAutostart=function(){return u};this._getCreated=function(){return H};this.getLocation=function(){return b};this.getHeaders=function(){return JSON.parse(JSON.stringify(G))};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 z};this.getServiceReferences=function(){var a=[];Object.keys(F).forEach(function(c){a.push(F[c].registration.getReference())});
return a};this.setParent=function(a){return O!==a?(O=a,x.stop({"transient":!0}).then(function(){if("started"===u)return x.start({"transient":!0});else if("lazy"===u)return x.start({lazy:!0,"transient":!0})})):(new h).resolve()};this.getState=function(){return s};this.start=function(a){if(s==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(C)return C.promise.then(this.start.bind(this,a));if(s==="active")return(new h).resolve();if(!a||!a.transient){var e=a&&a.lazy?"lazy":"started";
e!==u&&(u=e,B())}e=j.getState();if(e!=="starting"&&e!=="active")return a.transient?(new h).reject(Error("start transient error")):(new h).resolve();if(s==="installed")try{this._resolve()}catch(d){return(new h).reject(d)}s==="resolved"&&D.forEach(function(a){v(a)});if(a&&a.lazy)return s!=="starting"&&(s="starting",j.dispatchEvent(new c("lazy activation",x))),(new h).resolve();var k=new h;C=k;s="starting";j.dispatchEvent(new c("starting",x));y=new h;E=j.connect(b,t,O);y.then(function(){y=null;s="active";
j.dispatchEvent(new c("started",x));C=null;k.resolve()},function(){y=null;s="stopping";j.dispatchEvent(new c("stopping",x));Object.keys(F).forEach(function(a){F[a].registration.unregister();delete F[a]});j.disconnect(E);E=null;s="resolved";C=null;j.dispatchEvent(new c("stopped",x));k.reject(Error("plugin activation error"))});return k.promise};this.stop=function(a){if(s==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(C)return C.promise.then(this.stop.bind(this,a));if((!a||
!a.transient)&&"stopped"!==u)u="stopped",B();if(s!=="active"&&s!=="starting")return(new h).resolve();C=a=new h;s="stopping";j.dispatchEvent(new c("stopping",x));Object.keys(F).forEach(function(a){F[a].registration.unregister();delete F[a]});E&&(j.disconnect(E),E=null);s="resolved";C=null;j.dispatchEvent(new c("stopped",x));a.resolve();return a.promise};N=function(a){if(s==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(!a)return z===0&&(z=(new Date).getTime(),B()),j.loadManifest(b).then(N);
var e=G,d=D,k=u;G=a.headers||{};D=a.services||{};u=a.autostart||u;a.lastModified?z=a.lastModified:(z=(new Date).getTime(),B());if(f(G,e)&&f(D,d)&&u===k)return(new h).resolve();if(s==="active"||s==="starting"){var m=[];Object.keys(D).forEach(function(a){var c=D[a];m.push(a);var b=F[a];if(b){if(f(c.methods,Object.keys(b.proxy))){var a=A(c),e=b.registration.getReference(),d={};e.getPropertyKeys().forEach(function(a){d[a]=e.getProperty(a)});f(a,d)||b.registration.setProperties(a);return}b.registration.unregister();
delete F[a]}v(c)});Object.keys(F).forEach(function(a){m.indexOf(a)===-1&&(F[a].registration.unregister(),delete F[a])})}s==="active"&&(j.disconnect(E),y=new h,E=j.connect(b,t,O),y.then(function(){y=null},function(){y=null;s="stopping";j.dispatchEvent(new c("stopping"),x);Object.keys(F).forEach(function(a){F[a].registration.unregister();delete F[a]});j.disconnect(E);E=null;s="resolved";j.dispatchEvent(new c("stopped",x))}));return(new h).resolve()};this.update=function(a){return N(a).then(function(){j.dispatchEvent(new c("updated",
x))})};this.uninstall=function(){if(s==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(s==="active"||s==="starting"||s==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));j.removePlugin(this);s="uninstalled";j.dispatchEvent(new c("uninstalled",x));return(new h).resolve()}}var j=/^http[s]?/i;return{Plugin:k,PluginRegistry:function(a,e){function g(a){var c=a.source;t.some(function(b){if(c===b.target){try{var e;if(typeof b.useStructuredClone===
"undefined"){var d=typeof a.data!=="string";e=d?a.data:JSON.parse(a.data);b.useStructuredClone=d}else e=b.useStructuredClone?a.data:JSON.parse(a.data);b.handler(e)}catch(j){}return!0}})}var e=e||{},f=e.storage||localStorage;f.getItem||(f=b(f));var o="installed",p,q=[],t=[],w=new i,A={},v={registerService:a.registerService.bind(a),connect:function(a,c,b,e){function d(a){a=Error(a);a.name="timeout";c({method:"timeout",error:a})}var j={handler:c,url:a},k=setTimeout(d.bind(null,"Load timeout for: "+a),
e||15E3),l=document.createElement("iframe");l.name=a+"_"+(new Date).getTime();l.src=a;l.onload=function(){clearTimeout(k);k=setTimeout(d.bind(null,"Plugin handshake timeout for: "+a),5E3)};l.sandbox="allow-scripts allow-same-origin";l.style.width=l.style.height="100%";l.frameBorder=0;(b||p).appendChild(l);j.target=l.contentWindow;j.close=function(){clearTimeout(k);if(l){var a=l.parentNode;a&&a.removeChild(l);l=null}};t.push(j);return j},disconnect:function(a){for(var c=0;c<t.length;c++)if(a===t[c]){t.splice(c,
1);try{a.close()}catch(b){}break}},removePlugin:function(a){for(var c=0;c<q.length;c++)if(a===q[c]){q.splice(c,1);break}f.removeItem("plugin."+a.getLocation())},persist:function(a,c){f.setItem("plugin."+a,JSON.stringify(c))},postMessage:function(a,c){c.target.postMessage(c.useStructuredClone?a:JSON.stringify(a),c.url)},dispatchEvent:function(a){try{w.dispatchEvent(a)}catch(c){console&&console.log("PluginRegistry.dispatchEvent "+c)}},loadManifest:function(a){var c=new h,b=v.connect(a,function(a){b&&
a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],v.disconnect(b),b=null,c.resolve(a)):"timeout"===a.method&&(v.disconnect(b),b=null,c.reject(a.error)))});return c.promise},getState:function(){return o},handleServiceError:function(a,c){if(c&&c.status===401){var b=a.getHeaders(),e=a.getName()||a.getLocation(),d=document.createElement("span");d.appendChild(document.createTextNode("Authentication required for: "+e+"."));if(b.login)d.appendChild(document.createTextNode(" ")),e=document.createElement("a"),
e.target="_blank",e.textContent="Login",e.href=b.login,j.test(e.href)?(d.appendChild(e),d.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+b.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(d)}}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=v.getState;this.init=function(){if(!(o==="starting"||o==="active"||o==="stopping")){addEventListener("message",g,!1);for(var a=[],c=0,b=f.length;c<b;c++)a.push(f.key(c));a.forEach(function(a){if(a.indexOf("plugin.")===0){var c=a.substring(7),a=JSON.parse(f.getItem(a));a.created&&q.push(new k(c,a,v))}});q.sort(function(a,c){return a._getCreated()<c._getCreated()?-1:1});if(e.parent)p=e.parent;else{p=document.createElement("div");
if(!e.visible)p.style.display="none",p.style.visibility="hidden";document.body.appendChild(p)}e.plugins&&Object.keys(e.plugins).forEach(function(a){a=d(a);if(!this.getPlugin(a)){var c=e.plugins[a];typeof c!=="object"&&(c={});c.autostart=c.autostart||e.defaultAutostart||"lazy";q.push(new k(a,c,v))}}.bind(this));o="starting"}};this.start=function(){o!=="starting"&&this.init();if(o!=="starting")return(new h).reject("Cannot start framework. Framework is already "+o+".");var a=[],c=(new Date).getTime();
q.forEach(function(b){var e=b._getAutostart();b.getLastModified()===0?a.push(b.update().then(function(){if("started"===e)return b.start({"transient":!0});if("lazy"===e)return b.start({lazy:!0,"transient":!0});b._resolve()})):"started"===e?a.push(b.start({"transient":!0})):"lazy"===e?(a.push(b.start({lazy:!0,"transient":!0})),c>b.getLastModified()+864E5&&b.update()):b._resolve()});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){o="active"})};this.stop=function(){if(o!==
"starting"&&o!=="active")return(new h).reject("Cannot stop registry. Registry is already "+o+".");o="stopping";var a=[];q.forEach(function(c){a.push(c.stop({"transient":!0}))});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){if(!e.parent){var a=p.parentNode;a&&a.removeChild(p)}p=null;removeEventListener("message",g);o="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(A[a])return A[a];if(b)return e=new k(a,b,v),q.push(e),e._persist(),v.dispatchEvent(new c("installed",e)),(new h).resolve(e);var j=v.loadManifest(a).then(function(b){e=new k(a,b,v);q.push(e);e._persist();delete A[a];v.dispatchEvent(new c("installed",e));return e},function(c){delete A[a];throw c;});return A[a]=j};this.getPlugins=function(){return q.slice()};this.getPlugin=function(a){var c=null,a=d(a);q.some(function(b){if(a===
b.getLocation())return c=b,!0});return c};this.addEventListener=w.addEventListener.bind(w);this.removeEventListener=w.removeEventListener.bind(w);this.resolvePlugins=function(){var a=!0;q.forEach(function(c){a=a&&c._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function h(d,b){function g(b){var e=b.getProperty("service.id"),d=this.addingService(b);d&&(c[e]=b,a[e]=d)}function e(b){var e=b.getProperty("service.id"),d=a[e];delete c[e];delete a[e];this.removedService(b,d)}this.serviceRegistry=d;var c={},a={},k=i,j,l;this.close=function(){if(k!==f)throw"Already closed";k=i;d.removeEventListener("registered",j);d.removeEventListener("unregistering",l);l=j=null;var a=this;this.getServiceReferences().forEach(function(c){e.call(a,
c)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var a=Object.keys(c);return!a.length?null:a.map(function(a){return c[a]})};this.open=function(){if(k!==i)throw"Already open";k=f;var a=this;j=function(c){if(c.serviceReference.getProperty("objectClass").indexOf(b)!==-1&&(g.call(a,c.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(c.serviceReference,a.serviceRegistry.getService(c.serviceReference))};l=function(c){c.serviceReference.getProperty("objectClass").indexOf(b)!==
-1&&e.call(a,c.serviceReference)};d.addEventListener("registered",j);d.addEventListener("unregistering",l);d.getServiceReferences(b).forEach(function(c){g.call(a,c);if(typeof a.onServiceAdded==="function")return a.onServiceAdded(c,d.getService(c))});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/objects",[],function(){function h(i){for(var f=1;f<arguments.length;f++){var d=arguments[f],b;for(b in d)Object.prototype.hasOwnProperty.call(d,b)&&(i[b]=d[b])}return i}return{clone:function(i){if(Array.isArray(i))return Array.prototype.slice.call(i);var f=Object.create(Object.getPrototypeOf(i));h(f,i);return f},mixin:h,toArray:function(i){return Array.isArray(i)?i:[i]}}});
define("orion/config",["orion/Deferred","orion/serviceTracker","orion/objects"],function(h,i,f){var d,b,g,e,c,a="pid";d=function(c,b,e){function d(a,c,e){c.forEach(function(d,j){try{var k=a[j].getProperty("__plugin__"),m=k&&b.getPlugin(k);(!k||m&&m.getState()==="active")&&c[j].updated(e)}catch(g){typeof console!=="undefined"&&console.log(g)}})}i.call(this,c,"orion.cm.managedservice");var k={},g={},p=function(b){var d=[];b.plugin.getServiceReferences().forEach(function(b){if(b.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var k=b.getProperty(a),b=c.getService(b);k&&b&&(k=(k=e._find(k))&&k.getProperties(),d.push(b.updated(k)))}});return h.all(d)};this.addingService=function(b){var e=b.getProperty(a),d=c.getService(b);if(!e||!d)return null;k[e]||(k[e]=[]);g[e]||(g[e]=[]);k[e].push(b);g[e].push(d);return d};this.onServiceAdded=function(c,b){var j=c.getProperty(a),j=e._find(j);d([c],[b],j&&j.getProperties())};this.onOpen=function(){b.addEventListener("started",p)};this.onClose=function(){b.removeEventListener("started",
p)};this.notifyUpdated=function(a){var c=a.getPid();d(k[c]||[],g[c]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();d(k[a]||[],g[a]||[],null)};this.removedService=function(c,b){var e=c.getProperty(a),d=k[e],j=g[e];d.length>1?d.splice(d.indexOf(c),1):delete k[e];j.length>1?j.splice(j.indexOf(b),1):delete g[e]}};b=function(){function a(c,b,j){this.store=new g(this,j);this.configAdmin=new e(this,this.store);this.tracker=new d(c,b,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(c){a.tracker.open();return c})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();e=function(){function a(c,b){this.factory=c;this.store=b}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 k="/cm/configurations";
g=function(){function b(e,d){this.factory=e;this.prefsService=d;this.configs=Object.create(null);this.pref=null;var j=this;this.initPromise=this.prefsService.getPreferences(k).then(function(b){j.pref=b;b.keys().forEach(function(e){if(!j.configs[e]){var d=b.get(e);typeof d==="object"&&d!==null&&Object.keys(d).length>0&&(d[a]=e,j.configs[e]=new c(j.factory,j,d))}})})}b.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var b=this._find(a);
b||(b=new c(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,c=[];this.pref.keys().forEach(function(b){(b=a._find(b))&&b.getProperties()!==null&&c.push(b)});return c},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,c){this.pref.put(a,c.getProperties(!0)||{})}};return b}();c=function(){function c(b,e){e=f.clone(e);delete e[a];b.properties=e}function b(e,d,k){this.factory=e;this.store=d;if(k!==null&&typeof k==="object")this.pid=k[a],c(this,
k);else if(typeof k==="string")this.pid=k,this.properties=null;else throw Error("Invalid pid/properties "+k);}b.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(c){this._checkRemoved();var b=null;if(this.properties&&(b=f.clone(this.properties),!c))b[a]=this.pid;return b},remove:function(){this._checkRemoved();this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=
!0},update:function(a){this._checkRemoved();c(this,a);this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return b}();return{ConfigurationAdminFactory:b}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(h,i,f,d,b,g){var e;return{startup:function(){if(e)return e;e=new i;var c=new f.ServiceRegistry,a=new d.PreferencesService(c);return a.getPreferences("/plugins").then(function(d){var j={plugins:{}};d.keys().forEach(function(a){var c=h.toUrl(a);j.plugins[c]=d[a]});var l=new b.PluginRegistry(c,j);return l.start().then(function(){if(c.getServiceReferences("orion.core.preference.provider").length>
0)return a.getPreferences("/plugins",a.USER_SCOPE).then(function(a){var c=[];a.keys().forEach(function(a){a=h.toUrl(a);l.getPlugin(a)||c.push(l.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return i.all(c,function(a){console.log(a)})})}).then(function(){return(new g.ConfigurationAdminFactory(c,l,a)).getConfigurationAdmin().then(c.registerService.bind(c,"orion.cm.configadmin"))}).then(function(){var a=c.getService("orion.core.auth");
if(a){var b=a.getUser().then(function(c){if(c)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 b}}).then(function(){var b={serviceRegistry:c,preferences:a,pluginRegistry:l};e.resolve(b);return b})})}}});
define("orion/util",[],function(){var h=navigator.userAgent,i=h.indexOf("MSIE")!==-1||h.indexOf("Trident")!==-1?document.documentMode:void 0,f=parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0,d=h.indexOf("Opera")!==-1?parseFloat(h.split("Version/")[1]):void 0,b=parseFloat(h.split("Chrome/")[1])||void 0,g=h.indexOf("Safari")!==-1&&!b,e=parseFloat(h.split("WebKit/")[1])||void 0,c=h.indexOf("Android")!==-1,a=h.indexOf("iPad")!==-1,h=h.indexOf("iPhone")!==-1,k=a||h,j=navigator.platform.indexOf("Mac")!==
-1,l=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==-1,n="ontouchstart"in document.createElement("input");return{formatMessage:function(a){var c=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,b){return c[(b<<0)+1]})},createElement:function(a,c){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",c):a.createElement(c)},isIE:i,isFirefox:f,isOpera:d,isChrome:b,isSafari:g,isWebkit:e,isAndroid:c,isIPad:a,isIPhone:h,isIOS:k,isMac:j,isWindows:l,
isLinux:m,isTouch:n,platformDelimiter:l?"\r\n":"\n"}});
define("orion/webui/littlelib",["orion/util"],function(h){function i(a,c){c||(c=document);return c.querySelectorAll(a)}function f(a){var c=a.tabIndex;c===0&&h.isIE&&!{a:!0,body:!0,button:!0,frame:!0,iframe:!0,img:!0,input:!0,isindex:!0,object:!0,select:!0,textarea:!0}[a.nodeName.toLowerCase()]&&!a.attributes.tabIndex&&(c=-1);return c}function d(a){if(f(a)>=0)return a;if(a.hasChildNodes())for(var c=0;c<a.childNodes.length;c++){var b=d(a.childNodes[c]);if(b)return b}return null}function b(a){if(f(a)>=
0)return a;if(a.hasChildNodes())for(var c=a.childNodes.length-1;c>=0;c--){var e=b(a.childNodes[c]);if(e)return e}return null}function g(a,c){if(a.nodeType===3){var b=e.exec(a.nodeValue);b&&b.length>1&&c(a,b)}if(a.hasChildNodes())for(b=0;b<a.childNodes.length;b++)g(a.childNodes[b],c)}var e=/\$\{([^\}]+)\}/,c=null;return{$:function(a,c){c||(c=document);return c.querySelector(a)},$$:i,$$array:function(a,c){return Array.prototype.slice.call(i(a,c))},node:function(a){var c=a;typeof a==="string"&&(c=document.getElementById(a));
return c},contains:function(a,c){if(!a||!c)return!1;if(a===c)return!0;var b=a.compareDocumentPosition(c);return Boolean(b&16)},bounds:function(a){a=a.getBoundingClientRect();return{left:a.left+document.documentElement.scrollLeft,top:a.top+document.documentElement.scrollTop,width:a.width,height:a.height}},empty:function(a){for(;a.hasChildNodes();)a.removeChild(a.firstChild)},firstTabbable:d,lastTabbable:b,stop:function(a){if(window.document.all)a.keyCode=0;a.preventDefault&&(a.preventDefault(),a.stopPropagation())},
processTextNodes:function(a,c){g(a,function(a,b){a.parentNode.replaceChild(document.createTextNode(c[b[1]]||b[1]),a)})},processDOMNodes:function(a,c){g(a,function(a,b){var e=c[b[1]];if(e){var d=document.createRange(),g=b.index;d.setStart(a,g);d.setEnd(a,g+b[0].length);d.deleteContents();d.insertNode(e)}})},addAutoDismiss:function(a,b){function e(a){c.forEach(function(c){var b=!1,e=c.excludeNodes.some(function(c){return document.body.contains(c)?(b=!0,c.contains(a.target)):!1});if(b&&!e)try{c.dismiss(a)}catch(d){typeof console!==
"undefined"&&console&&console.error(d&&d.message)}});c=c.filter(function(a){return a.excludeNodes.some(function(a){return document.body.contains(a)})})}c===null&&(c=[],document.addEventListener("click",e,!0),h.isIOS&&document.addEventListener("touchend",function(a){function c(){a.target.removeEventListener("click",c)}a.touches.length===0&&a.target.addEventListener("click",c)},!1));c.push({excludeNodes:a,dismiss:b})},setFramesEnabled:function(a){for(var c=document.getElementsByTagName("iframe"),b=
0;b<c.length;b++)c[b].parentNode.style.pointerEvents=a?"":"none"},removeAutoDismiss:function(a){c=c.filter(function(c){return a!==c.dismiss})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
define("orion/webui/dropdown",["require","orion/webui/littlelib","orion/EventTarget"],function(h,i,f){function d(b){f.attach(this);this._init(b)}d.prototype={_init:function(b){this._dropdownNode=i.node(b.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._populate=b.populate;this._selectionClass=b.selectionClass;this._parentDropdown=b.parentDropdown;this._positioningNode=b.positioningNode;if(!this._parentDropdown)for(var d=this._dropdownNode.parentNode;d&&document!==d;){if(d.classList&&
d.classList.contains("dropdownMenu")){this._parentDropdown=d.dropdown;break}d=d.parentNode}this._triggerNode=b.triggerNode?b.triggerNode:i.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";if(!b.skipTriggerEventListeners){var e=this;this._triggerNode.addEventListener("click",function(c){e.toggle(c)&&i.stop(c)},!1);this._triggerNode.tagName.toLowerCase()==="span"&&this._triggerNode.addEventListener("keydown",function(c){if(c.keyCode===
i.KEY.ENTER||c.keyCode===i.KEY.SPACE)e.toggle(),i.stop(c)},!1)}this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},addTriggerNode:function(b){var d=this;b.addEventListener("click",function(b){d.toggle(b)&&i.stop(b)},!1)},toggle:function(b){return this.isVisible()?this.close():this.open(b)},isVisible:function(){return this._isVisible},open:function(b){var d=!1;if(!this.isVisible()){this.dispatchEvent({type:"triggered",dropdown:this,event:b});i.setFramesEnabled(!1);this._populate&&
(this.empty(),this._populate(this._dropdownNode));var e=this.getItems();if(e.length>0){if(!this._hookedAutoDismiss)this._boundAutoDismiss?i.removeAutoDismiss(this._boundAutoDismiss):this._boundAutoDismiss=this._autoDismiss.bind(this),d=i.$$array(".dropdownSubMenu",this._dropdownNode),i.addAutoDismiss([this._triggerNode].concat(d),this._boundAutoDismiss),this._hookedAutoDismiss=!0;this._triggerNode.classList.add("dropdownTriggerOpen");this._selectionClass&&this._triggerNode.classList.add(this._selectionClass);
this._dropdownNode.classList.add("dropdownMenuOpen");this._isVisible=!0;this._positionDropdown(b);e[0].focus();d=!0;this._parentDropdown&&this._parentDropdown.submenuOpen(this)}}return d},_autoDismiss:function(b){if(this.close(!1)&&this._dropdownNode.contains(b.target))for(b=this._parentDropdown;b;)b.close(!1),b=b._parentDropdown},_positionDropdown:function(){this._dropdownNode.style.left="";this._dropdownNode.style.top="";if(this._positioningNode)this._dropdownNode.style.left=this._positioningNode.offsetLeft+
"px";else{var b=i.bounds(this._dropdownNode),d=i.bounds(document.body);if(b.left+b.width>d.left+d.width)if(this._triggerNode.classList.contains("dropdownMenuItem"))this._dropdownNode.style.left=-b.width+"px";else{var e=i.bounds(this._boundingNode(this._triggerNode)),c=i.bounds(this._triggerNode);this._dropdownNode.style.left=c.left-e.left-b.width+c.width+"px"}b=b.top+b.height-(d.top+d.height);if(0<b)this._dropdownNode.style.top=Math.floor(this._dropdownNode.style.top-b)+"px"}},_boundingNode:function(b){var d=
window.getComputedStyle(b,null);return d===null?b:d.getPropertyValue("position")==="absolute"||!b.parentNode||b===document.body?b:this._boundingNode(b.parentNode)},close:function(b){var d=!1;if(this.isVisible())this._triggerNode.classList.remove("dropdownTriggerOpen"),this._selectionClass&&this._triggerNode.classList.remove(this._selectionClass),this._dropdownNode.classList.remove("dropdownMenuOpen"),i.setFramesEnabled(!0),b&&this._triggerNode.focus(),this._isVisible=!1,d=!0;return d},getItems:function(){var b=
[],d=this;i.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(e){e.parentNode.parentNode===d._dropdownNode&&b.push(e)});b.forEach(function(b){if(!b._hasDropdownMouseover)b.addEventListener("mouseover",function(c){b.dropdown?b.dropdown.open(c):(d._closeSelectedSubmenu(),i.stop(c))}),b._hasDropdownMouseover=!0});return b},empty:function(){var b=this;i.$$array("li",this._dropdownNode).forEach(function(d){d.parentNode===b._dropdownNode&&d.parentNode.removeChild(d)});
this._hookedAutoDismiss=!1},_dropdownKeyDown:function(b){if(b.keyCode===i.KEY.UP||b.keyCode===i.KEY.DOWN||b.keyCode===i.KEY.RIGHT||b.keyCode===i.KEY.ENTER||b.keyCode===i.KEY.LEFT){var d=this.getItems(),e=document.activeElement;if(d.length&&d.length>0&&e){var c=d.indexOf(e);c<0&&(c=d.indexOf(e.parentNode));c>=0&&(b.keyCode===i.KEY.UP&&c>0?(c--,d[c].focus()):b.keyCode===i.KEY.DOWN&&c<d.length-1?(c++,d[c].focus()):b.keyCode===i.KEY.ENTER||b.keyCode===i.KEY.RIGHT?e.classList.contains("dropdownTrigger")&&
e.dropdown&&e.dropdown.open():b.keyCode===i.KEY.LEFT&&e.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),i.stop(b))}}else b.keyCode===i.KEY.ESCAPE&&(this.close(!0),i.stop(b))},submenuOpen:function(b){if(b!==this._selectedSubmenu)this._closeSelectedSubmenu(),this._selectedSubmenu=b},_closeSelectedSubmenu:function(){for(var b=this._selectedSubmenu;b;)b.close(),b=b._selectedSubmenu},destroy:function(){this.empty();this._boundAutoDismiss&&i.removeAutoDismiss(this._boundAutoDismiss)}};
d.prototype.constructor=d;return{Dropdown:d}});
define("text",["module"],function(h){var i,f,d=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],b=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,g=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=typeof location!=="undefined"&&location.href,c=e&&location.protocol&&location.protocol.replace(/\:/,""),a=e&&location.hostname,k=e&&(location.port||void 0),j=[],l=h.config&&h.config()||{};i={version:"2.0.5",strip:function(a){if(a){var a=a.replace(b,""),c=a.match(g);c&&(a=c[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,c,b;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else if(typeof ActiveXObject!=="undefined")for(c=0;c<3;c+=1){b=d[c];try{a=new ActiveXObject(b)}catch(e){}if(a){d=[b];break}}return a},parseName:function(a){var c,
b,e=!1,d=a.indexOf(".");c=a.indexOf("./")===0||a.indexOf("../")===0;d!==-1&&(!c||d>1)?(c=a.substring(0,d),b=a.substring(d+1,a.length)):c=a;a=b||c;d=a.indexOf("!");d!==-1&&(e=a.substring(d+1)==="strip",a=a.substring(0,d),b?b=a:c=a);return{moduleName:c,ext:b,strip:e}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,c,b,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===c)&&(!d||d.toLowerCase()===b.toLowerCase())&&(!j&&!d||j===e)},finishLoad:function(a,
c,b,e){b=c?i.strip(b):b;l.isBuild&&(j[a]=b);e(b)},load:function(b,d,j,g){if(g.isBuild&&!g.inlineText)j();else{l.isBuild=g.isBuild;var f=i.parseName(b),g=f.moduleName+(f.ext?"."+f.ext:""),h=d.toUrl(g),t=l.useXhr||i.useXhr;!e||t(h,c,a,k)?i.get(h,function(a){i.finishLoad(b,f.strip,a,j)},function(a){j.error&&j.error(a)}):d([g],function(a){i.finishLoad(f.moduleName+"."+f.ext,f.strip,a,j)})}},write:function(a,c,b){if(j.hasOwnProperty(c)){var e=i.jsEscape(j[c]);b.asModule(a+"!"+c,"define(function () { return '"+
e+"';});\n")}},writeFile:function(a,c,b,e,d){var c=i.parseName(c),j=c.ext?"."+c.ext:"",k=c.moduleName+j,l=b.toUrl(c.moduleName+j)+".js";i.load(k,b,function(){var c=function(a){return e(l,a)};c.asModule=function(a,c){return e.asModule(a,l,c)};i.write(a,k,c,d)},d)}};if(l.env==="node"||!l.env&&typeof process!=="undefined"&&process.versions&&process.versions.node)f=require.nodeRequire("fs"),i.get=function(a,c){var b=f.readFileSync(a,"utf8");b.indexOf("\ufeff")===0&&(b=b.substring(1));c(b)};else if(l.env===
"xhr"||!l.env&&i.createXhr())i.get=function(a,c,b,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,b(e)):c(d.responseText)};d.send(null)};else if(l.env==="rhino"||!l.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")i.get=function(a,c){var b,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")),k="";try{b=new java.lang.StringBuffer;(e=d.readLine())&&e.length()&&e.charAt(0)===65279&&(e=e.substring(1));for(e!==null&&b.append(e);(e=d.readLine())!==null;)b.append(j),b.append(e);k=String(b.toString())}finally{d.close()}c(k)};return i});define("text!orion/webui/dropdowntriggerbutton.html",[],function(){return'<button class="dropdownTrigger">${ButtonText}<\!--span class="dropdownArrowDown core-sprite-openarrow"></span--\></button><ul class="dropdownMenu"></ul>'});
define("text!orion/webui/dropdowntriggerbuttonwitharrow.html",[],function(){return'<button class="dropdownTrigger dropdownDefaultButton">${ButtonText}<span class="dropdownArrowDown core-sprite-openarrow"></span></button><ul class="dropdownMenu"></ul>'});define("text!orion/webui/submenutriggerbutton.html",[],function(){return'<li class="dropdownSubMenu"><span class="dropdownTrigger dropdownMenuItem" role="menuitem" tabindex="0"><span class="dropdownCommandName">${ButtonText}</span><span class="dropdownArrowRight core-sprite-closedarrow"></span></span><ul class="dropdownMenu"></ul></li>'});
define("text!orion/webui/checkedmenuitem.html",[],function(){return'<li><label class="dropdownMenuItem"><input class="checkedMenuItem" role="menuitem" type="checkbox" />${ItemText}</label></li>'});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(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 b=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",this._clickHandler=function(e){e.target===b._node&&(b.show(),i.stop(e))},!1);else if(this._trigger==="mouseover"){this._showDelay=d.showDelay===void 0?500:d.showDelay;d=["mouseout","click"];this._node.addEventListener("mouseover",this._mouseoverHandler=function(e){i.contains(b._node,e.target)&&(b.show(),i.stop(e))},!1);this._leaveHandler=function(e){i.contains(b._node,e.target)&&b.hide()};for(var g=0;g<d.length;g++)this._node.addEventListener(d[g],
this._leaveHandler,!1)}},_makeTipNode:function(){if(!this._tip){this._tip=document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("div");this._tipInner.classList.add("tooltip");if(this._text)this._tipTextContent=document.createElement("div"),this._tipTextContent.classList.add("textContent"),this._tipInner.appendChild(this._tipTextContent),this._tipTextContent.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);
document.body.appendChild(this._tip);var d=this;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(b){i.contains(d._tip,b.target)&&(d.hide(),i.stop(b))},
!1)},!1)}return this._tip},_positionTip:function(d,b){this._makeTipNode();d==="left"?this._tipInner.classList.add("left"):this._tipInner.classList.remove("left");var g=this._node,e;for(e=i.bounds(g);g&&!e.width&&!e.height;g=g.parentNode)e=i.bounds(g);var g=i.bounds(this._tipInner),c;switch(d){case "above":c=e.top-g.height-this._tailSize-1;e=e.left-this._tailSize;break;case "below":c=e.top+e.height+this._tailSize+1;e=e.left-this._tailSize;break;case "left":c=e.top-this._tailSize/2;e=e.left-g.width-
this._tailSize-1;break;default:c=e.top-this._tailSize/2,e=e.left+e.width+this._tailSize+1}var a=i.bounds(document.documentElement);if(c+g.height>a.height)if(b)c=a.height-g.height-1;else return!1;if(e+g.width>a.width)if(b)e=a.width-g.width-1;else return!1;if(e<0)if(b)e=4;else return!1;if(c<0)if(b)c=4;else return!1;if(this._tail&&this._tail.previousPosition!==d)this._tip.removeChild(this._tail),this._tail=null;if(!this._tail){this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+
d);d==="above"||d==="left"?this._tip.appendChild(this._tail):this._tip.insertBefore(this._tail,this._tipInner);if(d==="left")this._tail.style.left=g.width+"px";this._tail.previousPosition=d}this._tip.style.top=c+"px";this._tip.style.left=e+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._showDelay?this._timeout=
window.setTimeout(this._showImmediately.bind(this),this._showDelay):this._showImmediately()}},_showImmediately:function(){for(var d=!1,b=0;!d&&b<this._position.length;)d=this._positionTip(this._position[b]),b++;d||this._positionTip(this._position[0],!0);this._tip.classList.add("tooltipShowing");this._afterShowing&&this._afterShowing()},hide:function(d){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(d===void 0)d=
this._hideDelay;var b=this;this._timeout=window.setTimeout(function(){b._tip.classList.remove("tooltipShowing");b._tip.removeAttribute("style");b._afterHiding&&b._afterHiding()},d)}},destroy:function(){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip)document.body.removeChild(this._tip),this._tail=this._tipTextContent=this._tipInner=this._tip=null;if(this._node){this._node.removeEventListener("click",this._clickHandler,!1);this._node.removeEventListener("mouseover",
this._mouseoverHandler,!1);for(var d=["mouseout","click"],b=0;b<d.length;b++)this._node.removeEventListener(d[b],this._leaveHandler,!1)}}};f.prototype.constructor=f;return{Tooltip:f}});
define("orion/commands","orion/util,orion/webui/littlelib,orion/webui/dropdown,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/dropdowntriggerbuttonwitharrow.html,text!orion/webui/submenutriggerbutton.html,text!orion/webui/checkedmenuitem.html,orion/webui/tooltip".split(","),function(h,i,f,d,b,g,e,c){function a(a){var c=a.invocation;if(c){var b=a.command;if(b.hrefCallback)return a=b.hrefCallback.call(c.handler||window,c),a.then?a.then(function(a){window.open(a)}):window.open(a),!0;else if(c.commandRegistry)return c.commandRegistry._invoke(c),
!0;else if(b.onClick||b.callback)return window.setTimeout(function(){(b.onClick||b.callback).call(c.handler||window,c)},0),!0}return!1}function k(c,b){for(var e in b)if(b[e]&&b[e].keyBinding&&b[e].command&&b[e].keyBinding.match(c)){var d=b[e],j=d.keyBinding;if((!j.domScope||i.contains(i.node(j.domScope),c.target))&&a(d)){i.stop(c);break}}}function j(){var a={};if(t){var c,b,e;b=Object.keys(w);for(c=0;c<b.length;c++)e=b[c],a[e]=w[e];var d=t();b=Object.keys(d);for(c=0;c<b.length;c++)e=b[c],a[e]=d[e]}else a=
w;return a}function l(a){k(a,j())}function m(a,c){a=a||window.event;if(function(a){if(h.isMac){if(a.metaKey&&!a.altKey)return!a.shiftKey&&!a.ctrlKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.ctrlKey)return!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return a["char"].length>0;else if(a.charCode||a.keyCode)switch(a=
a.charCode||a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return a>=32&&a<112||a>123}return!1}(a)){if(a.target.contentEditable==="true")return;var b=a.target.nodeName.toLowerCase();if(b==="input")switch(a.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(b==="textarea")return}c?c(a):l(a)}function n(){this._init()}
function r(a,c,b){c.classList.add("commandImage");var e;a.imageClass?a.addImageClassToElement?c.classList.add(a.imageClass):(e=document.createElement("span"),c.appendChild(e),e.classList.add(a.spriteClass),e.classList.add(a.imageClass)):(e=new Image,e.alt=a.name,e.name=b,e.id=b,e.src=a.image,c.appendChild(e));return e}function o(a,c){var b=document.createElement("span");b.classList.add("dropdownKeyBinding");b.appendChild(document.createTextNode(c));a.appendChild(b)}function p(a,c,b,e,d){this.commandRegistry=
d;this.handler=a;this.items=c;this.userData=b;this.command=e;if(e.parameters)this.parameters=e.parameters.makeCopy();this.id=e.id}function q(a){this._init(a)}var t=null,w={};n.prototype={setProxy:function(a){this.proxy=a},setKeyBindings:function(a){this.bindings=a},_init:function(){var a=this;document.addEventListener("keydown",function(c){return m(c,function(c){var b=a.proxy,e=a.bindings;if(e&&b)for(var d=0;d<e.length;d++)e[d].match(c)&&(b.processKey({type:c.type,keyCode:c.keyCode,altKey:c.altKey,
ctrlKey:c.ctrlKey,metaKey:c.metaKey,shiftKey:c.shiftKey}),i.stop(c))})})}};window.document.addEventListener("keydown",m,!1);p.prototype={collectsParameters:function(){return this.commandRegistry&&this.commandRegistry.collectsParameters()},makeCopy:function(a){var c=new p(this.handler,this.items,this.userData,this.command,this.commandRegistry);c.domNode=this.domNode;c.domParent=this.domParent;if(a)c.parameters=a.makeCopy();else if(this.parameters)c.parameters=this.parameters.makeCopy();return c}};
p.prototype.constructor=p;q.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.positioningNode=a.positioningNode;this.image=a.image||"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC";this.imageClass=a.imageClass;this.addImageClassToElement=a.addImageClassToElement;this.selectionClass=
a.selectionClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters;this.isEditor=a.isEditor},populateChoicesMenu:function(a,c,b,e,d){var b=this.getChoices(c,b,e),j=b.some(function(a){return a.checked});b.forEach(function(b){if(b.name){var e=document.createElement("li");a.appendChild(e);var k=document.createElement("span");k.tabIndex=0;k.role="menuitem";k.classList.add("dropdownMenuItem");if(j){var l=document.createElement("span");l.classList.add("check");
l.appendChild(document.createTextNode(b.checked?"\u25cf":""));k.appendChild(l)}l=document.createTextNode(b.name);k.appendChild(l);e.appendChild(k);k.choice=b;k.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,c)},!1);k.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&a.target.choice&&a.target.choice.callback.call(a.target.choice,c)},!1)}else d._generateMenuSeparator(a)})},getChoices:function(a,c,b){return this.choiceCallback?
this.choiceCallback.call(c,a,b):null},makeChoiceCallback:function(a,c){return function(b){a.callback&&a.callback.call(a,c,b)}},hasImage:function(){return this.imageClass||this.image!=="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC"}};q.prototype.constructor=q;return{Command:q,CommandInvocation:p,createDropdownMenu:function(a,c,e,j,k,l,g,m,p){a=i.node(a);if(!a)throw"no parent node was specified";
var o=document.createRange();o.selectNode(a);o=p?o.createContextualFragment(b):o.createContextualFragment(d);i.processTextNodes(o,{ButtonText:c});a.appendChild(o);var a=a.lastChild,h;p?(p=a.previousSibling,h=p.lastChild):p=a.previousSibling;j?p.classList.add(j):(p.classList.add("orionButton"),p.classList.add("commandButton"));if(k){if(!l)p.textContent="",p.setAttribute("aria-label",c);r({spriteClass:"commandSprite",imageClass:k},p,c);p.classList.add("orionButton")}p.dropdown=new f.Dropdown({dropdown:a,
populate:e,selectionClass:g,skipTriggerEventListeners:!!h,positioningNode:m});a.dropdown=p.dropdown;return{menuButton:p,menu:a,dropdown:p.dropdown,dropdownArrow:h}},createCheckedMenuItem:function(a,c,b,d){a=i.node(a);if(!a)throw"no parent node was specified";var j=document.createRange();j.selectNode(a);j=j.createContextualFragment(e);i.processTextNodes(j,{ItemText:c});a.appendChild(j);a=i.$(".checkedMenuItem",a.lastChild);a.checked=b;a.addEventListener("change",d,!1);return a},createCommandItem:function(a,
b,e,d,j,k,l){var g,k=k||!b.name&&b.hasImage();if(b.hrefCallback)g=document.createElement("a"),g.id=d,k&&b.hasImage()?r(b,g,d):(g.className="commandLink",g.appendChild(document.createTextNode(b.name))),l=b.hrefCallback.call(e.handler,e),l.then?l.then(function(a){g.href=a}):g.href=l?l:"#";else{g=document.createElement("button");g.className="orionButton";k?b.hasImage()?(r(b,g,d),b.name&&g.setAttribute("aria-label",b.name)):(g.classList.add("commandButton"),g.classList.add("commandMissingImageButton"),
g.appendChild(document.createTextNode(b.name))):(g.classList.add("commandButton"),d=document.createTextNode(b.name),g.appendChild(d));var f=l||b.callback;if(f)b.onClick=f,g.addEventListener("click",function(){f.call(e.handler,e)},!1)}a.nodeName.toLowerCase()==="ul"?(l=document.createElement("li"),a.appendChild(l),a=l):g.classList.add("commandMargins");a.appendChild(g);if(b.tooltip)g.commandTooltip=new c.Tooltip({node:g,text:b.tooltip,position:["above","below","right","left"]});j&&(w[b.id]={keyBinding:j,
command:b,invocation:e});return g},createCommandMenuItem:function(a,b,e,d,j,k){var l,g=a.dropdown;if(b.hrefCallback){l=document.createElement("a");var f=document.createElement("span");f.appendChild(document.createTextNode(b.name));f.classList.add("dropdownCommandName");l.appendChild(f);j=b.hrefCallback.call(e.handler,e);j.then?j.then(function(a){l.href=a}):l.href=j?j:"#";l.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&l.click()},!1)}else{l=document.createElement("span");
l.tabIndex=0;f=document.createElement("span");f.appendChild(document.createTextNode(b.name));f.classList.add("dropdownCommandName");l.appendChild(f);var m=j||b.callback;if(m)b.onClick=m,l.addEventListener("click",function(){g.close(!0);m.call(e.handler,e)},!1),l.addEventListener("keydown",function(a){if(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)a.preventDefault(),l.click()},!1)}l.className="dropdownMenuItem";l.role="menuitem";if(b.tooltip)l.commandTooltip=new c.Tooltip({node:l,text:b.tooltip,
position:["above","below","right","left"]});k&&o(l,k);k=document.createElement("li");a.appendChild(k);k.appendChild(l);d&&(w[b.id]={keyBinding:d,command:b,invocation:e});return l},executeBinding:a,setKeyBindingProvider:function(a){t=a},localKeyBindings:w,CommandsProxy:n,getKeyBindings:j,processKey:l,NO_IMAGE:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAAtJREFUCNdjIBEAAAAwAAFletZ8AAAAAElFTkSuQmCC",_testMethodProcessKey:k}});
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,b){f&&(f=f.getGridNavHolder(d,!0))&&h(f,b)},generateNavGrid:h,removeNavGrid:function(f,d){if(f)for(var b=0;b<f.length;b++)if(f[b].domNode===d){f.splice(b,1);break}}}});
define("orion/PageUtil",[],function(){var h=/^http[s]?/i;return{hash:function(){var h=window.location.href.split("#")[1];return h?"#"+h:""},matchResourceParameters:function(h){var h=h||window.location.toString(),f={resource:""},d=h.indexOf("#");if(d!==-1&&(h=h.substring(d+1),h.length!==0)){h=h.split(",");f.resource=decodeURIComponent(h[0]);for(d=1;d<h.length;d++){var b=/([^=]*)(=?)(.*)/.exec(h[d]),g=decodeURIComponent(b[1]||""),b=decodeURIComponent(b[3]||"");g!==""&&g!=="resource"&&(f[g]=b)}}return f},
validateURLScheme:function(i,f){var d=i;if(i.indexOf("://")===-1){var b=document.createElement("a");b.href=i;d=b.href}b=!1;return(b=f?f.some(function(b){return RegExp("^"+b+":","i").test(d)}):h.test(d))?i:(console.log("Illegal URL Scheme: '"+i+"'"),"")}}});
define("orion/uiUtils",["orion/webui/littlelib"],function(h){function i(d){var b="",g=navigator.platform.indexOf("Mac")!==-1;g?(d.mod4&&(b+="\u2303"),d.mod3&&(b+="\u2325"),d.mod2&&(b+="\u21e7"),d.mod1&&(b+="\u2318")):(d.mod1&&(b+="Ctrl+"),d.mod2&&(b+="Shift+"),d.mod3&&(b+="Alt+"));if(d.alphaKey)return b+d.alphaKey;if(d.type==="keypress")return b+d.keyCode;for(var e in h.KEY)if(typeof(h.KEY[e]==="number")&&h.KEY[e]===d.keyCode){if(g)switch(h.KEY[e]){case h.KEY.BKSPC:e="\u232b";break;case h.KEY.TAB:e=
"\u21e5";break;case h.KEY.ENTER:e="\u23ce";break;case h.KEY.ESCAPE:e="\u238b";break;case h.KEY.SPACE:e="\u2423";break;case h.KEY.PAGEUP:e="\u21de";break;case h.KEY.PAGEDOWN:e="\u21df";break;case h.KEY.END:e="\u21f2";break;case h.KEY.HOME:e="\u21f1";break;case h.KEY.DEL:e="\u2326"}switch(h.KEY[e]){case h.KEY.DOWN:e="\u2193";break;case h.KEY.UP:e="\u2191";break;case h.KEY.RIGHT:e="\u2192";break;case h.KEY.LEFT:e="\u2190"}return b+e}var c;switch(d.keyCode){case 59:c=d.mod2?":":";";break;case 61:c=d.mod2?
"+":"=";break;case 188:c=d.mod2?"<":",";break;case 190:c=d.mod2?">":".";break;case 191:c=d.mod2?"?":"/";break;case 192:c=d.mod2?"~":"`";break;case 219:c=d.mod2?"{":"[";break;case 220:c=d.mod2?"|":"\\";break;case 221:c=d.mod2?"}":"]";break;case 222:c=d.mod2?'"':"'"}return c?b+c:d.keyCode>=112&&d.keyCode<=123?b+"F"+(d.keyCode-111):b+String.fromCharCode(d.keyCode)}function f(d){var b=window.navigator.platform.indexOf("Mac")!==-1;return b&&d.metaKey||!b&&d.ctrlKey}return{getUserKeyString:function(d){for(var b=
"",d=d.getKeys(),g=0;g<d.length;g++)g!==0&&(b+=" "),b+=i(d[g]);return b},getUserText:function(d){var b=d.id,g=d.refNode,e=d.hideRefNode,c=d.initialText,a=d.onComplete,k=d.onEditDestroy,j=d.selectTo,l=d.isInitialValid,d=d.insertAsChild,f=!1,i=function(d){return function(j){if(!f){var i=h.node(b),n=i.value;if(i)if(d&&j.keyCode===h.KEY.ESCAPE){if(e)g.style.display="inline";f=!0;i.parentNode.removeChild(i);k&&k()}else if(!(d&&j.keyCode!==h.KEY.ENTER)){if(n.length===0||!l&&n===c){if(e)g.style.display=
"inline"}else if(a(n),e&&g.parentNode)g.style.display="inline";f=!0;i.parentNode&&i.parentNode.removeChild(i);k&&k()}}}},r=document.createElement("input");r.id=b;r.value=c||"";d?g.appendChild(r):g.parentNode.insertBefore(r,g.nextSibling);r.classList.add("userEditBoxPrompt");if(e)g.style.display="none";r.addEventListener("keydown",i(!0),!1);r.addEventListener("blur",i(!1),!1);window.setTimeout(function(){r.focus();if(c){var a=h.node(b),e=j?c.indexOf(j):-1;if(e>0)if(a.createTextRange)a=a.createTextRange(),
a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",e),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,e);else{if(a.selectionStart!==void 0)a.selectionStart=0,a.selectionEnd=e}else a.select()}},0)},openInNewWindow:f,followLink:function(d,b){b&&f(b)?window.open(d):window.location=d},createButton:function(d,b){var g=document.createElement("button");g.className="orionButton commandButton commandMargins";g.addEventListener("click",function(e){b();h.stop(e)},!1);d&&g.appendChild(document.createTextNode(d));
return g},createDropdownButton:function(){},isFormElement:function(d){switch(d.tagName.toLowerCase()){case "button":case "fieldset":case "form":case "input":case "keygen":case "label":case "legend":case "meter":case "optgroup":case "output":case "progress":case "select":case "textarea":return!0}return!1}}});
define("orion/commandRegistry","orion/commands,orion/explorers/navigationUtils,orion/PageUtil,orion/uiUtils,orion/webui/littlelib,orion/webui/dropdown,orion/webui/tooltip,text!orion/webui/checkedmenuitem.html,text!orion/webui/dropdowntriggerbutton.html,text!orion/webui/submenutriggerbutton.html".split(","),function(h,i,f,d,b,g,e,c,a,k){function j(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._pendingBindings={};this._init(a);this._parameterCollector=
null}function l(a,c){this.token=a;this.parameterName=c}function m(a,c,b){this.event=a;this.handler=c;this.capture=b||!1}function n(a,c,b,e,d,j){this.name=a;this.type=c;this.label=b;this.value=e;this.lines=d||1;this.eventListeners=Array.isArray(j)?j:j?[j]:[]}function r(a,c,b){this._storeParameters(a);this._hasOptionalParameters=c&&c.hasOptionalParameters;this._options=c;this.optionsRequested=!1;this.getParameters=b;this.clientCollect=c&&c.clientCollect}j.prototype={_init:function(a){this._selectionService=
a.selection;var c=this;h.setKeyBindingProvider(function(){return c._activeBindings})},processURL:function(a){for(var c in this._urlBindings)if(this._urlBindings[c]&&this._urlBindings[c].urlBinding&&this._urlBindings[c].command){var b=this._urlBindings[c].urlBinding.match(a);if(b){var e=this._urlBindings[c],d=e.command,j=e.invocation;if(j&&j.parameters&&d.callback){j.parameters.setValue(b.parameterName,b.parameterValue);var k=this;window.setTimeout(function(){k._invoke(j)},0);break}}}},findCommand:function(a){return this._commandList[a]},
runCommand:function(a,c,b,e){c?(a=this._commandList[a])&&(a.visibleWhen?a.visibleWhen(c):1)&&a.callback&&this._invoke(new h.CommandInvocation(b,c,null,a,this),e):(c=this._urlBindings[a])&&c.command&&c.command.callback&&this._invoke(c.invocation,e)},getSelectionService:function(){return this._selectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,c,b){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,
c,b))},confirm:function(a,c,b,e,d,j){var k=!1;if(this._parameterCollector&&!d){var l=this;this._parameterCollector.close();if(this._parameterCollector.open(a,function(a,d){var j=document.createElement("span");j.classList.add("parameterPrompt");j.textContent=c;a.appendChild(j);j=document.createElement("button");j.addEventListener("click",function(){k=!0;l._parameterCollector.close()},!1);d.appendChild(j);j.appendChild(document.createTextNode(b));j.className="dismissButton";var g=document.createElement("button");
g.addEventListener("click",function(){k=!1;l._parameterCollector.close()},!1);d.appendChild(g);g.appendChild(document.createTextNode(e));g.className="dismissButton";return j},function(){j(k)}))return}k=window.confirm(c);j(k)},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,c){return this._collectAndInvoke(a.makeCopy(c),!1)},_collectAndInvoke:function(a,c){if(a)if(this._parameterCollector&&
a.parameters&&a.parameters.hasParameters()&&(c||a.parameters.shouldCollectParameters())){var b=!1;a.parameters.updateParameters(a);if(a.parameters.shouldCollectParameters()&&(b=this._parameterCollector.collectParameters(a),!b)){var d=new e.Tooltip({node:a.domNode,afterHiding:function(){this.destroy()},trigger:"click",position:["below","right","above","left"]}),b=d.contentContainer();b.classList.add("parameterPopup");var j=window.document.activeElement,k=this._parameterCollector.getFillFunction(a,
function(){j&&j.focus();d.destroy()})(b);d.show();window.setTimeout(function(){k.focus();k.select()},0);b=!0}b||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 c(a){return function(){h.executeBinding(a)}}var b={},e,j,k=[],l;for(l in this._activeBindings)(j=
this._activeBindings[l])&&j.keyBinding&&j.command&&(j.command.name||j.command.tooltip)&&k.push(j);k.sort(function(a,c){return(a.command.name||a.command.tooltip).localeCompare(c.command.name||c.command.tooltip)});for(l=0;l<k.length;l++)j=k[l],j.keyBinding.scopeName?(b[j.keyBinding.scopeName]||(b[j.keyBinding.scopeName]=[]),b[j.keyBinding.scopeName].push(j)):(e=d.getUserKeyString(j.keyBinding),a.createItem(e,j.command.name||j.command.tooltip,c(j)));for(var g in b)b[g].length&&b[g].length>0&&(a.createHeader(g),
b[g].forEach(function(b){e=d.getUserKeyString(b.keyBinding);a.createItem(e,b.command.name||b.command.tooltip,c(b))}))},addCommand:function(a){this._commandList[a.id]=a;var c=this._pendingBindings[a.id];if(c){var b=this;c.forEach(function(c){b._addBinding(a,c.type,c.binding,c.bindingOnly)});delete this._pendingBindings[a.id]}},addCommandGroup:function(a,c,b,e,d,j,k,l,g,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,
d));if(a[c]){if(e)a[c].title=e;if(b)a[c].position=b;if(k)a[c].imageClass=k;if(l)a[c].tooltip=l;if(g)a[c].selectionClass=g;f===!0?a[c].pretendDefaultActionId=!0:a[c].defaultActionId=f;a[c].emptyGroupMessage=j}else a[c]={title:e,position:b,emptyGroupMessage:j,imageClass:k,tooltip:l,selectionClass:g,defaultActionId:f===!0?null:f,pretendDefaultActionId:f===!0,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,c){c&&c.split("/").forEach(function(c){if(c.length>1){if(!a[c])a[c]={position:0,
children:{}},a.sortedContributions=null;a=a[c].children}});return a},registerSelectionService:function(a,c){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=c},registerCommandContribution:function(a,c,b,e,d,j,k){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));a[c]={position:b};j&&((b=this._commandList[c])?this._addBinding(b,"key",j,
d):this._addPendingBinding(c,"key",j,d));k&&((b=this._commandList[c])?this._addBinding(b,"url",k,d):this._addPendingBinding(c,"url",k,d));a.sortedContributions=null},unregisterCommandContribution:function(a,c,b){if(this._contributionsByScopeId[a]){delete this._commandList[c];delete this._activeBindings[c];delete this._urlBindings[c];delete this._pendingBindings[c];var e=this._contributionsByScopeId[a];b&&b.split("/").forEach(function(a){if(a.length>1&&e[a])e=e[a].children});delete e[c];e.sortedContributions=
null}},_addBinding:function(a,c,b,e){if(!a.id)throw Error("No command id: "+a);c==="key"?this._activeBindings[a.id]={command:a,keyBinding:b,bindingOnly:e}:c==="url"&&(this._urlBindings[a.id]={command:a,urlBinding:b,bindingOnly:e})},_addPendingBinding:function(a,c,b,e){this._pendingBindings[a]=this._pendingBindings[a]||[];this._pendingBindings[a].push({type:c,binding:b,bindingOnly:e})},_checkForTrailingSeparator:function(a,c,e){var d;if(c==="tool"||c==="button")if((d=a.childNodes.length>0?a.childNodes[a.childNodes.length-
1]:null)&&d.classList.contains("commandSeparator"))return e?(a.removeChild(d),!1):!0;if(c==="menu"&&(a=b.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(d=a[a.length-1],e)d.parentNode.parentNode.removeChild(d.parentNode);else return!0;return!1},renderCommands:function(a,c,e,d,j,k,l){if(typeof a!=="string")throw"a scope id for rendering must be specified";c=b.node(c);if(!c)throw"no parent";var g=this._contributionsByScopeId[a];if(!e&&g){var e=g.localSelectionService||
this._selectionService,f=this;e&&e.getSelections(function(b){f.renderCommands(a,c,b,d,j,k)})}else g&&(this._render(g,c,e,d,j||"button",k,l),this._checkForTrailingSeparator(c,j,!0))},destroy:function(a){a=b.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var c=a.firstChild;c.commandTooltip&&c.commandTooltip.destroy();c.emptyGroupTooltip&&c.emptyGroupTooltip.destroy();this.destroy(c);a.removeChild(c)}},_render:function(a,c,b,j,k,l,g){var f=a.sortedContributions;if(!f){var f=[],m=!1,n;for(n in a)if(Object.prototype.hasOwnProperty.call(a,
n)){var r=a[n];if(r&&typeof r.position==="number")r.id=n,f.push(r),m=!0}if(m)f.sort(function(a,c){return a.position-c.position}),a.sortedContributions=f}var D=0,u=this;f.forEach(function(a){var f;if(!a.imageClass)a.imageClass=null;if(a.children&&Object.getOwnPropertyNames(a.children).length>0){var m=a.children;if(k==="tool"||k==="button")if(a.title){var n;if(a.defaultActionId)(m=u._commandList[a.defaultActionId])&&(m.visibleWhen?m.visibleWhen(b):1)?(n=new h.CommandInvocation(j,b,l,m,u),n.domParent=
c):a.pretendDefaultActionId=!0;m=u._createDropdownMenu(c,a.title,null,null,a.imageClass,a.tooltip,a.selectionClass,null,n,a.pretendDefaultActionId);g&&i.generateNavGrid(g,m.menuButton);if(m)if(u._render(a.children,m.menu,b,j,"menu",l,g),u._checkForTrailingSeparator(m.menu,"menu",!0),m.menu.childNodes.length===0)if(a.emptyGroupMessage){if(!m.menuButton.emptyGroupTooltip)m.menuButton.emptyGroupTooltip=new e.Tooltip({node:m.menuButton,text:a.emptyGroupMessage,trigger:"click",position:["below","right",
"above","left"]})}else g&&i.removeNavGrid(g,m.menuButton),a=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},a(m.menu),a(m.menuButton),a(m.destroyButton);else m.menuButton.style.visibility="visible"}else{var r;c.childNodes.length>0&&!u._checkForTrailingSeparator(c,k)&&(r=u.generateSeparatorImage(c));u._render(m,c,b,j,k,l,g);c.childNodes.length>0&&c.childNodes[c.childNodes.length-1]!==r&&(r=u.generateSeparatorImage(c))}else if(a.title){if(a=u._createDropdownMenu(c,a.title,!0,null,null,a.imageClass))u._render(m,
a.menu,b,j,"menu",l,g),u._checkForTrailingSeparator(a.menu,"menu",!0),a.menu.childNodes.length===0&&a.destroyButton&&c.removeChild(a.destroyButton)}else c.childNodes.length>0&&u._generateMenuSeparator(c),u._render(m,c,b,j,k,l,g),u._generateMenuSeparator(c)}else{var o=u._commandList[a.id],m=o?!0:!1;n=a=null;if(o){f=new h.CommandInvocation(j,b,l,o,u);f.domParent=c;r=m&&(o.visibleWhen?o.visibleWhen(b):!0);if(u._activeBindings[o.id]&&u._activeBindings[o.id].keyBinding)a=u._activeBindings[o.id],a.invocation=
r?f:null,a.bindingOnly&&(m=!1);if(u._urlBindings[o.id]&&u._urlBindings[o.id].urlBinding)n=u._urlBindings[o.id],n.invocation=r?f:null,n.bindingOnly&&(m=!1);m=m&&r}if(m)o.choiceCallback?(k==="tool"||k==="button"?(a=c,m=!1,c.nodeName.toLowerCase()==="ul"&&(a=document.createElement("li"),c.appendChild(a))):(a=c,m=!0),u._createDropdownMenu(a,o.name,m,function(a){o.populateChoicesMenu(a,b,j,l,u)}.bind(o),o.imageClass,o.tooltip||o.title,o.selectionClass,o.positioningNode)):(f.handler=f.handler||this,f.domParent=
c,m=function(){u._invoke(f)},k==="menu"?(n=null,a&&a.keyBinding&&(n=d.getUserKeyString(a.keyBinding)),a=h.createCommandMenuItem(c,o,f,null,m,n)):(a=k+o.id+D,a=h.createCommandItem(c,o,f,a,null,k==="tool",m)),i.generateNavGrid(g,a),f.domNode=a,D++)}})},_createDropdownMenu:function(a,c,d,j,l,f,m,i,n,r){a=b.node(a);if(!a||!b.contains(document.body,a))return null;var G,D,u=a;if(d)f=document.createRange(),f.selectNode(a),f=f.createContextualFragment(k),b.processTextNodes(f,{ButtonText:c}),a.appendChild(f),
D=a.lastChild,l=D.lastChild,c=l.previousSibling,c.dropdown=new g.Dropdown({dropdown:l,populate:j,parentDropdown:a.dropdown}),l.dropdown=c.dropdown;else{a.nodeName.toLowerCase()==="ul"&&(u=document.createElement("li"),a.appendChild(u),D=u);a=null;l&&(a="dropdownButtonWithIcon",f=f||c);var f=l?f||c:f,z=h.createDropdownMenu(u,c,j,a,l,!1,m,i,n||r);G=z.dropdownArrow;c=z.menuButton;if(G){if(n)n.domNode=z.menuButton;var s=this;c.onclick=function(a){var c=b.bounds(G);a.clientX>=c.left&&z.dropdown?z.dropdown.toggle(a):
s._invoke(n)};if(z.dropdown)c.onkeydown=function(a){b.KEY.DOWN===a.keyCode&&(z.dropdown.toggle(a),b.stop(a))}}var l=z.menu,C;(j=n&&n.command&&(n.command.tooltip||n.command.name))?C=n.command.tooltip||n.command.name:j&&(C=f);if(C)c.commandTooltip=new e.Tooltip({node:c,text:C,position:["above","below","right","left"]})}return{menuButton:c,menu:l,dropdown:c.dropdown,destroyButton:D,dropdownArrow:G}},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var c=document.createElement("li");
c.classList.add("dropdownSeparator");var b=document.createElement("span");b.classList.add("dropdownSeparator");c.appendChild(b);a.appendChild(c)}},generateSeparatorImage:function(a){var c;c=a.nodeName.toLowerCase()==="ul"?document.createElement("li"):document.createElement("span");a.appendChild(c);c.classList.add("core-sprite-sep");c.classList.add("imageSprite");c.classList.add("commandSeparator");return c}};j.prototype.constructor=j;l.prototype={match:function(a){a=f.matchResourceParameters(a);return typeof a[this.token]!==
"undefined"?(this.parameterValue=a[this.token],this):null}};l.prototype.constructor=l;m.prototype.constructor=m;n.prototype={optionsRequested:function(){return this.optionsRequested}};n.prototype.constructor=n;r.prototype={_storeParameters:function(a){this.parameterTable=null;if(a){var c=this.parameterTable={};a.forEach(function(a){c[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,c){var b=this.parameterTable[a];if(b)b.value=c},forEach:function(a){for(var c in this.parameterTable)this.parameterTable[c].type&&this.parameterTable[c].name&&a(this.parameterTable[c])},makeCopy:function(){var a=[];this.forEach(function(c){c=new n(c.name,c.type,c.label,
c.value,c.lines,c.eventListeners);a.push(c)});var c=new r(a,this._options,this.getParameters);c.clientCollect=this.clientCollect;return c},hasOptionalParameters:function(){return this._hasOptionalParameters}};r.prototype.constructor=r;return{CommandRegistry:j,URLBinding:l,ParametersDescription:r,CommandParameter:n,CommandEventListener:m}});
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/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize strings from JavaScript files in this folder.",
"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Export as zip":"Zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"Folder","Folder name:":"Folder name:","Create a new folder":"Create a new folder",
"Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file",
"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.",
"Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.","Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Go Into":"Go Into","Move into the selected folder":"Move into the selected folder",
"Import local file...":"File System","Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location",Exporting:"Exporting to ${0}","Pasting ${0}":"Pasting ${0}",
"Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location",Cut:"Cut",Copy:"Copy","Fetching children of ":"Fetching children of ",Paste:"Paste","Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With",
"Loading ":"Loading ",New:"New",File:"File",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system","Create new content":"Create new content","Import from HTTP...":"HTTP","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.",
"You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.","Unzip ${0}?":"Unzip ${0}?",NoFile:"Use the ${0} menu to create new files and folders. Click a file to start coding."});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/i18nUtil",["require","orion/Deferred"],function(h,i){function f(b){if(b=localStorage.getItem("orion/messageBundle/"+b))if(b=JSON.parse(b),b._expires&&b._expires>(new Date).getTime())return delete b._expires,b;return null}var d={};return{getMessageBundle:function(b){function g(a){a?h(["i18n!"+b],function(a){if(a){var e=b;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+e,JSON.stringify(a));delete a._expires}c.resolve(a)}):e(Error(b))}function e(a){c.reject(a)}
if(d[b])return d[b];var c=new i;d[b]=c;var a=f(b);if(a)return c.resolve(a),c;try{h([b],g,e)}catch(k){h(["orion/i18n!"+b],g,e)}return c},formatMessage:function(b){var d=arguments;return b.replace(/\$\{([^\}]+)\}/g,function(b,c){return d[(c<<0)+1]})}}});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(h,i,f){function d(b,c,a){if(!b[c])throw c+h[" is not supported in this file system"];return b[c].apply(b,a)}function b(e,c,a,k){if(!e.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(c[c.length-1]!=="/")return d(e,"readBlob",[c]).then(function(c){return d(a,"writeBlob",[k,c])});var j=k.substring(0,
k.length-1),l=decodeURIComponent(j.substring(j.lastIndexOf("/")+1)),j=j.substring(0,j.lastIndexOf("/")+1);return d(a,"createFolder",[j,l]).then(function(){},function(){}).then(function(){return d(e,"fetchChildren",[c]).then(function(c){for(var d=[],j=0;j<c.length;++j){var l=c[j].Location,f=l;c[j].Directory&&(f=l.substring(0,l.length-1));f=decodeURIComponent(f.substring(f.lastIndexOf("/")+1));f=k+encodeURIComponent(f);c[j].Directory&&(f+="/");d[j]=b(e,l,a,f)}return i.all(d)})})}function g(b,c){function a(a){var c=
new i;c.reject(h["No Matching FileService for location:"]+a);return c}var d=b.getServiceReferences("orion.core.file"),j=d;if(c)for(var j=[],l=0;l<d.length;++l)c(d[l])&&j.push(d[l]);for(var g=[],n=[],r=[],o=[],p={fetchChildren:function(){var a=new i;a.resolve(o);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:o,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<j.length;++d)o[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:j[d].getProperty("top"),ChildrenLocation:j[d].getProperty("top"),Name:j[d].getProperty("Name")},l=j[d].getProperty("pattern")||j[d].getProperty("top").replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),l[0]!=="^"&&(l=
"^"+l),g[d]=RegExp(l),n[d]=b.getService(j[d]),r[d]=j[d].getProperty("Name"),j[d].getProperty("NameKey")&&j[d].getProperty("nls")&&f.getMessageBundle(j[d].getProperty("nls")).then(function(a,c){o[a].Name=c[j[a].getProperty("NameKey")];r[a]=c[j[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return n[0]?0:-1;for(var c=0;c<g.length;++c)if(g[c].test(a))return c;throw h["No Matching FileService for location:"]+a;};this._getService=
function(a){a=this._getServiceIndex(a);return a===-1?p:n[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return a===-1?p.Name:r[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?p.Location:o[a].Location}}g.prototype={getService:function(b){return this._getService(b)},fileServiceName:function(b){return this._getServiceName(b)},fileServiceRootURL:function(b){return this._getServiceRootURL(b)},fetchChildren:function(b){return d(this._getService(b),"fetchChildren",
arguments)},createWorkspace:function(b){return d(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return d(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(b){return d(this._getService(b),"loadWorkspace",arguments)},createProject:function(b,c,a,k){return d(this._getService(b),"createProject",arguments)},createFolder:function(b,c){return d(this._getService(b),"createFolder",arguments)},createFile:function(b,c){return d(this._getService(b),"createFile",
arguments)},deleteFile:function(b){return d(this._getService(b),"deleteFile",arguments)},moveFile:function(e,c,a){var k=this._getService(e),j=this._getService(c);if(k===j)return d(k,"moveFile",arguments);var l=e[e.length-1]==="/",f=c;f[f.length-1]!=="/"&&(f+="/");if(a)f+=encodeURIComponent(a);else{var g=e;l&&(g=g.substring(0,g.length-1));f+=g.substring(g.lastIndexOf("/")+1)}l&&f[f.length-1]!=="/"&&(f+="/");return b(k,e,j,f).then(function(){return d(k,"deleteFile",[e])})},copyFile:function(e,c,a){var k=
this._getService(e),j=this._getService(c);if(k===j)return d(k,"copyFile",arguments);var l=e[e.length-1]==="/",f=c;f[f.length-1]!=="/"&&(f+="/");if(a)f+=encodeURIComponent(a);else{var g=e;l&&(g=g.substring(0,g.length-1));f+=g.substring(g.lastIndexOf("/")+1)}l&&f[f.length-1]!=="/"&&(f+="/");return b(k,e,j,f)},read:function(b,c){return d(this._getService(b),"read",arguments)},readBlob:function(b){return d(this._getService(b),"readBlob",arguments)},write:function(b,c,a){return d(this._getService(b),"write",
arguments)},remoteImport:function(b,c){return d(this._getService(b),"remoteImport",arguments)},remoteExport:function(b,c){return d(this._getService(b),"remoteExport",arguments)},search:function(b){return d(this._getService(b.resource),"search",arguments)}};g.prototype.constructor=g;return{FileClient: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",Next:"Next",Previous:"Previous",Replace:"Replace","Replace All":"Replace All",
"Search ${0}":"Search ${0}","Type a keyword or wild card to search in ":"Type a keyword or wild card to search in ","Search failed.":"Search failed.","No matches found for ${0}":"No matches found for ${0}","Searching...":"Searching...","Resource has been changed by others.":"Resource has been changed by others.","Failed to write file.":"Failed to write file.",Results:"Results","Files ${0} of ${1} matching ${2}":"Files ${0} of ${1} matching ${2}","Replace ${0} with ${1} for files ${2} of ${3}":"Replace ${0} with ${1} for files ${2} of ${3}",
Location:"Location","Click to compare":"Click to compare",'Search again in this folder with "${0}"':'Search again in this folder with "${0}"',"Files replaced":"Files replaced",Status:"Status","${0} out of ${1}  matches replaced.":"${0} out of ${1}  matches replaced.","Replace all matches with...":"Replace all matches with...","Apply Changes":"Apply Changes","Replace all selected matches":"Replace all selected matches","Hide Compare":"Hide Compare","Hide compare view of changes":"Hide compare view of changes",
"Show Compare":"Show Compare","Show compare view of changes":"Show compare view of changes","Show All":"Show All","Show all the results in one page":"Show all the results in one page","< Previous Page":"< Previous Page","Show previous page of search result":"Show previous page of search result","Next Page >":"Next Page >","Show next page of search result":"Show next page of search result","Next result":"Next result","Previous result":"Previous result","Expand all results":"Expand all results","Collapse all results":"Collapse all results",
"Writing files...":"Writing files...","Preparing preview...":"Preparing preview...","Replaced File (${0})":"Replaced File (${0})","Original File (${0})":"Original File (${0})","Sort by Name":"Sort by Name","Compare changes":"Compare changes","Search Results":"Search Results","Replace All Matches":"Replace All Matches","No matches":"No matches",Rename:"Rename","My Saved Searches":"My Saved Searches","Save frequently used searches by choosing ${0} shown above.":"Save frequently used searches by choosing ${0} shown above.",
"Save frequently used searches by clicking on the ${0} button above.":"Save frequently used searches by clicking on the ${0} button above.","Files that contain:":"Files that contain:",Search:"Search","All types":"All types","File type":"File type","All ${0} files":"All ${0} files","${0} is already saved":"${0} is already saved","Type a search term":"Type a search term","Type a replace term":"Type a replace term","Case sensitive":"Case sensitive","Sort by":"Sort by","File name":"File name","Path name":"Path name",
Save:"Save","Type a name for the search":"Type a name for the search","Save the current search":"Save the current search","Type filter text":"Type filter text","Scope Search":"Scope Search","Open in Search page for this directory":"Open the Search page for this folder.","${0}. Try your search again.":"${0}. Try your search again.","Click or use delete key to delete the search term":"Click or use delete key to delete the search term","${0} matches":"${0} matches","Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.":"Regular expression is off. You can click here or use options to turn it on for replacement - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.",
"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>.":"Regular expression is on. You can click here or use options to turn it off - e.g. when the option is on you can replace <td([\\s\\S]*?)</td> with <span$1</span>."});
define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Shell:"Shell",ShellLinkWorkspace:"Workspace Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor",EditorRelatedLink:"Show Current Folder",EditorRelatedLinkParent:"Show Enclosing Folder",EditorLinkWorkspace:"Show Workspace",EditorRelatedLinkProj:"Show Project","Filter bindings":"Filter bindings","Orion Editor":"Orion Editor","Orion Image Viewer":"Orion Image Viewer","Orion Markdown Viewer":"Orion Markdown Viewer","Orion JSON Editor":"Orion JSON Editor",
"View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion.","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer","Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it",
"Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown","Unknown item":"Unknown item","Can't search: no search service is available":"Can't search: no search service is available","could not find banner parent, id was ":"could not find banner parent, id was ",
Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Bugs","Privacy Policy":"Privacy","Terms of Use":"Terms","Copyright Agent":"Copyright","Orion Logo":"Orion Logo","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"I20140226-2325","LOG: ":"LOG: ",View:"View","no parent":"no parent","no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ","Resource is out of sync with the server. Do you want to save it anyway?":"Resource is out of sync with the server. Do you want to save it anyway?",
Operations:"Operations","Operations running":"Operations running","Some operations finished with warning":"Some operations finished with warning","Some operations finished with error":"Some operations finished with error","no service registry":"no service registry",Tasks:"Tasks",Close:"Close","Expand all":"Expand all","Collapse all":"Collapse all",Search:"Search","Advanced search":"Advanced search",Submit:"Submit",More:"More","Saved searches":"Saved searches","Recent searches":"Recent searches","Regular expression":"Regular expression",
"Search options":"Search options","Global search":"Global search","Orion Home":"Orion Home","Close notification":"Close notification","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations","Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Toggle side panel":"Toggle side panel","Open or close the side panel":"Open or close the side panel",Projects:"Projects","Toggle Sidebar":"Toggle Sidebar","Sample HTML5 Site":"Sample HTML5 Site",
"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.":"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.","Sample Orion Plugin":"Sample Orion Plugin","Generate a sample plugin for integrating with Orion.":"Generate a sample plugin for integrating with Orion.",Browser:"Web Browser",OutlineProgress:"Getting outline for ${0} from ${1}",UnknownError:"An unknown error occurred.",UnknownWarning:"An unknown warning occurred.",Filter:"Filter (* = any string, ? = any character)",
"To view the browser's context menu, trigger the context menu again.":"To view the browser's context menu, trigger the context menu again.",Edit:"Edit",CentralNavTooltip:"Toggle Navigation Menu"});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/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/URITemplate",[],function(){function h(a){this._text=a}function i(a){return a.replace("%25","%")}function f(a,c){if(c==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(c==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(k,i);if(c==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+c);}function d(a,c,b){for(var e=
[],d=0;d<a.length;d++)typeof a[d]!=="undefined"&&e.push(f(a[d],c));return e.join(b)}function b(a,c,b,e){for(var d=Object.keys(a),k=[],g=0;g<d.length;g++)typeof a[d[g]]!=="undefined"&&k.push(f(d[g],c)+b+f(a[d[g]],c));return k.join(e)}function g(b){if(b.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=c[b[0]])?b=b.substring(1):this._operator=c.NUL;for(var e=[],d=b.split(","),k=0;k<d.length;k++){var f=d[k].match(a);if(f===null)throw Error("Bad VarSpec: "+b);e.push({name:f[1],
explode:!!f[2],prefix:f[3]?parseInt(f[3],10):-1})}this._varSpecList=e}function e(a){for(var c=[],b=0,e=a.indexOf("{",b);e!==-1;){c.push(new h(a.substring(b,e)));b=a.indexOf("}",e+1);if(b===-1)throw Error("Invalid template: "+a);c.push(new g(a.substring(e+1,b)));b+=1;e=a.indexOf("{",b)}c.push(new h(a.substring(b)));this._templateComponents=c}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-,"}},a=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/,k=/%25[0-9A-F][0-9A-F]/g;h.prototype={expand:function(){return encodeURI(this._text)}};
g.prototype={expand:function(a){for(var c=[],e=0;e<this._varSpecList.length;e++){var k=this._varSpecList[e],g=k.name,h=a[g],i=typeof h;if(i!=="undefined"&&h!==null){var q=c.length===0?this._operator.first:this._operator.sep;if(i==="string")this._operator.named&&(q+=f(g,"U+R"),q+=h.length===0?this._operator.ifemp:"="),k.prefix!==-1&&k.prefix<h.length&&(h=h.substring(0,k.prefix)),q+=f(h,this._operator.allow);else if(Array.isArray(h)){if(h.length===0)continue;k.explode?q+=d(h,this._operator.allow,this._operator.sep):
(k=d(h,this._operator.allow,","),this._operator.named&&(q+=f(g,"U+R"),q+=k.length===0?this._operator.ifemp:"="),q+=k)}else if(i==="object"){if(Object.keys(h).length===0)continue;k.explode?q+=b(h,this._operator.allow,"=",this._operator.sep):(k=b(h,this._operator.allow,",",","),this._operator.named&&(q+=f(g,"U+R"),q+=k.length===0?this._operator.ifemp:"="),q+=k)}else throw Error("bad param type: "+g+" : "+i);c.push(q)}}return c.join("")}};e.prototype={expand:function(a){for(var c=[],b=0;b<this._templateComponents.length;b++)c.push(this._templateComponents[b].expand(a));
return c.join("")}};return e});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/regex,orion/commandRegistry,orion/PageUtil,orion/URITemplate".split(","),function(h,i,f,d,b,g){function e(a,c,b){var e="";b&&(e="^");if(e=f.parse("/"+e+a.searchStr+"/"))b=e.pattern,e=e.flags,e.indexOf("i")===-1&&!c.caseSensitive&&(e+="i"),a.regExp={pattern:b,flags:e},a.wildCard=!0}var c={ALL_FILE_TYPE:"*.*"};c.doSearch=function(a,b,e,d){if(a){var f=!0;e==="*"&&(e="");e===""&&(f=d&&d.type!==c.ALL_FILE_TYPE);if(f)e!==""&&c.addRecentSearch(b,
e,d?d.regEx:!1),a=a.createSearchParams(e,!1,!1,d),a=c.generateSearchHref(a),window.location=a}else window.alert(h["Can't search: no search service is available"])};c.generateSearchHelper=function(a,b){var d=a.keyword,l=d,f={};a.fileType&&a.fileType!==c.ALL_FILE_TYPE&&d===""&&(l="*."+a.fileType);if(a.regEx)f.searchStr=d,e(f,a,b);else{var g=d.indexOf("*")>-1,h=d.indexOf("?")>-1;g&&(d=d.split("*").join(".*"));h&&(d=d.split("?").join("."));!g&&!h&&!a.nameSearch?(f.searchStr=a.caseSensitive?d.split("\\").join(""):
d.split("\\").join("").toLowerCase(),f.wildCard=!1):(f.searchStr=a.caseSensitive?d:d.toLowerCase(),e(f,a,b),f.wildCard=!0)}f.searchStrLength=f.searchStr.length;return{params:a,inFileQuery:f,displayedSearchTerm:l}};c.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"};c.copySearchParams=function(a,c){var b={},e;for(e in a)if(a[e]!==void 0&&a[e]!==null&&(c||e!=="replace"))b[e]=a[e];return b};c.generateSearchHref=function(a){var b=i.toUrl("search/search.html"),a=c.copySearchParams(a,!0),e=a.resource;a.resource=void 0;return typeof a.keyword!=="undefined"?(new g(b+"#{,resource,params*}")).expand({resource:e,params:a}):(new g(b+"#{,resource}")).expand({resource:e})};c.generateFindURLBinding=
function(a,c,b,e,d){a={find:c.searchStr,regEx:c.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof e==="string"?e:void 0,atLine:typeof b==="number"?b:void 0};return d?a:","+(new g("{,params*}")).expand({params:a})};c.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)};c.replaceRegEx=
function(a,c,b){return a.replace(RegExp(c.pattern,c.flags),b)};c.replaceStringLiteral=function(a,b,e){b=f.parse("/"+b+"/gim");return c.replaceRegEx(a,b,e)};c.searchOnelineLiteral=function(a,c,b){var e;e=0;for(var d=!1,f=[];;)if(e=c.indexOf(a.searchStr,e),e<0)break;else{f.push({startIndex:e,length:a.searchStrLength});d=!0;if(b)break;e+=a.searchStrLength}return d?f:null};c.findRegExp=function(a,c,b,e){if(!c)return null;b=b||"";b+=(b.indexOf("g")===-1?"g":"")+(b.indexOf("m")===-1?"m":"");var d=null;
return(d=RegExp(c,b).exec(a.substring(e)))&&{startIndex:d.index+e,length:d[0].length}};c.searchOnelineRegEx=function(a,b,e){for(var d=0,f=!1,g=[];;)if(d=c.findRegExp(b,a.regExp.pattern,a.regExp.flags,d)){g.push(d);f=!0;if(e)break;d=d.startIndex+d.length}else break;return f?g:null};c.generateNewContents=function(a,b,e,d,f,g){if(d&&b){if(!a)e.contents=[];for(var h=0;h<b.length;h++){for(var i=b[h],p=!1,q=!1,t=[],w,A=0,v=0;v<d.children.length;v++)if(d.children[v].lineNumber-1===h){A=v;for(p=0;p<d.children[v].matches.length;p++)d.children[v+
p].checked!==!1&&t.push(p);q=t.length>0;w=d.children[v].matches;p=!0;break}if(p){if(q){t=c.replaceCheckedMatches(i,f,w,t,g);i=t.replacedStr;for(p=0;p<d.children[A].matches.length;p++)d.children[A+p].newMatches=t.newMatches}else for(p=0;p<d.children[A].matches.length;p++)d.children[A+p].newMatches=d.children[A+p].matches;a?e.contents[h]=i:e.contents.push(i)}else a||e.contents.push(i)}}};c.generateMatchContext=function(a,c,b){var e=[],d=a*2+1,f;c.length<=d?(f=0,a=c.length-1):(f=b-a,f<0?(f=0,a=f+d-1):
(a=b+a,a>c.length-1&&(a=c.length-1,f=a-d+1)));for(d=f;d<=a;d++)e.push({context:c[d],current:d===b});return e};c.splitFile=function(a){for(var c=0,b=0,e=0,d=0,f=[];;){c!==-1&&c<=e&&(c=a.indexOf("\r",e));b!==-1&&b<=e&&(b=a.indexOf("\n",e));if(b===-1&&c===-1){f.push(a.substring(d));break}var g=1;c!==-1&&b!==-1?c+1===b?(g=2,e=b+1):e=(c<b?c:b)+1:e=c!==-1?c+1:b+1;f.push(a.substring(d,e-g));d=e}return f};c.searchWithinFile=function(a,b,e,d,f,g){e=c.splitFile(e);if(f)b.contents=e;if(b){b.children=[];for(var h=
d=0;h<e.length;h++){var i=e[h];if(i&&i.length>0){var p=g?i:i.toLowerCase();if(p=a.wildCard?c.searchOnelineRegEx(a,p):c.searchOnelineLiteral(a,p)){var q,t=h+1;if(f)for(var w=0;w<p.length;w++)q=w+1,q={parent:b,checked:b.checked,type:"detail",matches:p,lineNumber:t,matchNumber:q,name:i,location:b.location+"-"+t+"-"+q},b.children.push(q);else q={parent:b,context:c.generateMatchContext(2,e,h),checked:b.checked,type:"detail",matches:p,lineNumber:t,name:i,location:b.location+"-"+t},b.children.push(q);d+=
p.length}}}b.totalMatches=d}};c.replaceCheckedMatches=function(a,c,b,e,d){for(var f=0,g="",h=[],i=0;i<b.length;i++){f!==b[i].startIndex&&(g+=a.substring(f,b[i].startIndex));if(b[i].length)d=b[i].length;for(var f=!1,q=0;q<e.length;q++)if(e[q]===i){f=!0;break}f?(h.push({startIndex:g.length,length:c.length}),g+=c):(h.push({startIndex:g.length,length:d}),g+=a.substring(b[i].startIndex,b[i].startIndex+d));f=b[i].startIndex+d}f<a.length&&(g+=a.substring(f));return{replacedStr:g,newMatches:h}};c.fullPathNameByMeta=
function(a){var c=a.length,b="";if(c>0)for(c-=1;c>-1;c--)b=b+(b===""?"":"/")+a[c].Name;return b};c.path2FolderName=function(a,c,b){return a.substring(0,a.length-c.length-(b?0:1))};c._storeRecentSearch=function(a,c,b,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",c);b&&window.setTimeout(function(){b.dispatchEvent({type:"inputDataListChanged",deleting:e})}.bind(this),20)})};c.addRecentSearch=function(a,b,e){typeof b==="string"&&b&&
a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var f,d=d.get("recentSearch");typeof d==="string"&&(d=JSON.parse(d));if(d){for(f in d)if(d[f].name===b)return;d.length>=20&&d.splice(19,d.length-20+1)}else d=[];d.splice(0,0,{name:b,regEx:e});c._storeRecentSearch(a,d)})};c.removeRecentSearch=function(a,b,e){typeof b==="string"&&b&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var f,d=d.get("recentSearch");typeof d===
"string"&&(d=JSON.parse(d));if(d)for(f in d)if(d[f].name===b){d.splice(f,1);c._storeRecentSearch(a,d,e,!0);break}})};c.getSearches=function(a,c,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(c);typeof a==="string"&&(a=JSON.parse(a));a&&b&&b(a)})};c.getMixedSearches=function(a,b,e,d){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var f=a.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));b&&(a=
a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a&&a.forEach(function(a){if(e){var b=c.parseQueryStr(a.query);f.some(function(a){return b.searchStrTitle===a.name})||f.push({name:b.searchStrTitle,label:a.name})}else f.push({name:null,label:a.name,value:a.query})}));f&&d&&d(f)})};c.getOpenSearchPref=function(a,c){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");c(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?!0:!1:!1)})};
c.setOpenSearchPref=function(a,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:c})})};return c});
define("orion/crawler/nls/root/messages",{"Searching file:":"Searching file:","is not supported in this file system":"is not supported in this file system","${0} files found out of ${1}":"${0} files found out of ${1}","The search term on this location will not use indexed files.":"The search term on this location will not use indexed files.","It will take longer time. Do you want to proceed?":"It will take longer time. Do you want to proceed?","Search cancelled by user":"Search cancelled by user",
Cancel:"Cancel"});define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages","orion/crawler/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/contentTypes",[],function(){function h(a,c){function b(a,c,e,d){var e=c.filename.indexOf(e)>=0,j;j=d.toLowerCase();j=c.extension.indexOf(j)!==-1;if(e||j){if(!(j=!a))e&&(d=d.toLowerCase(),e=a.extension.indexOf(d)!==-1),j=e;if(j)return c}return a}if(typeof a!=="string")return null;for(var e=a&&a.split(".").pop(),d=null,f=0;f<c.length;f++){var g=c[f];b(d,g,a,e)===g&&(d=g)}return d}function i(a){return a===null||typeof a==="undefined"?[]:Array.isArray(a)?a:[a]}function f(a){return i(a).map(function(a){return String.prototype.toLowerCase.call(a)})}
function d(a){return{id:a.id,name:a.name,image:a.image,imageClass:a.imageClass,"extends":a["extends"],extension:f(a.extension),filename:i(a.filename)}}function b(a){var c=Object.create(null);a.map(d).forEach(function(a){Object.prototype.hasOwnProperty.call(c,a.id)||(c[a.id]=a)});return c}function g(d){if(d&&d.registerService){this.serviceRegistry=d;for(var j=d.getServiceReferences(c).concat(d.getServiceReferences(a)),f=[],g=0;g<j.length;g++)for(var h=i(j[g].getProperty("contentTypes")),r=0;r<h.length;r++)f.push(h[r]);
this.map=b(f);d.registerService(e,this)}else if(Array.isArray(d))this.serviceRegistry=null,this.map=b(d);else throw Error("Invalid parameter");}var e="orion.core.contentTypeRegistry",c="orion.core.contenttype",a="orion.file.contenttype";g.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),c=[],b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(a[b]);return c},getContentTypesMap:function(){return this.map},getFileContentType:function(a){return h(a.Name,this.getContentTypes())},
getFilenameContentType:function(a){return h(a,this.getContentTypes())},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,c){a=typeof a==="string"?this.getContentType(a):a;c=typeof c==="string"?this.getContentType(c):c;if(!a||!c)return!1;if(a.id===c.id)return!0;else for(var b=a,e={};b&&(b=this.getContentType(b["extends"]));){if(b.id===c.id)return!0;if(e[b.id])throw Error("Cycle: "+b.id);e[b.id]=!0}return!1},isSomeExtensionOf:function(a,c){for(var b=0;b<c.length;b++)if(this.isExtensionOf(a,
c[b]))return!0;return!1}};return{ContentTypeRegistry:g,getFilenameContentType:h}});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(h,i,f,d,b,g){function e(c,a,b,e){this.registry=c;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=b;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:d.generateSearchHelper(b);this._location=e&&e.location;this._childrenLocation=e&&e.childrenLocation?e.childrenLocation:this._location;this._cancelled=!1;this._statusService=this.registry.getService("orion.page.message");this._progressService=this.registry.getService("orion.page.progress");this._statusService&&this._statusService.setCancelFunction(function(){this._cancelFileContentsSearch()}.bind(this))}e.prototype.search=function(c){var a=this.registry.getService("orion.core.contentTypeRegistry");
this._onSearchComplete=c;this._cancelled=!1;this._deferredArray=[];a.getContentTypes().then(function(a){this.contentTypesCache=a;var c=this;this._visitRecursively(this._childrenLocation).then(function(){c._cancelled||c._reportResult()}.bind(c),function(a){c._reportResult();c._statusService&&a.name==="Cancel"&&(console.log("Crawling search cancelled. Deferred array length : "+c._deferredArray.length),c._statusService.setProgressResult({Message:h["Search cancelled by user"],Severity:"Warning"}))}.bind(c))}.bind(this))};
e.prototype.searchName=function(c,a){if(c)this._searchParams=c,this.searchHelper=d.generateSearchHelper(c,!0);if(a)this.onSearchNameComplete=a;var b=[];this._cancelled=!1;this._deferredArray=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var e=0;e<this.fileSkeleton.length;e++){var f=this.fileSkeleton[e].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(b.push(this.fileSkeleton[e]),
b.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:b.length,docs:b}})}else this.onSearchNameComplete({response:{numFound:0,docs:[]}})};e.prototype.buildSkeleton=function(c,a){this._buildingSkeleton=!0;var b=this.registry.getService("orion.core.contentTypeRegistry");this._cancelled=!1;this._deferredArray=[];var e=this;c();b.getContentTypes().then(function(c){e.contentTypesCache=c;e._visitRecursively(e._childrenLocation).then(function(){e._buildingSkeleton=!1;
a();e.searchHelper&&!e._buildSkeletonOnly&&e.searchName()})})};e.prototype._sort=function(c){c.sort(function(a,c){var b,e;if(this._searchParams.sort==="Path asc"){b=a.Location&&a.Location.toLowerCase();b=d.path2FolderName(b,a.Name&&a.Name.toLowerCase(),!0);e=c.Location&&c.Location.toLowerCase();e=d.path2FolderName(e,c.Name&&c.Name.toLowerCase(),!0);if(b<e)return-1;if(b>e)return 1}return this._sortOnNameSingle(a,c)}.bind(this))};e.prototype._reportResult=function(){this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,
docs:this.fileLocations}})};e.prototype._sortOnNameSingle=function(c,a){var b=c.Name&&c.Name.toLowerCase(),e=a.Name&&a.Name.toLowerCase();return b<e?-1:b>e?1:0};e.prototype._onFileType=function(c){return this.searchHelper.params.fileType?this.searchHelper.params.fileType===d.ALL_FILE_TYPE?!0:c.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};e.prototype._visitRecursively=function(c){var a=[],e=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(c);return(e._progressService?this._progressService.progress(e.fileClient.fetchChildren(c),
"Crawling search for children of "+c):e.fileClient.fetchChildren(c)).then(function(c){for(var d=0;d<c.length;d++)if(c[d].Directory!==void 0&&c[d].Directory===!1)if(e._searchOnName)a.push(e._buildSingleSkeleton(c[d]));else if(e._buildSkeletonOnly)a.push(e._buildSingleSkeleton(c[d]));else{if(!e._cancelled){var f=b.getFilenameContentType(c[d].Name,e.contentTypesCache);if(f&&(f["extends"]==="text/plain"||f.id==="text/plain")&&e._onFileType(f))f=e._sniffSearch(c[d]),a.push(f),e._deferredArray.push(f)}}else if(c[d].Location)if(e._cancelled)break;
else f=e._visitRecursively(c[d].ChildrenLocation),a.push(f),e._deferredArray.push(f);return g.all(a)})};e.prototype._hitOnceWithinFile=function(c){c=this._searchParams.caseSensitive?c:c.toLowerCase();return this.searchHelper.inFileQuery.wildCard?d.searchOnelineRegEx(this.searchHelper.inFileQuery,c,!0):d.searchOnelineLiteral(this.searchHelper.inFileQuery,c,!0)};e.prototype._reportSingleHit=function(c){if(!this._cancelled)c.LastModified=c.LocalTimeStamp,this.fileLocations.push(c),this._hitCounter++,
this._sort(this.fileLocations),this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};e.prototype._cancelFileContentsSearch=function(){(this._cancelled=!0)&&this._deferredArray.forEach(function(c){c.cancel()})};e.prototype._sniffSearch=function(c){this._totalCounter++;var a=this;if(!this._cancelled)if(this.searchHelper.params.keyword==="")this._reportSingleHit(c),this._statusService&&this._statusService.setProgressResult({Message:f.formatMessage(h["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return(a._progressService?a._progressService.progress(a.fileClient.read(c.Location),"Reading file "+c.Location):a.fileClient.read(c.Location)).then(function(b){a._hitOnceWithinFile(b)&&a._reportSingleHit(c);a._statusService&&a._statusService.setProgressResult({Message:f.formatMessage(h["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)},h.Cancel)},function(a){a&&a.message&&a.message.toLowerCase()!=="cancel"&&console.error("Error loading file content: "+
a.message)})};e.prototype._buildSingleSkeleton=function(c){this._totalCounter++;this.fileSkeleton.push(c);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();c=new g;c.resolve(this._totalCounter);return c};e.prototype.constructor=e;return{SearchCrawler:e}});
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 b=d.parent,f=this,b=i.node(b);if(!b)throw h["no parent"];if(!d.model)throw h["no tree model"];if(!d.renderer)throw h["no renderer"];this._parent=b;this._treeModel=d.model;this._onComplete=d.onComplete;this._renderer=d.renderer;this._showRoot=d.showRoot===void 0?!1:d.showRoot;this._indent=d.indent===void 0?16:d.indent;this._onCollapse=d.onCollapse;
this._labelColumnIndex=d.labelColumnIndex===void 0?0:d.labelColumnIndex;this._id=d.id===void 0?"treetable":d.id;this._tableStyle=d.tableStyle;this._tableElement=d.tableElement||"table";this._tableBodyElement=d.tableBodyElement||"tbody";this._tableRowElement=d.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(b){f._showRoot?(b._depth=0,f._generate([b],0)):f._treeModel.getChildren(b,function(c){f.destroyed||f._generate(c,0)})})},destroy:function(){this.destroyed=!0},_generate:function(d,
b){i.empty(this._parent);var f=document.createElement("div");this._renderer.wrapperCallback&&this._renderer.wrapperCallback(f);var e=document.createElement(this._tableElement);this._renderer.tableCallback&&this._renderer.tableCallback(e);e.id=this._id;this._tableStyle&&e.classList.add(this._tableStyle);this._renderer.initTable(e,this);this._bodyElement=document.createElement(this._tableBodyElement);this._renderer.bodyCallback&&this._renderer.bodyCallback(this._bodyElement);this._bodyElement.id=this._id+
"tbody";d.length===0?this._renderer.emptyCallback&&this._renderer.emptyCallback(this._bodyElement):this._generateChildren(d,b);e.appendChild(this._bodyElement);f.appendChild(e);this._parent.appendChild(f);this._rowsChanged();this._onComplete&&this._onComplete(this)},_generateChildren:function(d,b,f){for(var e=0;e<d.length;e++){var c=document.createElement(this._tableRowElement);c.id=this._treeModel.getId(d[e]);c._depth=b;c._item=d[e];this._renderer.render(d[e],c);c.childNodes[this._labelColumnIndex].style.paddingLeft=
this._indent*b+"px";this._renderer.rowCallback&&this._renderer.rowCallback(c,d[e]);f?(this._bodyElement.insertBefore(c,f.nextSibling),f&&(f=c)):this._bodyElement.appendChild(c)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(d,b,f){var e=this._treeModel.getId(d),c;if(e===this._id)this._removeChildRows(e),this._generateChildren(b,0),this._rowsChanged();else{var a=i.node(e);a?(a._item=d,
a&&(f||a._expanded)?(this._removeChildRows(e),b?(a._expanded=!0,this._renderer.updateExpandVisuals(a,!0),this._generateChildren(b,a._depth+1,a),this._rowsChanged()):(c=this,this._renderer.updateExpandVisuals(a,"progress"),b=this._treeModel.getChildren(a._item,function(b){if(!c.destroyed&&(c._renderer.updateExpandVisuals(a,!0),!a._expanded))a._expanded=!0,c._generateChildren(b,a._depth+1,a),c._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(h["could not find table row "]+e)}},
getItem:function(d){var b=i.node(d);return b&&b._item?b._item:d},toggle:function(d){var b=i.node(d);b&&(b._expanded?this.collapse(d):this.expand(d))},isExpanded:function(d){d=typeof d==="string"?d:this._treeModel.getId(d);return(d=i.node(d))?d._expanded:!1},expand:function(d,b,f){var d=typeof d==="string"?d:this._treeModel.getId(d),e=i.node(d);if(e)if(e._expanded)b&&b.apply(c,f);else{var c=this;this._renderer.updateExpandVisuals(e,"progress");this._treeModel.getChildren(e._item,function(a){if(!c.destroyed){c._renderer.updateExpandVisuals(e,
!0);if(!e._expanded)e._expanded=!0,c._generateChildren(a,e._depth+1,e),c._rowsChanged();b&&b.apply(c,f)}})}},_removeChildRows:function(d){for(var b=d===this._id,f=!1,e=-1,c=[],a=i.$$array(".treeTableRow",this._parent),k=0;k<a.length;k++){var j=a[k];if(f)break;if(b)j._depth>e?c.push(j):f=!0;else if(j.id===d)b=!0,e=j._depth}for(d=0;d<c.length;d++)b=c[d],b.parentNode.removeChild(b)},collapse:function(d){var d=typeof d==="string"?d:this._treeModel.getId(d),b=i.node(d);if(b){if(!b._expanded)return;b._expanded=
!1;this._renderer.updateExpandVisuals(b,!1);this._removeChildRows(d);this._rowsChanged()}this._onCollapse&&this._onCollapse(b._item)},getIndent:function(){return this._indent}};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 b=this;return this.forceExpandFunc(this._cursor,"first",function(d){d&&b.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 b=this;return this.forceExpandFunc(d,"last",function(d){d&&
b.setCursor(d)})}d&&this.setCursor(d);return d},_findSibling:function(f,d){for(var b=this.topLevel(f),g=this._getChildren(f.parent),g=b?this.firstLevelChildren:g,e=0;e<g.length;e++)if(g[e]===f)return e===0&&!d?b?null:f.parent:e===g.length-1&&d?b?null:this._findSibling(f.parent,d):d?g[e+1]:g[e-1];return null},_inParentChain:function(f,d){for(var b=f.parent;b;){if(b===d)return!0;b=b.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,b){this.setCursor(d);var g=[];for(g.push(d);;){if(this.iterate(f))g.push(this.cursor());else break;if(b===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 b=this.cursor(),
g=this._scan(!0,f,d);g||(g=this._scan(!1,f,d));this.setCursor(b);return g},iterate:function(f,d){return f?this._forward(d):this._backward(d)},iterateOnTop:function(f,d){var b=this._findSibling(this._getTopLevelParent(this.cursor()),f);b?this.setCursor(b):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",["orion/webui/littlelib","orion/treeModelIterator","orion/uiUtils"],function(h,i,f){var d={},b=navigator.userAgent.indexOf("iPad")!==-1,g=window.navigator.platform.indexOf("Mac")!==-1;d.ExplorerNavHandler=function(){function e(c,a,b){this.explorer=c;this.model=this.explorer.model;this._navDict=a;this._listeners=[];this._selections=[];this._currentColumn=0;c=this._getEventListeningDiv();c.tabIndex=0;c.classList.add("selectionModelContainer");var e=this;this._modelIterator=
new i.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),getChildrenFunc:b.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,c,b){return e.explorer.forceExpandFunc(a,c,b)}:void 0});this._init(b);(!b||b.setFocus!==!1)&&c.focus();b=function(a){if(f.isFormElement(a.target))return!0;if(e.explorer.preventDefaultFunc&&e.explorer.preventDefaultFunc(a,
e._modelIterator.cursor()))return!0;if(a.keyCode===h.KEY.DOWN)return e.onDownArrow(a);else if(a.keyCode===h.KEY.UP)return e.onUpArrow(a);else if(a.keyCode===h.KEY.RIGHT)return e.onRightArrow(a);else if(a.keyCode===h.KEY.LEFT)return e.onLeftArrow(a);else if(a.keyCode===h.KEY.SPACE)return e.onSpace(a);else if(a.keyCode===h.KEY.ENTER)return e.onEnter(a)};c.addEventListener("keydown",b,!1);this._listeners.push({type:"keydown",listener:b});b=function(){if(e.explorer.onFocus)e.explorer.onFocus(!1);else e.toggleCursor(null,
!1)};c.addEventListener("blur",b,!1);this._listeners.push({type:"blur",listener:b});b=function(){if(e.explorer.onFocus)e.explorer.onFocus(!0);else e.toggleCursor(null,!0)};c.addEventListener("focus",b,!1);this._listeners.push({type:"focus",listener:b});this._parentDiv=c}e.prototype={destroy:function(){this._parentDiv.classList.remove("selectionModelContainer");this.removeListeners()},_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 g?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):h.node(this.explorer._parentId)},isExpandable:function(c){return!c?!1:h.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,a){var b=this;this.explorer.selection&&this.explorer.selection.getSelections(function(e){b._clearSelection(a);for(var d=0;d<e.length;d++)b._selections.push(e[d]);b._selections.length>0?
b.cursorOn(b._selections[0],!0,!1,c):b.cursorOn(null,!1,!1,c);if(!(b._shiftSelectionAnchor&&b._inSelection(b._shiftSelectionAnchor)>=0))b._shiftSelectionAnchor=null})},refreshModel:function(c,a,b,e){this._currentColumn=0;this.topIterationNodes=[];this.model=a;this._navDict=c;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(b)this.topIterationNodes=b;this._modelIterator.setTree(this.topIterationNodes);!e&&this.explorer.selection&&(this.toggleCursor(this._modelIterator.cursor(),
!1),this._modelIterator.reset());this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(c){for(var c=this.model.getId(c),a=0;a<this._selections.length;a++)if(c===this.model.getId(this._selections[a]))return a;return-1},_clearSelection:function(c){if(c)for(c=0;c<this._selections.length;c++)this._checkRow(this._selections[c],!0);this._selections=[]},getSelectionPolicy:function(){return this._selectionPolicy},setSelectionPolicy:function(c){if(this._selectionPolicy!==
c)this._selectionPolicy=c,this._selectionPolicy==="cursorOnly"&&this._clearSelection(!0)},setSelection:function(c,a,b){if(this._selectionPolicy==="cursorOnly")a&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(c,!0);else if(this._isRowSelectable(c)){!a||this._selectionPolicy==="singleSelection"?(this._clearSelection(!0),this._checkRow(c,!1),this._selections.push(c),this._lastSelection=c):(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));if(b)this._shiftSelectionAnchor=this._lastSelection;this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(c,a){c||(c=this.currentModel());var b=this._getGridChildren(c);if(b&&b.length>1||a===0&&b){a!==0&&this.toggleCursor(c,!1);var e=this._currentColumn,d=!0;e+=a;e<0?(this._linearGridMove&&a!==0&&(this._modelIterator.iterate(!1)?c=this.currentModel():d=!1),
e=d?b.length-1:this._currentColumn):e>=b.length&&(this._linearGridMove&&a!==0&&(this._modelIterator.iterate(!0)?c=this.currentModel():d=!1),e=d?0:this._currentColumn);this._currentColumn=e;a!==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 a=
this._parentDiv,b;c&&c!==a&&(b=c.getAttribute("role"))!=="grid"&&b!=="tree"&&b!=="treegrid";)c=c.parentNode;return c===a?null:c},toggleCursor:function(c,a){var b=this.getRowDiv(c),e=this.getCurrentGrid(c);e?(b&&(a?b.classList.add("treeIterationCursorRow"):b.classList.remove("treeIterationCursorRow")),e.domNode&&(b=this.getAriaContainerElement(e.domNode),a?(e.domNode.classList.add("treeIterationCursor"),b&&b.setAttribute("aria-activedescendant",e.domNode.id)):e.domNode.classList.remove("treeIterationCursor"))):
b&&(a?b.classList.add("treeIterationCursorRow_Dotted"):b.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(c,a,b,e){var d,f;if(c||a){if(f===this._modelIterator.cursor())return;d=this._modelIterator.cursor();f=c;this._modelIterator.setCursor(f)}else d=this._modelIterator.prevCursor(),f=this._modelIterator.cursor();if(d!==f||a)if(this.toggleCursor(d,!1),!a||f){this.moveColumn(null,0);this.toggleCursor(f,!0);if((c=this.getRowDiv())&&
!e){e=c.parentNode;for(a=document.documentElement;e&&e!==a;){var g=window.getComputedStyle(e,null);if(!g)break;g=g.getPropertyValue("overflow-y");if(g==="auto"||g==="scroll")break;e=e.parentNode}e&&(a=!0,c.offsetTop<=e.scrollTop?(a=!1,b===void 0&&(b=!1)):c.offsetTop+c.offsetHeight>=e.scrollTop+e.clientHeight&&(a=!1,b===void 0&&(b=!0)),a||c.scrollIntoView(!b))}if(this.explorer.onCursorChanged)this.explorer.onCursorChanged(d,f)}},getSelection:function(){return this._selections},getSelectionIds:function(){for(var c=
[],a=0;a<this._selections.length;a++)c.push(this.model.getId(this._selections[a]));return c},getRowDiv:function(c){c=c?c:this._modelIterator.cursor();if(!c)return null;var c=this.model.getId(c),a=this._navDict.getValue(c);return a&&a.rowDomNode?a.rowDomNode:h.node(c)},iterate:function(c,a,b,e){var d=null;if(this.topIterationNodes&&this.topIterationNodes.length!==0)if(e){e=this.currentModel();for((d=this._modelIterator.iterate(c,a))&&this._setCursorOnItem(c,b);d&&d.isNotSelectable;)(d=this._modelIterator.iterate(c,
a))&&this._setCursorOnItem(c,b);d||(this.cursorOn(e,!0,!1,!0),this._setCursorOnItem(c,b))}else(d=this._modelIterator.iterate(c,a))&&this._setCursorOnItem(c,b)},_setCursorOnItem:function(c,a){this.cursorOn(null,!1,c);if(a){var b=this._inSelection(this._modelIterator.prevCursor()),e=this._inSelection(this._modelIterator.cursor());b>=0&&e>=0?this.setSelection(this._modelIterator.prevCursor(),!0):this.setSelection(this.currentModel(),!0)}},_checkRow:function(c,a){if(this.explorer.renderer._useCheckboxSelection&&
this._selectionPolicy!=="singleSelection"){var b=this.getRowDiv(c);if(b){var e=h.node(this.explorer.renderer.getCheckBoxId(b.id)),d=a?!e.checked:!0;if(d!==e.checked)this.explorer.renderer.onCheck(b,e,d,!0)}}else this._select(c,a)},_select:function(c){c||(c=this._modelIterator.cursor());var a=this.getRowDiv(c);a&&(this._inSelection(c)<0?a.classList.add("checkedRow"):a.classList.remove("checkedRow"))},_onModelGrid:function(c,a){var b=this._getGridChildren(c);if(b)for(var e=0;e<b.length;e++)if(a.target===
b[e].domNode)return!0;return!1},onClick:function(c,a){if(this.isDisabled(this.getRowDiv(c)))h.stop(a);else{var e=h.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)));if(a.target!==e&&!(this.gridClickSelectionPolicy==="none"&&this._onModelGrid(c,a)))if(this.cursorOn(c,!0,!1,!0),b)this.setSelection(c,!0);else if(this._ctrlKeyOn(a))this.setSelection(c,!0,!0);else if(a.shiftKey&&this._shiftSelectionAnchor){if(e=this._modelIterator.scan(this._shiftSelectionAnchor,c)){this._clearSelection(!0);
for(var d=0;d<e.length;d++)this.setSelection(e[d],!0)}}else this.setSelection(c,!1,!0)}},onCollapse:function(c){this._modelIterator.collapse(c)&&this.cursorOn()},onUpArrow:function(c){this.iterate(!1,!1,c.shiftKey,!0);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1,!0);c.preventDefault();return!1},onDownArrow:function(c){this.iterate(!0,!1,c.shiftKey,!0);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1,!0);c.preventDefault();return!1},_shouldMoveColumn:function(c){var a=
this.currentModel(),b=this._getGridChildren(a);return b&&b.length>1?this.isExpandable(a)?this._ctrlKeyOn(c):!0:!1},onLeftArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,-1),c.preventDefault(),!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&this.isExpanded(a))return this.explorer.myTree.collapse(a),c.preventDefault(),!0;this._modelIterator.topLevel(a)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(a.parent),
this.setSelection(a.parent,!1,!0))},onRightArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,1),c.preventDefault(),!0;var a=this._modelIterator.cursor();if(!a)return!1;if(this.isExpandable(a)&&!this.isExpanded(a))return this.explorer.myTree.expand(a),this.explorer.postUserExpand&&this.explorer.postUserExpand(this.model.getId(a)),c.preventDefault(),!1},_isRowSelectable:function(c){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(c):!0},onSpace:function(c){this.setSelection(this.currentModel(),
!0,!0);c.preventDefault()},onEnter:function(c){var a=this.getCurrentGrid(this._modelIterator.cursor());if(a)if(a.widget)if(typeof a.onClick==="function")a.onClick();else typeof a.widget.focus==="function"&&a.widget.focus();else{var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(c),!1,!1,!1,0,null);a.domNode.dispatchEvent(b)}else if(a=this._modelIterator.cursor()){if(this.explorer.renderer.getRowActionElement&&(b=this.explorer.renderer.getRowActionElement(this.model.getId(a)),
b.href))this._ctrlKeyOn(c)?window.open(b.href):window.location.href=b.href;if(this.explorer.renderer.performRowAction)return this.explorer.renderer.performRowAction(c,a),c.preventDefault(),!1}},setIsNotSelectable:function(c,a){c.isNotSelectable=a},disableItem:function(c){var a=this.getRowDiv(c);this.isExpandable(c)&&this.isExpanded(c)&&(this._modelIterator.collapse(c),this.explorer.myTree.toggle(a.id));a.classList.remove("checkedRow");a.classList.add("disabledNavRow");this.setIsNotSelectable(c,!0)},
isDisabled:function(c){return c.classList.contains("disabledNavRow")},enableItem:function(c){var a=this.getRowDiv(c);a&&(a.classList.remove("disabledNavRow"),this.setIsNotSelectable(c,!1))}};return e}();d.ExplorerNavDict=function(){function b(c){this._dict={};this._model=c}b.prototype={addRow:function(c,a){this._dict[this._model.getId(c)]={model:c,rowDomNode:a}},getValue:function(c){return this._dict[c]},getGridNavHolder:function(c,a){if(!c)return null;var b=this._model.getId(c);if(this._dict[b]){if(!this._dict[b].gridChildren&&
a)this._dict[b].gridChildren=[];return this._dict[b].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 b}();return d});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(h,i,f,d,b,g){var e={};e.Explorer=function(){function c(a,c,b,e){this.registry=a;this.renderer=b;this.selection=c;this.commandService=e;if(this.renderer)this.renderer.explorer=this;this.myTree=null}c.prototype={destroy:function(){this._navHandler&&this._navHandler.destroy();this.model&&this.model.destroy();this.myTree&&
this.myTree.destroy();this.destroyed=!0},changedItem:function(a,c){this.myTree&&this.myTree.refresh.bind(this.myTree)(a,c,!0)},updateCommands:function(a){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(a)},makeNewItemPlaceHolder:function(a,c,b,e){a=this.getRow(a);if(b)return a=a.childNodes[b],a.appendChild(document.createElement("br")),e=document.createElement("span"),e.id=c+"placeHolderRow",a.appendChild(e),{tempNode:e,refNode:e};if(a){var d=document.createElement("tr");
d.id=c+"placeHolderRow";b=document.createElement("td");b.id=c+"placeHolderCol";d.appendChild(b);e?(a.parentNode.insertBefore(d,a.nextSibling),a=parseInt(a.firstChild.style.paddingLeft),b.style.paddingLeft=this.myTree.getIndent()+a+"px"):a.appendChild(d);e=f.node(c+"placeHolderRow");a=f.node(c+"placeHolderCol");if(e&&a)return{tempNode:e,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(),c=0;c<a.length;c++)this.myTree.collapse(a[c])},
expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler)for(var a=this._navHandler.getTopLevelNodes(),c=0;c<a.length;c++)this._expandRecursively(a[c])},_expandRecursively:function(a){if(this._navHandler&&this._navHandler.isExpandable(a)){var c=this;this.myTree.expand(a,function(){c.model.getChildren(a,function(a){if(!(a===void 0||a===null))for(var b=a.length,e=0;e<b;e++)c._expandRecursively(a[e])})})}},createTree:function(a,c,e){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(c)c.rootId=g;this.model=c;this._parentId=a;this._treeOptions=e;if(!e||e&&!e.noSelection)this.selectionPolicy=e?e.selectionPolicy:"",this._navDict=new b.ExplorerNavDict(this.model);this.myTree=new d.TableTree({id:g,model:c,parent:a,onComplete:e?e.onComplete:void 0,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,showRoot:e?!!e.showRoot:
!1,indent:e?e.indent:void 0,onCollapse:e?e.onCollapse:void 0,navHandlerFactory:e?e.navHandlerFactory:void 0,tableElement:e?e.tableElement:void 0,tableBodyElement:e?e.tableBodyElement:void 0,tableRowElement:e?e.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy==="cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),c=[];
if(a&&this.getNavDict())for(var b=a.getSelection(),e=0;e<b.length;e++){var d=a.getRowDiv(b[e]);d&&d.parentNode&&(d=this.getNavDict().getValue(this.model.getId(b[e])),d.model&&c.push(d.model))}this.selection.setSelections(c)}},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 b.ExplorerNavHandler(this,this._navDict,{getChildrenFunc:a?a.getChildrenFunc:null,setFocus:a&&a.setFocus,selectionPolicy:a?a.selectionPolicy:null});var c=this;this.model.getRoot(function(b){b instanceof Array?c.getNavHandler().refreshModel(c.getNavDict(),c.model,b):b.children&&b.children instanceof Array&&c.getNavHandler().refreshModel(c.getNavDict(),c.model,b.children);a&&a.setFocus&&c.getNavHandler().cursorOn(null,!1,!1,!0)})}},
_lastHash:null,checkbox:!1};return c}();e.createExplorerCommands=function(c,a){function b(c){return typeof c.getItemCount==="function"?c.getItemCount()>0?a?a(c):!0:!1:!1}var e=new g.Command({tooltip:h["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return b(a)},callback:function(a){a.items.expandAll()}}),d=new g.Command({tooltip:h["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",
groupId:"orion.explorerGroup",visibleWhen:function(a){return b(a)},callback:function(a){a.items.collapseAll()}});c.addCommand(e);c.addCommand(d)};e.ExplorerModel=function(){function c(a,c,b){this.rootPath=a;this.fetchItems=c;this.idPrefix=b||""}c.prototype={destroy:function(){this.destroyed=!0},getRoot:function(a){var c=this;this.fetchItems(this.rootPath).then(function(b){c.root=b;a(b)})},getChildren:function(a,c){a.Children?c(a.Children):a.ChildrenLocation?this.fetchItems(a.ChildrenLocation).then(function(b){a.Children=
b;c(b)}):c([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;for(var a=a.Location.replace(/[\\\/]/g,""),c=this.idPrefix,b=0;b<a.length;b++)c+=a[b].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(b):a[b];return c}};return c}();e.ExplorerFlatModel=function(){function c(a,c,b){this.rootPath=a;this.fetchItems=c;this.root=b}c.prototype=new e.ExplorerModel;c.prototype.getRoot=function(a){if(this.root)a(this.root);else{var c=this;this.fetchItems(this.rootPath).then(function(b){c.root=
b;a(b)})}};c.prototype.getChildren=function(a,c){a===this.root?c(this.root):c([])};return c}();e.ExplorerRenderer=function(){function c(a,c){this.explorer=c;this._init(a);this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._progressImageClass="core-sprite-progress";this._twistieSpriteClass="modelDecorationSprite"}c.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,c){this.tableTree=c;this.tableNode=
a;f.empty(a);this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,c,b,e,d){var b=b||"tool",f=document.createElement("td");f.id=c.id+"actionswrapper";e&&f.classList.add(e);this.actionScopeId&&this.commandService?this.commandService.renderCommands(this.actionScopeId,f,a,this.explorer,b,null,d&&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,c){if(this._useCheckboxSelection){var b=document.createElement("td"),e=document.createElement("span");e.id=this.getCheckBoxId(c.id);e.classList.add("core-sprite-check");e.classList.add("selectionCheckmarkSprite");e.rowId=c.id;if(this.getCheckedFunc)e.checked=this.getCheckedFunc(a),e.checked?(this._highlightSelection&&c.classList.add("checkedRow"),e.classList.add("core-sprite-check_on")):
(this._highlightSelection&&c.classList.remove("checkedRow"),e.classList.remove("core-sprite-check_on"));b.appendChild(e);var d=this;e.addEventListener("click",function(a){d.onCheck(c,a.target,a.target.checked?!1:!0,!0)},!1);return b}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,c,b,e,d){(c.checked=b)?c.classList.add("core-sprite-check_on"):c.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(c.rowId,b,e);this.explorer.getNavHandler()&&d&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,
!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),c=this._getUIStatePreferencePath();c&&window.sessionStorage&&(window.sessionStorage[c+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){var c=this.explorer.getNavDict(),b=this.explorer.getNavHandler();if(b&&c&&b.getSelectionPolicy()!=="cursorOnly"&&(a=window.sessionStorage[a+"selection"],typeof a==="string"&&(a=a.length>0?JSON.parse(a):null),a)){for(var e=[],b=0;b<
a.length;b++){var d=c.getValue(a[b]);if(d&&d.rowDomNode&&d.model&&(e.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(e),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(a){var c=
!1,b=window.sessionStorage[a+"expanded"];typeof b==="string"&&(b=b.length>0?JSON.parse(b):null);var e;if(b)for(e=0;e<b.length;e++)if(f.node(b[e])){this._expanded.push(b[e]);var d=this;this.tableTree.expand(b[e],function(){d._restoreSelections(a)});c=!0}return!c},_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,c){var b=f.node(this.expandCollapseImageId(a.id));b&&(b.classList.remove(this._expandImageClass),b.classList.remove(this._collapseImageClass),b.classList.remove(this._progressImageClass),b.classList.add(c==="progress"?this._progressImageClass:c?this._expandImageClass:this._collapseImageClass))},getExpandImage:function(a,c,b,e){var d=document.createElement("span");d.id=this.expandCollapseImageId(a.id);c.appendChild(d);d.classList.add(this._twistieSpriteClass);
d.classList.add(this._collapseImageClass);if(b){var f=document.createElement("span");c.appendChild(f);f.classList.add(e||"imageSprite");f.classList.add(b)}var g=this;d.onclick=function(){if(!g.explorer.getNavHandler().isDisabled(a)){g.tableTree.toggle(a.id);if(g.tableTree.isExpanded(a.id))g._expanded.push(a.id),g.explorer.postUserExpand&&g.explorer.postUserExpand(a.id);else for(var c in g._expanded)if(g._expanded[c]===a.id){g._expanded.splice(c,1);break}(c=g._getUIStatePreferencePath())&&window.sessionStorage&&
g._storeExpansions(c)}};return d},render:function(a,c){c.classList.add("navRow");this.renderRow(a,c)},rowsChanged:function(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler());(f.$(".sectionTreeTable",this.tableNode.parentNode)||f.$(".treetable",this.tableNode.parentNode))&&f.$$array(".treeTableRow",this.tableNode).forEach(function(a,c){var b=!(c%2)?"darkSectionTreeTableRow":"lightSectionTreeTableRow",e=b==="darkSectionTreeTableRow"?"lightSectionTreeTableRow":
"darkSectionTreeTableRow";a.classList.add(b);a.classList.remove(e)})},updateCommands:function(){if(this.commandService)for(var a=f.$$array(".treeTableRow"),c=0;c<a.length;c++){var b=a[c],e=f.node(b.id+"actionswrapper");this.commandService.destroy(e);this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,e,b._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};
return c}();e.SelectionRenderer=function(){function c(a,c){this._init(a);this.explorer=c}c.prototype=new e.ExplorerRenderer;c.prototype.renderTableHeader=function(a){var c=document.createElement("thead"),b=document.createElement("tr");c.classList.add("navTableHeading");this._useCheckboxSelection&&b.appendChild(this.initCheckboxColumn(a));for(var e=0,d=this.getCellHeaderElement(e);d;)d.innerHTML.length>0&&d.classList.add("navColumn"),b.appendChild(d),d=this.getCellHeaderElement(++e);c.appendChild(b);
e>0&&a.appendChild(c)};c.prototype.renderRow=function(a,c){c.verticalAlign="baseline";c.classList.add("treeTableRow");var b=this.explorer.getNavDict();if(b){b.addRow(a,c);var e=this;c.addEventListener("click",function(c){if(e.explorer.getNavHandler())e.explorer.getNavHandler().onClick(a,c)},!1)}if(b=this.getCheckboxColumn(a,c))b.classList.add("checkColumn"),c.appendChild(b);for(var b=0,d=this.getCellElement(b,a,c);d;)c.appendChild(d),b===0?this.getPrimColumnStyle?d.classList.add(this.getPrimColumnStyle(a)):
d.classList.add("navColumn"):this.getSecondaryColumnStyle?d.classList.add(this.getSecondaryColumnStyle()):d.classList.add("secondaryColumn"),d=this.getCellElement(++b,a,c)};c.prototype.getCellHeaderElement=function(){};c.prototype.getCellElement=function(){};return c}();e.SimpleFlatModel=function(){function c(a,c,b){this.items=a;this.getKey=b;this.idPrefix=c;this.root={children:a}}c.prototype=new e.ExplorerModel;c.prototype.getRoot=function(a){a(this.root)};c.prototype.getId=function(a){for(var a=
this.getKey(a).replace(/[\\\/]/g,""),c="",b=0;b<a.length;b++)c+=a[b].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(b):a[b];return this.idPrefix+c};c.prototype.getChildren=function(a,c){a===this.root?c(this.items):c([])};return c}();return e});
define("orion/PageLinks","require,orion/Deferred,orion/PageUtil,orion/URITemplate,orion/i18nUtil,orion/objects,orion/URL-shim".split(","),function(h,i,f,d,b,g){function e(){return h.toUrl?(new URL(h.toUrl("orion/../"),window.location.href)).href.slice(0,-1):(new URL("/",window.location.href)).href.slice(0,-1)}function c(a){var c={};a.getPropertyKeys().forEach(function(b){b!=="objectClass"&&b!=="service.names"&&b!=="service.id"&&b!=="__plugin__"&&(c[b]=a.getProperty(b))});return c}function a(a){return b.getMessageBundle(a.nls).then(function(c){a.textContent=
a.nameKey?c[a.nameKey]:a.name;return a},function(){a.textContent=a.nameKey||a.name;return a})}function k(b,g){var j=b.getServiceReferences(g||"orion.page.link"),h=f.matchResourceParameters(window.location.href),k={OrionHome:e(),Location:h.resource},l=[];j.forEach(function(b){b=c(b);if(b.uriTemplate&&(b.nls||b.name)){var e=(new d(b.uriTemplate)).expand(k),e=f.validateURLScheme(e);b.href=e;b.nls?l.push(a(b)):(b.textContent=b.name,l.push((new i).resolve(b)))}});return i.all(l)}function j(a){var c=this.categories=
Object.create(null);a.forEach(function(a){c[a.id]=a})}function l(a){this.allPageLinks=a;this.allPageLinks.sort(m)}function m(a,c){var b=a.textContent&&a.textContent.toLowerCase(),e=c.textContent&&c.textContent.toLowerCase();return b<e?-1:b>e?1:0}var n;g.mixin(j.prototype,{getCategoryIDs:function(){return Object.keys(this.categories)},getCategory:function(a){return this.categories[a]||null}});g.mixin(l.prototype,{createLinkElements:function(){return this.allPageLinks.map(function(a){var c=a.href,a=
a.textContent,b=document.createElement("a");b.href=c;b.target="_self";b.classList.add("targetSelector");b.textContent=a;return b})},getAllLinks:function(){return this.allPageLinks}});return{getCategoriesInfo:function(b){var e;return!n?(e=[],b.getServiceReferences("orion.page.link.category").forEach(function(b){b=c(b);if(b.id&&(b.name||b.nameKey))b.nls?e.push(a(b)):(b.textContent=b.name,e.push((new i).resolve(b)))}),i.all(e).then(function(a){return n=new j(a)})):(new i).resolve(n)},getPageLinksInfo:function(a,
c){return k(a,c).then(function(a){return new l(a)})},getOrionHome:e}});
define("orion/edit/nls/root/messages",{Editor:"Editor",switchEditor:"Switch Editor",Fetching:"Fetching: ${0}",confirmUnsavedChanges:"There are unsaved changes.  Do you still want to navigate away?",searchFiles:"Search Files...",searchTerm:"Enter search term:",unsavedChanges:"There are unsaved changes.",unsavedAutoSaveChanges:"Please stay on the page until Auto Save is complete.",Save:"Save",Saved:"Saved",Blame:"Blame",BlameTooltip:"Show blame annotations",saveOutOfSync:"Resource is out of sync with the server. Do you want to save it anyway?",
loadOutOfSync:"Resource is out of sync with the server. Do you want to load it anyway? This will overwrite your local changes.",ReadingMetadata:"Reading metadata of ${0}",ReadingMetadataError:"Can not get metadata of ${0}",Reading:"Reading ${0}",readonly:"Read Only.",saveFile:"Save this file",gotoLine:"Go to Line...",gotoLineTooltip:"Go to specified line number",gotoLinePrompt:"Go to line:",Undo:"Undo",Redo:"Redo",Find:"Find...",noResponse:"No response from server.  Check your internet connection and try again.",
savingFile:"Saving file ${0}",running:"Running ${0}","Saving...":"Saving...",View:"View",SidePanel:"Side Panel",SidePanelTooltip:"Choose what to show in the side panel.",Actions:"Actions",Navigator:"Navigator",FolderNavigator:"Folder Navigator",Project:"Project",New:"New",File:"File",Edit:"Edit",Tools:"Tools",Add:"Add",noActions:"There are no actions for the current selection.",NoFile:"Use the ${0} to create new files and folders. Click a file to start coding.",LocalEditorSettings:"Local Editor Settings",
NoProject:"${0} is not a project. To convert it to a project use ${1}.",NoProjects:"There are no projects in your workspace. Use the ${0} menu to create projects.",disconnected:"(disconnected)",ChooseFS:"Choose Filesystem",ChooseFSTooltip:"Choose the filesystem you want to view.",FSTitle:"${0} (${1})",Deploy:"Deploy","Deploy As":"Deploy As",Import:"Import",Export:"Export",OpenWith:"Open With",OpenRelated:"Open Related",Dependency:"Dependency",UnnamedCommand:"Unnamed"});
define("orion/edit/nls/messages",["orion/i18n!orion/edit/nls/messages","orion/edit/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim,orion/PageLinks,i18n!orion/edit/nls/messages".split(","),function(h,i,f,d,b,g,e,c,a,k){function j(a){var c={};a.getPropertyKeys().forEach(function(b){c[b]=a.getProperty(b)});return c}var l={},m=a.getOrionHome();l._cloneItemWithoutChildren=function p(a){if(a===null||typeof a!=="object")return a;var c=a.constructor(),b;for(b in a)b!=="children"&&b!==
"Children"&&(c[b]=p(a[b]));return c};l._getOpenWithNavCommandExtensions=function(a){function c(a,b){for(var e=a.getServiceReferences("orion.navigate.openWith"),d=[],f=[],g=0;g<e.length;g++){var j=e[g];if(j.getProperty("editor")===b.id){var h=j.getProperty("contentType");h instanceof Array?d=d.concat(h):d.push(h||"*/*");j=j.getProperty("excludedContentTypes");j instanceof Array?f=f.concat(j):j!==null&&typeof j!=="undefined"&&f.push(j)}}0===d.length&&(d=null);0===f.length&&(f=null);return{contentTypes:d,
excludedContentTypes:f}}for(var b=function(){for(var c=a.getServiceReferences("orion.edit.editor"),b=[],e=0;e<c.length;e++){var d=c[e],f=d.getProperty("id");b.push({id:f,"default":d.getProperty("default")||!1,name:d.getProperty("name"),nameKey:d.getProperty("nameKey"),nls:d.getProperty("nls"),uriTemplate:d.getProperty("orionTemplate")||d.getProperty("uriTemplate"),validationProperties:d.getProperty("validationProperties")||[]})}return b}(),e=[],d=0;d<b.length;d++){var f=b[d],g=c(a,f);e.push({properties:{name:f.name||
f.id,nameKey:f.nameKey,id:"eclipse.openWithCommand."+f.id,contentType:g.contentTypes,excludedContentTypes:g.excludedContentTypes,uriTemplate:f.uriTemplate,nls:f.nls,forceSingleItem:!0,isEditor:f["default"]?"default":"editor",validationProperties:f.validationProperties},service:{}})}return e};l._makeValidator=function(a,c,e,d){function f(a,c,b,e){var d=b.match,g,j;if((g=c.indexOf("["))>=0){if((j=c.indexOf("]"))<0)return!1;var h=c.substring(0,g),k;if(!(k=a[h])||!Array.isArray(k))return!1;g=c.substring(g+
1,j);g=parseInt(g,10);if(isNaN(g))return!1;g<0&&(g+=k.length);c=c.substring(j+1);c=h+":"+String(g)+c}if(c.indexOf("|")>=0)return g=c.substring(0,c.indexOf("|")),c=c.substring(c.indexOf("|")+1),f(a,g,b,e)?!0:f(a,c,b,e);else if(c.indexOf(":")>=0)return g=c.substring(0,c.indexOf(":")),c=c.substring(c.indexOf(":")+1),a[g]?f(a[g],c,b,e):!1;else{a:{var h=!1,l;if(c.charAt(0)==="!")b=typeof a[c.substring(1)]==="undefined";else if(typeof a[c]!=="undefined"){if(typeof d==="undefined")l=a[c],h=!0;else if(typeof d===
"string"){if(!typeof(a[c]==="string")){b=!1;break a}if(b.variableName){if(d=RegExp(d).exec(a[c]))l=d[0],l=b.variableMatchPosition==="before"?a[c].substring(0,d.index):b.variableMatchPosition==="after"?a[c].substring(d.index+l.length):b.variableMatchPosition==="only"?l:a[c],h=!0}else{b=RegExp(d).test(a[c]);break a}}else a[c]===d&&(l=a[c],h=!0);if(h&&b.variableName&&(e[b.variableName]=l,e.itemCached=a,b.replacements))for(a=0;a<b.replacements.length;a++)l=!1,b.replacements[a].pattern?e[b.variableName]=
e[b.variableName].replace(RegExp(b.replacements[a].pattern),b.replacements[a].replacement||""):l=!0,l&&window.console.log("Invalid replacements specified in validation property.  "+b.replacements[a]);b=h}else b=!1}return b}}function j(c,e,d){if(d.info.validationProperties)for(var g=0;g<d.info.validationProperties.length;g++){var h=d.info.validationProperties[g];if(typeof h.source!=="undefined"){if(!f(c,h.source,h,d))return!1}else return window.console.log("Invalid validationProperties in "+a.id+".  No source property specified."),
!1}var g=!0,k=e?b.getFilenameContentType(c.Name,e):null,k=k||{id:"application/octet-stream"};d.info.excludedContentTypes&&e&&(g=d.info.excludedContentTypes.every(function(a){a=a.replace(/([*?])/g,".$1");return-1!==k.id.search(a)?!1:!0}));g&&d.info.contentType&&e&&(g=d.info.contentType.some(function(a){a=a.replace(/([*?])/g,".$1");return-1!==k.id.search(a)?!0:!1}));return g}return{info:a,validationFunction:function(a){typeof d==="function"&&(a=d.call(this,a));if(a){if(Array.isArray(a)){if((this.info.forceSingleItem||
this.info.uriTemplate)&&a.length!==1)return!1;if(a.length<1)return!1}else a=[a];for(var c=0;c<a.length;c++)if(!j(a[c],e,this))return!1;return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(a){if(this.info.uriTemplate){var c={},b;for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&(c[b]=a[b]);if(this.info.validationProperties)for(b=0;b<this.info.validationProperties.length;b++){var e=this.info.validationProperties[b];e.source&&e.variableName&&(this.itemCached===
a&&this[e.variableName]||f(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."):c[e.variableName]=this[e.variableName])}c.OrionHome=m;return(new g(this.info.uriTemplate)).expand(c)}return null}}};var n=k.UnnamedCommand;l._createCommandOptions=function(a,c,b,d,f,g){function j(e,h){var k=l._makeValidator(a,b,d,g);e.visibleWhen=k.validationFunction.bind(k);if(f)if(k.generatesURI.bind(k)())e.hrefCallback=
function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return k.getURI.bind(k)(a)};else{var i=a;e.callback=function(a){var d;if(i.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,d=l._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){d=[];for(var f=0;f<a.items.length;f++)d.push(l._cloneItemWithoutChildren(a.items[f]))}else d=l._cloneItemWithoutChildren(a.items);if(b)var g=b.getService("orion.page.progress");c.run?g?g.progress(c.run(d),"Running command: "+e.name):c.run(d):b&&
(g?g.progress(b.getService(c).run(d),"Running command: "+e.name):b.getService(c).run(d))}}h.resolve(e)}var h=new i;if(a.nls){var k=function(c){var b;c?(b=a.tooltipKey&&c[a.tooltipKey],c=a.nameKey&&c[a.nameKey]||a.name||n,b=b||a.tooltip||""):(c=a.name||a.nameKey||n,b=a.tooltip||a.tooltipKey||"");j({name:c,image:a.image,id:a.id||a.name,tooltip:b,isEditor:a.isEditor,showGlobally:a.showGlobally},h)};e.getMessageBundle(a.nls).then(k,k.bind(this,null))}else j({name:a.name,image:a.image,id:a.id||a.name,
tooltip:a.tooltip,isEditor:a.isEditor,showGlobally:a.showGlobally},h);return h};l.getOpenWithCommand=function(a,c,b){for(var e,a=b||l.getOpenWithCommands(a),b=0;b<a.length;b++)if(a[b].visibleWhen(c)){var d=a[b].isEditor==="default";if(!e||d)if(e=a[b],d)break}return e};l.getOpenWithCommands=function(a){var c=[],b;for(b in a._commandList){var e=a._commandList[b];e.isEditor&&c.push(e)}return c};var r;l.createAndPlaceFileCommandsExtension=function(a,c,b,e,d,f){return l.createFileCommands(a,null,f?"all":
void 0,!!f,c).then(function(a){d&&0<a.length&&(c.addCommandGroup(b,"eclipse.openWith",1E3,k.OpenWith,d,null,null,null,"dropdownSelection"),c.addCommandGroup(b,"eclipse.fileCommandExtensions",1E3,k.OpenRelated,d));a.forEach(function(a){var f=null;d&&(f=a.isEditor?d+"/eclipse.openWith":d+"/eclipse.fileCommandExtensions");c.registerCommandContribution(b,a.id,e,f)});return{}})};l.createFileCommands=function(a,c,b,e,d){var b=b===void 0?"global":b,e=e===void 0?!0:e,g=[];l._cachedFileCommands||l._createCachedFileCommands(a);
(b==="all"||b==="global")&&l._cachedFileCommands.forEach(function(a){var c=a.properties;(b==="all"||c.forceSingleItem&&c.showGlobally)&&g.push(a)});return i.when(function(){var b=a.getService("orion.core.contentTypeRegistry")||c;return r||i.when(b.getContentTypes(),function(a){return r=a})}(),function(){if(e){if(!l._cachedOpenWithExtensions)l._cachedOpenWithExtensions=l._getOpenWithNavCommandExtensions(a,r);g=g.concat(l._cachedOpenWithExtensions);d._addedOpenWithCommands=e}var c=g.map(function(c){var b=
c.properties,c=c.service,e=d.findCommand(b.id||b.name);return e?(new i).resolve(e):l._createCommandOptions(b,c,a,r,!0).then(function(a){a=new f.Command(a);d.addCommand(a);return a})});return i.all(c,function(a){return{_error:a}}).then(function(a){return a})})};l._createCachedFileCommands=function(a){var c=a.getServiceReferences("orion.navigate.command");l._cachedFileCommands=[];for(var b=0;b<c.length;b++)if(c[b].getProperty("id")!=="orion.navigateFromMetadata"){var e=a.getService(c[b]),d=j(c[b]);
l._cachedFileCommands.push({properties:d,service:e})}};l.getFileCommandIds=function(){var a=[];if(l._cachedFileCommands)l._cachedFileCommands.length&&(a=l._cachedFileCommands.map(function(a){return a.properties.id}));else throw"extensionCommandUtils._cachedFileCommands is not initialized";return a};l.createOpenWithCommands=function(a,c,b){return b&&b._addedOpenWithCommands?(new i).resolve(l.getOpenWithCommands(b)):l.createFileCommands(a,c,"none",!0,b)};return l});
define("orion/explorers/navigatorRenderer","i18n!orion/navigate/nls/messages,orion/Deferred,orion/explorers/explorer,orion/explorers/navigationUtils,orion/extensionCommands,orion/objects,orion/URITemplate,orion/webui/littlelib".split(","),function(h,i,f,d,b,g,e,c){function a(a){switch(a&&a.id){case "image/jpeg":case "image/png":case "image/gif":case "image/ico":case "image/tiff":case "image/svg":return!0}return!1}function k(c,d,f,j,h,k,t,w,A){var d=g.clone(d),v;if(d.Directory)v=document.createElement("a"),
v.className="navlinkonpage",v.href=!c?l:(new e(c+"#{,resource,params*}")).expand({resource:d.ChildrenLocation}),d.Name&&v.appendChild(document.createTextNode(d.Name));else{h||(h=b.getOpenWithCommands(f));v=document.createElement("a");v.className="navlink targetSelector";k&&typeof k==="object"&&Object.keys(k).forEach(function(a){v[a]=k[a]});var B=null,x=null;if(B=w?w.holderDom:v)x=document.createElement("span"),x.className="core-sprite-file modelDecorationSprite thumbnail",B.appendChild(x);d.Name&&
v.appendChild(document.createTextNode(d.Name));var H=d.Location;if(t&&typeof t==="object")d.params={},g.mixin(d.params,t);(c=b.getOpenWithCommand(f,d,h))&&(H=c.hrefCallback({items:d}));i.when(j.getFileContentType(d),function(c){if(B){var b=B,e=x;if(c){var f,g=c.imageClass,j=c.image;if(g)f=document.createElement("span"),f.className+=g,f.classList.add("thumbnail");else if(j)f=document.createElement("img"),f.src=j,f.classList.add("thumbnail");f&&b.replaceChild(f,e)}}v.href=H;A&&typeof A.updateFileNode===
"function"&&A.updateFileNode(d,v,a(c))})}return v}function j(a,c,b,e){this.explorer=c;this.commandService=b;this.contentTypeService=e;this.openWithCommands=null;this.actionScopeId=a.actionScopeId;this._init(a);this.target="_self"}var l=new e("#{,resource,params*}");j.prototype=new f.SelectionRenderer;j.prototype.wrapperCallback=function(a){a.setAttribute("role","tree")};j.prototype.tableCallback=function(a){a.setAttribute("aria-label",h.Navigator);a.setAttribute("role","presentation")};j.prototype.rowCallback=
function(a){a.setAttribute("role","treeitem")};j.prototype.emptyCallback=function(a){var b=document.createElement("tr"),e=document.createElement("td");e.colSpan=this.oneColumn?1:3;var d=document.createElement("div");d.classList.add("noFile");d.textContent=h.NoFile;var f=document.createElement("span");f.appendChild(document.createTextNode(h.File));c.processDOMNodes(d,[f]);e.appendChild(d);b.appendChild(e);a.appendChild(b)};j.prototype.getCellHeaderElement=function(a){if(this.oneColumn&&a!==0)return null;
switch(a){case 0:case 1:case 2:document.createElement("th").style.height="8px"}};j.prototype.setTarget=function(a){this.target=a};j.prototype.getFolderImage=function(){if(!this.showFolderImage)return null;var a=document.createElement("span");a.className="core-sprite-folder modelDecorationSprite";return a};j.prototype.createFolderNode=function(a){var c;this.showFolderLinks?(c=k(this.folderLink||"",a,this.commandService,this.contentTypeService),(a=this.getFolderImage(a))&&c.insertBefore(a,c.firstChild)):
(c=document.createElement("span"),c.textContent=a.Name);return c};j.prototype.updateFileNode=function(){};j.prototype.showFolderLinks=!0;j.prototype.getCellElement=function(a,c,e){switch(a){case 0:var a=document.createElement("td"),f=document.createElement("span");f.id=e.id+"MainCol";f.setAttribute("role","presentation");a.appendChild(f);a.setAttribute("role","presentation");f.className="mainNavColumn";var g;if(c.Directory)this.getExpandImage(e,f),g=this.createFolderNode(c),f.appendChild(g),this.explorer._makeDropTarget(c,
g),this.explorer._makeDropTarget(c,e);else{if(!this.openWithCommands)this.openWithCommands=b.getOpenWithCommands(this.commandService);g=k("",c,this.commandService,this.contentTypeService,this.openWithCommands,{target:this.target},null,null,this);f.appendChild(g)}if(g)g.id=e.id+"NameLink",g.nodeType===1&&(d.addNavGrid(this.explorer.getNavDict(),c,g),g.setAttribute("role","link"),g.setAttribute("tabindex","-1"));this.actionScopeId&&this.commandService.renderCommands(this.actionScopeId,f,c,this.explorer,
"tool",null,!0);return a;case 1:if(this.oneColumn)return null;e=document.createElement("td");if(c.LocalTimeStamp)e.textContent=(new Date(c.LocalTimeStamp)).toLocaleString();return e;case 2:if(this.oneColumn)return null;e=document.createElement("td");if(!c.Directory&&typeof c.Length==="number")c=parseInt(c.Length,10)/1024,e.textContent=Math.ceil(c).toLocaleString()+" KB";e.style.textAlign="right";return e}};j.prototype.constructor=j;return{NavigatorRenderer:j,isImage:a,createLink:k}});
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,b,g,e,c,a){function k(a,c){this.serviceRegistry=a;this.commandRegistry=c;this.openWithCommands=null}function j(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;this._fileService=a.fileService;this.defaultRenderer=new k(this.registry,
this._commandService);this._fileService||console.error("No file service on search client")}k.prototype.makeRenderFunction=function(g,j,k,r,o){var p=this.serviceRegistry,q=this.commandRegistry;this.openWithCommands=this.openWithCommands||c.createOpenWithCommands(p,g,q);var t=this;return function(c,p,v,B){a.when(t.openWithCommands,function(a){if(v)f.empty(j),a=document.createElement("div"),a.appendChild(document.createTextNode(h["Search failed."])),j.appendChild(a),typeof r==="function"&&r(j);else{var t=
function(){function a(c,b){var e=b.folderName?b.folderName:b.path,d=document.createElement("span");d.id=e.replace(/[^a-zA-Z0-9_\.:\-]/g,"");d.appendChild(document.createTextNode(" - "+e+" "));c.appendChild(d)}var c={};return function(b,e){var d=e.name;if(c.hasOwnProperty(d)){a(b,e);var f=c[d];typeof f==="function"&&(c[d]=null,f())}else c[d]=function(){a(b,e)}}}(),G=!1;f.empty(j);if(c&&c.length>0){var D=document.createElement("table");D.setAttribute("role","presentation");for(var u=0;u<c.length;u++){var z=
c[u],s;if(!G&&(G=!0,k))s=D.insertRow(0).insertCell(0),s.textContent=k;s=D.insertRow(-1).insertCell(0);s.colspan=2;o&&o(s);var C={Name:z.name,Directory:z.directory,Location:z.path||z.location},y=null;if(typeof z.LineNumber==="number")y={},y.line=z.LineNumber;if(B&&B.keyword&&!B.nameSearch){var E=b.generateSearchHelper(B),y=y||{};y.find=E.inFileQuery.searchStr;y.regEx=E.inFileQuery.wildCard?!0:void 0}C=e.createLink(i.toUrl("edit/edit.html"),C,q,g,a,{"aria-describedby":(z.folderName?z.folderName:z.path).replace(/[^a-zA-Z0-9_\.:\-]/g,
""),style:{verticalAlign:"middle"}},y);z.LineNumber&&C.appendChild(document.createTextNode(" (Line "+z.LineNumber+")"));s.appendChild(C);t(s,z)}j.appendChild(D);typeof r==="function"&&r(j)}!G&&p&&(a=d.formatMessage(h["No matches found for ${0}"],p),f.empty(j),j.appendChild(document.createTextNode(a)),typeof r==="function"&&r(j))}})}};j.prototype={search:function(a,c,e){var d=function(a){for(var e=[],d=0;d<a.response.docs.length;d++){var f=a.response.docs[d],g=f.Location,j=b.path2FolderName(f.Path?
f.Path:f.Location,f.Name),h=j?j:g;(c?h.indexOf(c)>=0:1)&&e.push({name:f.Name,path:g,folderName:j,directory:f.Directory,lineNumber:f.LineNumber})}return e};if(this._crawler&&a.nameSearch)this._crawler.searchName(a,function(c){e(d(c),a.keyword,null,a)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(a),"Searching "+a.keyword).then(function(c){var b=a.keyword,b=b.substring(b.indexOf("}")+1),b=b.substring(b.indexOf(":")+1);e(d(c),b,null,a)},function(a){e(null,
null,a,null)})}catch(f){typeof f==="string"&&f.indexOf("search")>-1&&this._crawler?this._crawler.searchName(a,function(c){e(d(c),null,null,a)}):typeof f==="string"&&f.indexOf("search")>-1&&!a.nameSearch?(new g.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(c){e(d(c),null,null,a)}):this.registry.getService("orion.page.message").setErrorMessage(f)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=
a},handleError:function(a,c){console.error(a);f.empty(c);c.appendChild(document.createTextNode(a));return a},setLocationByMetaData:function(a,c){var b="",e=null;this._searchRootLocation=this._fileService.fileServiceRootURL(a.Location);c&&a&&a.Parents&&a.Parents.length>0?e=c.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),b=e.Name,this._childrenLocation=e.ChildrenLocation;else if(a)this.setLocationbyURL(this._searchRootLocation),
b=this._fileService.fileServiceName(a.Location),this._childrenLocation=a.ChildrenLocation;e=f.node("search");b||(b="");if(e&&e.placeholder){e.value="";var g=d.formatMessage(h["Search ${0}"],b);e.placeholder=g.length>30?g.substring(0,27)+"...":d.formatMessage(h["Search ${0}"],b)}if(e&&e.title)e.title=h["Type a keyword or wild card to search in "]+b},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,c,b,e){b=b?this.getSearchRootLocation():this.getSearchLocation();return c?{resource:b,sort:"NameLower asc",
rows:100,start:0,nameSearch:!0,keyword:a}:{resource:b,sort:e&&e.sort?e.sort:"Path asc",rows:e&&e.rows?e.rows:40,start:0,caseSensitive:e?e.caseSensitive:void 0,regEx:e?e.regEx:void 0,fileType:e?e.fileType:void 0,keyword:a,replace:e?e.replace:void 0}}};j.prototype.constructor=j;return{Searcher:j}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(h,i){function f(b,c,a){return b[c].apply(b,a)}function d(b){this._location=b}function b(){var b=new i;b.reject(h["No Matching OperationService for location:"]+this._location);return b}function g(b){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=b.getService("orion.core.preference");for(var c=b.getServiceReferences("orion.core.operation"),
a=0;a<c.length;a++){var f=b.getService(c[a]);this._services[a]=f;f=c[a].getProperty("pattern")||".*";f[0]!=="^"&&(f="^"+f);this._patterns[a]=RegExp(f)}this._getService=function(a){if(!a)return this._services[0];for(var c=0;c<this._patterns.length;++c)if(this._patterns[c].test(a))return this._services[c];this._operations.remove(a);return new d(a)}}d.prototype={getOperation:b,getOperations:b,removeCompletedOperations:b,removeOperation:b,cancelOperation:b};d.prototype.constructor=d;g.prototype={getOperations:function(){var b=
new i;if(this._operations)return b.resolve(this._operations),b;var c=this;this._preferenceService.getPreferences("/operations").then(function(a){c._operations=a;b.resolve(c._operations)});return b},getOperation:function(b){return f(this._getService(b),"getOperation",arguments)},removeCompletedOperations:function(){for(var b=[],c=this,a=0;a<this._services.length;a++){var d=this._patterns[a],g=new i;b[a]=g.promise;f(this._services[a],"removeCompletedOperations").then(function(a){return function(b){Array.isArray(b)&&
c.getOperations.bind(c)().then(function(c){for(var e=c.keys(),f=0;f<e.length;f++){var g=e[f];d.test(g)&&b.indexOf(g)<0&&c.remove(g)}a.resolve()})}}(g),function(a){return function(c){a.reject(c)}}(g))}return i.all(b)},removeOperation:function(b){var c=this;return f(this._getService(b),"removeOperation",arguments).then(function(){c.getOperations.bind(c)().then(function(a){a.remove(b)})},function(a){return a},function(a){return a})}};g.prototype.constructor=g;return{OperationsClient:g}});
define("text!orion/banner/slideout.html",[],function(){return'<div id="slideContainer" class="slideParameters slideContainer">\n\t<span id="pageCommandParameters" class="layoutLeft parameters"></span>\n\t<span id="pageCommandDismiss" class="layoutRight parametersDismiss"></span>\n</div>'});
define("orion/commonHTMLFragments",["require","orion/webui/littlelib","text!orion/banner/slideout.html"],function(h,i,f){return{slideoutHTMLFragment:function(d){var b=document.createElement("div");b.innerHTML=f;var g=i.$("#slideContainer",b);g.id=d+g.id;g=i.$("#pageCommandParameters",b);g.id=d+g.id;g=i.$("#pageCommandDismiss",b);g.id=d+g.id;return b.innerHTML}}});
define("orion/keyBinding",["orion/util"],function(h){function i(d,b,f,e,c,a){this.type=a||"keydown";this.keyCode=typeof d==="string"&&this.type==="keydown"?d.toUpperCase().charCodeAt(0):d;this.mod1=b!==void 0&&b!==null?b:!1;this.mod2=f!==void 0&&f!==null?f:!1;this.mod3=e!==void 0&&e!==null?e:!1;this.mod4=c!==void 0&&c!==null?c:!1}function f(d){this.keys=d}i.prototype={getKeys:function(){return[this]},match:function(d,b){if(b!==void 0){if(b!==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,b){var f=this.keys;if(b!==void 0)return b>f.length?!1:f[b].match(d)?b===f.length-1?!0:b+1:!1;else{d instanceof Array||(d=[d]);if(d.length>f.length)return!1;var e;for(e=0;e<d.length;e++)if(!f[e].match(d[e]))return!1;return e===f.length?!0:e}},equals:function(d){if(!d.keys)return!1;if(d.keys.length!==this.keys.length)return!1;for(var b=0;b<d.keys.length;b++)if(!d.keys[b].equals(this.keys[b]))return!1;return!0}};return{KeyBinding:i,KeyStroke:i,
KeySequence:f}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(h,i,f){function d(b,d){this._activeContainer=null;this._getElementsFunction=b;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(b,d,e){typeof b==="string"&&(b=f.node(b));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===b)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(b))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=e;var c=d(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!c)return!1;this._activeElements.focusNode=c;b=f.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(b.length===0){d=this._activeElements.dismissArea||
this._activeElements.parameterArea;b=document.createElement("button");b.id="closebox";b.className="imageSprite core-sprite-close dismissButton";b.title=h.Close;d.appendChild(b);var a=this;b.addEventListener("click",function(){a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);if(c)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){c.focus();c.select&&c.select()},0);this._activeElements.commandNode&&
this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(b,d){f.$$array("input",d).forEach(function(e){e.type==="checkbox"?b.parameters.setValue(e.parameterName,e.checked):e.type!=="button"&&b.parameters.setValue(e.parameterName,e.value.trim())});f.$$array("textArea",d).forEach(function(e){b.parameters.setValue(e.parameterName,e.value.trim())});b.command.callback&&b.command.callback.call(b.handler,b)},collectParameters:function(b){return b.parameters?
(b.domNode&&b.domNode.classList.add("commandMarker"),this.open(b.domNode||b.domParent,this.getFillFunction(b))):!1},getFillFunction:function(b,d){var e=this;return function(c,a){var k=null,j=function(){d&&d();e.close()},i=function(a){a.keyCode===f.KEY.ENTER&&e._collectAndCall(b,c);if(a.keyCode===f.KEY.ESCAPE||a.keyCode===f.KEY.ENTER)j(),f.stop(a)};b.parameters.forEach(function(a){var e=null;if(a.label)e=document.createElement("label"),e.classList.add("parameterInput"),e.setAttribute("for",a.name+
"parameterCollector"),e.textContent=a.label,c.appendChild(e);var d=a.name+"parameterCollector",g,e=e||c;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)g=document.createElement("textarea"),g.rows=a.lines,g.type="textarea",g.id=d,e.appendChild(g),i=function(a){a.keyCode===f.KEY.ESCAPE&&(j(),f.stop(a))};else if(a.type==="boolean"){if(g=document.createElement("input"),g.type="checkbox",g.id=d,e.appendChild(g),a.value)g.checked=!0}else if(g=document.createElement("input"),g.type=a.type,g.id=
d,e.appendChild(g),a.value)g.value=a.value;g.classList.add("parameterInput");g.setAttribute("speech","speech");g.setAttribute("x-webkit-speech","x-webkit-speech");g.parameterName=a.name;k||(k=g);a.eventListeners.length>0&&a.eventListeners.forEach(function(a){g.addEventListener(a.event,function(c){return a.handler(c,b)},a.capture)});g.addEventListener("keydown",i,!1)});var m=a;m||(m=document.createElement("span"),m.classList.add("layoutRight"),m.classList.add("parametersDismiss"),c.appendChild(m));
var n=function(a,c){var b=document.createElement("button");c.appendChild(b);a&&b.appendChild(document.createTextNode(a));b.classList.add("dismissButton");return b};if(b.parameters.hasOptionalParameters())b.parameters.optionsRequested=!1,n(h.More,m).addEventListener("click",function(){b.parameters.optionsRequested=!0;e._collectAndCall(b,c);j()},!1);n(h.Submit,m).addEventListener("click",function(){e._collectAndCall(b,c);j()},!1);m=n(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");
m.title=h.Close;m.addEventListener("click",function(){j()},!1);return k}}};d.prototype.constructor=d;return{CommandParameterCollector:d}});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(h,i){function f(d){this._init(d)}f.prototype={_init:function(d){var b=i.node(d.container);if(!b)throw"no parent container";this._container=b;b.classList.remove("currentLocation");this._id=d.id||"eclipse.breadcrumbs";this._resource=d.resource||null;this._rootSegmentName=d.rootSegmentName;this._workspaceRootSegmentName=d.workspaceRootSegmentName;this._workspaceRootURL=d.workspaceRootURL;this._makeHref=d.makeHref;this._makeFinalHref=
d.makeFinalHref;this._maxLength=d.maxLength;this.path="";this.measure();this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var d;if(this._resource&&this._resource.Parents&&!this._resource.skip){d=document.createElement("a");var b=this._workspaceRootURL?this._workspaceRootURL:"";this._makeHref?this._makeHref(d,b):d.href=h.toUrl("edit/edit.html")+"#"+b}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 b=document.createElement("a");b.classList.add("breadcrumb");b.appendChild(document.createTextNode(d));return b},addSegmentHref:function(d,b){this._makeHref?this._makeHref(d,b.Location,b):d.href=h.toUrl("edit/edit.html")+"#"+b.ChildrenLocation},buildSegments:function(d,b){if(this._resource.Parents){var f=this._resource.Parents.slice(0),e,c;f&&(f=f.slice(0),b==="reverse"&&(f=f.reverse().slice(0)),
f.forEach(function(a){if(!a.skip)d?(c=d,d=null):c=a.Name,e=this.buildSegment(c),this.path+=a.Name,this.addSegmentHref(e,a),e.include=!1,this.segments.push(e)}.bind(this)))}},addDivider:function(){var d=document.createElement("span");d.appendChild(document.createTextNode(" / "));this.path+="/";d.classList.add("breadcrumbSeparator");this.append(d)},refresh:function(){(this.crumbs=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,b){var f=b||document.title;this.crumbs.childNodes.length===0&&(d=document.createElement("span"),d.appendChild(document.createTextNode(f)),
d.classList.add("breadcrumb"),d.classList.add("currentLocation"),this.append(d))},finalSegment:function(d,b){if(!this._resource.skip){var f;f=b?b:this._resource.Name;this._makeFinalHref?(d=this.buildSegment(f),this.addSegmentHref(d,this._resource)):(d=document.createElement("span"),d.appendChild(document.createTextNode(f)));d.classList.add("currentLocation");this.path+=this._resource.Name;this.append(d)}},firstSegment:function(d){if(d)if(this.append(d),this._resource&&this._resource.Parents&&!this._resource.skip)d.classList.add("breadcrumb"),
this.addDivider();else{if(!this._resource.skip)d.href="";d.classList.add("currentLocation")}},drawSegments:function(){this._resource.Parents&&this.segments.slice(0).forEach(function(d){d.include===!0&&(this.append(d),this.addDivider())}.bind(this))},measureSegments:function(){this.INCLUDE_FIRST_SECTION=!0;if(this._resource.Parents){var d=this.segments.slice(0).reverse();d.forEach(function(b){this.append(b);this.addDivider();this.crumbs.offsetWidth<this.MAX_LENGTH?b.include=!0:this.INCLUDE_FIRST_SECTION=
!1}.bind(this));this.segments=d.reverse()}},measure:function(){var d=this._container;d.style.width="auto";this.MAX_LENGTH=this._maxLength?this._maxLength:d.offsetWidth;this.refresh();this.segments=[];this.crumbs.style.visibility="hidden";var d=this.getNavigatorWorkspaceRootSegment(),b=this._rootSegmentName;if(b)this.addTitle(d,b);else if(this.finalSegment(d,b),this._resource&&this._resource.Parents&&(this.buildSegments(b,"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(),b=this._rootSegmentName;b?this.addTitle(d,b):(this.INCLUDE_FIRST_SECTION===!0&&this.firstSegment(d),this._resource&&this._resource.Parents&&(this.drawSegments(),this.finalSegment(d,b)));this.crumbs.parentNode.style.width=this.crumbs.offsetWidth+20+"px"}};f.prototype.constructor=f;return{BreadCrumbs:f}});
define("orion/webui/splitter",["require","orion/EventTarget","orion/webui/littlelib"],function(h,i,f){function d(b){i.attach(this);this._init(b)}d.prototype={_init:function(b){this._tracking=null;this._animationDelay=501;this._closeReversely=b.closeReversely;this.$node=f.node(b.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=f.node(b.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=f.node(b.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";
this._vertical=b.vertical;this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(b.toggle)this._thumb=document.createElement("div"),this.$node.appendChild(this._thumb),this._thumb.classList.add("splitThumb"),this._thumb.classList.add(this._vertical?"splitVerticalThumbLayout":"splitThumbLayout");this._closeByDefault=this.$node.getAttribute("data-initial-state")==="closed";if(typeof b.closeByDefault!=="undefined")this._closeByDefault=b.closeByDefault;this._initializeFromStoredSettings();
this._closed?(this._closed=!1,this._thumbDown(!0,!0)):this._adjustToSplitPosition();this.$node.style.visibility="visible";this.$mainNode.style.display="block";this.$sideNode.style.display="block";this.$node.addEventListener("mousedown",this._mouseDown.bind(this),!1);window.addEventListener("mouseup",this._mouseUp.bind(this),!1);window.addEventListener("resize",this._resize.bind(this),!1)},isClosed:function(){return this._closed},toggleSidePanel:function(){this._thumbDown()},openSidePanel:function(){this._closed||
this._thumbDown()},addResizeListener:function(b){this.addEventListener("resize",function(d){b(d.node)})},_initializeFromStoredSettings:function(){var b=localStorage.getItem(this._prefix+"/toggleState");this._closed=typeof b==="string"?b==="closed":this._closeByDefault;var b=f.bounds(this.$node.parentNode),d=f.bounds(this.$node),e;if(this._vertical)if(e=localStorage.getItem(this._prefix+"/yPosition")){if(this._splitTop=parseInt(e,10),this._splitTop>b.top+b.height-d.height)this._splitTop=b.top+b.height/
2}else{if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitTop=0}else if(e=localStorage.getItem(this._prefix+"/xPosition")){if(this._splitLeft=parseInt(e,10),this._splitLeft>b.left+b.width-d.width)this._splitLeft=b.left+b.width/2}else if(this._closeByDefault)this._initialSplit=this._getSplitPosition(),this._splitLeft=0},_getSplitPosition:function(){var b=f.bounds(this.$node),d=f.bounds(this.$node.parentNode);return this.vertical?b.top-d.top:b.left-d.left},_adjustToSplitPosition:function(b){var d=
f.bounds(this.$node),e=f.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=d.height;if(b||!this._splitTop)this._splitTop=d.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);b=this._splitTop;this.$node.parentNode.style.position==="relative"&&(b=this._splitTop-e.top);this.$sideNode.style.height=b+"px";this.$sideNode.style.display="block";this.$node.style.top=b+"px"}else{this._splitWidth=d.width;if(b||!this._splitLeft)this._splitLeft=d.left,localStorage.setItem(this._prefix+
"/xPosition",this._splitLeft);b=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(b=this._splitLeft-e.left);this.$sideNode.style.width=b+"px";this.$sideNode.style.display="block";this.$node.style.left=b+"px"}this._resize()},_resize:function(b,d,e){var b=b||0,c=f.bounds(this.$node.parentNode),a=f.bounds(this.$node);this._vertical?(e===void 0&&(e=a.top-c.top),e+=a.height,this.$mainNode.style.top=e+"px"):(d===void 0&&(d=a.left-c.left),d+=a.width,this.$mainNode.style.left=d+"px");var h=
this;window.setTimeout(function(){h._notifyResizeListeners(h.$mainNode);h._notifyResizeListeners(h.$sideNode)},b)},_notifyResizeListeners:function(b){this.dispatchEvent({type:"resize",node:b})},_notifyToggleListeners:function(){this.dispatchEvent({type:"toggle",closed:this._closed})},_thumbDown:function(b,d){b||this._addAnimation();var e=this._splitTop,c=this._splitLeft;if(this._closed){if(this._closed=!1,!this._splitLeft&&!this._splitTop&&typeof this._initialSplit==="number")e=c=this._initialSplit}else if(this._closed=
!0,this._closeReversely){var a=f.bounds(this.$node.parentNode),h=f.bounds(this.$node);this._vertical?e=a.height-h.height:c=a.width-h.width}else e=c=0;this._vertical?(this.$sideNode.style.height=e+"px",this.$node.style.top=e+"px"):(this.$sideNode.style.width=c+"px",this.$node.style.left=c+"px");this._resize(this._animationDelay,c,e);b||this._removeAnimation();d||localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null);var j=this;window.setTimeout(function(){j._notifyToggleListeners()},
this._animationDelay)},_removeAnimation:function(){var b=this;window.setTimeout(function(){b.$sideNode.classList.remove(b._vertical?"sidePanelVerticalLayoutAnimation":"sidePanelLayoutAnimation");b.$mainNode.classList.remove(b._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");b.$node.classList.remove(b._vertical?"splitVerticalLayoutAnimation":"splitLayoutAnimation")},this._animationDelay)},_addAnimation:function(){this.$sideNode.classList.add(this._vertical?"sidePanelVerticalLayoutAnimation":
"sidePanelLayoutAnimation");this.$mainNode.classList.add(this._vertical?"mainPanelVerticalLayoutAnimation":"mainPanelLayoutAnimation");this.$node.classList.add(this._vertical?"splitVerticalLayoutAnimation":"splitLayoutAnimation")},_mouseDown:function(b){if(b.target===this._thumb)return f.stop(b),this._thumbDown();if(!this._tracking)this.$node.classList.add("splitTracking"),this.$mainNode.classList.add("panelTracking"),this.$sideNode.classList.add("panelTracking"),this._tracking=this._mouseMove.bind(this),
window.addEventListener("mousemove",this._tracking),f.setFramesEnabled(!1),f.stop(b)},_mouseMove:function(b){if(this._tracking){var d=f.bounds(this.$node.parentNode);if(this._vertical){this._splitTop=b.clientY;if(this._splitTop<d.top+5)this._splitTop=d.top+5;else if(this._splitTop>d.top+d.height-5)this._splitTop=d.top+d.height-5;var e=this._splitTop,e=this._splitTop-d.top;this.$node.style.top=e+"px"}else{this._splitLeft=b.clientX;if(this._splitLeft<d.left+5)this._splitLeft=d.left+5;else if(this._splitLeft>
d.left+d.width-5)this._splitLeft=d.left+d.width-5;e=this._splitLeft;e=this._splitLeft-2*d.left;this.$node.style.left=e+"px"}this._adjustToSplitPosition(!0);f.stop(b)}},_mouseUp:function(b){if(this._tracking)f.setFramesEnabled(!0),window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),this.$sideNode.classList.remove("panelTracking"),f.stop(b)}};d.prototype.constructor=d;return{Splitter:d}});
define("orion/keyAssist",["i18n!orion/nls/messages","orion/webui/littlelib","orion/util"],function(h,i,f){function d(b){this.commandRegistry=b.commandRegistry;this.create();this._filterString="";this._providers=[]}d.prototype={addProvider:function(b){this._providers.push(b)},create:function(){var b=this._keyAssistDiv=document.createElement("div");b.id="keyAssist";b.style.display="none";b.classList.add("keyAssistFloat");b.setAttribute("role","menu");var d=this._keyAssistInput=document.createElement("input");
d.classList.add("keyAssistInput");d.type="text";d.placeholder=h["Filter bindings"];b.appendChild(d);var e=this._keyAssistContents=document.createElement("div");e.classList.add("keyAssistContents");if(f.isIOS||f.isAndroid)e.style.overflowY="auto";b.appendChild(e);var c=this._keyAssistTable=document.createElement("table");c.tabIndex=0;c.classList.add("keyAssistList");e.appendChild(c);document.body.appendChild(b);d.addEventListener("keydown",function(a){this._keyDown(a)}.bind(this));c.addEventListener("keydown",
function(a){this._keyDown(a)}.bind(this));d.addEventListener("input",function(){this.filterChanged()}.bind(this));e.addEventListener(f.isFirefox?"DOMMouseScroll":"mousewheel",function(a){this._scrollWheel(a)}.bind(this));document.addEventListener("keydown",function(a){a.keyCode===i.KEY.ESCAPE&&this.hide()}.bind(this));i.addAutoDismiss([b],function(){this.hide()}.bind(this))},createContents:function(){i.empty(this._keyAssistTable);this._selectedIndex=-1;this._selectedRow=null;for(var b=this._idCount=
this._keyAssistContents.scrollTop=0;b<this._providers.length;b++)this._providers[b].showKeyBindings(this);this.createHeader(h.Global);this.commandRegistry.showKeyBindings(this)},createItem:function(b,d,e){if(this._filterString){var c=this._filterString.toLowerCase(),a;c!==this._filterString?(c=this._filterString,a=function(a){return a}):a=function(a){return a.toLowerCase()};if(a(d).indexOf(c)===-1&&a(b).indexOf(c)===-1&&a(this._lastHeader).indexOf(c)===-1)return}var f=this._keyAssistTable.insertRow(-1);
f.id="keyAssist-keyBinding-"+this._idCount++;f.setAttribute("role","menuitem");f._execute=e;f.classList.add("keyAssistItem");f.addEventListener("click",function(a){this._selectedRow=f;this.execute();a.preventDefault()}.bind(this));e=f.insertCell(-1);e.classList.add("keyAssistName");e.appendChild(document.createTextNode(d));e=f.insertCell(-1);e.classList.add("keyAssistAccel");e.appendChild(document.createTextNode(b))},createHeader:function(b){this._lastHeader=b;var d=this._keyAssistTable.insertRow(-1);
d.classList.add("keyAssistSection");var d=d.insertCell(-1),e=document.createElement("h2");e.appendChild(document.createTextNode(b));d.appendChild(e)},execute:function(){window.setTimeout(function(){this.hide();var b=this._selectedRow;this._selectedRow=null;b&&b._execute&&b._execute()}.bind(this),0)},filterChanged:function(){this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){this._timeout=null;var b=this._keyAssistInput.value;if(this._filterString!==b)this._filterString=
b,this.createContents()}.bind(this),100)},hide:function(){if(this.isVisible()){var b=document.activeElement,d=this._keyAssistDiv,b=d===b||(d.compareDocumentPosition(b)&16)!==0;d.style.display="none";b&&document.compareDocumentPosition(this._previousActiveElement)!==1&&this._previousActiveElement.focus();this._previousActiveElement=null}},isVisible:function(){return this._keyAssistDiv.style.display==="block"},removeProvider:function(b){b=this._providers.indexOf(b);b!==-1&&this._providers.splice(b,
1)},select:function(b){var d=this._keyAssistTable.querySelectorAll(".keyAssistItem");if(d.length===0)this._selectedIndex=-1;else{var e=this._selectedIndex;e+=b?1:-1;e%=d.length;e<0&&(e=d.length-1);if(this._selectedIndex!==-1)b=d[this._selectedIndex],b.classList.remove("selected"),this._selectedRow=null;this._selectedIndex=e;if(this._selectedIndex!==-1){this._selectedRow=b=d[this._selectedIndex];b.classList.add("selected");this._keyAssistTable.setAttribute("aria-activedescendant",b.id);this._keyAssistTable.focus();
var d=b.getBoundingClientRect(),c=this._keyAssistContents,a=c.getBoundingClientRect();b.offsetTop<c.scrollTop?e===0?c.scrollTop=0:b.scrollIntoView(!0):d.bottom>a.bottom&&b.scrollIntoView(!1)}}},show:function(){if(!this.isVisible())this._previousActiveElement=document.activeElement,this.createContents(),this._keyAssistContents.style.height=Math.floor(this._keyAssistDiv.parentNode.clientHeight*0.75)+"px",this._keyAssistDiv.style.display="block",this._keyAssistInput.value=this._filterString,this._keyAssistInput.focus(),
this._keyAssistInput.select()},_keyDown:function(b){if(b.keyCode===40)this.select(!0);else if(b.keyCode===38)this.select(!1);else if(b.keyCode===13)this.execute();else return;b.preventDefault()},_scrollWheel:function(b){var d=0,d=f.isIE||f.isOpera?-b.wheelDelta:f.isFirefox?b.detail*40:-b.wheelDeltaY,e=this._keyAssistContents,c=e.scrollTop;e.scrollTop+=d;if(c!==e.scrollTop)return b.preventDefault&&b.preventDefault(),!1}};return{KeyAssistPanel:d}});
define("orion/widgets/themes/ThemePreferences",[],function(){function h(h,f){this._preferences=h;this._themeData=f;var d=f.getThemeStorageInfo();this._themeVersion=d.version;var b=h.listenForChangedSettings(d.storage,2,function(d){d.key===b&&this.apply()}.bind(this))}h.prototype={_initialize:function(h,f,d){var b,g;this._themeVersion===void 0||d.get("version")===this._themeVersion?(b=d.get(h.styleset),(g=d.get("selected"))&&(g=JSON.parse(g))):g=b=null;b||(b=f.getStyles(),d.put(h.styleset,JSON.stringify(b)));
if(!g||g[h.selectedKey]===void 0)g=g||{},g[h.selectedKey]=h.defaultTheme,d.put("selected",JSON.stringify(g));d.put("version",this._themeVersion)},apply:function(){this.setTheme()},getTheme:function(h){var f=this._themeData,d=f.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(b){this._initialize(d,f,b);var g=JSON.parse(b.get("selected")),b=JSON.parse(b.get(d.styleset)),e;if(b)for(var c=0;c<b.length;c++)if(b[c].name===g[d.selectedKey]){e=b[c];break}h({style:e,styles:b})}.bind(this))},
setTheme:function(h,f){var d=this._themeData,b=d.getThemeStorageInfo();this._preferences.getPreferences(b.storage,2).then(function(g){this._initialize(b,d,g);var e=JSON.parse(g.get("selected"));h||(h=e[b.selectedKey]);e[b.selectedKey]=h;g.put("selected",JSON.stringify(e));f?g.put(b.styleset,JSON.stringify(f)):f=JSON.parse(g.get(b.styleset));for(var c=0;c<f.length;c++)if(f[c].name===e[b.selectedKey]){d.processSettings(f[c]);break}g.put("version",this._themeVersion)}.bind(this))},setFontSize:function(h){var f=
this._themeData,d=f.getThemeStorageInfo();this._preferences.getPreferences(d.storage,2).then(function(b){this._initialize(d,f,b);var g=JSON.parse(b.get("selected")),e=JSON.parse(b.get(d.styleset)),c;if(e)for(var a=0;a<e.length;a++)e[a].fontSize=h,e[a].name===g[d.selectedKey]&&(c=e[a]);b.put(d.styleset,JSON.stringify(e));f.processSettings(c)}.bind(this))}};return{ThemePreferences:h}});
define("orion/settings/nls/root/messages",{"Plugin Description":"Plugin Description",Create:"Create","Loading...":"Loading...","Label:":"Label:",Title:"Title",Plugins:"Plugins","User Profile":"User Profile",Git:"Git","Git Settings":"Git Settings",General:"General",Navigation:"Navigation",Links:"Links","Open in same tab":"Open in same tab","Open in new tab":"Open in new tab",Font:"Font",Family:"Family","Sans Serif":"Sans Serif",Serif:"Serif",Size:"Size","8pt":"8pt","9pt":"9pt","10pt":"10pt","12pt":"12pt",
Color:"Color",Background:"Background",Strings:"Strings","String Types":"String Types",blue:"blue",Weight:"Weight",Normal:"Normal",Bold:"Bold",Comments:"Comments","Comment Types":"Comment Types",green:"green",Keywords:"Keywords","Keyword Types":"Keyword Types",darkred:"darkred",Categories:"Categories",Username:"Username","Full Name":"Full Name","Email Address":"Email Address","Email Confirmed":"Email Confirmed",Account:"Account","Current Password":"Current Password","New Password":"New Password","Verify Password":"Verify Password",
Password:"Password",OpenId:"OpenId",AOL:"AOL",Yahoo:"Yahoo",Google:"Google",Unlink:"Unlink",Link:"Link",Unlinked:"Unlinked",Linked:"Linked","Linked Accounts":"Linked Accounts","Git Email Address":"Git Email Address","Git Username":"Git Username","Git Credentials Storage":"Git Credentials Storage",Update:"Update","Update Profile Settings":"Update Profile Settings","Update Git User Settings":"Update Git User Settings","Update Git Credentials":"Update Git Credentials","User profile data successfully updated.":"User profile data successfully updated.",
"Git user data successfully updated.":"Git user data successfully updated.","Git Credentials successfully updated.":"Git Credentials successfully updated.","Edit Plugin JavaScript":"Edit Plugin JavaScript","Install Plugin":"Install Plugin","Plugin Name:":"Plugin Name:","Author Name:":"Author Name:","Licence:":"Licence:","Description:":"Description:","A plugin for Eclipse Orion":"A plugin for Eclipse Orion","Plugin Link":"Plugin Link",Install:"Install","Install a plugin by specifying its URL":"Install a plugin by specifying its URL",
"Plugin URL:":"Plugin URL:",Disable:"Disable",DisableTooltip:"Disable the plugin",Enable:"Enable",EnableTooltip:"Enable the plugin","Reload all":"Reload all","Reload all installed plugins":"Reload all installed plugins","Create a new Orion Plugin":"Create a new Orion Plugin","Find More Orion Plugins":"Find More Orion Plugins","Get Plugins":"Get Plugins",Reload:"Reload","Reload the plugin":"Reload the plugin",Delete:"Delete","Delete this plugin from the configuration":"Delete this plugin from the configuration",
"Type a plugin url here ...":"Type a plugin url here ...","Installed ":"Installed ","Installing ":"Installing ","Already installed":"Already installed"," plugin":" plugin","Reloaded ":"Reloaded ","Uninstalled ":"Uninstalled ","Are you sure you want to uninstall '":"Are you sure you want to uninstall '",Services:"Services",Value:"Value","JavaScript Object":"JavaScript Object","click here, then check javascript console to drill down":"click here, then check javascript console to drill down",Item:"Item",
"Git Config":"Git Config","Clear Git Credentials":"Clear Git Credentials","Enable Storage":"Enable Storage","Please be aware that your credentials will be stored persistently in the browser.":"Please be aware that your credentials will be stored persistently in the browser.","Do you wish to enable the Key Storage?":"Do you wish to enable the Key Storage?",general:"General",validation:"Validation","Deleted git credentials for ${0}":"Deleted git credentials for ${0}",Editor:"Editor",editorSettings:"Settings",
EditorThemes:"Themes",Import:"Import","Import a theme":"Import a theme",Export:"Export","Export a theme":"Export a theme","Theme name:":"Theme name:",yourTheme:"yourTheme",fileManagement:"File Management",typing:"Typing",autoSave:"Auto Save",autoSaveTimeout:"Save interval (ms)",autoLoad:"Auto Load",saveDiffs:"Save file as diffs",trimTrailingWhiteSpace:"Trim Trailing Whitespace on Save",Restore:"Restore Defaults",Default:"Default",keys:"Keys",tabs:"Tabs",tabSize:"Tab Size",expandTab:"Insert spaces for tabs",
smoothScrolling:"Smooth Scrolling",scrollAnimation:"Scrolling Animation",scrollAnimationTimeout:"Scrolling Duration (ms)",keyBindings:"Key Bindings",rulers:"Rulers",annotationRuler:"Show Annotation Ruler",lineNumberRuler:"Show Line Number Ruler",foldingRuler:"Show Folding Ruler",overviewRuler:"Show Overview Ruler",whitespaces:"White Spaces",wrapping:"Wrapping",wordWrap:"Word Wrap",showMargin:"Show Margin",marginOffset:"Margin Column",showTabs:"Show Tabs",showSpaces:"Show Spaces",autoSaveTimeoutInvalid:"Invalid save interval.",
scrollAnimationTimeoutInvalid:"Invalid scrolling duration.",tabSizeInvalid:"Invalid tab size.",localSettingsTooltip:"Toggle whether this setting is shown in the local editor settings drop down.",editorSettingsInfo:"Use the ${0} and ${1} to toggle whether a given setting is shown in the local editor settings drop down ${2}.",autoPairParentheses:"Autopair (Parentheses)",autoPairBraces:"Autopair {Braces}",autoPairSquareBrackets:"Autopair [Square] Brackets",autoPairAngleBrackets:"Autopair <Angle> Brackets",
autoPairQuotations:'Autopair "Strings"',autoCompleteComments:"Autocomplete /** Block Comments */",smartIndentation:"Smart Indentation",sourceControl:"Source Control",showBlame:"Show Blame",languageTools:"Language Tools",showOccurrences:"Show Occurrences",contentAssistAutoTrigger:"Show Content Assist automatically","Editor preferences updated":"Editor preferences updated","Editor defaults restored":"Editor defaults restored",Theme:"Theme","Font Size":"Font Size","New Theme Name:":"New Theme Name:",
"Font Size:":"Font Size:","UI Theme":"UI Theme","Navigation Bar":"Navigation Bar","Navigation Text":"Navigation Text","Search Box":"Search Box","Tool Panel":"Tool Panel","Selection Bar":"Selection Bar",Location:"Location",Content:"Content","Main Panel":"Main Panel",Button:"Button","Button Text":"Button Text","Section Text":"Section Text","Side Panel":"Side Panel","Line Color":"Line Color","Line Numbers":"Line Numbers",Foreground:"Foreground","Current Line":"Current Line","HTML Attribute":"HTML Attribute",
"Overview Ruler":"Overview Ruler","HTML Tag":"HTML Tag","Annotation Ruler":"Annotation Ruler","Show Guide":"Show Guide","Check Guide":"Check Guide",Cancel:"Cancel","Revert Theme":"Revert Theme","Update Theme":"Update Theme","Theme:":"Theme:",clickDiagram:"Click diagram to style.",clickUpdate:"Click Update button to save preview.","CSS Class Name":"CSS Class Name","CSS Attribute":"CSS Attribute","CSS Value":"CSS Value","CSS Text":"CSS Text","COLOR:":"Color:","NEW COLOR:":"New Color:",Ok:"Ok","OR HEX:":"Or Hex: "});
define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages","orion/settings/nls/root/messages"],function(h,i){var f={root:i};Object.keys(h).forEach(function(d){typeof f[d]==="undefined"&&(f[d]=h[d])});return f});
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 b=this._eventTypes[h];b||(b=this._eventTypes[h]={level:0,listeners:[]});b.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 b=d.listeners;try{if(d.level++,b)for(var g=0,e=b.length;g<e;g++)if(b[g]){var c=b[g].listener;typeof c==="function"?c.call(this,f):c.handleEvent&&typeof c.handleEvent==="function"&&c.handleEvent(f)}}finally{if(d.level--,d.compact&&d.level===0){for(g=b.length-1;g>=0;g--)b[g]||b.splice(g,1);b.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 b=this._eventTypes[h];if(b){for(var g=b.listeners,e=0,c=g.length;e<c;e++){var a=g[e];if(a&&a.listener===f&&a.useCapture===d){b.level!==0?(g[e]=null,b.compact=!0):g.splice(e,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(b){b=b||{};this._document=b.document||document}var b={};d.getTheme=function(f){var f=f||"default",e=b[f];e||(e=b[f]=new d);return e};d.prototype={getThemeClass:function(){return this._themeClass},setThemeClass:function(b,e){var c=this,a=c._themeClass;c._themeClass=b;this._load(b,e,function(){c.onThemeChanged({type:"ThemeChanged",oldValue:a,newValue:c.getThemeClass()})})},onThemeChanged:function(b){return this.dispatchEvent(b)},
buildStyleSheet:function(b,e){function c(c,e,d){e&&(a.push("."+b+" ."+c+" {"),a.push("\t"+(d?"background-color":"color")+": "+e+";"),a.push("}"))}var a=[];a.push("");a.push("."+b+" {");e.fontFamily&&a.push("\tfont-family: "+e.fontFamily+";");e.fontSize&&a.push("\tfont-size: "+e.fontSize+";");e.fontSize&&a.push("\tcolor: "+e.text+";");a.push("}");a.push("."+b+".textview {");e.background&&a.push("\tbackground-color: "+e.background+";");a.push("}");c("ruler.annotations",e.annotationRuler,!0);c("ruler.lines",
e.annotationRuler,!0);c("ruler.folding",e.annotationRuler,!0);c("ruler.overview",e.overviewRuler,!0);c("rulerLines",e.lineNumber,!1);c("rulerLines.even",e.lineNumberEven,!1);c("rulerLines.odd",e.lineNumberOdd,!1);c("annotationLine.currentLine",e.currentLine,!0);c("entity-name-tag",e.keyword,!1);c("entity-other-attribute-name",e.attribute,!1);c("string-quoted",e.string,!1);c("meta.annotation.currentLine",e.currentLine,!0);c("keyword",e.keyword,!1);c("string",e.string,!1);c("comment",e.comment,!1);
c("comment.block.documentation",e.comment,!1);c("keyword.other.documentation.markup",e.comment,!1);return a.join("\n")},_createStyle:function(b,e,c,a){var d=this._document,b="orion-theme-"+b,j=d.getElementById(b);if(j){if(a||j.firstChild.data===e)return;j.removeChild(j.firstChild);j.appendChild(d.createTextNode(e))}else a?(j=f.createElement(d,"link"),j.rel="stylesheet",j.type="text/css",j.href=e,j.addEventListener("load",function(){c()})):(j=f.createElement(d,"style"),j.appendChild(d.createTextNode(e))),
j.id=b,(d.getElementsByTagName("head")[0]||d.documentElement).appendChild(j);a||c()},_load:function(b,e,c){if(b)if(typeof e==="string")this._createStyle(b,e,c);else if(e=e.href,e.substring(e.length-4)!==".css"&&(e+=".css"),/^\//.test(e)||/[a-zA-Z0-9]+:\/\//i.test(e)||!h.toUrl)this._createStyle(b,e,c,!0);else{var a=this;h(["text!"+e],function(e){a._createStyle(b,e,c,!1)})}else c()}};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="white";i.prototype.button="#777777";i.prototype.location="#EFEFEF";i.prototype.selection="#cedce7";i.prototype.sidepanel="#F7F7F7";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=[],b=new h.ThemeClass("orionPage");
b.style.backgroundColor="#fdfdfd";b.style.width="100%";b.style.height="100%";d.push(b);b=new h.ThemeClass("topRowBanner");b.style.margin="0";b.style.border="0";b.style.backgroundColor=this.navbar;b.style.height="16px";b.style.padding="10px";b.style.paddingLeft="6px";b.style.paddingRight="2px";b.style.borderBottom="none";b.style.boxShadow="0 2px 2px 0 rgba(0, 0, 0, 0.1),0 1px 0 0 rgba(0, 0, 0, 0.1)";b.style.zIndex="100";d.push(b);b=new h.ThemeClass("a");b.style.textDecoration="none";b.style.color=
this.content;d.push(b);b=new h.ThemeClass("navlink");b.style.display="inline-block";b.style.padding="2px";b.style.color=this.content;b.style.verticalAlign="bottom";d.push(b);b=new h.ThemeClass("primaryNav");b.style.color=this.navtext;b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.paddingTop="0";b.style.verticalAlign="baseline";d.push(b);b=new h.ThemeClass("primaryNav a");b.style.fontSize="8pt";b.style.color=this.navtext;b.style.marginRight="6px";b.style.marginLeft="6px";b.style.verticalAlign=
"baseline";b.style.textDecoration="none";d.push(b);b=new h.ThemeClass("primaryNav a:hover");b.style.color="#bfbfbf";b.style.cursor="hand";b.style.color="white";b.style.fontWeight="normal";d.push(b);for(var g in d)f+=d[g].toString();return f};i.prototype.writeLocationStyle=function(){var f="",d=[],b=new h.ThemeClass("titleArea");b.style.margin="0";b.style.paddingTop="5px";b.style.border="0";b.style.background=this.location;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+
this.location+"), color-stop(100%,"+this.location+"))";b.style.borderBottom="1px solid "+this.location;b.style.minHeight="20px";d.push(b);b=new h.ThemeClass("breadcrumb");b.style.fontSize="8pt";b.style.textDecoration="none";b.style.color="#f1f1f2;";b.style.paddingTop="2px";d.push(b);b=new h.ThemeClass("a.breadcrumb:hover");b.style.textDecoration="none";b.style.borderBottom="1px dotted";b.style.color="#F58B0F";b.style.cursor="pointer";d.push(b);b=new h.ThemeClass("breadcrumbSeparator");b.style.fontSize=
"8pt";b.style.textDecoration="none";b.style.color=this.separator;b.style.fontWeight="bold";d.push(b);b=new h.ThemeClass("currentLocation");b.style.fontWeight="bold";b.style.fontSize="8pt";b.style.color=this.breadcrumb;b.style.textDecoration="none";b.style.textWrap="normal";b.style.lineHeight="10pt";d.push(b);b=new h.ThemeClass("a.currentLocation:hover");b.style.fontWeight="bold";b.style.fontSize="10pt";b.style.color="#666666";b.style.textDecoration="none";b.style.borderBottom="0";d.push(b);b=new h.ThemeClass("navlinkonpage");
b.style.color=this.content;b.style.verticalAlign="middle";d.push(b);if(this.bannerProgress)b=new h.ThemeClass("topRowBanner .progressPane_running"),b.style.borderColor=this.bannerProgress,d.push(b);for(var g in d)f+=d[g].toString();return f};i.prototype.writeButtonStyle=function(){var f="",d=[],b=new h.ThemeClass("commandButton");b.style.color="#666";b.style.border="1px solid #dedede";b.style.backgroundColor="#ddd";b.style.textAlign="center";b.style.verticalAlign="middle";b.style.cursor="pointer";
b.style.display="inline-block";b.style.padding="4px 6px";b.style.borderRadius="3px";b.style.lineHeight="12px";b.style.fontSize="9pt";b.style.userSelect="none";d.push(b);b=new h.ThemeClass("commandButton:over");b.style.backgroundColor="#e6e6e6";b.style.border="1px solid #808080";d.push(b);b=new h.ThemeClass("commandMenu");b.style.color="#222";b.style.display="inline-block";b.style.verticalAlign="baseline";b.style.margin="0";b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.border="1px solid #dedede";
b.style.backgroundColor="#efefef";b.style.cursor="pointer";b.style.borderRadius="1px";d.push(b);b=new h.ThemeClass("commandMenuItem");b.style.border="0";b.style.padding="0";b.style.margin="0";d.push(b);for(var g in d)f+=d[g].toString();return f};i.prototype.writeMainStyle=function(){var f="",d=[],b=new h.ThemeClass("searchbox");b.style.backgroundImage="url(../images/core_sprites.png)";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="4px -297px";b.style.width="12px";b.style.height=
"12px";b.style.backgroundColor=this.search;b.style.border="1px solid "+this.search;b.style.fontSize="11px";b.style.width="15em";b.style.height="16px";b.style.borderRadius="10px";b.style.color="#999";b.style.padding="0";b.style.paddingLeft="20px";b.style.marginLeft="5px";b.style.marginTop="6px !important";b.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";d.push(b);b=new h.ThemeClass("searchbox:focus");b.style.color="white";b.style.outline=
"none";d.push(b);b=new h.ThemeClass("checkedRow");b.style.cssText="background-color:"+this.selection+" !important;";d.push(b);b=new h.ThemeClass("navbar-item-selected");b.style.background=this.selection;b.style.color=this.content;d.push(b);b=new h.ThemeClass("auxpane");b.style.border="0";b.style.background=this.sidepanel;d.push(b);b=new h.ThemeClass("mainpane");b.style.background=this.mainpanel;b.style.border=0;d.push(b);b=new h.ThemeClass("mainToolbar");b.style.background=this.toolpanel;d.push(b);
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.bannerProgress=f.bannerProgress.value):(this.navbar=f.navbar,this.button=f.button,this.location=f.location,this.selection=f.selection,this.sidepanel=f.sidepanel,this.mainpanel=f.mainpanel,this.navtext=f.navtext,this.search=f.search,this.content=f.content,this.toolpanel=f.toolpanel,this.bannerProgress=f.bannerProgress);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};
return{ThemeSheetWriter:i}});
define("orion/widgets/themes/container/ThemeData",["i18n!orion/settings/nls/messages","orion/editor/textTheme","orion/widgets/themes/container/ThemeSheetWriter"],function(h,i,f){function d(){}function b(){this.styles=[];var b=new d;b.name="Orion";b.navbar="white";b.button="#EFEFEF";b.location="#efefef";b.selection="FEC";b.sidepanel="#FBFBFB";b.mainpanel="white";b.toolpanel="white";b.navtext="#bfbfbf";b.content="#3087B3";b.search="#444";b.breadcrumb="#3087B3";b.separator="#333";b.bannerProgress="whitesmoke";
this.styles.push(b);b=new d;b.name="Orion2014";b.navbar="white";b.button="#EFEFEF";b.location="#EFEFEF";b.selection="FEC";b.sidepanel="#EEEEEE";b.mainpanel="#EEEEEE";b.toolpanel="#EEEEEE";b.navtext="#BFBFBF";b.content="#333333";b.search="#444444";b.breadcrumb="#333333";b.separator="#333333";b.bannerProgress="orange";this.styles.push(b);b=new d;b.name="Green Zone";b.navbar="seagreen";b.button="lavender";b.location="darkseagreen";b.selection="moccasin";b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel=
"white";b.navtext="#FBFBFB";b.content="darkgreen";b.search="darkgreen";b.breadcrumb="#3087B3";b.separator="seagreen";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;b.name="Pretty In Pink";b.navbar="plum";b.button="lavender";b.location="pink";b.selection="lavender";b.sidepanel="seashell";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="mediumorchid";b.search="violet";b.breadcrumb="#3087B3";b.separator="plum";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;b.name=
"Blue Monday";b.navbar="cornflowerblue";b.button="lavender";b.location="skyblue";b.selection="lavender";b.sidepanel="aliceblue";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="royalblue";b.search="royalblue";b.breadcrumb="#3087B3";b.separator="cornflowerblue";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;b.name="Vanilla Skies";b.navbar="sandybrown";b.button="lemmonchiffon";b.location="cornsilk";b.selection="lemonchiffon";b.sidepanel="white";b.mainpanel="white";b.toolpanel=
"white";b.navtext="lemonchiffon";b.content="chocolate";b.search="moccasin";b.breadcrumb="#3087B3";b.separator="sandybrown";b.bannerProgress="#F2F2F2";this.styles.push(b);b=new d;b.name="Beetlejuice";b.navbar="indigo";b.button="slateblue";b.location="darkslateblue";b.selection="silver";b.sidepanel="lavender";b.mainpanel="white";b.toolpanel="white";b.navtext="#FBFBFB";b.content="mediumslateblue";b.search="#444";b.breadcrumb="#3087B3";b.separator="indigo";b.bannerProgress="#F2F2F2";this.styles.push(b);
b=new d;b.name="Red";b.navbar="#CD2127";b.button="#777777";b.location="#D85F56";b.selection="lightcoral";b.sidepanel="#EFDAB2";b.mainpanel="#FDFADD";b.toolpanel="#FDFADD";b.navtext="#FBFBFB";b.content="darkred";b.search="#D85F56";b.breadcrumb="darkred";b.separator="#CD2127";b.bannerProgress="#F2F2F2";this.styles.push(b)}function g(){return this.styles}d.prototype.name="Orion";d.prototype.navbar="#404648";d.prototype.button="#EFEFEF";d.prototype.location="#333";d.prototype.breadcrumb="#3087B3";d.prototype.separator=
"#333";d.prototype.selection="FEC";d.prototype.sidepanel="#FBFBFB";d.prototype.mainpanel="white";d.prototype.toolpanel="white";d.prototype.navtext="#bfbfbf";d.prototype.content="#3087B3";d.prototype.search="#444";d.prototype.bannerProgress="white";b.prototype.styles=[];b.prototype.getStyles=g;b.prototype.getThemeStorageInfo=function(){return{storage:"/themes",styleset:"styles",defaultTheme:"Orion2014",selectedKey:"selected",version:"5.0"}};b.prototype.getViewData=function(){var b={top:10,left:10,
width:350,height:350};b.shapes=[{type:"RECTANGLE",name:h["Navigation Bar"],x:10,y:10,width:350,height:32,family:"navbar",fill:"#333",order:1},{type:"TEXT",name:h["Navigation Text"],label:"UserName",x:290,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif"},{type:"ROUNDRECTANGLE",name:h["Search Box"],x:215,y:20,width:70,height:12,family:"search",fill:"#444",order:3},{type:"RECTANGLE",name:h["Tool Panel"],x:150,y:71,width:209,height:30,family:"toolpanel",fill:"white",order:4},{type:"RECTANGLE",
name:h["Selection Bar"],x:155,y:133,width:200,height:20,family:"selection",fill:"#FEC",order:7},{type:"RECTANGLE",name:h.Location,x:10,y:42,width:350,height:29,family:"location",fill:"#efefef",order:8},{type:"TEXT",name:h["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},{type:"TEXT",name:h.Content,label:"Breadcrumb",x:15,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"TEXT",name:h.Content,label:"/",x:78,y:60,family:"content",
fill:"#3087B3",font:"8pt sans-serif",order:9},{type:"TEXT",name:h.Content,label:"Location",x:84,y:60,family:"content",fill:"#3087B3",font:"8pt sans-serif"},{type:"RECTANGLE",name:h["Main Panel"],x:150,y:101,width:209,height:258,family:"mainpanel",fill:"white",order:6},{type:"ROUNDRECTANGLE",name:h.Button,x:155,y:76,width:37,height:20,family:"button",fill:"#EFEFEF",order:11},{type:"TEXT",name:h["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:h["Section Text"],label:"Section",x:30,y:94,family:"navbar",fill:"#333",font:"8pt sans-serif"},{type:"LINE",name:h["Line Color"],x1:150,y1:101,x2:360,y2:101,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:h["Line Color"],x1:150,y1:71,x2:150,y2:360,linewidth:2,fill:"#DEDEDE"},{type:"LINE",name:h["Line Color"],
x1:20,y1:100,x2:140,y2:100,linewidth:2,fill:"#DEDEDE"},{type:"RECTANGLE",name:h["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:h["Navigation Text"],label:"Navigator",x:60,y:30,family:"navtext",fill:"#bfbfbf",font:"8pt sans-serif",order:2},
{type:"TRIANGLE",name:"userMenu",x1:353,y1:24,x2:347,y2:24,x3:350,y3:29,family:"userMenu",fill:"#BFBFBF"},{type:"TRIANGLE",name:"userMenu",x1:20,y1:88,x2:26,y2:88,x3:23,y3:93,family:"userMenu",fill:"#BFBFBF"}];for(var c=0;c<3;c++)b.shapes.push({type:"TEXT",name:h.Content,label:"org.eclipse.orion.content",x:170,y:127+20*c,fill:"#3087B3",family:"content"});for(c=0;c<3;c++)b.shapes.push({type:"TEXT",name:h.Content,label:"Item",x:25,y:115+20*c,fill:"#3087B3",family:"content"});for(c=0;c<3;c++)b.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"});b.shapes.push({type:"IMAGE",name:"logo",x:15,y:18,source:"../../images/orion-transparent.png",family:"logo"});return b};b.prototype.processSettings=function(b){var c=new f.ThemeSheetWriter;(new i.TextTheme.getTheme("orionTheme")).setThemeClass("orionTheme",c.getSheet(b))};return{ThemeData:b,getStyles:g}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? = any character, * = any string):":"Type the name of a file to open (? = any character, * = any string):",Search:"Search","FileName FolderName":"FileName FolderName(Optional)","Searching...":"Searching...","Searching for occurrences of":'Searching for occurrences of: "${0}"',
name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","</a>":"</a>",">":">","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Report a Bug":"Report a Bug","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:",
"Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination","Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'.","Main Pages":"Main Pages","Related Links":"Related Links"});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(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/userAssistance/UATaskPanel",["orion/webui/littlelib"],function(h){function i(f,d,b){this.elements=b;this.taskPanel=document.createElement("div");this.taskPanel.className="UAContainer";this.taskPanel.innerHTML='<header class="UAHeader">Develop software from within the cloud</header>';this.elementNode=document.createElement("div");this.switchesContainer=document.createElement("div");this.switches=document.createElement("span");this.radioButtons=[];this.elementNode.className="UAContainer-body";
this.taskPanel.appendChild(this.elementNode);this.switchesContainer.className="UAContainer-switch-body";this.switches.className="UAContainer-switches";this.switchesContainer.innerHTML="";this.switchesContainer.appendChild(this.switches);this.taskPanel.appendChild(this.switchesContainer);d===!0?(this.container=document.createElement("div"),this.container.className="UAModal",this.container.appendChild(this.taskPanel),this.backdrop=document.createElement("div"),this.backdrop.className="UAModalBackground",
document.body.appendChild(this.backdrop),document.body.appendChild(this.container),h.addAutoDismiss([this.container],this.destroy.bind(this))):f.appendChild(this.taskPanel);this.chosenSwitch=this.createSwitch(null,!0);this.chosenSwitch.firstChild.className="chosenCircle";this.initialize();this.elements.forEach(this.createSwitch.bind(this))}i.prototype.elementNode=null;i.prototype.switchesContainer=null;i.prototype.switches=null;i.prototype.radioButtons=null;i.prototype.chosenSwitch=null;i.prototype.addElement=
function(f){var d=document.createElement("span");d.className="UAContainer-icon";d.innerHTML='<span class="workingSpan"><img src="'+f.image+'" id="'+f.label+'ImageNode" alt="'+f.alt+'" height="64" width="64"></span><span class="UAIcon-label"><span class="UALabel" id="'+f.label+'LabelNode" >'+f.label+"</span></span>";d.onmouseover=function(){document.getElementById(f.label+"ImageNode").src=f.secondaryImage;document.getElementById(f.label+"LabelNode").className="UALabel-live";d.className="UAContainer-icon-live"};
d.onmouseout=function(){document.getElementById(f.label+"ImageNode").src=f.image;document.getElementById(f.label+"LabelNode").className="UALabel";d.className="UAContainer-icon"};var b=this;d.onclick=function(){b.showMedia(f)};this.elementNode.appendChild(d)};i.prototype.clearElements=function(){this.elementNode.innerHTML=""};i.prototype.showMedia=function(f){this.clearElements();this.addElement(f);var d=document.createElement("span");d.className="UAContainer-media";d.innerHTML='<div></div><div></div><span class="mediaSpan"><img src="'+
f.media+'" alt="'+f.alt+'" height="300" width="400"></span>';this.elementNode.appendChild(d);setTimeout(function(){d.style.opacity=1},100);f=document.getElementById(f.label+"switch");this.chosenSwitch.firstChild.className="circle";this.chosenSwitch=f.parentNode;f.className="chosenCircle"};i.prototype.createSwitch=function(f){var d;d=f?f.label+"switch":"indexSwitch";var b=document.createElement("span");b.className="workingSpan";b.innerHTML='<div class="circle" id ="'+d+'"></div>';var g=this;b.onclick=
f?function(){g.showMedia(f)}:function(){g.initialize();g.chosenSwitch.firstChild.className="circle";g.chosenSwitch=b;g.chosenSwitch.firstChild.className="chosenCircle"};this.switches.appendChild(b);return this.radioButtons[this.radioButtons.length]=b};i.prototype.initialize=function(){this.clearElements();this.elements.forEach(this.addElement.bind(this))};i.prototype.destroy=function(){document.body.removeChild(this.backdrop);document.body.removeChild(this.container)};return i});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(h,i,f,d){function b(){}var g=null;b.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'<div class="dialog" role="dialog"><div class="dialogTitle"><span id="title" class="dialogTitleText layoutLeft"></span><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" id="closeDialog"></button></div><div id="dialogContent" class="dialogContent layoutBlock"></div><div id="buttons" class="dialogButtons"></div></div>',
_initialize:function(){var b=document.body;this.$frameParent=b;this.$$modalExclusions=this.$$modalExclusions||[];var c=document.createRange();c.selectNode(b);c=c.createContextualFragment(this.CONTAINERTEMPLATE);b.appendChild(c);this.$frame=b.lastChild;this.title&&f.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=f.$("#closeDialog",this.$frame);var a=this;this.$close.addEventListener("click",function(){a.hide()},!1);this.$parent=f.$(".dialogContent",this.$frame);
c=document.createRange();c.selectNode(this.$parent);b=c.createContextualFragment(this.TEMPLATE);this.messages&&f.processTextNodes(b,this.messages);this.$parent.appendChild(b);this.$buttonContainer=f.$(".dialogButtons",this.$frame);this._makeButtons();this.$frame.addEventListener("keydown",function(b){b.keyCode===f.KEY.ESCAPE?a.hide():b.keyCode===f.KEY.ENTER&&typeof a._defaultCallback==="function"&&a._defaultCallback()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent);
this.modal&&this._makeModal()},_makeButtons:function(){if(this.$buttonContainer&&Array.isArray(this.buttons)){var b=this;this.buttons.forEach(function(c){var a=d.createButton(c.text,c.callback);if(c.id)a.id=c.id,b["$"+a.id]=a;if(c.isDefault)b._defaultCallback=c.callback,b._defaultButton=a;b.$buttonContainer.appendChild(a)})}},_makeModal:function(){var b=this;this.$frame.addEventListener("blur",function(a){b.$lastFocusedElement=a.target},!0);this._modalListener=function(a){var c=!f.contains(b.$frame,
a.target);if(c)for(var d=0;d<b.$$modalExclusions.length;d++)if(f.contains(b.$$modalExclusions[d],a.target)){c=!1;break}c&&(window.setTimeout(function(){(b.$lastFocusedElement||b.$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,a=!1;this._addedBackdrop=[];for(var d=0;d<c.length;d++){for(var g=0;g<this.$$modalExclusions.length;g++)if(f.contains(this.$$modalExclusions[g],
c[d])){a=!0;break}!a&&c[d]!==b.$frame&&c[d].classList&&!c[d].classList.contains("tooltipContainer")&&(g=c[d],g.classList.contains("modalBackdrop")||(g.classList.add("modalBackdrop"),this._addedBackdrop.push(g)))}(c=f.lastTabbable(this.$buttonContainer)||f.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===f.KEY.TAB){var c=b._getFirstFocusField();c&&c!==a.target&&c.focus();f.stop(a)}},!1)},_addChildDialog:function(b){this.$$modalExclusions.push(b.$frame||b.$parent)},
_inModalExclusion:function(b){return this.$$modalExclusions.some(function(c){return b.$frame===c||b.$parent===c})},_bindElements:function(b){for(var c=0;c<b.childNodes.length;c++){var a=b.childNodes[c];a.id&&(this["$"+a.id]=a);this._bindElements(a)}},hide:function(b){!b&&g===this&&(g=null);typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,
!0));this.$frame.classList.remove("dialogShowing");f.setFramesEnabled(!0);typeof this._afterHiding==="function"&&this._afterHiding();var c=this;this.keepAlive||window.setTimeout(function(){c.destroy()},0)},show:function(b){if(this.modal)if(g){if(!g._inModalExclusion(this)){this.hide(!0);return}}else g=this;typeof this._beforeShowing==="function"&&this._beforeShowing();f.setFramesEnabled(!1);var c=f.bounds(this.$frame),a=f.bounds(document.documentElement),d;b?(d=f.bounds(b),b=d.top+d.height+4,d=d.left+
4,b+c.height>a.height&&(b=Math.max(0,a.height-c.height-4)),d+c.width>a.width&&(d=Math.max(0,a.width-c.width-4))):(d=Math.max(0,(a.width-c.width)/2),b=Math.max(0,(a.height-c.height)/2));this.$lastFocusedElement=document.activeElement;this.$frame.style.top=b+"px";this.$frame.style.left=d+"px";this.$frame.classList.add("dialogShowing");typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return f.firstTabbable(this.$parent)||
this._defaultButton||f.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){if(this.$frame)g===this&&(g=null),f.setFramesEnabled(!0),this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(b){b.classList.remove("modalBackdrop")}),this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0),this.$frameParent.removeChild(this.$frame),this.$parent=this.$frame=void 0}};b.prototype.constructor=
b;return{Dialog:b}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,orion/webui/littlelib,orion/PageLinks,orion/widgets/userAssistance/UATaskPanel,orion/webui/dialog".split(","),function(h,i,f,d,b){function g(b){this._displaySignOut=!0;this._init(b)}g.prototype={_init:function(b){this._dropdownNode=f.node(b.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=b.dropdown;this._serviceRegistry=b.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices=
{};this._noSeparator=b.noSeparator;this._dropDownItemClass=b.dropDownItemClass;this._keyAssistClass=b.keyAssistClass;if(b.signOut!==void 0)this._displaySignOut=b.signOut},isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},hasServices:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)>0},length:function(b){var c=0,a;for(a in b)b.hasOwnProperty(a)&&c++;return c},_makeMenuItem:function(b,
c){var a=document.createElement("span");a.role="menuitem";a.tabIndex=0;var d=document.createTextNode(b);a.appendChild(d);typeof this._dropDownItemClass==="string"?this._dropDownItemClass!==""&&a.classList.add(this._dropDownItemClass):a.classList.add("dropdownMenuItem");a.addEventListener("click",c,!1);a.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&c()},!1);return a},_renderAuthenticatedService:function(b){var c=this,a=this.authenticatedServices[b].authService;
if(a&&a.logout&&this._displaySignOut){var d=document.createElement("li"),f=this._makeMenuItem(h["Sign Out"],function(){a.logout().then(function(){c.addUserItem(b,a,c.authenticatedServices[b].label);localStorage.removeItem(b);localStorage.removeItem("lastLogin");for(var d=localStorage.length-1;d>=0;d--){var f=localStorage.key(d);f&&f.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(f)}a.getAuthForm(window.location.href).then(function(a){window.location=a})})});d.appendChild(f);this._dropdownNode.appendChild(d)}},
renderServices:function(){function b(d){a[d]||(a[d]=c.createDocumentFragment());return a[d]}var c=document,a=[],g=this._serviceRegistry;d.getPageLinksInfo(g,"orion.page.link.user").then(function(d){this._dropdown?this._dropdown.empty():this._dropdownNode&&f.empty(this._dropdownNode);d.getAllLinks().forEach(function(a){var d,g;if(a.category&&(g=/user\.(\d+)/.exec(a.category)))d=parseInt(g[1],10);if(typeof d!=="number"||isNaN(d))d=1;d=b(d);g=c.createElement("li");var 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;g.appendChild(j);d.appendChild(g);j.addEventListener("keydown",function(a){(a.keyCode===f.KEY.ENTER||a.keyCode===f.KEY.SPACE)&&j.click()},!1)}.bind(this));if(this.keyAssistFunction){var d=document.createElement("li"),i=this._makeMenuItem(h["Keyboard Shortcuts"],this.keyAssistFunction);typeof this._keyAssistClass===
"string"?this._keyAssistClass!==""&&i.classList.add(this._keyAssistClass):i.classList.add("key-assist-menuitem");d.appendChild(i);b(0).appendChild(d)}if(d=g.getServiceReferences("orion.page.getstarted")[0])i=d.getProperty("data"),d=document.createElement("li"),i=this._makeMenuItem("Getting Started",this.getStartedDialog.bind(this,i)),d.appendChild(i),b(0).appendChild(d);var m=this;a.sort(function(a,b){return a-b}).forEach(function(b,c){if(c<a.length-1&&!this._noSeparator){var d=document.createElement("li");
d.classList.add("dropdownSeparator");var e=document.createElement("span");e.classList.add("dropdownSeparator");d.appendChild(e);b.appendChild(d)}m._dropdownNode.appendChild(b)}.bind(this));if(this.isSingleService())for(var n in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(n)&&this._renderAuthenticatedService(n,0)}.bind(this))},getStartedDialog:function(d){new b(null,!0,d)},setKeyAssist:function(b){this.keyAssistFunction=b;this.renderServices()},addUserItem:function(b,c,a,d){d?
(this.unauthenticatedServices[b]&&delete this.unauthenticatedServices[b],this.authenticatedServices[b]={authService:c,label:a,data:d}):(this.authenticatedServices[b]&&delete this.authenticatedServices[b],this.unauthenticatedServices[b]=this.unauthenticatedServices[b]?{authService:c,label:a,pending:this.unauthenticatedServices[b].pending}:{authService:c,label:a});this.renderServices()}};g.prototype.constructor=g;return{UserMenu:g}});
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,b,g,e){function c(a){this._init(a)}c.prototype=new e.Dialog;c.prototype.TEMPLATE='<div role="search"><div><label id="fileNameMessage" for="fileName">${Type the name of a file to open (? = any character, * = any string):}</label></div><div><input id="fileName" type="text" class="setting-control" style="width:90%;"/></div><div id="progress" style="padding: 2px 0 0; width: 100%;"><img src="'+
d.toUrl("../../../images/progress_running.gif")+'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="results" style="max-height:250px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';c.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.ContentTypeRegistry(this._searcher.registry);
if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=a.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._initialText=a.initialText;this._message=a.message;this._nameSearch=!0;if(a.nameSearch!==void 0)this._nameSearch=a.nameSearch;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(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._initialize()};c.prototype._bindToDom=function(a){var c=this;c.$crawlingProgress.style.display="none";this._nameSearch?this.$fileName.setAttribute("placeholder",h["FileName FolderName"]):this.$fileName.setAttribute("placeholder",h.Search);this.$fileName.addEventListener("input",function(){c._time=+new Date;c._timeoutId&&clearTimeout(c._timeoutId);c._timeoutId=setTimeout(c.checkSearch.bind(c),
0)},!1);this.$fileName.addEventListener("keydown",function(a){if(a.keyCode===b.KEY.ENTER){var d=b.$("a",c.$results);if(d)b.stop(a),(g.isMac?a.metaKey:a.ctrlKey)?window.open(d.href):(window.location.href=d.href,c.hide())}},!1);a.addEventListener("keydown",function(a){var d,e,f;if(a.keyCode===b.KEY.DOWN||a.keyCode===b.KEY.UP)d=b.$$array("a",c.$results),e=document.activeElement,f=d.indexOf(e),a.keyCode===b.KEY.DOWN?f>=0?(e.classList.remove("treeIterationCursor"),d=f<d.length-1?d[f+1]:d[0],d.focus(),
d.classList.add("treeIterationCursor")):d.length>0&&(d=-1<d.length-1?d[0]:d[0],d.focus(),d.classList.add("treeIterationCursor")):f>=0?(e.classList.remove("treeIterationCursor"),e=c.$fileName,d=f>0?d[f-1]:e,d.focus(),f>0&&d.classList.add("treeIterationCursor")):d.length>0&&(d[d.length-1].focus(),d[d.length-1].classList.add("treeIterationCursor")),b.stop(a)});a.addEventListener("mouseup",function(a){a.target.focus()},!1);setTimeout(function(){if(c._forceUseCrawler||!c._fileService.getService(c._searcher.getSearchLocation()).search){var a=
c._searchOnRoot?c._searcher.getSearchRootLocation():c._searcher.getChildrenLocation(),a=new i.SearchCrawler(c._searcher.registry,c._fileService,"",{searchOnName:!0,location:a});c._searcher.setCrawler(a);a.buildSkeleton(function(){c.$crawlingProgress.style.display="inline";c.$progress.appendChild(document.createTextNode(h["Building file skeleton..."]))},function(){c.$crawlingProgress.style.display="none";c.$progress.removeChild(c.$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()};c.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)};c.prototype._detectFolderKeyword=function(a){var b,c=a,d=null;if(this._nameSearch&&(b=/(\S+)\s*(.*)/,(a=b.exec(a))&&a.length===3))a[1]&&
(c=a[1]),a[2]&&(d=a[2]);return{keyword:c,folderKeyword:d}};c.prototype.doSearch=function(){var a=this.$fileName.value;if(a){var c=this._detectFolderKeyword(a),d=this._searcher.createSearchParams(c.keyword,this._nameSearch,this._searchOnRoot),e=this._searchRenderer.makeRenderFunction(this._contentTypeService,this.$results,!1,this.decorateResult.bind(this));this.currentSearch=e;var f=document.createElement("div");f.appendChild(document.createTextNode(this._nameSearch?h["Searching..."]:g.formatMessage(h["Searching for occurrences of"],
a)));b.empty(this.$results);this.$results.appendChild(f);this._searcher.search(d,c.folderKeyword,function(){e===this.currentSearch&&e.apply(null,arguments)}.bind(this))}};c.prototype.decorateResult=function(a){function c(a){a.button===0&&!a.ctrlKey&&!a.metaKey&&d.hide()}for(var d=this,a=b.$$array("a",a),e=0;e<a.length;e++)a[e].addEventListener("click",c,!1)};c.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};c.prototype._afterHiding=function(){this._onHide&&this._onHide()};c.prototype.constructor=
c;return{OpenResourceDialog:c}});define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner">\n\t<\!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\>\n\n\t<div id="staticBanner" class="layoutBlock topRowBanner"> <\!-- primaryNav --\>\n\t\t<div id="centralNavigationArea" style="position:absolute;left:0;top:0;width:39px;height:36px; z-index:1;border-right:1px solid #ddd;"></div>\n\n\t\t<\!-- Static "Home" link. TODO delete this --\>\n\t\t<a id="home" class="layoutLeft "></a>\n\n\t\t<\!-- Left banner component: hamburger --\>\n\t\t<nav id="primaryNav" class="bannerLeftArea" style="z-index:2;" role="navigation">\n\t\t\t\t<button class="centralNavigation commandSprite core-sprite-hamburger" type="button"id="centralNavigation"></button>\n\t\t</nav>\n\n\t\t<\!-- Middle banner component: Breadcrumb bar --\>\n\t\t<div class="clear navigationBreadcrumb bannerMiddleArea" >\n\t\t\t<div id="location" class="currentLocation"></div>\n\t\t</div>\n\n\t\t<\!-- Right banner component: user identity --\>\n\t\t<div class="bannerRightArea" style="z-index:2;">\n\t\t\t<\!-- Global commands support. --\>\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\n\t\t\t<\!-- Search. TODO delete this --\>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search" style="display:none;">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;display:none;"></div>\n\n\t\t\t<\!-- User identity menu and Progress --\>\n\t\t\t<div id="userMenu" class="spacingRight layoutRight" style="color:#ccc;line-height:16px;">\n\t\t\t\t<div style="position: absolute;right: 0px;top:0;width: 39px;height:36px; z-index:-50;border-left: 1px solid #ddd;"></div>\n\n\t\t\t\t<\!-- Progress indicator --\>\n\t\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\n\t\t\t\t<\!-- User identity menu --\>\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger" style="z-index:2;">\n\t\t\t\t</span>\n\t\t\t\t<ul id="userDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<\!-- IDE notification messages go in here --\>\n\t<div id="notificationArea" class="notificationHide">\n\t\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t\t<div class="layoutRight"><button aria-label="Close" class="dismissButton layoutRight core-sprite-close imageSprite" type="button" id="closeNotifications"></span></div>\n\t</div>\n</header>'});
define("text!orion/banner/footer.html",[],function(){return'<\!--\n<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<div class="logoFooter commandSprite core-sprite-orion-logo"></div>\n\t<div class="footerBlock">${Orion is in Beta. Please try it out but BEWARE your data may be lost.}</div>\n\t<div class="footerRightBlock">\n\t\t<ul>\n\t\t\t<li><a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=5.0" target="_blank">${Report a Bug}</a>\n\t\t\t<li><a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a></li>\n\t\t\t<li><a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a></li>\n\t\t</ul>\n\t</div>\n</footer>\n--\>'});
define("text!orion/banner/toolbar.html",[],function(){return'<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>\n<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>\n<ul class="layoutLeft commandList pageActions" id="navActions"></ul>\n<div class="layoutLeft" style="padding-left:7px;padding-right:7px;margin-top:2px;" id="filterBox" style="visibility: hidden;"></div>\n<ul class="layoutRight commandList pageActions" id="settingsActions"></ul>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>'});
define("orion/widgets/input/DropDownMenu",["orion/objects","orion/webui/littlelib"],function(h,i){function f(d,b,f){if(d=i.node(d))this._parent=d;else throw Error("Parent node of dropdown menu not found");this.options=f=f||{};this.navDropDownId=this._parent.id+"_navdropdown";this.selectionClass=f.selectionClass;d=document.createElement("div");d.classList.add("dropDownContainer");d.id=this.navDropDownId;d.style.display="none";this._parent.appendChild(d);this._dropdownMenu=d;if(b=i.node(b))this._triggerNode=
b;else throw"Trigger node of dropdown menu not found";if(this._triggerNode.style.visibility==="hidden")this._triggerNode.style.visibility="visible";if(!f.noClick)this._triggerNode.onclick=this.click.bind(this);this._dropdownMenu.addEventListener("keydown",function(b){b.keyCode===i.KEY.ESCAPE&&this.clearPanel()}.bind(this))}h.mixin(f.prototype,{click:function(){this._dropdownMenu.style.display==="none"?this.updateContent(this.getContentNode(),function(){i.setFramesEnabled(!1);this._dropdownMenu.style.display=
"";this._positionDropdown();this.selectionClass&&this._triggerNode.classList.add(this.selectionClass);this.handle=i.addAutoDismiss([this._triggerNode,this._dropdownMenu],this.clearPanel.bind(this));if(this.options.onShow)this.options.onShow()}.bind(this)):this.clearPanel()},clearPanel:function(){if(this.isVisible()&&(this._dropdownMenu.style.display="none",i.setFramesEnabled(!0),this.selectionClass&&this._triggerNode.classList.remove(this.selectionClass),this.options.onHide))this.options.onHide()},
addContent:function(d){this._dropdownMenu.innerHTML=d},getContentNode:function(){return this._dropdownMenu},updateContent:function(d,b){b()},_positionDropdown:function(){this._dropdownMenu.style.right="";var d=i.bounds(this._dropdownMenu),b=i.bounds(document.body);if(d.left+d.width>b.left+b.width)d=i.bounds(this._boundingNode(this._triggerNode)),b=i.bounds(this._triggerNode),this._dropdownMenu.style.right=d.width-(b.left-d.left+b.width)+"px"},_boundingNode:function(d){var b=window.getComputedStyle(d,
null);return b===null?d:b.getPropertyValue("position")==="absolute"||!d.parentNode||d===document.body?d:this._boundingNode(d.parentNode)},isDestroyed:function(){return!this._dropdownMenu.parentNode},isVisible:function(){return this._dropdownMenu.style.display!=="none"&&!this.isDestroyed()},focus:function(){this._dropdownMenu.focus()},destroy:function(){if(this._parent)i.setFramesEnabled(!0),i.empty(this._parent),this._parent=this.select=null}});return f});define("orion/customGlobalCommands",[],function(){return{}});
define("orion/webui/SideMenu","orion/commands,orion/objects,orion/webui/littlelib,orion/PageLinks,orion/PageUtil,orion/URITemplate,orion/URL-shim,orion/util".split(","),function(h,i,f,d,b,g,e,c){function a(a,b){this.parentNode=f.node(a);this.contentNode=f.node(b);if(!this.parentNode)throw Error("Missing parentNode");this.menuitems=Object.create(null);this.categories=this.links=null;this.anchor=document.createElement("ul");this.anchor.classList.add("sideMenuList");this.parentNode.appendChild(this.anchor);
this.anchor.addEventListener("click",this._handleEvent.bind(this));this.anchor.addEventListener("touchstart",this._handleEvent.bind(this));this.anchor.addEventListener("focus",this._handleEvent.bind(this),!0);f.addAutoDismiss([this.anchor],this._expandMenu.bind(this,null))}function k(a){return!a.isRelatedLink}function j(a,b){var c=a.order,d=b.order;if(c<d)return-1;else if(d<c)return 1;return 0}function l(a,b){var c=a.source.order,d=b.source.order,c=typeof c==="number"?c:100,d=typeof d==="number"?
d:100;return c===d?a.textContent.localeCompare(b.textContent):c<d?-1:1}var m=c.isTouch;i.mixin(a.prototype,{LOCAL_STORAGE_NAME:"sideMenuNavigation",OPEN_STATE:"open",CLOSED_STATE:"closed",DEFAULT_STATE:"open",SIDE_MENU_OPEN_WIDTH:"40px",TRANSITION_DURATION_MS:301,addMenuItem:function(a,b,c){var d=this.anchor,a=this.createListItem(a,b);c&&a.classList.add("sideMenuItemActive");d.appendChild(a);this.menuitems[b]=a},setSideMenu:function(){var a=this.getDisplayState(),b=this.parentNode;if(b){if(a===this.CLOSED_STATE){this.setPageContentLeft("0");
if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){b.style.display="none"},this.TRANSITION_DURATION_MS);b.classList.add("animating")}if(a===this.OPEN_STATE){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;b.classList.remove("animating");b.style.display="block";b.style.width=this.SIDE_MENU_OPEN_WIDTH;this.setPageContentLeft(this.SIDE_MENU_OPEN_WIDTH)}}},setPageContentLeft:function(a){var b=this.contentNode;if(b)b.style.left=
a},toggleSideMenu:function(){var a=this.getDisplayState(),b=this.contentNode;b&&b.classList.add("content-fixedHeight-animation");a=a===this.OPEN_STATE?this.CLOSED_STATE:this.OPEN_STATE;a===this.DEFAULT_STATE?localStorage.removeItem(this.LOCAL_STORAGE_NAME):localStorage.setItem(this.LOCAL_STORAGE_NAME,a);this.setSideMenu()},clearMenuItems:function(){this.menuitems=[];f.empty(this.anchor)},getMenuItems:function(){var a=this.menuitems;return Object.keys(a).map(function(b){return a[b]})},getMenuItem:function(a){return this.menuitems[a]},
getDisplayState:function(){var a=localStorage.getItem(this.LOCAL_STORAGE_NAME);if(!a)a=this.DEFAULT_STATE;return a},createListItem:function(a,b){var c=document.createElement("li");c.className=a;c.classList.add("sideMenuItem");c.categoryId=b;return c},setCategories:function(a){this.categories=a;this.links=Object.create(null)},setPageLinks:function(a){this.pageLinks=a;var b=this,c=a.createLinkElements();a.getAllLinks().forEach(function(a,d){var e=c[d];e.source=a;b._getLinksBin(a.category).push(e)});
this._renderLinks()},setRelatedLinks:function(a,b){this.relatedLinks=a;var c=this;Object.keys(this.links).forEach(function(a){var b=c._getLinksBin(a);c.links[a]=b.filter(k)});var d=document.createDocumentFragment();a.forEach(function(a){var b=a.relatedLink,e=c._getLinksBin(b.category),a=h.createCommandMenuItem(d,a.command,a.invocation);a.classList.remove("dropdownMenuItem");a.isRelatedLink=!0;a.source=b;e.push(a)});this._renderLinks(b)},_getLinksBin:function(a){if(a){var b=this.links;b[a]=b[a]||[];
return b[a]}else return[]},_sort:function(){var a=this.links;Object.keys(a).forEach(function(b){a[b].sort(l)})},_renderCategories:function(){var a=this.categories,c=this,e=new URL(window.location.href),f=b.matchResourceParameters();f.OrionHome=d.getOrionHome();var h=!1;this.clearMenuItems();a.getCategoryIDs().map(function(b){return a.getCategory(b)}).sort(j).forEach(function(a){var b=c._getLinksBin(a.id);b.length&&(h?c.addMenuItem(a.imageClass,a.id,!1):(b=b.some(function(a){if(!a.source.uriTemplate)return!1;
a=new g(a.source.uriTemplate);a=new URL(a.expand(f),window.location);return a.protocol===e.protocol&&a.host===e.host&&a.hostname===e.hostname&&a.port===e.port&&a.pathname===e.pathname&&a.search===e.search?h=!0:!1}),c.addMenuItem(a.imageClass,a.id,b)))})},_renderLinks:function(a){a=a||[];this._sort();this._renderCategories();var b=this,c=window.location.href;Object.keys(this.menuitems).forEach(function(d){var e=b.getMenuItem(d);if(e){for(var f=b._getLinksBin(d).slice(),f=f.filter(function(b){var d=
b.source;return a.indexOf(d.id)>=0||!d.default&&!d.force&&b.href===c?!1:!0}),f=f.filter(function(a){a=a.source;return!(f.length>1&&a.default&&!a.force)}),g=f.length-1;g>0;g--)f[g].href===f[g-1].href&&f.splice(g,1);if(f.length){e.appendChild(b._createCategoryElement(d,e,f[0]));var h=document.createElement("ul");h.className="sideMenuSubMenu";f.forEach(function(a){var b=document.createElement("li");b.className="sideMenuSubMenuItem";var c=document.createElement("a");c.href=a;c.className="sideMenuSubMenuItemLink";
var d=document.createElement("span");d.innerHTML=a.innerHTML;d.className="sideMenuSubMenuItemSpan";c.appendChild(d);b.appendChild(c);h.appendChild(b)});e.appendChild(h)}}})},_createCategoryElement:function(a,b,c){var a=this.categories.getCategory(a),d;m?(d=document.createElement("button"),d.type="button"):(d=document.createElement("a"),d.href=c.href);d.className+=a.imageClass;d.classList.add("submenu-trigger");d.tabIndex="0";b.classList.remove(a.imageClass);return d},_handleEvent:function(a){var b=
a.target,a=a.type==="focus";if(b.tagName!=="A"||a)b.classList.contains("submenu-trigger")&&(m||a)&&this._expandMenu(f.$(".sideMenuSubMenu",b.parentNode))},_expandMenu:function(a){this.getMenuItems().forEach(function(b){b=f.$(".sideMenuSubMenu",b);a!==b&&b.classList.remove("expanded")});a&&a.classList.toggle("expanded")}});return a});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/keyBinding,orion/EventTarget,orion/commandRegistry,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/keyBinding,orion/breadcrumbs,orion/webui/littlelib,orion/webui/splitter,orion/webui/dropdown,orion/webui/tooltip,orion/contentTypes,orion/URITemplate,orion/keyAssist,orion/PageUtil,orion/widgets/themes/ThemePreferences,orion/widgets/themes/container/ThemeData,orion/Deferred,orion/widgets/UserMenu,orion/PageLinks,orion/webui/dialogs/OpenResourceDialog,text!orion/banner/banner.html,text!orion/banner/footer.html,text!orion/banner/toolbar.html,orion/widgets/input/DropDownMenu,orion/util,orion/customGlobalCommands,orion/fileClient,orion/webui/SideMenu,orion/objects".split(","),function(h,
i,f,d,b,g,e,c,a,k,j,l,m,n,r,o,p,q,t,w,A,v,B,x,H,G,D,u,z,s,C,y,E,O,F){var R,P,K,L,M,S,N,V;function ea(a,b){if(a.getLabel)return a.getLabel();else{var c=new B;c.resolve(b.properties.name);return c}}function ga(a){m.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 fa(a,b){var c=a.getServiceReferences("orion.core.auth");ba=[];var d=R.apply(this,arguments);if(d)for(var e=
0;e<c.length;e++){var f=c[e],g=a.getService(f);ea(g,f).then(function(a){g.getKey().then(function(b){ba.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(){aa[b]!==localStorage.getItem(b)&&(aa[b]=localStorage.getItem(b),g.getUser().then(function(c){d.addUserItem(b,g,a,c)},function(){d.addUserItem(b,g,a)}))},!1)})})}}function W(a){return a}function X(b,c,d,f,g){function h(a){for(var b={},c=a.getPropertyKeys(),
d,e=0;e<c.length;e++)d=c[e],b[d]=a.getProperty(d);return b}function j(a,b){var c=null;a.some(function(a){return b===a.getProperty("id")?!!(c=a):!1});return c}function i(a){var b=a.command;if(!b.visibleWhen||b.visibleWhen(c))return a.invocation=new e.CommandInvocation(c,c,null,b,f),(new B).resolve(a);else if(typeof g==="function")return n||(n=g()),B.when(n,function(d){if(d&&c===ca&&(!b.visibleWhen||b.visibleWhen(d)))return a.invocation=new e.CommandInvocation(d,d,null,b,f),a});return(new B).resolve()}
function k(a,b,c){return c?(new B).resolve({relatedLink:a,command:c}):b.then(function(b){return{relatedLink:a,command:new e.Command(b)}})}var l=arguments,m,n,o=b&&b.getServiceReferences("orion.page.link.related");if(o&&o.length!==0){var r=this;B.when(function(){if(m)return m;var a=b.getService("orion.core.contentTypeRegistry");a||(a=new p.ContentTypeRegistry(b),a=b.getService("orion.core.contentTypeRegistry"));return a.getContentTypes().then(function(a){return m=a})}(),function(){if(P.apply(r,l)){var c=
b.getServiceReferences("orion.navigate.command"),e=[];o.forEach(function(d){var g=h(d);if(g.id){var i;if((g.nls&&g.nameKey||g.name)&&g.uriTemplate)i=a._createCommandOptions(g,d,b,m,!0),e.push(k(g,i,null));else if(i=j(c,g.id)){var l=h(i),d={};F.mixin(d,l,g);(g=f.findCommand(g.id))?e.push(k(d,null,g)):(i=a._createCommandOptions(l,i,b,m,!0),e.push(k(d,i,null)))}}});B.all(e,W).then(function(a){a.sort(function(a,b){return a.command.name.localeCompare(b.command.name)});return B.all(a.map(i),W).then(function(b){var c=
[],b=b.filter(function(b,d){if(b)return!0;c.push(a[d]);return!1});K.call(r,f,b,c,d);L.apply(r,l)})})}})}}function ha(a){var b=m.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function Y(a){var b=window.getComputedStyle(a,null);return b===null?a:b.getPropertyValue("position")==="absolute"||!a.parentNode||a===document.body?a:Y(a.parentNode)}function Z(a){var b={},c=null;typeof a==="string"&&(a=m.node(a));a||(a=m.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=m.$(".slideParameters",c),b.parameterArea=m.$(".parameters",c),b.dismissArea=m.$(".parametersDismiss",c),b.notifications=m.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=m.$(".toolbarTarget",c.parentNode),b.toolbarTarget)))a=m.bounds(b.toolbarTarget),d=m.bounds(Y(b.toolbarTarget.parentNode)),b.toolbarTargetY=a.top-d.top,b.toolbar=c;return b}function $(a){if(a=a.slideContainer)if(a.style.left=
"",a.style.top="",a.classList.contains("slideContainerActive")){var b=m.bounds(a),c=m.bounds(a.parentNode);a.style.left=(c.width-b.width)/2+"px";a.style.top="0"}}var g=function(a){var b=document.createElement("a");b.href=a;return b.href}(i.toUrl("auth/NotifyAuthentication.html")),aa={},J=null;R=y.createMenuGenerator||function(a,b){if(m.node("userMenu")){var c=m.node("userDropdown"),d=new r.Dropdown({dropdown:c}),c=new x.UserMenu({dropdownNode:c,dropdown:d,serviceRegistry:a}),d=m.node("userTrigger");
new o.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}};P=y.beforeGenerateRelatedLinks||function(){return!0};K=y.addRelatedLinkCommands||function(a,b,c,d){this.sideMenu&&this.sideMenu.setRelatedLinks(b,d)};L=y.afterGenerateRelatedLinks||function(){};M=y.afterSetPageTarget||function(){};S=y.generateNavigationMenu||function(){var a=m.node("sideMenu");
if(a){var b=m.node("centralNavigation");new o.Tooltip({node:b,text:h.CentralNavTooltip,position:["right"]});J=this.sideMenu=new O(a,m.node("pageContent"));b.addEventListener("click",J.toggleSideMenu.bind(J));(a=m.node("sideMenuToggle"))&&a.addEventListener("click",J.toggleSideMenu.bind(J))}};N=y.afterGenerateNavigationMenu||function(){};V=y.afterGenerateBanner||function(){};var ba=[],ca,U=[],I,T=null,Q=null,da=new b;return{generateBanner:function(a,b,g,j,k,l,o,p){function r(a){a.registerService("orion.cm.managedservice",
{updated:function(a){for(var a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=m.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}(new A.ThemePreferences(j,new v.ThemeData)).apply();var q=m.node(a);if(!q)throw h["could not find banner parent, id was "]+a;var s=document.createRange();s.selectNode(q);s=s.createContextualFragment(D);m.processTextNodes(s,h);q.firstChild?q.insertBefore(s,q.firstChild):q.appendChild(s);q=m.node("home");q.href=
i.toUrl("edit/edit.html");q.setAttribute("aria-label",h["Orion Home"]);m.node("progressPane").src=e.NO_IMAGE;if(q=m.node("pageToolbar"))q.classList.add("toolbarLayout"),q.innerHTML=z+f.slideoutHTMLFragment("mainToolbar");(q=m.node("closeNotifications"))&&q.setAttribute("aria-label",h["Close notification"]);if(C.isFirefox<=17&&(q=m.node("staticBanner")))q.style.width="100%",q.style.MozBoxSizing="border-box";if(q=m.node("footer"))q.innerHTML=u,m.processTextNodes(q,h);g.setParameterCollector(new c.CommandParameterCollector(Z,
$));document.addEventListener("keydown",function(a){a.keyCode===m.KEY.ESCAPE&&(a=b.getService("orion.page.message"))&&a.setProgressMessage("")},!1);S.apply(this,arguments);N.apply(this,arguments);q=H.getCategoriesInfo(b);s=H.getPageLinksInfo(b,"orion.page.link");B.all([q,s]).then(function(a){if(J){var b=a[1];J.setCategories(a[0]);J.setPageLinks(b);J.setSideMenu()}});if(q=m.$(".split")){var s=m.$(".sidePanelLayout"),w=m.$(".mainPanelLayout");if(s&&w)T={side:s,main:w},T.splitter=new n.Splitter({node:q,
sidePanel:s,mainPanel:w,toggle:!0,closeByDefault:p}),q=new e.Command({name:h["Toggle side panel"],tooltip:h["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){T.splitter.toggleSidePanel()}}),g.addCommand(q),g.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new d.KeyBinding("l",C.isMac?!1:!0,!0,!1,C.isMac?!0:!1))}var x=!1,y=function(a,b){if(!x){var c=b.getService("orion.page.progress"),d=new G.OpenResourceDialog({searcher:a,progress:c,searchRenderer:a.defaultRenderer,
onHide:function(){x=!1}});window.setTimeout(function(){x=!0;d.show()},0)}},q=new e.Command({name:h["Find File Named..."],tooltip:h["Choose a file by name and open an editor on it"],id:"orion.openResource",callback:function(){y(k,b)}});g.addCommand(q);g.registerCommandContribution("globalActions","orion.openResource",100,null,!0,new d.KeyBinding("f",!0,!0));q=new e.Command({name:h["Toggle banner and footer"],tooltip:h["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=
m.node("banner"),b=m.node("footer"),c=m.node("sideMenu"),d=m.$(".content-fixedHeight"),e=a.style.visibility==="hidden";e?(a.style.visibility="visible",b.style.visibility="visible",d.classList.remove("content-fixedHeight-maximized"),c&&c.classList.remove("sideMenu-maximized")):(a.style.visibility="hidden",b.style.visibility="hidden",d.classList.add("content-fixedHeight-maximized"),c&&c.classList.add("sideMenu-maximized"));da.dispatchEvent({type:"toggleTrim",maximized:!e});return!0}});g.addCommand(q);
g.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new d.KeyBinding("m",!0,!0));q=new e.Command({name:h["System Configuration Details"],tooltip:h["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return i.toUrl("help/about.html")}});g.addCommand(q);g.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new d.KeyBinding(112,!0,!0));q=new e.Command({name:h["Background Operations"],tooltip:h["Background Operations Tooltip"],
id:"orion.backgroundOperations",hrefCallback:function(){return i.toUrl("operations/list.html")}});g.addCommand(q);g.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new d.KeyBinding("o",!0,!0));Q=new t.KeyAssistPanel({commandRegistry:g});q=new e.Command({name:h["Show Keys"],tooltip:h["Show a list of all the keybindings on this page"],id:"orion.keyAssist",callback:function(){Q.isVisible()?Q.hide():Q.show();return!0}});g.addCommand(q);g.registerCommandContribution("globalActions",
"orion.keyAssist",100,null,!0,new d.KeyBinding(191,!1,!0));ha(g);fa(b,q.callback);ga(b);window.addEventListener("hashchange",function(){g.processURL(window.location.href)},!1);window.setTimeout(function(){r(b)},0);V.apply(this,arguments)},getToolbarElements:Z,getMainSplitter:function(){return T},getKeyAssist:function(){return Q},getGlobalEventTarget:function(){return da},layoutToolbarElements:$,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,ca=a.target,X.call(this,e,a.target,U,a.commandService,a.makeAlternate)):(a.breadcrumbTarget||(d=d||a.task||a.name),b=a.name,X.call(this,e,{NoTarget:""},U,a.commandService,a.makeAlternate));(I=a.title)||(I=b?b+" - "+a.task:a.task);window.document.title=I;M.apply(this,arguments);if(b=a.breadCrumbContainer?m.node(a.breadCrumbContainer):
m.node("location")){m.empty(b);var f=e&&new E.FileClient(e),e=a.breadcrumbTarget||a.target,f=f&&e&&e.Location?f.fileServiceRootURL(e.Location):null;new l.BreadCrumbs({container:b,resource:e,rootSegmentName:d,workspaceRootSegmentName:c,workspaceRootURL:f,makeFinalHref:a.makeBreadcrumFinalLink,makeHref:a.makeBreadcrumbLink})}},setDirtyIndicator:function(a){if(I)I.charAt(0)==="*"&&!a&&(I=I.substring(1)),a&&I.charAt(0)!=="*"&&(I="*"+I),window.document.title=I;var b=m.node("dirty");if(b)b.textContent=
a?"*":""},setPageCommandExclusions:function(a){U=a},notifyAuthenticationSite:g}});
define("orion/urlUtils",["orion/PageUtil","orion/URL-shim"],function(h){return{detectValidURL:function(i){for(var f=/\[([^\]]*)\]\(([^\)]+)\)/g,d=f.exec(i),b=[],g=0;d;){if(d.length===3&&d[2].length>0){var e=new URL(d[2]);e.protocol!==":"&&h.validateURLScheme(e.href)&&(d.index>g&&b.push({segmentStr:i.substring(g,d.index)}),b.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&&b.push({segmentStr:i.substring(g)});return b},processURLSegments:function(h,
f){f.forEach(function(d){if(d.urlStr){var b=document.createElement("a");b.href=d.urlStr;b.appendChild(document.createTextNode(d.segmentStr))}else b=document.createElement("span"),b.textContent=d.segmentStr;h.appendChild(b)})}}});
define("orion/status",["i18n!orion/nls/messages","orion/webui/littlelib","orion/globalCommands","orion/urlUtils"],function(h,i,f,d){function b(b,c,a,d,f){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.message",this);this._operationsClient=c;this.notificationContainerDomId=f;this.domId=a;this.progressDomId=d||a;this._hookedClose=!1;this._timer=null;this._clickToDisMiss=!0;this._cancelMsg=null}var g;b.prototype={_init:function(){var b=i.node("closeNotifications");if(b&&
!this._hookedClose){b.style.cursor="pointer";this._hookedClose=!0;var c=i.node(this.notificationContainerDomId);i.addAutoDismiss([c],function(){this._clickToDisMiss&&this.close()}.bind(this));b.addEventListener("click",function(){this.close()}.bind(this));c.addEventListener("click",function(a){a&&a.target&&a.target.nodeName.toLowerCase()==="a"&&(a=i.$$("a",c))&&a.length&&a.length===1&&this.close()}.bind(this))}},close:function(){window.clearTimeout(this._timer);var b=i.node("closeNotifications");
this._cancelMsg&&this._cancelFunc&&b?(b.innerHTML="",b.classList.remove("cancelButton"),b.classList.add("dismissButton"),b.classList.add("core-sprite-close"),b.classList.add("imageSprite"),this._cancelFunc(),this._cancelMsg=null):this.setProgressMessage("")},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=f.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(b,c,a){this._init();this.currentMessage=b;var d=i.node(this.domId);
if(typeof a==="boolean"){var f=d.getAttribute("aria-live");d.setAttribute("aria-live",a?"polite":"off");window.setTimeout(function(){b===this.currentMessage&&(i.empty(d),d.appendChild(document.createTextNode(b)),window.setTimeout(function(){d.setAttribute("aria-live",f)},100))}.bind(this),100)}else i.empty(d),d.appendChild(document.createTextNode(b));typeof c==="number"&&window.setTimeout(function(){b===this.currentMessage&&(i.empty(d),d.appendChild(document.createTextNode("")))}.bind(this),c)},setErrorMessage:function(b){this._clickToDisMiss=
!0;this.currentMessage=b;this._init();var c=b.responseText||b.message||b;if(typeof c==="string")try{c=JSON.parse(c)}catch(a){}var b=c.Message||c,d="red";if(c.Severity)switch(c.Severity){case "Warning":d="#FFCC00";break;case "Error":d="red";break;case "Info":case "Ok":d="green"}c=document.createElement("span");c.style.color=d;c.appendChild(document.createTextNode(b));b=i.node(this.domId);i.empty(b);b.appendChild(c)},setProgressMessage:function(b){this._clickToDisMiss=!1;this._init();this.currentMessage=
b;var c=document.createElement("span");c.classList.add("progressIcon");var a=i.node(this.progressDomId);i.empty(a);a.appendChild(c);a.appendChild(document.createTextNode(b));c=i.node(this.notificationContainerDomId);c.classList.remove("notificationHide");if(b&&b.length>0)c.classList.add("progressNormal"),c.classList.add("notificationShow");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else c.classList.remove("notificationShow"),c.classList.add("notificationHide")},
setCancelFunction:function(b){this._cancelFunc=b},setProgressResult:function(b,c){this._clickToDisMiss=!1;this._cancelMsg=c;this.currentMessage=b;var a=b.responseText||b;if(typeof a==="string")try{a=JSON.parse(a)}catch(f){}this._init();var g=a.Message||a.toString(),l=h.UnknownError,m="core-sprite-information",n="progressNormal",r=document.createElement("span");r.classList.add("imageSprite");r.classList.add("progressIcon");var o=[];if(a.Severity)switch(a.Severity){case "Warning":l=h.UnknownWarning;
m="core-sprite-warning";n="progressWarning";o.push("progressInfo");o.push("progressError");o.push("progressNormal");this._clickToDisMiss=!0;break;case "Error":m="core-sprite-error";n="progressError";o.push("progressWarning");o.push("progressInfo");o.push("progressNormal");this._clickToDisMiss=!0;break;default:n="progressNormal",o.push("progressWarning"),o.push("progressError"),o.push("progressNormal")}o.push("notificationHide");r.classList.add(m);var p=i.node(this.progressDomId),m=i.node(this.notificationContainerDomId);
i.empty(p);p.appendChild(r);g===Object.prototype.toString()&&(g=l);if(a.HTML)a=document.createElement("span"),a.innerHTML=g,p.appendChild(a);else{if(l=d.detectValidURL(g))g=document.createDocumentFragment(),d.processURLSegments(g,l),Array.prototype.forEach.call(i.$$("a",g),function(a){a.target="_blank"});else{if(a.Severity!=="Warning"&&a.Severity!=="Error"&&!c)this._timer&&window.clearTimeout(this._timer),this._timer=window.setTimeout(function(){this.setProgressMessage("");this._timer=null}.bind(this),
5E3);g=document.createTextNode(g)}p.appendChild(g)}if(n&&this.progressDomId!==this.domId){m.classList.add(n);for(n=0;n<o.length;n++)m.classList.remove(o[n])}m.classList.add("notificationShow");if(o=i.node("closeNotifications"))this._cancelMsg?(o.classList.add("cancelButton"),o.classList.remove("dismissButton"),o.classList.remove("core-sprite-close"),o.classList.remove("imageSprite"),o.innerHTML=this._cancelMsg):(o.innerHTML="",o.classList.remove("cancelButton"),o.classList.add("dismissButton"),o.classList.add("core-sprite-close"),
o.classList.add("imageSprite"))},showWhile:function(b,c){var a=this;if(c){a.setProgressMessage(c);var d=function(){c===a.currentMessage&&a.setProgressMessage("")};b.then(d,d)}return b},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(b,c){return new g(this,++this._lastProgressId,b,c)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var b="",c=!0,a;for(a in this._progressMonitors)this._progressMonitors[a].status&&(c||(b+=", "),b+=this._progressMonitors[a].status,
c=!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()}};b.prototype.constructor=
b;g=function(b,c,a,d){this.statusService=b;this.progressId=c;if(a){this.deferred=a;this.begin(d);var f=this;a.then(function(){f.done.bind(f)()},function(){f.done.bind(f)()})}};g.prototype.begin=function(b){this.status=b;this.statusService._beginProgressMonitor(this)};g.prototype.done=function(b){this.status=b;this.statusService._doneProgressMonitor(this)};g.prototype.worked=function(b){this.status=b;this.statusService._workedProgressMonitor(this)};g.prototype.constructor=g;return{StatusReportingService:b,
ProgressMonitor:g}});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(h,i,f,d){function b(){}b.prototype={_initialize:function(b,e,c,a,i){this._tooltip=new d.Tooltip({node:b,hideDelay:i||0,afterShowing:this._afterShowingFunction(e).bind(this),afterHiding:c,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";b=document.createRange();b.selectNode(this.$parent);b=b.createContextualFragment(this.TEMPLATE);this.messages&&
f.processTextNodes(b,h);this.$parent.appendChild(b);var j=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===f.KEY.ESCAPE&&j.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(b){for(var d=0;d<b.childNodes.length;d++){var c=b.childNodes[d];c.id&&(this["$"+c.id]=c);this._bindElements(c)}},_afterShowingFunction:function(b){return function(){b&&b.bind(this)();if(!this.customFocus){var d=f.firstTabbable(this.$parent);
d&&d.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};b.prototype.constructor=b;return{PopupDialog:b}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(h,i,f,d){var b={};(function(){var g=!1;b.updateNavTools=function(b,c,a,d,j,i){var m=f.node(d);if(m)c.destroy(m);else throw h["could not find toolbar "]+d;c.renderCommands(d,m,i,a,"button");if(j&&(d=f.node(j)))c.destroy(d),c.renderCommands(j,d,null,a,"button");g||(g=!0,b.getService("orion.page.selection").addEventListener("selectionChanged",function(b){var d=f.node(j);
d&&(c.destroy(d),c.renderCommands(j,d,b.selections,a,"button"))}))};b.createOperationsCommands=function(b,c,a){function f(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var g=new d.Command({name:h["Remove Completed"],tooltip:h["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){c.loadOperations.bind(c)()})},visibleWhen:function(){return!0}});b.addCommand(g);
g=new d.Command({name:h.Remove,tooltip:h["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(b){for(var b=Array.isArray(b.items)?b.items:[b.items],d=0;d<b.length;d++){var e=b[d];a.removeOperation.bind(a)(e.Location).then(function(){c.loadOperations.bind(c)()},function(){c.loadOperations.bind(c)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!f(a);for(var b in a)if(f(a[b]))return!1;return!0}});b.addCommand(g);
g=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 f(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!f(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;return!0}});b.addCommand(g)}})();
return b});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(h,i,f,d,b){function g(b){this._options=b}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(d){this._myOperations=[];this._operationsDeferreds=[];this._commandService=d.commandRegistry;b.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(d.triggerNode)};g.prototype._bindToDom=function(){this.$allOperationsLink.href=i.toUrl("operations/list.html");this._setOperationsVisibility()};g.prototype.setOperations=function(b,c){this._myOperations||this._init(this._options);this._myOperations=
[];this._operationsDeferreds=[];if(b)for(var a in b)this._myOperations.push(b[a]),this._operationsDeferreds.push(c[a]);this._renderOperations()};g.prototype.parseProgressResult=function(b){if(!b)return{};b=b.responseText||b;try{b=JSON.parse(b)}catch(c){}var a={Message:b.Message||b,Severity:b.Severity};if(b.DetailedMessage&&b.DetailedMessage!==a.Message)a.DetailedMessage=b.DetailedMessage;return a};g.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,this._myOperations,
this._operationsDeferreds)};g.prototype._renderOperationsTable=function(b,c,a){f.empty(b);for(var d=0;d<c.length;d++){var g=c[d],i=document.createElement("tr"),m=document.createElement("td");m.style.paddingLeft="5px";m.style.paddingRight="5px";m.textContent=g.Name;i.appendChild(m);var n=document.createElement("div");m.appendChild(n);m=document.createElement("span");m.style.paddingRight="5px";m.classList.add("imageSprite");switch(g.type){case "Warning":m.classList.add("core-sprite-warning");m.setAttribute("aria-label",
h["Operation resulted in a warning."]);break;case "error":m.classList.add("core-sprite-error");m.setAttribute("aria-label",h["Operation resulted in an error."]);break;case "loadstart":case "progress":m.classList.add("core-sprite-start");m.setAttribute("aria-label",h["Operation is running."]);break;case "abort":m.classList.add("core-sprite-stop");m.setAttribute("aria-label",h["Operation is canceled."]);break;case "load":case "loadend":m.classList.add("core-sprite-ok"),m.setAttribute("aria-label","Operation ok.")}n.appendChild(m);
m=document.createElement("span");m.classList.add("operationStatus");m.textContent=g.Name;n.appendChild(m);if(g.error){var r=g.error.Message||g.error;g.error.DetailedMessage&&g.error.DetailedMessage!==""&&(r+=": "+g.error.DetailedMessage);m.textContent=r;m.classList.remove("operationStatus");m.classList.add("operationError")}this._commandService.renderCommands("operationsDialogItems",n,{operation:g,deferred:a[d]},this,"tool");b.appendChild(i)}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,b){function g(c,a){if(!this._progressPane){this._progressPane=d.node(c);this._operationsDialog=new b.OperationsDialog({triggerNode:this._progressPane,commandRegistry:a});var e=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===d.KEY.ENTER)&&e._operationsDialog.show()})}}function e(b,a,d,e){this._serviceRegistry=
b;this._serviceRegistration=b.registerService("orion.page.progress",this);this._commandRegistry=d;this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=e}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 d=
{},e;for(e in b)b[e].progressMonitor||(d[e]=b[e]);if(this._isEmpty(d))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 f="";for(e in d){var g=d[e];if(g.type&&(g.type==="loadstart"||g.type==="progress")){f="running";break}}switch(f){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(d,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};
g.prototype.constructon=g;e.prototype={init:function(b){if(!this._progressMonitorClass)this._progressMonitorTool=new g(b,this._commandRegistry)},progress:function(b,a,d){var e=this,f=this._operationsIndex++;!d&&this._progressMonitorClass&&(d=new this._progressMonitorClass,d.begin(a));b.then(function(){if(e._operations[f]){var g=e._operations[f];if(a)g.Name=a;e._lastOperation=g;g.type="loadend";if(d)g.progressMonitor=d;e.writeOperation.bind(e)(f,g,b);g.Location||e._removeOperationFromTheList.bind(e)(f)}},
function(g){if(e._operations[f]){var h=e._operations[f];if(a)h.Name=a;if(d)h.progressMonitor=d;e._lastOperation=h;h.type=g.canceled?"abort":"error";h.error=g;e.writeOperation.bind(e)(f,h,b);h.Location||e._removeOperationFromTheList.bind(e)(f)}},function(g){if(a)g.Name=a;if(d)g.progressMonitor=d;e.writeOperation.bind(e)(f,g,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,d){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);var e=this;b.then(function(){e._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){d?e._serviceRegistry.getService("orion.page.message").setProgressMessage(""):
e.setProgressResult.bind(e)(a);return a});return this.progress(b,a)},writeOperation:function(b,a,d){this._operations[b]=a;this._operationDeferrds[b]=d;a.Location&&this._serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(b){b.put(a.Location,{Name:a.Name,expires:a.expires})});a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};e.prototype.constructor=e;return{ProgressService:e}});
define("orion/operationsTable",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/explorers/explorer","orion/operationsCommands"],function(h,i,f,d,b){var g={};g.OperationsExplorer=function(){function e(b,a,d,e,f,h,i,r){this.parentId=f;this.registry=b;this.commandRegistry=a;this.selection=d;this.toolbarId=h;this.selectionToolsId=i;this.operationsClient=e;this.actionScopeId=r;this.renderer=new g.OperationsRenderer({commandService:a,actionScopeId:this.actionScopeId},this)}
e.prototype=new d.Explorer;e.prototype.loadOperations=function(){var b=this;this.operationsClient.getOperations().then(function(a){for(var d=a.keys(),e={},f=0;f<d.length;f++){var g=d[f],h=a.get(g);h.Location=g;e[g]=h;if(h.expires&&(new Date).getTime()>h.expires)a.remove(g),delete e[g];else{var i=function(){e[this].operation=e[this].operation||{};e[this].operation.type="loadend";b.changedItem(this)},o=function(a){e[this].operation=a;b.changedItem(this)},p=function(d){d.canceled?(h.deferred=b.operationsClient.getOperation(this),
h.deferred.then(i.bind(this),p.bind(this),o.bind(this))):d.HttpCode==404&&d.JsonData&&d.JsonData.taskNotFound?(a.remove(this),delete e[this],b._loadOperationsList.bind(b)(e)):(e[this].operation=e[this].operation||{},e[this].operation.type=d.Severity=="Cancel"?"abort":"error",e[this].operation.error=d,b.changedItem(this))};h.deferred=b.operationsClient.getOperation(g);h.deferred.then(i.bind(g),p.bind(g),o.bind(g))}}b._loadOperationsList.bind(b)(e)},function(a){var d=[];d.Severity="Error";d.HTML=!1;
try{var e=JSON.parse(a);d.Message=e.DetailedMessage?e.DetailedMessage:e.Message}catch(f){d.Message=a}b.serviceRegistry.getService("orion.page.message").setProgressResult(d)})};e.prototype._loadOperationsList=function(c){this.operations=c;b.updateNavTools(this.registry,this.commandRegistry,this,this.toolbarId,this.selectionToolsId,this.operations);this.model=new g.OperationsModel(c);this.createTree(this.parentId,this.model);this.getNavHandler().refreshModel(this.getNavDict(),this.model,c)};e.prototype.changedItem=
function(b){var b=this.model.getItem.bind(this.model)(b),a=this.getRow(b);f.empty(a);this.renderer.renderRow(b,a)};return e}();g.OperationsModel=function(){function b(c){this.operations=c;this.rootId="operations";this.root={type:"operations"}}b.prototype=new d.ExplorerModel;b.prototype.getRoot=function(b){b(this.root)};b.prototype.getItem=function(b){var a=this.operations[b];a.Location=b;return a};b.prototype.getChildren=function(b,a){if(!b||!b.type==="operations")a([]);else{var d=[],e;for(e in this.operations)d.push(this.getItem(e));
a(d)}};return b}();g.OperationsRenderer=function(){function b(c,a){this._init(c);this.options=c;this.explorer=a}b.prototype=new d.SelectionRenderer;b.prototype.getCellHeaderElement=function(b){if(!this.options.minimal){var a;switch(b){case 0:return b=document.createElement("th"),b.style.height="8px;",a=document.createElement("h2"),b.appendChild(a),a.textContent=h.Name,b;case 1:return b=document.createElement("th"),b.style.height="8px;",a=document.createElement("h2"),b.appendChild(a),a.textContent=
h.Actions,b;case 2:return b=document.createElement("th"),b.style.height="8px;",a=document.createElement("h2"),b.appendChild(a),a.textContent=h.Status,b;case 3:return b=document.createElement("th"),b.style.height="8px;",a=document.createElement("h2"),b.appendChild(a),a.textContent=h.Scheduled,b}}};b.prototype.getCellElement=function(b,a,d){switch(b){case 0:b=document.createElement("td");d=document.createElement("div");b.appendChild(d);var e=document.createElement("span");d.appendChild(e);e.classList.add("imageSprite");
var f=document.createElement("span");d.appendChild(f);f.classList.add("mainNavColumn");f.appendChild(document.createTextNode(a.Name));if(a.operation)switch(a.operation.type){case "Warning":e.classList.add("core-sprite-warning");break;case "error":e.classList.add("core-sprite-error");break;case "loadstart":case "progress":e.classList.add("core-sprite-start");break;case "abort":e.classList.add("core-sprite-stop");break;case "load":case "loadend":e.classList.add("core-sprite-ok")}return b;case 1:return this.getActionsColumn(a,
d);case 2:return d="",a.operation&&a.operation.error&&(d=a.operation.error.Message||a.operation.error,a.operation.error.DetailedMessage&&a.operation.error.DetailedMessage!==""&&(d+=": "+a.operation.error.DetailedMessage)),b=document.createElement("td"),b.textContent=d,b;case 3:return a.operation&&a.operation.timestamp&&parseInt(a.operation.timestamp)>0?(b=document.createElement("td"),b.textContent=(new Date(parseInt(a.operation.timestamp))).toLocaleString(),b):document.createElement("td")}};return b}();
return g});
define('built-list.js',"i18n!orion/operations/nls/messages,require,orion/bootstrap,orion/commandRegistry,orion/selection,orion/fileClient,orion/searchClient,orion/operationsClient,orion/status,orion/progress,orion/globalCommands,orion/operationsTable,orion/operationsCommands".split(","),function(h,i,f,d,b,g,e,c,a,k,j,l,m){f.startup().then(function(f){var i=f.serviceRegistry,f=f.preferences,o=new b.Selection(i),p=new d.CommandRegistry({selection:o}),q=new g.FileClient(i),q=new e.Searcher({serviceRegistry:i,commandService:p,
fileService:q}),t=new c.OperationsClient(i);new a.StatusReportingService(i,t,"statusPane","notifications","notificationArea");new k.ProgressService(i,t,p);o=new l.OperationsExplorer(i,p,o,t,"tasks-list","pageActions","selectionTools","operationItems");j.generateBanner("orion-operationList",i,p,f,q);j.setPageTarget({task:"Operations",serviceRegistry:i,commandService:p});m.createOperationsCommands(p,o,t);p.addCommandGroup("pageActions","eclipse.taskGroup.unlabeled",100);p.addCommandGroup("selectionTools",
"eclipse.selectionGroup",500,h.More);p.registerCommandContribution("pageActions","eclipse.removeCompletedOperations",1,"eclipse.taskGroup.unlabeled");p.registerCommandContribution("operationItems","eclipse.removeOperation",1);p.registerCommandContribution("selectionTools","eclipse.removeOperation",1,"eclipse.selectionGroup");p.registerCommandContribution("operationItems","eclipse.cancelOperation",2);p.registerCommandContribution("selectionTools","eclipse.cancelOperation",2,"eclipse.selectionGroup");
o.loadOperations.bind(o)()})});