/**
 * @license RequireJS i18n 1.0.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs 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). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * 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) 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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 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) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others 
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors:
 * IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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
 * 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) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://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 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: Anton McConville - IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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
 *     Andy Clement (vmware) - bug 344614
 *******************************************************************************/
/**
 * @license RequireJS text 1.0.7 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs for details
 */
/*******************************************************************************
 * @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) 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, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 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) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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) 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, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - _initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and 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) 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) 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 1.0.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
 Available via the MIT or new BSD license.
 see: http://github.com/jrburke/requirejs 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 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.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(d,f,c,b,a,j){f[d]&&(c.push(d),(f[d]===!0||f[d]===1)&&b.push(a+d+"/"+j))}function i(d,f,c,b,a){f=b+f+"/"+a;require._fileExists(d.toUrl(f))&&c.push(f)}var g=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,e={};define("i18n",{version:"1.0.0",load:function(d,f,c,b){var b=b||{},a=g.exec(d),j=a[1],k=a[4],n=a[5],l=k.split("-"),q=[],r={},o,m,p="";a[5]?(j=a[1],d=j+n):(n=a[4],k=b.locale||(b.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
l=k.split("-"));if(b.isBuild){q.push(d);i(f,"root",q,j,n);for(o=0;m=l[o];o++)p+=(p?"-":"")+m,i(f,p,q,j,n);f(q,function(){c()})}else f([d],function(a){var b=[];h("root",a,b,q,j,n);for(o=0;m=l[o];o++)p+=(p?"-":"")+m,h(p,a,b,q,j,n);f(q,function(){var k,d;for(k=b.length-1;k>-1&&(m=b[k]);k--){d=a[m];if(d===!0||d===1)d=f(j+m+"/"+n);var l=r,p=void 0;for(p in d)!(p in e)&&!(p in l)&&(l[p]=d[p])}c(r)})})}})})();
define("orion/i18n",[],function(){return{load:function(h,i,g,e){var e=e||{},d=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,f=d.exec(h);if(f)if(i.defined(h))g(i(h));else if(e.isBuild||e.isTest)g({});else{var c=f[1],b=f[3]?f[2]:"",a=f[3]||f[2];i(["orion/bootstrap"],function(j){j.startup().then(function(j){var n=j.serviceRegistry,j=n.getServiceReferences("orion.i18n.message");if(b)j.some(function(a){return h===a.getProperty("name")?(n.getService(a).getMessageBundle().then(function(a){g(a)},function(){g({})}),
!0):!1})||g({});else{var l={},q;j.forEach(function(j){var k=j.getProperty("name");if((f=d.exec(k))&&c===f[1]&&a===(f[3]||f[2]))if(b=f[3]?f[2]:""){if((j=e.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&j.indexOf(b)===0)l[b]=!0,i.specified(k)||define(k,["orion/i18n!"+k],function(a){return a})}else q=j});i.specified(h)?g(l):q?n.getService(q).getMessageBundle().then(function(a){Object.keys(l).forEach(function(b){typeof a[b]==="undefined"&&(a[b]=l[b])});define(h,
[],a);g(a)},function(){define(h,[],l);g(l)}):(define(h,[],l),g(l))}})})}else g(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 g={root:i};Object.keys(h).forEach(function(e){typeof g[e]==="undefined"&&(g[e]=h[e])});return g});
(function(h,i){typeof define==="function"&&define.amd?define("orion/Deferred",[],i):typeof exports==="object"?module.exports=i():(h.orion=h.orion||{},h.orion.Deferred=i())})(this,function(){function h(){for(var j;j=c.shift()||b.shift();)j();a=!1}function i(j,k){(k?b:c).push(j);a||(a=!0,k?setTimeout(h,0):h())}function g(a){return function(){a.apply(null,arguments)}}function e(){}function d(){var a=Error("Cancel");a.name="Cancel";return a}function f(){function a(){for(var j;j=l.shift();){var d=j.deferred,
f=c==="resolved"?"resolve":"reject";if(typeof j[f]==="function")try{var p=j[f](b);p&&typeof p.then==="function"?(d.cancel=p.cancel||e,p.then(g(d.resolve),g(d.reject),d.progress)):d.resolve(p)}catch(q){d.reject(q)}else d[f](b)}}var b,c,l=[],q=this;this.reject=function(d){c||(c="rejected",b=d,l.length&&i(a));return q.promise};this.resolve=function(d){c||(c="resolved",b=d,l.length&&i(a));return q.promise};this.progress=function(a){c||l.forEach(function(b){b.progress&&b.progress(a)});return q.promise};
this.cancel=function(){c||q.reject(d())};this.then=function(b,k,d){var b={resolve:b,reject:k,progress:d,deferred:new f},e=b.deferred,q=this.cancel.bind(this),g=function(){i(function(){(e.cancel===g?q:e.cancel)()},!0)};e.cancel=g;k=e.promise;k.cancel=function(){e.cancel()};l.push(b);c&&i(a,!0);return k};this.promise={then:this.then,cancel:this.cancel}}var c=[],b=[],a=!1;f.all=function(a,b){function c(a,b){i||(g[a]=b,--e===0&&h.resolve(g))}function d(a,j){if(!i){if(b)try{c(a,b(j));return}catch(l){j=
l}h.reject(j)}}var e=a.length,g=[],i=!1,h=new f;h.then(null,function(){i=!0;a.forEach(function(a){a.cancel&&a.cancel()})});e===0?h.resolve(g):a.forEach(function(a,b){a.then(c.bind(null,b),d.bind(null,b))});return h.promise};f.when=function(a,b,c,d){var e;if(!(a&&typeof a.then==="function"))e=new f,e.resolve(a),a=e.promise;return a.then(b,c,d)};return f});
define("orion/EventTarget",[],function(){function h(){this._namedListeners={}}h.prototype={dispatchEvent:function(i){if(!i.type)throw Error("unspecified type");var g=this._namedListeners[i.type];g&&g.forEach(function(e){try{typeof e==="function"?e(i):e.handleEvent(i)}catch(d){typeof console!=="undefined"&&console.log(d)}});return!i.defaultPrevented},addEventListener:function(i,g){if(typeof g==="function"||g.handleEvent)this._namedListeners[i]=this._namedListeners[i]||[],this._namedListeners[i].push(g)},
removeEventListener:function(i,g){var e=this._namedListeners[i];if(e)for(var d=0;d<e.length;d++)if(e[d]===g){e.length===1?delete this._namedListeners[i]:e.splice(d,1);break}}};h.prototype.constructor=h;h.attach=function(i){var g=new h;i.dispatchEvent=g.dispatchEvent.bind(g);i.addEventListener=g.addEventListener.bind(g);i.removeEventListener=g.removeEventListener.bind(g)};return h});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(h,i){function g(b,a,j){this._properties=j||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function e(b,a,j){this._serviceId=b;this._serviceReference=a;this._internalRegistry=j}function d(b,a){function j(j){return function(){var k;try{if(!a())throw Error("Service was unregistered");var c=b[j].apply(b,Array.prototype.slice.call(arguments));if(c&&typeof c.then==="function")return c;
else k=new h,k.resolve(c)}catch(d){k=new h,k.reject(d)}return k.promise}}for(var k in b)typeof b[k]==="function"&&(this[k]=j(k))}function f(b,a){this.type=b;this.serviceReference=a}function c(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new i;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var j=b._entries[a];if(!j)throw Error("already unregistered");var k=j.reference;b._serviceEventTarget.dispatchEvent(new f("unregistering",
k));b._entries[a]=null;k.getProperty("objectClass").forEach(function(a){for(var j=b._namedReferences[a],c=0;c<j.length;c++)if(j[c]===k){j.length===1?delete b._namedReferences[a]:j.splice(c,1);break}})},modifyService:function(a){a=b._entries[a];if(!a)throw Error("already unregistered");b._serviceEventTarget.dispatchEvent(new f("modified",a.reference))}}}g.prototype={getPropertyKeys:function(){var b=[],a;for(a in this._properties)this._properties.hasOwnProperty(a)&&b.push(a);return b},getProperty:function(b){return this._properties[b]}};
g.prototype.constructor=g;e.prototype={unregister:function(){this._internalRegistry.unregisterService(this._serviceId)},getReference:function(){if(!this._internalRegistry.isRegistered(this._serviceId))throw Error("already unregistered");return this._serviceReference},setProperties:function(b){var a=this._serviceReference._properties;this._serviceReference._properties=b||{};b["service.id"]=this._serviceId;b.objectClass=a.objectClass;b["service.names"]=a["service.names"];this._internalRegistry.modifyService(this._serviceId)}};
e.prototype.constructor=e;c.prototype={getService:function(b){var a;if(typeof b==="string")(b=this._namedReferences[b])&&b.some(function(b){a=this._entries[b.getProperty("service.id")].service;return!!a},this);else if(b=this._entries[b.getProperty("service.id")])a=b.service;return a||null},getServiceReferences:function(b){if(b)return this._namedReferences[b]?this._namedReferences[b]:[];var a=[];this._entries.forEach(function(b){b&&a.push(b.reference)});return a},registerService:function(b,a,j){if(typeof a===
"undefined"||a===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var k=this._entries.length,c=new g(k,b,j),l=this._namedReferences;b.forEach(function(a){l[a]=l[a]||[];l[a].push(c)});b=new d(a,this._internalRegistry.isRegistered.bind(null,k));this._entries.push({reference:c,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new f("registered",c));return new e(k,c,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,
a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};c.prototype.constructor=c;return{ServiceRegistry:c}});
define("orion/xhr",["orion/Deferred"],function(h){function i(g,e,d,f){var c=typeof d.response!=="undefined"?d.response:d.responseText,b;try{b=d.status}catch(a){b=0}g={args:e,response:c,responseText:typeof c==="string"?c:null,status:b,url:g,xhr:d};if(typeof f!=="undefined")g.error=f;return g}return function(g,e,d){var d=d||{},f=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,c=new h,b=d.headers||{},a=d.log||!1,j;typeof b["X-Requested-With"]==="undefined"&&(b["X-Requested-With"]="XMLHttpRequest");
if(typeof d.data!=="undefined"&&(g==="POST"||g==="PUT"))j=d.data;if(typeof d.responseType==="string")f.responseType=d.responseType;f.onprogress=function(a){a.xhr=f;c.progress(a)};f.onreadystatechange=function(){if(f.readyState===4){var b=i(e,d,f),j=f.status;200<=j&&j<400?c.resolve(b):(a&&typeof console!=="undefined"&&console.log(Error(f.statusText)),c.reject(b))}};try{f.open(g,e,!0);if(typeof d.timeout==="number")if(typeof f.timeout==="number")f.timeout=d.timeout,f.addEventListener("timeout",function(){c.reject(i(e,
d,f,"Timeout exceeded"))});else{var k=setTimeout(function(){c.reject(i(e,d,f,"Timeout exceeded"))},d.timeout);c.then(clearTimeout.bind(null,k),clearTimeout.bind(null,k))}Object.keys(b).forEach(function(a){f.setRequestHeader(a,b[a])});f.send(j)}catch(n){c.reject(i(e,d,f,n))}return c.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(h,i,g){function e(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function d(a,b){return{get:function(c,d){if(b===0)return null;var f=localStorage.getItem(a+c);if(f===null)return null;f=JSON.parse(f);return d||b===-1||f._expires&&f._expires>(new Date).getTime()?(delete f._expires,f):null},set:function(c,d){if(b!==0){if(b!==-1)d._expires=(new Date).getTime()+1E3*b;
if(Object.keys(d).length===0)localStorage.removeItem(a+c);else{var f=JSON.stringify(d);localStorage.setItem(a+c,f);delete d._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function f(a){this._currentPromises={};this._cache=new d("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var b=a.getServiceReferences("orion.core.preference.provider");if(b.length>0)this._service=a.getService(b[0])}return!!this._service}}function c(a){this._location=
a;this._currentPromise=null;this._cache=new d("/orion/preferences/default",3600)}function b(){this._cache=new d("/orion/preferences/local",-1)}function a(a,k){this._userProvider=new f(a);this._localProvider=new b;k=k||"defaults.pref";k.indexOf("://")===-1&&(k=h.toUrl(k));this._defaultsProvider=new c(k);this._serviceRegistration=a.registerService("orion.core.preference",this)}e.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var c=this._stores[b];this._dirty.indexOf(c)!==-1&&
a.push(this._providers[b].put(this._name,c))}this._dirty=[];return i.all(a)},_scheduleFlush:function(a){this._dirty.indexOf(a)===-1&&this._dirty.push(a);if(!this._flushPending)this._flushPending=!0,window.setTimeout(function(){if(this._flushPending)this._flushPending=!1,this._flush()}.bind(this),0)},_getCached:function(){if(!this._cached){this._cached={};for(var a=0;a<this._stores.length;++a){var b=this._stores[a],c;for(c in b)b.hasOwnProperty(c)&&typeof this._cached[c]==="undefined"&&(this._cached[c]=
b[c])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,b){if(this._stores.length!==0){var c=this._stores[0];if(c[a]!==b)c[a]=b,this._cached=null,this._scheduleFlush(c)}},remove:function(a){for(var b=0;b<this._stores.length;++b){var c=this._stores[b];if(c.hasOwnProperty(a))return delete c[a],this._cached=null,this._scheduleFlush(c),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]=
{},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var b=this,c=[],d=0;d<this._providers.length;++d)c.push(this._providers[d].get(this._name,a).then(function(a){return function(j){b._stores[a]=j}}(d)));return i.all(c).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};f.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var c=new i,d=null;
b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);else{this._currentPromises[a]=c;var f=this;this._service.get(a).then(function(b){f._cache.set(a,b);delete f._currentPromises[a];c.resolve(b)},function(b){b.status===404?(b={},f._cache.set(a,b),delete f._currentPromises[a],c.resolve(b)):(delete f._currentPromises[a],c.resolve(f._cache.get(a,!0)||{}))})}return c},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)}};c.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;
var c=new i,d=null;b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)c.resolve(d);else{this._currentPromise=c;var f=this;g("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);f._cache.set(a,b[a]||{});f._currentPromise=null;c.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(f._cache.set(a,{}),f._currentPromise=null,c.resolve({})):(f._currentPromise=null,b=f._cache.get(a,!0),b!==null?c.resolve(b[a]||{}):c.resolve({}))})}return c},
put:function(){var a=new i;a.resolve();return a}};b.prototype={get:function(a){var b=new i,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var c=new i;this._cache.set(a,b);c.resolve();return c}};a.DEFAULT_SCOPE=1;a.LOCAL_SCOPE=2;a.USER_SCOPE=4;a.prototype={listenForChangedSettings:function(a){window.addEventListener("storage",a,!1);return"/orion/preferences/local/settings"},getPreferences:function(b,c){if(!c||typeof c!=="number"||c>7||c<1)c=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|
a.USER_SCOPE;var d=[];a.USER_SCOPE&c&&this._userProvider.available()&&d.push(this._userProvider);a.LOCAL_SCOPE&c&&d.push(this._localProvider);a.DEFAULT_SCOPE&c&&d.push(this._defaultsProvider);var f=new e(b,d);return f.sync().then(function(){return f})},getSetting:function(a,b,c){for(var d,f=0;f<a.length;f++)if(a[f].label===b)for(var e=0;e<a[f].data.length;e++)if(a[f].data[e].label===c){d=a[f].data[e].value;break}return d}};return{PreferencesService:a}});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget"],function(h,i){function g(a,b){var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;c.sort();d.sort();for(var f=0,e=c.length;f<e;f++){var g=c[f];if(g!==d[f])return!1;var i=a[g],g=b[g];if(i!==g&&JSON.stringify(i)!==JSON.stringify(g))return!1}return!0}function e(a){if(a.indexOf("://")===-1){var b=document.createElement("a");b.href=a;return b.href}return a}function d(a){var b=null;return{key:function(c){return(b=b||
Object.keys(a))[c]},getItem:function(b){return a[b]},setItem:function(c,d){a[c]=d;b=null},removeItem:function(c){delete a[c];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}}}function f(a,b){return{type:a,plugin:b}}function c(a,b,c){function d(a,b,j){if(!A)return(new h).reject(Error("plugin not connected"));var f=I++,e=new h;e.then(null,function(a){t==="active"&&a instanceof Error&&a.name==="Cancel"&&c.postMessage({id:f,cancel:a.message||"Cancel"},
A)});J[String(f)]=e;c.postMessage({id:f,serviceId:a,method:b,params:j},A);return e.promise}function e(a){var b={};if(a.methods&&(a.methods.forEach(function(c){b[c]=function(){var b=Array.prototype.slice.call(arguments);return t==="active"?d(a.serviceId,c,b):p.start({"transient":!0}).then(function(){return d(a.serviceId,c,b)})}}),b.addEventListener&&b.removeEventListener)){var c=new i;b.dispatchEvent=c.dispatchEvent.bind(c);var j=b.addEventListener;b.addEventListener=function(a,b){c._namedListeners[a]||
j(a);c.addEventListener(a,b)};var k=b.removeEventListener;b.removeEventListener=function(a,b){c.removeEventListener(a,b);c._namedListeners[a]&&k(a)}}return b}function q(b){var c=JSON.parse(JSON.stringify(b.properties));c.__plugin__=a;b=b.names||b.type||[];Array.isArray(b)||(b=[b]);c.objectClass=b;return c}function r(a){var b=e(a),j=q(a),j=c.registerService(a.names||a.type,b,j);y[a.serviceId]={registration:j,proxy:b}}function o(){c.persist(a,{created:x,headers:s,services:u,autostart:v,lastModified:w})}
function m(a){var b;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var j=a.params[0];F({headers:j.headers,services:j.services}).then(function(){C.resolve(p)})}else if("dispatchEvent"===a.method){var d=y[a.serviceId].proxy;d.dispatchEvent.apply(d,a.params)}else if("progress"===a.method)b=J[String(a.requestId)],b.progress.apply(b,a.params);else if("timeout"===a.method)C&&C.reject(a.error);else throw Error("Bad response method: "+a.method);else if(b=J[String(a.id)],delete J[String(a.id)],
a.error){var f=c.handleServiceError(p,a.error);b.reject(f)}else b.resolve(a.result)}catch(e){console.log("Plugin._responseHandler "+e)}}var p=this,b=b||{},x=b.created||(new Date).getTime(),s=b.headers||{},u=b.services||[],v=b.autostart,w=b.lastModified||0,t="installed",G,C,A,y={},I=0,J={},F;this._persist=o;this._resolve=function(){t="resolved";c.dispatchEvent(new f("resolved",p))};this._getAutostart=function(){return v};this._getCreated=function(){return x};this.getLocation=function(){return a};this.getHeaders=
function(){return JSON.parse(JSON.stringify(s))};this.getName=function(){var a=this.getHeaders();return a?a.name||"":null};this.getVersion=function(){var a=this.getHeaders();return a?a.version||"0.0.0":null};this.getLastModified=function(){return w};this.getServiceReferences=function(){var a=[];Object.keys(y).forEach(function(b){a.push(y[b].registration.getReference())});return a};this.getState=function(){return t};this.start=function(b){if(t==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));
if(G)return G.promise.then(this.start.bind(this,b));if(t==="active")return(new h).resolve();if(!b||!b["transient"]){var j=b&&b.lazy?"lazy":"started";j!==v&&(v=j,o())}j=c.getState();if(j!=="starting"&&j!=="active")return b["transient"]?(new h).reject(Error("start transient error")):(new h).resolve();if(t==="installed")try{this._resolve()}catch(d){return(new h).reject(d)}t==="resolved"&&u.forEach(function(a){r(a)});if(b&&b.lazy)return t!=="starting"&&(t="starting",c.dispatchEvent(new f("lazy activation",
p))),(new h).resolve();var e=new h;G=e;t="starting";c.dispatchEvent(new f("starting",p));C=new h;A=c.connect(a,m);C.then(function(){C=null;t="active";c.dispatchEvent(new f("started",p));G=null;e.resolve()},function(){C=null;t="stopping";c.dispatchEvent(new f("stopping",p));Object.keys(y).forEach(function(a){y[a].registration.unregister();delete y[a]});c.disconnect(A);A=null;t="resolved";G=null;c.dispatchEvent(new f("stopped",p));e.reject(Error("plugin activation error"))});return e.promise};this.stop=
function(a){if(t==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(G)return G.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==v)v="stopped",o();if(t!=="active"&&t!=="starting")return(new h).resolve();G=a=new h;t="stopping";c.dispatchEvent(new f("stopping",p));Object.keys(y).forEach(function(a){y[a].registration.unregister();delete y[a]});A&&(c.disconnect(A),A=null);t="resolved";G=null;c.dispatchEvent(new f("stopped",p));a.resolve();return a.promise};
F=function(b){if(t==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(!b)return w===0&&(w=(new Date).getTime(),o()),c.loadManifest(a).then(F);var j=s,d=u,e=v;s=b.headers||{};u=b.services||{};v=b.autostart||v;b.lastModified?w=b.lastModified:(w=(new Date).getTime(),o());if(g(s,j)&&g(u,d)&&v===e)return(new h).resolve();if(t==="active"||t==="starting"){var l=[];Object.keys(u).forEach(function(a){var b=u[a];l.push(a);var c=y[a];if(c){if(g(b.methods,Object.keys(c.proxy))){var a=q(b),
j=c.registration.getReference(),d={};j.getPropertyKeys().forEach(function(a){d[a]=j.getProperty(a)});g(a,d)||c.registration.setProperties(a);return}c.registration.unregister();delete y[a]}r(b)});Object.keys(y).forEach(function(a){l.indexOf(a)===-1&&(y[a].registration.unregister(),delete y[a])})}t==="active"&&(c.disconnect(A),C=new h,A=c.connect(a,m),C.then(function(){C=null},function(){C=null;t="stopping";c.dispatchEvent(new f("stopping"),p);Object.keys(y).forEach(function(a){y[a].registration.unregister();
delete y[a]});c.disconnect(A);A=null;t="resolved";c.dispatchEvent(new f("stopped",p))}));return(new h).resolve()};this.update=function(a){return F(a).then(function(){c.dispatchEvent(new f("updated",p))})};this.uninstall=function(){if(t==="uninstalled")return(new h).reject(Error("Plugin is uninstalled"));if(t==="active"||t==="starting"||t==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));c.removePlugin(this);t="uninstalled";c.dispatchEvent(new f("uninstalled",
p));return(new h).resolve()}}var b=/^http[s]?/i;return{Plugin:c,PluginRegistry:function(a,j){function k(a){var b=a.source;r.some(function(c){if(b===c.target){if(typeof c.useStructuredClone==="undefined")c.useStructuredClone=typeof a.data!=="string";c.handler(c.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var j=j||{},n=j.storage||localStorage;n.getItem||(n=d(n));var l="installed",g=[],r=[],o=new i,m={},p={registerService:a.registerService.bind(a),connect:function(a,b,c){function d(a){a=
Error(a);a.name="timeout";b({method:"timeout",error:a})}var k={handler:b,url:a},f=setTimeout(d.bind(null,"Load timeout for: "+a),c||15E3),e=document.createElement("iframe");e.name=a+"_"+(new Date).getTime();if(!j.visible)e.style.display="none",e.style.visibility="hidden";e.src=a;e.onload=function(){clearTimeout(f);setTimeout(d.bind(null,"Plugin handshake timeout for: "+a),5E3)};e.sandbox="allow-scripts allow-same-origin";document.body.appendChild(e);k.target=e.contentWindow;k.close=function(){e&&
(document.body.removeChild(e),e=null)};r.push(k);return k},disconnect:function(a){for(var b=0;b<r.length;b++)if(a===r[b]){r.splice(b,1);try{a.close()}catch(c){}break}},removePlugin:function(a){for(var b=0;b<g.length;b++)if(a===g[b]){g.splice(b,1);break}n.removeItem("plugin."+a.getLocation())},persist:function(a,b){n.setItem("plugin."+a,JSON.stringify(b))},postMessage:function(a,b){b.target.postMessage(b.useStructuredClone?a:JSON.stringify(a),b.url)},dispatchEvent:function(a){try{o.dispatchEvent(a)}catch(b){console&&
console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new h,c=p.connect(a,function(a){c&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],p.disconnect(c),c=null,b.resolve(a)):"timeout"===a.method&&(p.disconnect(c),c=null,b.reject(a.error)))});return b.promise},getState:function(){return l},handleServiceError:function(a,c){if(c&&c.status===401){var j=a.getHeaders(),d=a.getName()||a.getLocation(),k=document.createElement("span");k.appendChild(document.createTextNode("Authentication required for: "+
d+"."));if(j.login)k.appendChild(document.createTextNode(" ")),d=document.createElement("a"),d.target="_blank",d.textContent="Login",d.href=j.login,b.test(d.href)?(k.appendChild(d),k.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+j.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(k)}}if(c.__isError){var f=c,c=Error(f.message);Object.keys(f).forEach(function(a){c[a]=f[a]});delete c.__isError}return c}};this.getLocation=
function(){return"System"};this.getHeaders=function(){return{}};this.getName=function(){return"System"};this.getVersion=function(){return"0.0.0"};this.getLastModified=function(){return 0};this.getState=p.getState;this.init=function(){if(!(l==="starting"||l==="active"||l==="stopping")){addEventListener("message",k,!1);for(var a=[],b=0,d=n.length;b<d;b++)a.push(n.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(n.getItem(a));a.created&&g.push(new c(b,a,p))}});
g.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});j.plugins&&Object.keys(j.plugins).forEach(function(a){a=e(a);if(!this.getPlugin(a)){var b=j.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||j.defaultAutostart||"lazy";g.push(new c(a,b,p))}}.bind(this));l="starting"}};this.start=function(){l!=="starting"&&this.init();if(l!=="starting")return(new h).reject("Cannot start framework. Framework is already "+l+".");var a=[],b=(new Date).getTime();g.forEach(function(c){var j=
c._getAutostart();c.getLastModified()===0?a.push(c.update().then(function(){if("started"===j)return c.start({"transient":!0});if("lazy"===j)return c.start({lazy:!0,"transient":!0});c._resolve()})):"started"===j?a.push(c.start({"transient":!0})):"lazy"===j?(a.push(c.start({lazy:!0,"transient":!0})),b>c.getLastModified()+864E5&&c.update()):c._resolve()});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){l="active"})};this.stop=function(){if(l!=="starting"&&l!=="active")return(new h).reject("Cannot stop registry. Registry is already "+
l+".");l="stopping";var a=[];g.forEach(function(b){a.push(b.stop({"transient":!0}))});return h.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",k);l="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=e(a),j=this.getPlugin(a);if(j)return(new h).resolve(j);if(m[a])return m[a];if(b)return j=new c(a,b,p),g.push(j),
j._persist(),p.dispatchEvent(new f("installed",j)),(new h).resolve(j);var d=p.loadManifest(a).then(function(b){j=new c(a,b,p);g.push(j);j._persist();delete m[a];p.dispatchEvent(new f("installed",j));return j},function(b){delete m[a];throw b;});return m[a]=d};this.getPlugins=function(){return g.slice()};this.getPlugin=function(a){var b=null,a=e(a);g.some(function(c){if(a===c.getLocation())return b=c,!0});return b};this.addEventListener=o.addEventListener.bind(o);this.removeEventListener=o.removeEventListener.bind(o);
this.resolvePlugins=function(){var a=!0;g.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function h(e,d){function f(c){var j=c.getProperty("service.id"),d=this.addingService(c);d&&(b[j]=c,a[j]=d)}function c(c){var j=c.getProperty("service.id"),d=a[j];delete b[j];delete a[j];this.removedService(c,d)}this.serviceRegistry=e;var b={},a={},j=i,k,n;this.close=function(){if(j!==g)throw"Already closed";j=i;e.removeEventListener("registered",k);e.removeEventListener("unregistering",n);n=k=null;var a=this;this.getServiceReferences().forEach(function(b){c.call(a,
b)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){return b.length?Object.keys(b).map(function(a){return b[a]}):null};this.open=function(){if(j!==i)throw"Already open";j=g;var a=this;k=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(d)!==-1&&(f.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};n=function(b){b.serviceReference.getProperty("objectClass").indexOf(d)!==
-1&&c.call(a,b.serviceReference)};e.addEventListener("registered",k);e.addEventListener("unregistering",n);e.getServiceReferences(d).forEach(function(b){f.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var i=0,g=1;h.prototype={addingService:function(e){return this.serviceRegistry.getService(e)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return h});
define("orion/config",["orion/Deferred","orion/serviceTracker"],function(h,i){var g,e,d,f,c,b="pid";g=function(a,c,d){function f(a,b,j){b.forEach(function(d,f){try{var e=a[f].getProperty("__plugin__"),l=e&&c.getPlugin(e);(!e||l&&l.getState()==="active")&&b[f].updated(j)}catch(n){typeof console!=="undefined"&&console.log(n)}})}i.call(this,a,"orion.cm.managedservice");var e={},g={},o=function(c){var k=[];c.plugin.getServiceReferences().forEach(function(c){if(c.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var f=c.getProperty(b),c=a.getService(c);f&&c&&(f=(f=d._find(f))&&f.getProperties(),k.push(c.updated(f)))}});return h.all(k)};this.addingService=function(c){var d=c.getProperty(b),k=a.getService(c);if(!d||!k)return null;e[d]||(e[d]=[]);g[d]||(g[d]=[]);e[d].push(c);g[d].push(k);return k};this.onServiceAdded=function(a,c){var j=a.getProperty(b),j=d._find(j);f([a],[c],j&&j.getProperties())};this.onOpen=function(){c.addEventListener("started",o)};this.onClose=function(){c.removeEventListener("started",
o)};this.notifyUpdated=function(a){var b=a.getPid();f(e[b]||[],g[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();f(e[a]||[],g[a]||[],null)};this.removedService=function(a,c){var j=a.getProperty(b),d=e[j],k=g[j];d.length>1?d.splice(d.indexOf(a),1):delete e[j];k.length>1?k.splice(k.indexOf(c),1):delete g[j]}};e=function(){function a(b,c,j){this.store=new d(this,j);this.configAdmin=new f(this,this.store);this.tracker=new g(b,c,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(b){a.tracker.open();return b})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();f=function(){function a(b,c){this.factory=b;this.store=c}a.prototype={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var a="/cm/configurations";
d=function(){function j(j,d){this.factory=j;this.prefsService=d;this.configs=Object.create(null);this.pref=null;var f=this;this.initPromise=this.prefsService.getPreferences(a).then(function(a){f.pref=a;a.keys().forEach(function(j){if(!f.configs[j]){var d=a.get(j);typeof d==="object"&&d!==null&&Object.keys(d).length>0&&(d[b]=j,f.configs[j]=new c(f.factory,f,d))}})})}j.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var b=this._find(a);
b||(b=new c(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,b=[];this.pref.keys().forEach(function(c){(c=a._find(c))&&c.getProperties()!==null&&b.push(c)});return b},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,b){this.pref.put(a,b.getProperties(!0)||{})}};return j}();c=function(){function a(b){for(var c={},j=Object.keys(b),d=0;d<j.length;d++){var k=j[d],f=b[k];c[k]=f instanceof Array?f.slice():f}return c}function c(d,k,f){this.factory=
d;this.store=k;if(f!==null&&typeof f==="object")this.pid=f[b],d=a(f),delete d[b],this.properties=d;else if(typeof f==="string")this.pid=f,this.properties=null;else throw Error("Invalid pid/properties "+f);}c.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(c){this._checkRemoved();var d=null;if(this.properties&&(d=a(this.properties),!c))d[b]=this.pid;return d},remove:function(){this._checkRemoved();
this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=!0},update:function(c){this._checkRemoved();c=a(c);delete c[b];this.properties=c;this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return c}();return{ConfigurationAdminFactory:e}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(h,i,g,e,d,f){var c;return{startup:function(){if(c)return c;c=new i;var b=window.serviceRegistry=new g.ServiceRegistry,a=new e.PreferencesService(b);return a.getPreferences("/plugins").then(function(j){var k={plugins:{}};j.keys().forEach(function(a){var b=h.toUrl(a);k.plugins[b]=j[a]});var e=window.pluginRegistry=new d.PluginRegistry(b,k);return e.start().then(function(){if(b.getServiceReferences("orion.core.preference.provider").length>
0)return a.getPreferences("/plugins",a.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=h.toUrl(a);e.getPlugin(a)||b.push(e.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return i.all(b,function(a){console.log(a)})})}).then(function(){return(new f.ConfigurationAdminFactory(b,e,a)).getConfigurationAdmin().then(b.registerService.bind(b,"orion.cm.configadmin"))}).then(function(){var a=b.getService("orion.core.auth");
if(a){var c=a.getUser().then(function(b){if(b)localStorage.setItem("lastLogin",(new Date).getTime());else return a.getAuthForm(window.location.href).then(function(a){window.location=a})}),j=localStorage.getItem("lastLogin");if(!j||j<(new Date).getTime()-9E5)return c}}).then(function(){var j={serviceRegistry:b,preferences:a,pluginRegistry:e};c.resolve(j);return j})})}}});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Repositories:"Repositories",Shell:"Shell","Get Plugins":"Get Plugins",Global:"Global",Editor:"Editor","Orion Editor":"Orion Editor","View on Site":"View on Site","View this file or folder on a web site hosted by Orion":"View this file or folder on a web site hosted by Orion","Show a list of all the keybindings on this page":"Show a list of all the keybindings on this page","Show Keys":"Show Keys","Hide or show the page banner and footer":"Hide or show the page banner and footer",
"Toggle banner and footer":"Toggle banner and footer","Choose a file by name and open an editor on it":"Choose a file by name and open an editor on it","Find File Named...":"Find File Named...","System Configuration Details":"System Configuration Details","System Config Tooltip":"Go to the System Configuration Details page","Background Operations":"Background Operations","Background Operations Tooltip":"Go to the Background Operations page","Operation status is unknown":"Operation status is unknown",
" is already a favorite.":" is already a favorite.","Add to the favorites list":"Add to the favorites list","Make Favorite":"Make Favorite","Unknown item":"Unknown item","Can't search: no search service is available":"Can't search: no search service is available","could not find banner parent, id was ":"could not find banner parent, id was "," has been added to the favorites list.":" has been added to the favorites list.",Related:"Related",Options:"Options",FAQ:"FAQ","Report a Bug":"Report a Bug",
"Privacy Policy":"Privacy Policy","Terms of Use":"Terms of Use","Copyright Agent":"Copyright Agent","Orion Logo":"Orion Logo","Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Orion is in Beta. Please try it out but BEWARE your data may be lost.":"Orion build I20130222-1257. See the FAQ for terms of service","Add this page to the favorites list":"Add this page to the favorites list","LOG: ":"LOG: ",Switch:"Switch","Switch the type of outliner used":"Switch the type of outliner used",
Outliner:"Outliner","no parent":"no parent","no tree model":"no tree model","no renderer":"no renderer","could not find table row ":"could not find table row ","Resource is out of sync with the server. Do you want to save it anyway?":"Resource is out of sync with the server. Do you want to save it anyway?","Orion Home":"Orion Home","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",Operations:"Operations","Operations running":"Operations running",
"Some operations finished with warning":"Some operations finished with warning","Some operations finished with error":"Some operations finished with error","no service registry":"no service registry","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?","You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More menu.",
Tasks:"Tasks",Close:"Close","Expand all":"Expand all","Collapse all":"Collapse all",Search:"Search","Advanced search":"Advanced search",Submit:"Submit",More:"More","Saved searches":"Saved searches","Recent searches":"Recent searches","Open in new tab":"Open in new tab","Regular expression":"Regular expression","Search options":"Search options","Global search":"Global search","Orion Home":"Orion Home","Close notification":"Close notification","Operations - Press spacebar to show current operations":"Operations - Press spacebar to show current operations",
"Type a keyword or wild card to search in root":"Type a keyword or wild card to search in root","Toggle side panel":"Toggle side panel","Open or close the side panel":"Open or close the side panel",Projects:"Projects","Toggle Outliner":"Toggle Outliner","Sample HTML5 Site":"Sample HTML5 Site","Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.":"Generate an HTML5 'Hello World' website, including JavaScript, HTML, and CSS files.","Sample Orion Plugin":"Sample Orion Plugin",
"Generate a sample plugin for integrating with Orion.":"Generate a sample plugin for integrating with Orion."});define("orion/nls/messages",["orion/i18n!orion/nls/messages","orion/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(e){typeof g[e]==="undefined"&&(g[e]=h[e])});return g});
define("orion/PageUtil",[],function(){var h=/^http[s]?/i;return{matchResourceParameters:function(i){var i=i||window.location.toString(),g={resource:""},e=i.indexOf("#");if(e!==-1&&(i=i.substring(e+1),i.length!==0)){i=i.split(",");Object.defineProperty(g,"resourceRaw",{value:i[0]});g.resource=decodeURIComponent(i[0]);for(e=1;e<i.length;e++){var d=/([^=]*)(=?)(.*)/.exec(i[e]),f=decodeURIComponent(d[1]||""),d=decodeURIComponent(d[3]||"");f!==""&&f!=="resource"&&(g[f]=d)}}return g},validateURLScheme:function(i,
g){var e=i;if(i.indexOf("://")===-1){var d=document.createElement("a");d.href=i;e=d.href}d=!1;return(d=g?g.some(function(d){return RegExp("^"+d+":","i").test(e)}):h.test(e))?i:(console.log("Illegal URL Scheme: '"+i+"'"),"")}}});
define("orion/webui/littlelib",["require"],function(){function h(b,a){a||(a=document);return a.querySelectorAll(b)}function i(b,a){var c=b.compareDocumentPosition(a);return b===a||Boolean(c&16)}function g(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var c=g(b.childNodes[a]);if(c)return c}return null}function e(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=b.childNodes.length-1;a>=0;a--){var c=e(b.childNodes[a]);if(c)return c}return null}function d(b,
a){if(b.nodeType===3){var c=f.exec(b.nodeValue);c&&c.length>1&&b.parentNode.replaceChild(document.createTextNode(a[c[1]]||c[1]),b)}if(b.hasChildNodes())for(c=0;c<b.childNodes.length;c++)d(b.childNodes[c],a)}var f=/\$\{([^\}]+)\}/,c=[];return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:h,$$array:function(b,a){return Array.prototype.slice.call(h(b,a))},node:function(b){var a=b;typeof b==="string"&&(a=document.getElementById(b));return a},contains:i,bounds:function(b){b=b.getBoundingClientRect();
return{left:b.left+document.body.scrollLeft,top:b.top+document.body.scrollTop,width:b.width,height:b.height}},empty:function(b){for(;b.hasChildNodes();)b.removeChild(b.firstChild)},firstTabbable:g,lastTabbable:e,stop:function(b){window.document.all?b.keyCode=0:(b.preventDefault(),b.stopPropagation())},processTextNodes:d,addAutoDismiss:function(b,a){c.length===0&&document.addEventListener("click",function(a){for(var b=[],d=0;d<c.length;d++){for(var f=c[d].excludeNodes,e=c[d].dismiss,g=!1,h=!0,m=0;m<
f.length;m++)if((g=document.compareDocumentPosition(document,f[m])!==1)&&i(f[m],a.target)){h=!1;break}h&&(e(),g=document.compareDocumentPosition(document,f[m])!==1);g&&b.push(c[d])}c=b},!0);c.push({excludeNodes:b,dismiss:a})},KEY:{BKSPC:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,PAGEUP:33,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,INSERT:45,DEL:46}}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,i){function g(e){var d=window.navigator.platform.indexOf("Mac")!==-1;return d&&e.metaKey||!d&&e.ctrlKey}return{getUserKeyString:function(e){var d="",f=navigator.platform.indexOf("Mac")!==-1;e.mod1&&(d+=f?"Cmd+":"Ctrl+");e.mod2&&(d+="Shift+");e.mod3&&(d+="Alt+");e.mod4&&f&&(d+="Ctrl+");if(e.alphaKey)return d+e.alphaKey;for(var c in i.KEY)if(typeof(i.KEY[c]==="number")&&i.KEY[c]===e.keyCode)return d+c;var b;switch(e.keyCode){case 59:b=
e.mod2?":":";";break;case 61:b=e.mod2?"+":"=";break;case 188:b=e.mod2?"<":",";break;case 190:b=e.mod2?">":".";break;case 191:b=e.mod2?"?":"/";break;case 192:b=e.mod2?"~":"`";break;case 219:b=e.mod2?"{":"[";break;case 220:b=e.mod2?"|":"\\";break;case 221:b=e.mod2?"}":"]";break;case 222:b=e.mod2?'"':"'"}return b?d+b:e.keyCode>=112&&e.keyCode<=123?d+"F"+(e.keyCode-111):d+String.fromCharCode(e.keyCode)},getUserText:function(e,d,f,c,b,a,j,k,n){var l=!1,j=function(j){return function(k){if(!l){var g=i.node(e),
p=g.value;if(g)if(j&&k.keyCode===i.KEY.ESCAPE){if(f)d.style.display="inline";g.parentNode.removeChild(g);l=!0;a&&a()}else if(!(j&&k.keyCode!==i.KEY.ENTER)){if(p.length===0||!n&&p===c){if(f)d.style.display="inline"}else b(p);l=!0;g.parentNode&&g.parentNode.removeChild(g);a&&a()}}}},g=document.createElement("input");g.id=e;g.value=c||"";d.parentNode.insertBefore(g,d.nextSibling);g.classList.add("userEditBoxPrompt");if(f)d.style.display="none";g.addEventListener("keydown",j(!0),!1);g.addEventListener("blur",
j(!1),!1);window.setTimeout(function(){g.focus();if(c){var a=i.node(e),b=k?c.indexOf(k):-1;if(b>0)if(a.createTextRange)a=a.createTextRange(),a.collapse(!0),a.moveStart("character",0),a.moveEnd("character",b),a.select();else if(a.setSelectionRange)a.setSelectionRange(0,b);else{if(a.selectionStart!==void 0)a.selectionStart=0,a.selectionEnd=b}else a.select()}},0)},openInNewWindow:g,followLink:function(e,d){d&&g(d)?window.open(e):window.location=e},createButton:function(e,d){var f=document.createElement("span");
f.role="button";f.tabIndex=0;f.appendChild(document.createTextNode(e));f.className="commandButton commandMargins";f.addEventListener("click",function(c){d();i.stop(c)},!1);f.addEventListener("keydown",function(c){if(c.keyCode===i.KEY.ENTER||c.keyCode===i.KEY.SPACE)d(),i.stop(c)},!1);return f}}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(h,i){function g(e){this._init(e)}g.prototype={_init:function(e){this._dropdownNode=i.node(e.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=i.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=e.populate;var d=this;this._triggerNode.addEventListener("click",function(f){d.toggle()&&i.stop(f)},!1);this._triggerNode.tagName.toLowerCase()===
"span"&&this._triggerNode.addEventListener("keydown",function(f){if(f.keyCode===i.KEY.ENTER||f.keyCode===i.KEY.SPACE)d.toggle(),i.stop(f)},!1);this._dropdownNode.addEventListener("keydown",this._dropdownKeyDown.bind(this),!1)},toggle:function(){return this._triggerNode.classList.contains("dropdownTriggerOpen")?this.close():this.open()},open:function(){this._populate&&(this.empty(),this._populate(this._dropdownNode));var e=this.getItems();if(e.length>0){if(!this._hookedAutoDismiss)i.addAutoDismiss([this._triggerNode,
this._dropdownNode],this.close.bind(this)),this._hookedAutoDismiss=!0;this._positionDropdown();this._triggerNode.classList.add("dropdownTriggerOpen");this._dropdownNode.classList.add("dropdownMenuOpen");e[0].focus();return!0}return!1},_positionDropdown:function(){this._dropdownNode.style.left="";var e=i.bounds(this._dropdownNode),d=i.bounds(this._boundingNode(this._triggerNode));if(e.left+e.width>d.left+d.width)this._dropdownNode.style.right=0},_boundingNode:function(e){return e.style.right!==""||
e.style.position==="absolute"||!e.parentNode||!e.parentNode.style?e:this._boundingNode(e.parentNode)},close:function(e){this._triggerNode.classList.remove("dropdownTriggerOpen");this._dropdownNode.classList.remove("dropdownMenuOpen");e&&this._triggerNode.focus();return!0},getItems:function(){var e=[],d=this;i.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(f){f.parentNode.parentNode===d._dropdownNode&&e.push(f)});return e},empty:function(){var e=this;
i.$$array("li",this._dropdownNode).forEach(function(d){d.parentNode===e._dropdownNode&&d.parentNode.removeChild(d)})},_dropdownKeyDown:function(e){if(e.keyCode===i.KEY.UP||e.keyCode===i.KEY.DOWN||e.keyCode===i.KEY.RIGHT||e.keyCode===i.KEY.ENTER||e.keyCode===i.KEY.LEFT){var d=this.getItems(),f=document.activeElement;if(d.length&&d.length>0&&f){var c=d.indexOf(f);c>=0&&(e.keyCode===i.KEY.UP&&c>0?(c--,d[c].focus()):e.keyCode===i.KEY.DOWN&&c<d.length-1?(c++,d[c].focus()):e.keyCode===i.KEY.ENTER||e.keyCode===
i.KEY.RIGHT?f.classList.contains("dropdownTrigger")&&f.dropdown&&f.dropdown.open():e.keyCode===i.KEY.LEFT&&f.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),i.stop(e))}}else e.keyCode===i.KEY.ESCAPE&&(this.close(!0),i.stop(e))}};g.prototype.constructor=g;return{Dropdown:g}});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(h,i){function g(e){this._init(e)}g.prototype={_init:function(e){this._node=i.node(e.node);if(!this._node)throw"no dom node for tooltip found";this._position=e.position||["right","above","below","left"];this._text=e.text;this._hideDelay=e.hideDelay===void 0?200:e.hideDelay;this._tailSize=e.tailSize||10;this._trigger=e.trigger||"mouseover";this._afterShowing=e.afterShowing;this._afterHiding=e.afterHiding;var d=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",function(c){c.target===d._node&&(d.show(),i.stop(c))},!1);else if(this._trigger==="mouseover"){this._showDelay=e.showDelay===void 0?1E3:e.showDelay;e=["mouseout","click"];this._node.addEventListener("mouseover",function(c){i.contains(d._node,c.target)&&(d.show(),i.stop(c))},!1);for(var f=0;f<e.length;f++)this._node.addEventListener(e[f],function(c){i.contains(d._node,c.target)&&d.hide()},!1)}},_makeTipNode:function(){if(!this._tip){this._tip=
document.createElement("span");this._tip.classList.add("tooltipContainer");this._tipInner=document.createElement("span");this._tipInner.classList.add("tooltip");this._text&&this._tipInner.appendChild(document.createTextNode(this._text));this._tip.appendChild(this._tipInner);document.body.appendChild(this._tip);var e=this;i.addAutoDismiss([this._tip,this._node],function(){e.hide()});if(this._trigger==="mouseover")this._tipInner.role="tooltip",this._tipInner.id="tooltip"+(new Date).getTime().toString(),
this._node.setAttribute("aria-describedby",this._tipInner.id),this._tip.addEventListener("mouseover",function(){if(e._timeout)window.clearTimeout(e._timeout),e._timeout=null;e._tip.addEventListener("mouseout",function(d){i.contains(e._tip,d.target)&&(e.hide(),i.stop(d))},!1)},!1)}return this._tip},_positionTip:function(e,d){this._makeTipNode();if(this._tailBorder)this._tip.removeChild(this._tailBorder),this._tailBorder=null,this._tip.removeChild(this._tail),this._tail=null;e==="left"?this._tipInner.classList.add("left"):
this._tipInner.classList.remove("left");var f=i.bounds(this._node),c=i.bounds(this._tipInner),b;switch(e){case "above":b=f.top-c.height-this._tailSize-1;f=f.left-this._tailSize;break;case "below":b=f.top+f.height+this._tailSize+1;f=f.left-this._tailSize;break;case "left":b=f.top-this._tailSize/2;f=f.left-c.width-this._tailSize-1;break;default:b=f.top-this._tailSize/2,f=f.left+f.width+this._tailSize+1}var a=i.bounds(document.documentElement);if(b+c.height>a.height)if(d)b=a.height-c.height-1;else return!1;
if(f+c.width>a.width)if(d)f=a.width-c.width-1;else return!1;if(f<0)if(d)f=4;else return!1;if(b<0)if(d)b=4;else return!1;this._tailBorder=document.createElement("span");this._tailBorder.classList.add("tooltipTailBorderFrom"+e);this._tail=document.createElement("span");this._tail.classList.add("tooltipTailFrom"+e);e==="above"||e==="left"?(this._tip.appendChild(this._tailBorder),this._tip.appendChild(this._tail)):(this._tip.insertBefore(this._tailBorder,this._tipInner),this._tip.insertBefore(this._tail,
this._tipInner));this._tip.style.top=b+"px";this._tip.style.left=f+"px";this._tip.style.width=c.width+"px";this._tip.style.height=c.height+"px";return!0},contentContainer:function(){this._makeTipNode();return this._tipInner},show:function(){if(!this._tip||!this._tip.classList.contains("tooltipShowing")){var e=this;if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;this._timeout=window.setTimeout(function(){for(var d=!1,f=0;!d&&f<e._position.length;)d=e._positionTip(e._position[f]),
f++;d||e._positionTip(e._position[0],!0);e._tip.classList.add("tooltipShowing");e._afterShowing&&e._afterShowing()},this._showDelay)}},hide:function(e){if(this._timeout)window.clearTimeout(this._timeout),this._timeout=null;if(this._tip&&this._tip.classList.contains("tooltipShowing")){if(e===void 0)e=this._hideDelay;var d=this;this._timeout=window.setTimeout(function(){d._tip.classList.remove("tooltipShowing");d._afterHiding&&d._afterHiding()},e)}},destroy:function(){if(this._timeout)window.clearTimeout(this._timeout),
this._timeout=null;if(this._tip)document.body.removeChild(this._tip),this._tailBorder=this._tail=this._tipInner=this._tip=null}};g.prototype.constructor=g;return{Tooltip:g}});
define("orion/explorers/navigationUtils",[],function(){function h(g,e){if(!i&&g)g.push({domNode:e}),e.tabIndex=-1,e.style.outline="none"}var i=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(g,e,d){g&&(g=g.getGridNavHolder(e,!0))&&h(g,d)},generateNavGrid:h,removeNavGrid:function(g,e){if(g)for(var d=0;d<g.length;d++)if(g[d].domNode===e){g.splice(d,1);break}}}});
define("orion/commands","i18n!orion/nls/messages,require,orion/uiUtils,orion/PageUtil,orion/webui/littlelib,orion/webui/dropdown,orion/webui/tooltip,orion/explorers/navigationUtils".split(","),function(h,i,g,e,d,f,c,b){function a(a,b,c,d,j){this.commandService=a;this.handler=b;this.items=c;this.userData=d;this.command=j;if(j.parameters)this.parameters=j.parameters.makeCopy();this.id=j.id}function j(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};
this._init(a);this._parameterCollector=null}function k(a,b,c){b.classList.add("commandImage");var d;a.imageClass?(d=document.createElement("span"),b.appendChild(d),d.classList.add(a.spriteClass),d.classList.add(a.imageClass)):(d=new Image,d.alt=a.name,d.name=c,d.id=c,d.src=a.image,b.appendChild(d));return d}function n(a){this._init(a)}function l(a,b,c,j,k,f,e){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=b!==void 0&&b!==null?b:!1;this.mod2=c!==void 0&&c!==null?c:!1;this.mod3=
j!==void 0&&j!==null?j:!1;this.mod4=k!==void 0&&k!==null?k:!1;this.domScope=d.node(f);this.scopeName=e||(f?f.id:null)}function q(a,b){this.token=a;this.parameterName=b}function r(a,b,c,d,j){this.name=a;this.type=b;this.label=c;this.value=d;this.lines=j||1}function o(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=b&&b.clientCollect}var m=window.navigator.platform.indexOf("Mac")!==
-1;a.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()},makeCopy:function(b){var c=new a(this.commandService,this.handler,this.items,this.userData,this.command);c.domNode=this.domNode;c.domParent=this.domParent;if(b)c.parameters=b.makeCopy();else if(this.parameters)c.parameters=this.parameters.makeCopy();return c}};a.prototype.constructor=a;j.prototype={_init:function(a){this._registry=a.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.page.command",
this);this._defaultSelectionService=a.selection;var b=this;window.document.addEventListener("keydown",function(a){a=a||window.event;if(function(a){if(m){if(a.metaKey&&!a.altKey)return!a.shiftKey&&!a.ctrlKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1}else{if(a.ctrlKey&&!a.altKey)return!a.shiftKey&&(a.keyCode===65||a.keyCode===67||a.keyCode===86||a.keyCode===88||a.keyCode===90)?!0:!1;if(a.altKey&&!a.ctrlKey)return!1}if(a["char"])return a["char"].length>0;
else if(a.charCode||a.keyCode)switch(a=a.charCode||a.keyCode,a){case 8:case 9:case 13:case 46:return!0;default:return a>=32&&a<112||a>123}return!1}(a)){if(a.target.contentEditable==="true")return;var c=a.target.nodeName.toLowerCase();if(c==="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(c===
"textarea")return}b._processKey(a)},!1)},_processKey:function(a){function b(a){window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())}for(var c in this._activeBindings)if(this._activeBindings[c]&&this._activeBindings[c].keyBinding&&this._activeBindings[c].command&&this._activeBindings[c].keyBinding.match(a)){var d=this._activeBindings[c],j=d.invocation;if(j)if(d=d.command,d.hrefCallback){b(a);a=d.hrefCallback.call(j.handler||window,j);a.then?a.then(function(a){window.open(a)}):window.open(a);
break}else if(d.callback){b(a);var k=this;window.setTimeout(function(){k._invoke(j)},0);break}}},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var c=this._urlBindings[b].urlBinding.match(a);if(c){var d=this._urlBindings[b],j=d.command,k=d.invocation;if(k&&k.parameters&&j.callback){k.parameters.setValue(c.parameterName,c.parameterValue);var f=this;window.setTimeout(function(){f._invoke(k)},0);break}}}},
findCommand:function(a){return this._commandList[a]},runCommand:function(b,c,d,j){c?(b=this._commandList[b])&&(b.visibleWhen?b.visibleWhen(c):1)&&b.callback&&this._invoke(new a(this,d,c,null,b),j):(c=this._urlBindings[b])&&c.command&&c.command.callback&&this._invoke(c.invocation,j)},getSelectionService:function(){return this._defaultSelectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),
this._parameterCollector.open(a,b,c))},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},collectsParameters:function(){return this._parameterCollector},_invoke:function(a,b){return this._collectAndInvoke(a.makeCopy(b),!1)},_collectAndInvoke:function(a,b){if(a)if(this._parameterCollector&&a.parameters&&a.parameters.hasParameters()&&(b||a.parameters.shouldCollectParameters())){var d=!1;a.parameters.updateParameters(a);d=this._parameterCollector.collectParameters(a);
if(!d){var j=new c.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),d=j.contentContainer();d.classList.add("parameterPopup");var k=window.document.activeElement,f=this._parameterCollector.getFillFunction(a,function(){k&&k.focus();j.destroy()})(d);j.show();window.setTimeout(function(){f.focus();f.select()},0);d=!0}d||a.command.callback.call(a.handler||window,a)}else a.command.callback.call(a.handler||window,a);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},
collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(a){var b={},c,d,j,k;for(k in this._activeBindings)if((d=this._activeBindings[k])&&d.keyBinding&&d.command)d.keyBinding.scopeName?(b[d.keyBinding.scopeName]||(b[d.keyBinding.scopeName]=[]),b[d.keyBinding.scopeName].push(d)):(c=g.getUserKeyString(d.keyBinding),j=document.createElement("span"),j.role="listitem",j.appendChild(document.createTextNode(c+" = "+d.command.name)),j.appendChild(document.createElement("br")),
a.appendChild(j));for(var f in b)if(b[f].length&&b[f].length>0){c=document.createElement("h2");a.appendChild(c);c.appendChild(document.createTextNode(f));for(k=0;k<b[f].length;k++)d=b[f][k],c=g.getUserKeyString(d.keyBinding),j=document.createElement("span"),j.role="listitem",j.appendChild(document.createTextNode(c+" = "+d.command.name)),j.appendChild(document.createElement("br")),a.appendChild(j)}},addCommand:function(a){this._commandList[a.id]=a},addCommandGroup:function(a,b,c,d,j,k){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];j&&(a=this._createEntryForPath(a,j));if(a[b]){if(d)a[b].title=d;if(c)a[b].position=c;a[b].emptyGroupMessage=k}else a[b]={title:d,position:c,emptyGroupMessage:k,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){if(b)for(var c=b.split("/"),d=0;d<c.length;d++)if(c[d].length>1)a[c[d]]||(a[c[d]]={position:0,children:{}}),a=a[c[d]].children;return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,c,d,j,k,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));a[b]={position:c};k&&(c=this._commandList[b])&&(this._activeBindings[b]={command:c,keyBinding:k,bindingOnly:j});f&&(c=this._commandList[b])&&(this._urlBindings[b]={command:c,urlBinding:f,bindingOnly:j});a.sortedContributions=
null},_checkForTrailingSeparator:function(a,b,c){var j;if(b==="tool"||b==="button")if((j=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&j.classList.contains("commandSeparator"))return c?(a.removeChild(j),!1):!0;if(b==="menu"&&(a=d.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(j=a[a.length-1],c)j.parentNode.parentNode.removeChild(j.parentNode);else return!0;return!1},renderCommands:function(a,b,c,j,k,f,e){if(typeof a!=="string")throw"a scope id for rendering must be specified";
b=d.node(b);if(!b)throw"no parent";var l=this._contributionsByScopeId[a];if(!c&&l){var c=l.localSelectionService||this._defaultSelectionService,n=this;c&&c.getSelections(function(c){n.renderCommands(a,b,c,j,k,f)})}else l&&(this._render(this._contributionsByScopeId[a],b,c,j,k||"button",f,e),this._checkForTrailingSeparator(b,k,!0))},destroy:function(a){a=d.node(a);if(!a)throw"no parent";for(;a.hasChildNodes();){var b=a.firstChild;b.commandTooltip&&b.commandTooltip.destroy();b.emptyGroupTooltip&&b.emptyGroupTooltip.destroy();
this.destroy(b);a.removeChild(b)}},_render:function(d,j,k,f,e,l,n){var g=d.sortedContributions;if(!g){var g=[],i=!1,h;for(h in d)if(!d.hasOwnProperty||d.hasOwnProperty(h)){var q=d[h];if(q&&typeof q.position==="number")q.id=h,g.push(q),i=!0}if(i)g.sort(function(a,b){return a.position-b.position}),d.sortedContributions=g}for(d=0;d<g.length;d++){var r;if(g[d].children&&Object.getOwnPropertyNames(g[d].children).length>0){var q=g[d],i=g[d].children,o=this,m;if(e==="tool"||e==="button")if(q.title){m=this._createDropdownMenu(j,
q.title);n&&b.generateNavGrid(n,m.menuButton);var O=i,M=q;window.setTimeout(function(){o._render(O,m.menu,k,f,"menu",l,n);o._checkForTrailingSeparator(m.menu,"menu",!0);if(m.menu.childNodes.length===0)if(M.emptyGroupMessage){if(!m.menuButton.emptyGroupTooltip)m.menuButton.emptyGroupTooltip=new c.Tooltip({node:m.menuButton,text:M.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else n&&b.removeNavGrid(n,m.menuButton),m.menu.parentNode&&m.menu.parentNode.removeChild(m.menu),
m.destroyButton&&m.destroyButton.parentNode&&m.destroyButton.parentNode.removeChild(m.destroyButton);else m.menuButton.style.visibility="visible"},0)}else{var H;j.childNodes.length>0&&!this._checkForTrailingSeparator(j,e)&&(H=this.generateSeparatorImage(j));o._render(i,j,k,f,e,l,n);j.childNodes.length>0&&j.childNodes[j.childNodes.length-1]!==H&&(H=this.generateSeparatorImage(j))}else q.title?(h=document.createElement("li"),j.appendChild(h),q=this._createDropdownMenu(h,q.title,!0),o._render(i,q.menu,
k,f,"menu",l,n),q.menu.childNodes.length===0&&j.removeChild(h)):(j.childNodes.length>0&&this._generateMenuSeparator(j),o._render(i,j,k,f,e,l,n),this._generateMenuSeparator(j))}else{h=(i=this._commandList[g[d].id])?!0:!1;var E=null,E=null;if(i){r=new a(this,f,k,l,i);r.domParent=j;q=h&&(i.visibleWhen?i.visibleWhen(k):!0);if(this._activeBindings[i.id]&&this._activeBindings[i.id].keyBinding)E=this._activeBindings[i.id],E.invocation=q?r:null,E.bindingOnly&&(h=!1);if(this._urlBindings[i.id]&&this._urlBindings[i.id].urlBinding)E=
this._urlBindings[i.id],E.invocation=q?r:null,E.bindingOnly&&(h=!1);h=h&&q}if(h)if(i.choiceCallback){e==="tool"||e==="button"?(h=j,q=!1,j.nodeName.toLowerCase()==="ul"&&(h=document.createElement("li"),j.appendChild(h))):(h=j,q=!0);var P=this;this._createDropdownMenu(h,i.name,q,function(a){this.populateChoicesMenu(a,k,f,l,P)}.bind(i))}else e==="tool"?(h="tool"+i.id+d,i._addTool(j,h,r,n)):e==="button"?(h="button"+i.id+d,i._addButton(j,h,r,n)):e==="menu"&&i._addMenuItem(j,r,n)}}},_createDropdownMenu:function(a,
b,c,j){var a=d.node(a),k,e=document.createElement("span");e.classList.add("dropdownTrigger");c?(e.classList.add("dropdownMenuItem"),k="dropdownSubMenu",c="dropdownArrowRight",e.tabIndex=0,e.role="menuitem"):(e.classList.add("commandButton"),c="dropdownArrowDown",e.tabIndex=0,e.role="button");b=document.createTextNode(b);e.appendChild(b);b=document.createElement("span");b.classList.add(c);e.appendChild(b);c=a;a.nodeName.toLowerCase()==="ul"?(c=document.createElement("li"),a.appendChild(c),a=c):(e.classList.add("commandMargins"),
a=e);c.appendChild(e);k&&c.classList.add(k);k=document.createElement("ul");c.appendChild(k);k.classList.add("dropdownMenu");e.dropdown=new f.Dropdown({dropdown:k,populate:j});k.dropdown=e.dropdown;return{menuButton:e,menu:k,dropdown:e.dropdown,destroyButton:a}},_generateCheckedMenuItem:function(a,b,c,d){var j=document.createElement("li");a.appendChild(j);a=document.createElement("label");a.classList.add("dropdownMenuItem");var k=document.createElement("input");k.type="checkbox";k.role="menuitem";
k.checked=c;k.classList.add("checkedMenuItem");a.appendChild(k);b=document.createTextNode(b);a.appendChild(b);j.appendChild(a);k.addEventListener("change",d,!1)},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var c=document.createElement("span");c.classList.add("dropdownSeparator");b.appendChild(c);a.appendChild(b)}},generateSeparatorImage:function(a){var b;b=a.nodeName.toLowerCase()==="ul"?
document.createElement("li"):document.createElement("span");a.appendChild(b);b.classList.add("core-sprite-sep");b.classList.add("imageSprite");b.classList.add("commandSeparator");return b}};j.prototype.constructor=j;n.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||i.toUrl("images/none.png");this.imageClass=a.imageClass;this.spriteClass=a.spriteClass||
"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},_addTool:function(a,d,j,f){j.handler=j.handler||this;var e;if(this.hrefCallback){if(e=this._makeLink(a,j,"commandLink"),!e)return}else e=document.createElement("span"),e.tabIndex=f?-1:0,e.role="button",this.hasImage()?(k(this,e,d),this.name&&e.setAttribute("aria-label",this.name)):(d=window.document.createTextNode(this.name),e.appendChild(d),e.classList.add("commandMissingImageButton"),e.classList.add("commandButton")),this._hookCallback(e,
j);j.domNode=e;j.domParent=a;if(this.tooltip)e.commandTooltip=new c.Tooltip({node:e,text:this.tooltip,position:["above","below","right","left"]});a.nodeName.toLowerCase()==="ul"?(d=document.createElement("li"),a.appendChild(d),a=d):e.classList.add("commandMargins");a.appendChild(e);b.generateNavGrid(f,j.domNode)},_addButton:function(a,d,j,f){j.handler=j.handler||this;var e;if(this.hrefCallback)e=this._makeLink(a,j,"commandLink");else if(!this.name&&this.hasImage()){if(e=document.createElement("span"),
e.tabIndex=0,e.role="button",k(this,e,d),this.tooltip&&e.setAttribute("aria-label",this.tooltip),this._hookCallback(e,j),this.tooltip)e.commandTooltip=new c.Tooltip({node:e,text:this.tooltip,position:["above","below","right","left"]})}else e=this._makeButton(a,j,"commandButton"),this._hookCallback(e,j);j.domParent=a;a.nodeName.toLowerCase()==="ul"?(d=document.createElement("li"),a.appendChild(d),a=d):e.classList.add("commandMargins");a.appendChild(e);b.generateNavGrid(f,j.domNode)},_addMenuItem:function(a,
c,d){c.domParent=a;var j,k=a.dropdown;this.hrefCallback?j=this._makeLink(a,c,"dropdownMenuItem",["right","left","above","below"]):(j=this._makeButton(a,c,"dropdownMenuItem",["right","left","above","below"]),this.callback&&this._hookCallback(j,c,function(){k.close(!0)}));j.role="menuitem";b.generateNavGrid(d,c.domNode);a.nodeName.toLowerCase()==="ul"?(c=document.createElement("li"),a.appendChild(c),a=c):j.classList.add("commandMargins");a.appendChild(j)},_makeButton:function(a,b,d,j){a=document.createElement("span");
a.role="button";a.tabIndex=0;a.id=this.name;var k=document.createTextNode(this.name);a.appendChild(k);d&&a.classList.add(d);if(this.tooltip)a.commandTooltip=new c.Tooltip({node:a,text:this.tooltip,position:j||["above","below","right","left"]});return b.domNode=a},_makeLink:function(a,b,d,j){var k=document.createElement("a");k.id=this.name;d&&k.classList.add(d);k.appendChild(document.createTextNode(this.name));if(this.hrefCallback)a=this.hrefCallback.call(b.handler,b),a.then?a.then(function(a){k.href=
a}):k.href=a?a:"#";if(this.tooltip)k.commandTooltip=new c.Tooltip({node:k,text:this.tooltip,position:j||["above","below","right","left"]});return b.domNode=k},_hookCallback:function(a,b,c,j){a.addEventListener("click",function(a){c&&c();b.commandService._invoke(b);j&&j();d.stop(a)},!1);a.addEventListener("keydown",function(a){if(a.keyCode===d.KEY.ENTER||a.keyCode===d.KEY.SPACE)c&&c(),b.commandService._invoke(b),j&&j(),d.stop(a)},!1)},populateChoicesMenu:function(a,b,c,j,k){c=this.getChoices(b,c,j);
for(j=0;j<c.length;j++){var f=c[j];if(f.name){var e=document.createElement("li");a.appendChild(e);var l=document.createElement("span");l.tabIndex=0;l.role="menuitem";l.classList.add("dropdownMenuItem");var n=document.createTextNode(f.name);l.appendChild(n);e.appendChild(l);l.choice=f;l.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);l.addEventListener("keydown",function(a){(a.keyCode===d.KEY.ENTER||a.keyCode===d.KEY.SPACE)&&a.target.choice&&
a.target.choice.callback.call(a.target.choice,b)},!1)}else k._generateMenuSeparator(a)}},getChoices:function(a,b,c){return this.choiceCallback?this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||this.image!==i.toUrl("images/none.png")}};n.prototype.constructor=n;l.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(m?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==
a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(m&&this.mod4!==a.ctrlKey)return!1;if(!this.domScope)return!0;for(a=a.target;a;){if(a===window.document)break;if(a===this.domScope)return!0;a=a.parentNode}}return!1},equals:function(a){return!a?!1:this.keyCode!==a.keyCode?!1:this.mod1!==a.mod1?!1:this.mod2!==a.mod2?!1:this.mod3!==a.mod3?!1:this.mod4!==a.mod4?!1:this.domScope!==a.domScope?!1:!0}};l.prototype.constructor=l;q.prototype={match:function(a){a=e.matchResourceParameters(a);return typeof a[this.token]!==
"undefined"?(this.parameterValue=a[this.token],this):null}};q.prototype.constructor=q;r.prototype={optionsRequested:function(){return this.optionsRequested}};r.prototype.constructor=r;o.prototype={_storeParameters:function(a){this.parameterTable=null;if(a){this.parameterTable={};for(var b=0;b<a.length;b++)this.parameterTable[a[b].name]=a[b]}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==
null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,b){var c=this.parameterTable[a];if(c)c.value=b},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=[];this.forEach(function(b){b=new r(b.name,b.type,b.label,
b.value,b.lines);a.push(b)});var b=new o(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};o.prototype.constructor=o;return{CommandService:j,CommandKeyBinding:l,Command:n,CommandInvocation:a,URLBinding:q,ParametersDescription:o,CommandParameter:r}});
define("orion/selection",["orion/EventTarget"],function(h){function i(g,e){e||(e="orion.page.selection");this._serviceRegistry=g;h.attach(this);this._serviceRegistration=g.registerService(e,this);this._selections=null}i.prototype={getSelection:function(g){g(this._getSingleSelection())},getSelections:function(g){g(this._selections||[])},_getSingleSelection:function(){return this._selections&&this._selections.length>0?this._selections[0]:null},setSelections:function(g){var e=this._selections;this._selections=
Array.isArray(g)?g.length>0?g:null:g?[g]:null;e!==this._selections&&this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};i.prototype.constructor=i;return{Selection:i}});
define("orion/i18nUtil",["require","orion/Deferred"],function(h,i){function g(d){if(d=localStorage.getItem("orion/messageBundle/"+d))if(d=JSON.parse(d),d._expires&&d._expires>(new Date).getTime())return delete d._expires,d;return null}var e={};return{getMessageBundle:function(d){function f(){h(["i18n!"+d],function(a){if(a){var b=d;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}c.resolve(a)})}if(e[d])return e[d];var c=new i;e[d]=
c;var b=g(d);if(b)return c.resolve(b),c;try{h([d],f)}catch(a){h(["orion/i18n!"+d],f)}return c},formatMessage:function(d){var f=arguments;return d.replace(/\$\{([^\}]+)\}/g,function(c,b){return f[(b<<0)+1]})}}});
define("orion/navigate/nls/root/messages",{"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.":"Click one of the tasks below to create an Orion folder.  You can upload, import, or generate files.","Toggle Left Pane":"Toggle Left Pane","Open or close the left pane":"Open or close the left pane",Navigator:"Navigator","Strings Xtrnalizr":"Strings Xtrnalizr","Externalize Strings from JavaScript files in this folder":"Externalize Strings from JavaScript files in this folder",
"Choose a Folder":"Choose a Folder","Copy of ${0}":"Copy of ${0}","Enter a new name for '${0}'":"Enter a new name for '${0}'","Choose folder...":"Choose folder...",Rename:"Rename","Rename the selected files or folders":"Rename the selected files or folders","Compare with each other":"Compare with each other","Compare the selected 2 files with each other":"Compare the selected 2 files with each other","Compare with...":"Compare with...","Compare the selected folder with a specified folder":"Compare the selected folder with a specified folder",
Delete:"Delete","Unknown item":"Unknown item","Make Favorite":"Make Favorite","Delete the selected files or folders":"Delete the selected files or folders","Are you sure you want to delete these ${0} items?":"Are you sure you want to delete these ${0} items?","Are you sure you want to delete '${0}'?":"Are you sure you want to delete '${0}'?","Are you sure you want to delete '${0}' from the favorites?":"Are you sure you want to delete '${0}' from the favorites?","Are you sure you want to delete these ${0} favorites?":"Are you sure you want to delete these ${0} favorites?",
"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the ${1} menu.","Export as zip":"Export as zip","Create a zip file of the folder contents and download it":"Create a zip file of the folder contents and download it","New File":"New File","Create a new file":"Create a new file","Name:":"Name:","New Folder":"New Folder","Folder name:":"Folder name:",
"Create a new folder":"Create a new folder","Creating folder":"Creating folder",Folder:"Folder","Create an empty folder":"Create an empty folder","Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.":"Create an empty folder on the Orion server.  You can import, upload, or create content in the editor.","Sample HTML5 Site":"Sample HTML5 Site","Generate a sample":"Generate a sample",'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.':'Generate an HTML5 "Hello World" website, including JavaScript, HTML, and CSS files.',
"Creating a folder for ${0}":"Creating a folder for ${0}","SFTP Import":"SFTP Import","Import content from SFTP":"Import content from SFTP","Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.":"Import content from an SFTP location into an Orion folder.  You will be prompted for the SFTP location and credentials.","Imported Content":"Imported Content","Upload a Zip":"Upload a Zip","Upload content from a local zip file":"Upload content from a local zip file",
"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.":"Upload content from a local zip file into an Orion folder.  You will be prompted for the local zip file.","Uploaded Content":"Uploaded Content","Creating an upload folder for ":"Creating an upload folder for ","Clone Git Repository":"Clone Git Repository","Clone a git repository":"Clone a git repository","Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.":"Go to the Orion repositories page to provide a git repository URL.  Once the repository is created, it will appear in the Navigator.",
"Link to Server":"Link to Server","Link to existing content on the server":"Link to existing content on the server","Create a folder that links to an existing folder on the server.":"Create a folder that links to an existing folder on the server.","Server path:":"Server path:","The name and server location were not specified.":"The name and server location were not specified.","Go Up":"Go Up","Move up to the parent folder":"Move up to the parent folder","Import local file...":"Import local file...",
"Copy files and folders from your local file system":"Copy files and folders from your local file system","SFTP from...":"SFTP from...","Copy files and folders from a specified SFTP connection":"Copy files and folders from a specified SFTP connection","Importing from ${0}":"Importing from ${0}","SFTP to...":"SFTP to...","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location","Exporting from ${0}":"Exporting from ${0}","Pasting ${0}":"Pasting ${0}",
"Copy to":"Copy to","Move to":"Move to","Copying ${0}":"Copying ${0}","Moving ${0}":"Moving ${0}","Renaming ${0}":"Renaming ${0}","Deleting ${0}":"Deleting ${0}","Creating ${0}":"Creating ${0}","Linking to ${0}":"Linking to ${0}","Move files and folders to a new location":"Move files and folders to a new location","Copy Items":"Copy Items","Copy the selected items to the copy/paste buffer":"Copy the selected items to the copy/paste buffer","Paste Items":"Paste Items","Paste items from the copy/paste buffer":"Paste items from the copy/paste buffer",
"Cannot paste into the Workspace root":"Cannot paste into the Workspace root","Open With":"Open With","Loading ":"Loading ",New:"New","Click on an item to make a selection, then use this menu to see what actions are available.":"Click on an item to make a selection, then use this menu to see what actions are available.",Actions:"Actions","Orion Content":"Orion Content"," is not supported in this file system":" is not supported in this file system","Create new content":"Create new content",Favorites:"Favorites",
"Import from HTTP...":"Import from HTTP...","File URL:":"File URL:","Copy a file from a URL and optionally unzip it":"Copy a file from a URL and optionally unzip it","Unzip *.zip files:":"Unzip *.zip files:","Extracted from:":"Extracted from:","Did not drop ${0}.  Folder drop is not supported in this browser.":"Did not drop ${0}.  Folder drop is not supported in this browser.","You cannot copy files directly into the workspace.  Create a folder first.":"You cannot copy files directly into the workspace.  Create a folder first.",
"Unzip ${0}?":"Unzip ${0}?"});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages","orion/navigate/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(e){typeof g[e]==="undefined"&&(g[e]=h[e])});return g});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(h,i,g){function e(c,b,a){if(!c[b])throw b+h[" is not supported in this file system"];return c[b].apply(c,a)}function d(c,b,a,j){if(!c.readBlob)throw h["source file service does not support binary read"];if(!a.writeBlob)throw h["target file service does not support binary write"];if(b[b.length-1]!=="/")return e(c,"readBlob",[b]).then(function(b){return e(a,"writeBlob",[j,b])});var k=j.substring(0,
j.length-1),f=decodeURIComponent(k.substring(k.lastIndexOf("/")+1)),k=k.substring(0,k.lastIndexOf("/")+1);return e(a,"createFolder",[k,f]).then(function(){},function(){}).then(function(){return e(c,"fetchChildren",[b]).then(function(b){for(var k=[],f=0;f<b.length;++f){var e=b[f].Location,n=e;b[f].Directory&&(n=e.substring(0,e.length-1));n=decodeURIComponent(n.substring(n.lastIndexOf("/")+1));n=j+encodeURIComponent(n);b[f].Directory&&(n+="/");k[f]=d(c,e,a,n)}return i.all(k)})})}function f(c,b){function a(a){var b=
new i;b.reject(h["No Matching FileService for location:"]+a);return b}var d=c.getServiceReferences("orion.core.file"),k=d;if(b)for(var k=[],f=0;f<d.length;++f)b(d[f])&&k.push(d[f]);for(var e=[],q=[],r=[],o=[],m={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<k.length;++d)o[d]={Directory:!0,Length:0,LocalTimeStamp:0,Location:k[d].getProperty("top"),ChildrenLocation:k[d].getProperty("top"),Name:k[d].getProperty("Name")},f=k[d].getProperty("pattern")||".*",f[0]!=="^"&&(f="^"+f),e[d]=RegExp(f),q[d]=c.getService(k[d]),r[d]=k[d].getProperty("Name"),
k[d].getProperty("NameKey")&&k[d].getProperty("nls")&&g.getMessageBundle(k[d].getProperty("nls")).then(function(a,b){o[a].Name=b[k[a].getProperty("NameKey")];r[a]=b[k[a].getProperty("NameKey")]}.bind(this,d));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return q[0]?0:-1;for(var b=0;b<e.length;++b)if(e[b].test(a))return b;throw h["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?m:q[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?m.Name:r[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?m.Location:o[a].Location}}f.prototype={getService:function(c){return this._getService(c)},fileServiceName:function(c){return this._getServiceName(c)},fileServiceRootURL:function(c){return this._getServiceRootURL(c)},fetchChildren:function(c){return e(this._getService(c),"fetchChildren",arguments)},createWorkspace:function(c){return e(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return e(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(c){return e(this._getService(c),"loadWorkspace",arguments)},createProject:function(c,b,a,d){return e(this._getService(c),"createProject",arguments)},createFolder:function(c,b){return e(this._getService(c),"createFolder",arguments)},createFile:function(c,b){return e(this._getService(c),"createFile",arguments)},deleteFile:function(c){return e(this._getService(c),"deleteFile",arguments)},
moveFile:function(c,b,a){var j=this._getService(c),k=this._getService(b);if(j===k)return e(j,"moveFile",arguments);var f=c[c.length-1]==="/",l=b;l[l.length-1]!=="/"&&(l+="/");if(a)l+=encodeURIComponent(a);else{var g=c;f&&(g=g.substring(0,g.length-1));l+=g.substring(g.lastIndexOf("/")+1)}f&&l[l.length-1]!=="/"&&(l+="/");return d(j,c,k,l).then(function(){return e(j,"deleteFile",[c])})},copyFile:function(c,b,a){var j=this._getService(c),k=this._getService(b);if(j===k)return e(j,"copyFile",arguments);
var f=c[c.length-1]==="/",l=b;l[l.length-1]!=="/"&&(l+="/");if(a)l+=encodeURIComponent(a);else{var g=c;f&&(g=g.substring(0,g.length-1));l+=g.substring(g.lastIndexOf("/")+1)}f&&l[l.length-1]!=="/"&&(l+="/");return d(j,c,k,l)},read:function(c,b){return e(this._getService(c),"read",arguments)},write:function(c,b,a){return e(this._getService(c),"write",arguments)},remoteImport:function(c,b){return e(this._getService(c),"remoteImport",arguments)},remoteExport:function(c,b){return e(this._getService(c),
"remoteExport",arguments)},search:function(c){return e(this._getService(c.resource),"search",arguments)}};f.prototype.constructor=f;return{FileClient:f}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Case sensitive":"Case sensitive","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Replace:"Replace","Replace All":"Replace All",
"Not found":"Not found","Replacing all...":"Replacing all..."," matches":" matches","Replaced ":"Replaced ","Nothing replaced":"Nothing replaced","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.","Save Search":"Save Search","Save search query":"Save search query",
"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","Search Again":"Search Again","Search again":"Search again","< 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",Searches:"Searches","You can save frequently used by searches by choosing ${0} in the search toolbar.":"You can save frequently used by searches by choosing ${0} in the search toolbar."});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages","orion/search/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(e){typeof g[e]==="undefined"&&(g[e]=h[e])});return g});
define("orion/editor/regex",[],function(){return{escape:function(h){return h.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(h){return(h=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(h))?{pattern:h[1],flags:h[2]}:null}}});
define("orion/URITemplate",[],function(){function h(a){this._text=a}function i(a,b){if(b==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(b==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]");if(b==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+b);}function g(a,b,c){for(var d=[],f=0;f<a.length;f++)typeof a[f]!=="undefined"&&
d.push(i(a[f],b));return d.join(c)}function e(a,b,c,d){for(var f=Object.keys(a),e=[],g=0;g<f.length;g++)typeof a[f[g]]!=="undefined"&&e.push(i(f[g],b)+c+i(a[f[g]],b));return e.join(d)}function d(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=c[a[0]])?a=a.substring(1):this._operator=c.NUL;for(var d=[],f=a.split(","),e=0;e<f.length;e++){var l=f[e].match(b);if(l===null)throw Error("Bad VarSpec: "+a);d.push({name:l[1],explode:!!l[2],prefix:l[3]?parseInt(l[3],
10):-1})}this._varSpecList=d}function f(a){for(var b=[],c=0,f=a.indexOf("{",c);f!==-1;){b.push(new h(a.substring(c,f)));c=a.indexOf("}",f+1);if(c===-1)throw Error("Invalid template: "+a);b.push(new d(a.substring(f+1,c)));c+=1;f=a.indexOf("{",c)}b.push(new h(a.substring(c)));this._templateComponents=b}var c={NUL:{first:"",sep:",",named:!1,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R"},".":{first:".",sep:",",named:!1,ifemp:"",allow:"U"},"/":{first:"/",sep:"/",named:!1,ifemp:"",
allow:"U"},";":{first:";",sep:";",named:!0,ifemp:"",allow:"U"},"?":{first:"?",sep:"&",named:!0,ifemp:"=",allow:"U"},"&":{first:"&",sep:"&",named:!0,ifemp:"=",allow:"U"},"#":{first:"#",sep:",",named:!1,ifemp:"",allow:"U+R"},",":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R-,"}},b=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;h.prototype={expand:function(){return encodeURI(this._text)}};d.prototype={expand:function(a){for(var b=[],c=
0;c<this._varSpecList.length;c++){var d=this._varSpecList[c],f=d.name,h=a[f],r=typeof h;if(r!=="undefined"&&h!==null){var o=b.length===0?this._operator.first:this._operator.sep;if(r==="string")this._operator.named&&(o+=i(f,"U+R"),o+=h.length===0?this._operator.ifemp:"="),d.prefix!==-1&&d.prefix<h.length&&(h=h.substring(0,d.prefix)),o+=i(h,this._operator.allow);else if(Array.isArray(h))d.explode?o+=g(h,this._operator.allow,this._operator.sep):(this._operator.named&&(o+=i(f,"U+R"),o+=h.length===0?this._operator.ifemp:
"="),o+=g(h,this._operator.allow,","));else if(r==="object")d.explode?o+=e(h,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(o+=i(f,"U+R"),o+=Object.keys(h).length===0?this._operator.ifemp:"="),o+=e(h,this._operator.allow,",",","));else throw Error("bad param type: "+f+" : "+r);b.push(o)}}return b.join("")}};f.prototype={expand:function(a){for(var b=[],c=0;c<this._templateComponents.length;c++)b.push(this._templateComponents[c].expand(a));return b.join("")}};return f});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commands,orion/PageUtil,orion/URITemplate".split(","),function(h,i,g,e,d,f){function c(a,b,c){var d="";c&&(d="^");if(d=g.parse("/"+d+a.searchStr+"/"))c=d.pattern,d=d.flags,d.indexOf("i")===-1&&!b.caseSensitive&&(d+="i"),a.regExp={pattern:c,flags:d},a.wildCard=!0}var b=b||{};b.searchUtils=b.searchUtils||{};b.searchUtils.ALL_FILE_TYPE="*.*";b.searchUtils.doSearch=function(a,c,d,f){if(a){var e=!0;d==="*"&&(d="");d===
""&&(e=f&&f.type!==b.searchUtils.ALL_FILE_TYPE);if(e){d!==""&&b.searchUtils.addRecentSearch(c,d,f?f.regEx:!1);var a=a.createSearchParams(d,!1,!1,f),g=b.searchUtils.generateSearchHref(a);b.searchUtils.getOpenSearchPref(c,function(a){a?window.open(g):window.location=g})}}else window.alert(h["Can't search: no search service is available"])};b.searchUtils.generateSearchHelper=function(a,d){var f=a.keyword,e=f,g={};a.fileType&&a.fileType!==b.searchUtils.ALL_FILE_TYPE&&f===""&&(e="*."+a.fileType);if(a.regEx)g.searchStr=
f,c(g,a,d);else{var i=f.indexOf("*")>-1,h=f.indexOf("?")>-1;i&&(f=f.split("*").join(".*"));h&&(f=f.split("?").join("."));!i&&!h&&!a.nameSearch?(g.searchStr=a.caseSensitive?f.split("\\").join(""):f.split("\\").join("").toLowerCase(),g.wildCard=!1):(g.searchStr=a.caseSensitive?f:f.toLowerCase(),c(g,a,d),g.wildCard=!0)}g.searchStrLength=g.searchStr.length;return{params:a,inFileQuery:g,displayedSearchTerm:e}};b.searchUtils.convertSearchParams=function(a){if(a.rows!==void 0)a.rows=parseInt(a.rows);if(a.start!==
void 0)a.start=parseInt(a.start);if(typeof a.regEx==="string")a.regEx=a.regEx.toLowerCase()==="true";if(typeof a.caseSensitive==="string")a.caseSensitive=a.caseSensitive.toLowerCase()==="true";if(typeof a.nameSearch==="string")a.nameSearch=a.nameSearch.toLowerCase()==="true"};b.searchUtils.copySearchParams=function(a,b){var c={},d;for(d in a)if(a[d]!==void 0&&a[d]!==null&&(b||d!=="replace"))c[d]=a[d];return c};b.searchUtils.generateSearchHref=function(a){var c=i.toUrl("search/search.html"),a=b.searchUtils.copySearchParams(a,
!0),d=a.resource;a.resource=void 0;return(new f(c+"#{,resource,params*}")).expand({resource:d,params:a})};b.searchUtils.generateFindURLBinding=function(a,b,c,d){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof d==="string"?d:void 0,atLine:typeof c==="number"?c:void 0};return","+(new f("{,params*}")).expand({params:a})};b.searchUtils.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)};b.searchUtils.replaceRegEx=function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)};b.searchUtils.replaceStringLiteral=function(a,c,d){c=g.parse("/"+c+"/gim");return b.searchUtils.replaceRegEx(a,c,d)};b.searchUtils.searchOnelineLiteral=function(a,b,c){var d;d=0;for(var f=!1,e=[];;)if(d=b.indexOf(a.searchStr,d),d<0)break;else{e.push({startIndex:d,length:a.searchStrLength});
f=!0;if(c)break;d+=a.searchStrLength}return f?e:null};b.searchUtils.findRegExp=function(a,b,c,d){if(!b)return null;c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var f=null;return(f=RegExp(b,c).exec(a.substring(d)))&&{startIndex:f.index+d,length:f[0].length}};b.searchUtils.searchOnelineRegEx=function(a,c,d){for(var f=0,e=!1,g=[];;)if(f=b.searchUtils.findRegExp(c,a.regExp.pattern,a.regExp.flags,f)){g.push(f);e=!0;if(d)break;f=f.startIndex+f.length}else break;return e?g:null};
b.searchUtils.generateNewContents=function(a,c,d,f,e,g){if(f&&c){if(!a)d.contents=[];for(var i=0;i<c.length;i++){for(var h=c[i],m=!1,p=!1,x=[],s,u=0,v=0;v<f.children.length;v++)if(f.children[v].lineNumber-1===i){u=v;for(m=0;m<f.children[v].matches.length;m++)f.children[v+m].checked!==!1&&x.push(m);p=x.length>0;s=f.children[v].matches;m=!0;break}if(m){if(p){x=b.searchUtils.replaceCheckedMatches(h,e,s,x,g);h=x.replacedStr;for(m=0;m<f.children[u].matches.length;m++)f.children[u+m].newMatches=x.newMatches}else for(m=
0;m<f.children[u].matches.length;m++)f.children[u+m].newMatches=f.children[u+m].matches;a?d.contents[i]=h:d.contents.push(h)}else a||d.contents.push(h)}}};b.searchUtils.generateMatchContext=function(a,b,c){var d=[],f=a*2+1,e;b.length<=f?(e=0,a=b.length-1):(e=c-a,e<0?(e=0,a=e+f-1):(a=c+a,a>b.length-1&&(a=b.length-1,e=a-f+1)));for(f=e;f<=a;f++)d.push({context:b[f],current:f===c});return d};b.searchUtils.splitFile=function(a){for(var b=0,c=0,d=0,f=0,e=[];;){b!==-1&&b<=d&&(b=a.indexOf("\r",d));c!==-1&&
c<=d&&(c=a.indexOf("\n",d));if(c===-1&&b===-1){e.push(a.substring(f));break}var g=1;b!==-1&&c!==-1?b+1===c?(g=2,d=c+1):d=(b<c?b:c)+1:d=b!==-1?b+1:c+1;e.push(a.substring(f,d-g));f=d}return e};b.searchUtils.searchWithinFile=function(a,c,d,f,e,g){d=b.searchUtils.splitFile(d);if(e)c.contents=d;if(c){c.children=[];for(var i=f=0;i<d.length;i++){var h=d[i];if(h&&h.length>0){var m=g?h:h.toLowerCase();if(m=a.wildCard?b.searchUtils.searchOnelineRegEx(a,m):b.searchUtils.searchOnelineLiteral(a,m)){var p=i+1;
if(e)for(var x=0;x<m.length;x++){var s=x+1,s={parent:c,checked:c.checked,type:"detail",matches:m,lineNumber:p,matchNumber:s,name:h,location:c.location+"-"+p+"-"+s};c.children.push(s)}else s={parent:c,context:b.searchUtils.generateMatchContext(2,d,i),checked:c.checked,type:"detail",matches:m,lineNumber:p,name:h,location:c.location+"-"+p},c.children.push(s);f+=m.length}}}c.totalMatches=f}};b.searchUtils.replaceCheckedMatches=function(a,b,c,d,f){for(var e=0,g="",i=[],h=0;h<c.length;h++){e!==c[h].startIndex&&
(g+=a.substring(e,c[h].startIndex));if(c[h].length)f=c[h].length;for(var e=!1,p=0;p<d.length;p++)if(d[p]===h){e=!0;break}e?(i.push({startIndex:g.length,length:b.length}),g+=b):(i.push({startIndex:g.length,length:f}),g+=a.substring(c[h].startIndex,c[h].startIndex+f));e=c[h].startIndex+f}e<a.length&&(g+=a.substring(e));return{replacedStr:g,newMatches:i}};b.searchUtils.fullPathNameByMeta=function(a){var b=a.length,c="";if(b>0)for(b-=1;b>-1;b--)c=c+(c===""?"":"/")+a[b].Name;return c};b.searchUtils.path2FolderName=
function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};b.searchUtils._storeRecentSearch=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b)})};b.searchUtils.addRecentSearch=function(a,c,d){typeof c==="string"&&c&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){var e,f=f.get("recentSearch");typeof f==="string"&&(f=JSON.parse(f));if(f){for(e in f)if(f[e].name===c)return;
f.length>=20&&f.splice(19,f.length-20+1)}else f=[];f.splice(0,0,{name:c,regEx:d});b.searchUtils._storeRecentSearch(a,f)})};b.searchUtils.getSearches=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&c&&c(a)})};b.searchUtils.getMixedSearches=function(a,c,d,f){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var e,g=a.get("recentSearch");typeof g===
"string"&&(g=JSON.parse(g));if(c)for(e in a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a)if(d){var h=b.searchUtils.parseQueryStr(a[e].query);g.some(function(a){return h.searchStrTitle===a.name})||g.push({name:h.searchStrTitle,label:a[e].name})}else g.push({name:null,label:a[e].name,value:a[e].query});g&&f&&f(g)})};b.searchUtils.getOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/cm/configurations").then(function(a){a=a.get("nav.config");b(a&&a["links.newtab"]!==
"undefined"?a["links.newtab"]?!0:!1:!1)})};b.searchUtils.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})};return b.searchUtils});
define("orion/contentTypes",[],function(){function h(d,c){function b(a,b,c,d){var c=b.filename.indexOf(c)>=0,f=b.extension.indexOf(d)>=0;if(c||f)if(!a||c&&a.extension.indexOf(d)>=0)return b;return a}for(var a=d&&d.split(".").pop(),e=null,k=0;k<c.length;k++){var g=c[k];b(e,g,d,a)===g&&(e=g)}return e}function i(f){this.serviceRegistry=f;this.map=function(c){function b(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var c=c.getServiceReferences(e).concat(c.getServiceReferences(d)),
a={},f=0;f<c.length;f++)for(var k=b(c[f].getProperty("contentTypes")),g=0;g<k.length;g++){var l=k[g];a[l.id]||(a[l.id]={id:l.id,name:l.name,image:l.image,"extends":l["extends"],extension:b(l.extension),filename:b(l.filename)})}return a}(f);f.registerService(g,this)}var g="orion.core.contenttypes",e="orion.core.contenttype",d="orion.file.contenttype";i.prototype={getContentTypes:function(){var d=this.getContentTypesMap(),c=[],b;for(b in d)d.hasOwnProperty(b)&&c.push(d[b]);return c},getContentTypesMap:function(){return this.map},
getFileContentType:function(d){return h(d.Name,this.getContentTypes())},getFilenameContentType:function(d){return h(d,this.getContentTypes())},getContentType:function(d){return this.map[d]||null},isExtensionOf:function(d,c){d=typeof d==="string"?this.getContentType(d):d;c=typeof c==="string"?this.getContentType(c):c;if(!d||!c)return!1;if(d.id===c.id)return!0;else for(var b=d,a={};b&&(b=this.getContentType(b["extends"]));){if(b.id===c.id)return!0;if(a[b.id])throw Error("Cycle: "+b.id);a[b.id]=!0}return!1},
isSomeExtensionOf:function(d,c){for(var b=0;b<c.length;b++)if(this.isExtensionOf(d,c[b]))return!0;return!1}};return{ContentTypeService:i,getFilenameContentType:h}});
define("orion/crawler/nls/root/messages",{"Searching file:":"Searching file:","is not supported in this file system":"is not supported in this file system","${0} files found out of ${1}":"${0} files found out of ${1}","The search term on this location will not use indexed files.":"The search term on this location will not use indexed files.","It will take longer time. Do you want to proceed?":"It will take longer time. Do you want to proceed?"});
define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages","orion/crawler/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(e){typeof g[e]==="undefined"&&(g[e]=h[e])});return g});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(h,i,g,e,d,f){function c(b,a,c,d){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=d&&d.searchOnName;this._buildSkeletonOnly=d&&d.buildSkeletonOnly;this._fetchChildrenCallBack=d&&d.fetchChildrenCallBack;this._searchParams=c;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:e.generateSearchHelper(c);this._location=d&&d.location;this._childrenLocation=d&&d.childrenLocation?d.childrenLocation:this._location}c.prototype.search=function(b){var a=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=b;var c=this;this.registry.getService("orion.page.dialog").confirm(h["The search term on this location will not use indexed files."]+"\n"+h["It will take longer time. Do you want to proceed?"],function(b){b&&a.getContentTypes().then(function(a){c.contentTypesCache=
a;c._visitRecursively(c._childrenLocation).then(function(){c._sort(c.fileLocations);c._onSearchComplete({response:{numFound:c.fileLocations.length,docs:c.fileLocations}})})})})};c.prototype.searchName=function(b,a){if(b)this.searchHelper=e.generateSearchHelper(b,!0);if(a)this.onSearchNameComplete=a;var c=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var d=0;d<this.fileSkeleton.length;d++){var f=this.fileSkeleton[d].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?
e.searchOnelineRegEx(this.searchHelper.inFileQuery,f,!0):e.searchOnelineLiteral(this.searchHelper.inFileQuery,f,!0))if(c.push(this.fileSkeleton[d]),c.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:c.length,docs:c}})}};c.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contenttypes"),d=this;b();c.getContentTypes().then(function(b){d.contentTypesCache=b;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=
!1;a();d.searchHelper&&!d._buildSkeletonOnly&&d.searchName()})})};c.prototype._searchCompleted=function(){console.log("Search Completed.")};c.prototype._searchFiles=function(){var b=[],a;if(this.fileLocations.length>0){a=this;for(var c=0;c<a.fileLocations.length;c++)b.push(a._sniffSearch(a.fileLocations[c]))}return f.all(b)};c.prototype._sort=function(b){b.sort(function(a,b){var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0})};c.prototype._onFileType=function(b){return this.searchHelper.params.fileType?
this.searchHelper.params.fileType===e.ALL_FILE_TYPE?!0:b.extension.indexOf(this.searchHelper.params.fileType)>=0:!0};c.prototype._visitRecursively=function(b){var a=[],c=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);var e=c.registry.getService("orion.page.progress");return(e?e.progress(c.fileClient.fetchChildren(b),"Crawling search for children of "+b):c.fileClient.fetchChildren(b)).then(function(b){for(var e=0;e<b.length;e++)if(b[e].Directory!==void 0&&b[e].Directory===!1)if(c._searchOnName)a.push(c._buildSingleSkeleton(b[e]));
else if(c._buildSkeletonOnly)a.push(c._buildSingleSkeleton(b[e]));else{var k=d.getFilenameContentType(b[e].Name,c.contentTypesCache);k&&(k["extends"]==="text/plain"||k.id==="text/plain")&&c._onFileType(k)&&a.push(c._sniffSearch(b[e]))}else b[e].Location&&a.push(c._visitRecursively(b[e].ChildrenLocation));return f.all(a)})};c.prototype._hitOnceWithinFile=function(b){b=this._searchParams.caseSensitive?b:b.toLowerCase();return this.searchHelper.inFileQuery.wildCard?e.searchOnelineRegEx(this.searchHelper.inFileQuery,
b,!0):e.searchOnelineLiteral(this.searchHelper.inFileQuery,b,!0)};c.prototype._reportSingleHit=function(b){b.LastModified=b.LocalTimeStamp;this.fileLocations.push(b);this._hitCounter++;this._sort(this.fileLocations);this._onSearchComplete({response:{numFound:this.fileLocations.length,docs:this.fileLocations}},!0)};c.prototype._sniffSearch=function(b){this._totalCounter++;var a=this;if(this.searchHelper.params.keyword==="")this._reportSingleHit(b),this.registry.getService("orion.page.message").setProgressResult({Message:g.formatMessage(h["${0} files found out of ${1}"],
this._hitCounter,this._totalCounter)});else return this.registry.getService("orion.page.progress").progress(a.fileClient.read(b.Location),"Reading file "+b.Location).then(function(c){a._hitOnceWithinFile(c)&&a._reportSingleHit(b);a.registry.getService("orion.page.message").setProgressResult({Message:g.formatMessage(h["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)})},function(a){console.error("Error loading file content: "+a.message)})};c.prototype._buildSingleSkeleton=function(b){this._totalCounter++;
this.fileSkeleton.push(b);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();b=new f;b.resolve(this._totalCounter);return b};c.prototype.constructor=c;return{SearchCrawler:c}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/searchUtils,orion/crawler/searchCrawler".split(","),function(h,i,g,e,d,f){function c(b){this.registry=b.serviceRegistry;this._commandService=b.commandService;(this._fileService=b.fileService)||console.error("No file service on search client")}c.prototype={search:function(b,a,c){var e=function(a){for(var b=[],c=0;c<a.response.docs.length;c++){var f=a.response.docs[c];b.push({name:f.Name,path:f.Location,
folderName:d.path2FolderName(f.Path?f.Path:f.Location,f.Name),directory:f.Directory,lineNumber:f.LineNumber})}return b};if(this._crawler&&b.nameSearch)this._crawler.searchName(b,function(a){c(e(a),null)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(b),"Searching "+b.keyword).then(function(a){var d=b.keyword,d=d.substring(d.indexOf("}")+1),d=d.substring(d.indexOf(":")+1);c(e(a),d)},function(a){c(null,null,a)})}catch(g){typeof g==="string"&&g.indexOf("search")>
-1&&this._crawler?this._crawler.searchName(b,function(a){c(e(a),null)}):typeof g==="string"&&g.indexOf("search")>-1&&!b.nameSearch?(new f.SearchCrawler(this.registry,this._fileService,b,{childrenLocation:this.getChildrenLocation()})).search(function(a){c(e(a),null)}):this.registry.getService("orion.page.message").setErrorMessage(g)}},getFileService:function(){return this._fileService},setCrawler:function(b){this._crawler=b},handleError:function(b,a){console.error(b);g.empty(a);a.appendChild(document.createTextNode(b));
return b},setLocationByMetaData:function(b,a){var c="",d=null;this._searchRootLocation=this._fileService.fileServiceRootURL(b.Location);a&&b&&b.Parents&&b.Parents.length>0?d=a.index==="last"?b.Parents[b.Parents.length-1]:b.Parents[0]:b&&b.Directory&&b.Location&&b.Parents&&(d=b);if(d)this.setLocationbyURL(d.Location),c=d.Name,this._childrenLocation=d.ChildrenLocation;else if(b)this.setLocationbyURL(this._searchRootLocation),c=this._fileService.fileServiceName(b.Location),this._childrenLocation=b.ChildrenLocation;
d=g.node("search");c||(c="");if(d&&d.placeholder){d.value="";var f=e.formatMessage(h["Search ${0}"],c);d.placeholder=f.length>30?f.substring(0,27)+"...":e.formatMessage(h["Search ${0}"],c)}if(d&&d.title)d.title=h["Type a keyword or wild card to search in "]+c},setLocationbyURL:function(b){this._searchLocation=b},setRootLocationbyURL:function(b){this._searchRootLocation=b},setChildrenLocationbyURL:function(b){this._childrenLocation=b},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(b,a,c,d){c=c?this.getSearchRootLocation():this.getSearchLocation();return a?{resource:c,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:b}:{resource:c,sort:"Path asc",
rows:40,start:0,caseSensitive:d?d.caseSensitive:void 0,regEx:d?d.regEx:void 0,fileType:d?d.type:void 0,keyword:b}},defaultRenderer:{makeRenderFunction:function(b,a,c,d,f){function l(a){return!b?!0:(a=b.getFilenameContentType(a))&&(a["extends"]==="text/plain"||a.id==="text/plain")?!0:!1}return function(b,r,o){if(o)g.empty(a),b=document.createElement("div"),b.appendChild(document.createTextNode(h["Search failed."])),a.appendChild(b),typeof d==="function"&&d(a);else{var o=function(){function a(b,c){var d=
c.folderName?c.folderName:c.path,f=document.createElement("span");f.id=d.replace(/[^a-zA-Z0-9_\.:\-]/g,"");f.appendChild(document.createTextNode(" - "+d+" "));b.appendChild(f)}var b={};return function(c,d){var f=d.name;if(b.hasOwnProperty(f)){a(c,d);var e=b[f];typeof e==="function"&&(b[f]=null,e())}else b[f]=function(){a(c,d)}}}(),m=!1;g.empty(a);if(b&&b.length>0){var p=document.createElement("table");p.setAttribute("role","presentation");for(var x=0;x<b.length;x++){var s=b[x],u;if(!m&&(m=!0,c))u=
p.insertRow(0).insertCell(0),u.textContent=c;u=p.insertRow(-1).insertCell(0);u.colspan=2;f&&f(u);var v=document.createElement("a");v.appendChild(document.createTextNode(s.name));s.LineNumber&&v.appendChild(document.createTextNode(" (Line "+s.LineNumber+")"));var w=s.location;s.isExternalResource?w=s.path:(w=s.directory?i.toUrl("navigate/table.html")+"#"+s.path:l(s.name)?i.toUrl("edit/edit.html")+"#"+s.path:s.path,w==="#"&&(w=""));v.setAttribute("href",w);v.setAttribute("aria-describedby",(s.folderName?
s.folderName:s.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));v.style.verticalAlign="middle";u.appendChild(v);o(u,s)}a.appendChild(p);typeof d==="function"&&d(a)}!m&&r&&(b=e.formatMessage(h["No matches found for ${0}"],r),g.empty(a),a.appendChild(document.createTextNode(b)),typeof d==="function"&&d(a))}}}}};c.prototype.constructor=c;return{Searcher:c}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(h,i){function g(c,b,a){return c[b].apply(c,a)}function e(c){this._location=c}function d(){var c=new i;c.reject(h["No Matching OperationService for location:"]+this._location);return c}function f(c){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=c.getService("orion.core.preference");for(var b=c.getServiceReferences("orion.core.operation"),
a=0;a<b.length;a++){var d=c.getService(b[a]);this._services[a]=d;d=b[a].getProperty("pattern")||".*";d[0]!=="^"&&(d="^"+d);this._patterns[a]=RegExp(d)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];return new e(a)}}e.prototype={getOperation:d,getOperations:d,removeCompletedOperations:d,removeOperation:d,cancelOperation:d};e.prototype.constructor=e;f.prototype={getOperations:function(){var c=
new i;if(this._operations)return c.resolve(this._operations),c;var b=this;this._preferenceService.getPreferences("/operations").then(function(a){b._operations=a;c.resolve(b._operations)});return c},getOperation:function(c){return g(this._getService(c),"getOperation",arguments)},removeCompletedOperations:function(){for(var c=[],b=this,a=0;a<this._services.length;a++){var d=this._patterns[a],f=new i;c[a]=f.promise;g(this._services[a],"removeCompletedOperations").then(function(a){return function(c){Array.isArray(c)&&
b.getOperations.bind(b)().then(function(b){for(var f=b.keys(),e=0;e<f.length;e++){var g=f[e];d.test(g)&&c.indexOf(g)<0&&b.remove(g)}a.resolve()})}}(f),function(a){return function(b){a.reject(b)}}(f))}return i.all(c)},removeOperation:function(c){var b=this;return g(this._getService(c),"removeOperation",arguments).then(function(){b.getOperations.bind(b)().then(function(a){a.remove(c)})},function(a){return a},function(a){return a})}};f.prototype.constructor=f;return{OperationsClient:f}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? = any character, * = any string):":"Type the name of a file to open (? = any character, * = any string):",Search:"Search","Populating favorites...":"Populating favorites...",Favorite:"Favorite","Searching...":"Searching...",name:"name","orion.widgets.UserMenu":"orion.widgets.UserMenu",
test:"test","Sign Out":"Sign Out","Sign Out ":"Sign Out ","</a>":"</a>",">":">","Sign In To ":"Sign In To ","Sign In":"Sign In",Help:"Help","Keyboard Shortcuts":"Keyboard Shortcuts",Settings:"Settings","View profile of ":"View profile of ",Profiles:"Profiles","Information Needed":"Information Needed",Cancel:"Cancel","If the same file exists in both the source and destination:":"If the same file exists in both the source and destination:","Cancel the transfer":"Cancel the transfer","Always overwrite destination":"Always overwrite destination",
"Overwrite if source is newer":"Overwrite if source is newer",New:"New","Building file skeleton...":"Building file skeleton...",Add:"Add","Upload...":"Upload...","For a list of available commands type '${0}'.":"For a list of available commands type '${0}'."});define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages","orion/widgets/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(e){typeof g[e]==="undefined"&&(g[e]=h[e])});return g});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(h,i,g,e){function d(){}d.prototype={_initialize:function(d,c,b,a,j){this._tooltip=new e.Tooltip({node:d,hideDelay:j||0,afterShowing:this._afterShowingFunction(c).bind(this),afterHiding:b,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";d=document.createRange();d.selectNode(this.$parent);d=d.createContextualFragment(this.TEMPLATE);
this.messages&&g.processTextNodes(d,h);this.$parent.appendChild(d);var k=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE&&k.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},_afterShowingFunction:function(d){return function(){d&&d.bind(this)();if(!this.customFocus){var c=
g.firstTabbable(this.$parent);c&&c.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};d.prototype.constructor=d;return{PopupDialog:d}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(h,i,g){function e(d,f){this._activeContainer=null;this._getElementsFunction=d;this._toolbarLayoutFunction=f}e.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&g.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&g.empty(this._activeElements.dismissArea);
this._activeElements.commandNode&&this._activeElements.commandNode.classList.remove("activeCommand");this._toolbarLayoutFunction(this._activeElements);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},open:function(d,f,c){typeof d==="string"&&(d=g.node(d));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===d)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(d))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=c;var b=f(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!b)return!1;this._activeElements.focusNode=b;d=g.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(d.length===0){f=this._activeElements.dismissArea||
this._activeElements.parameterArea;d=document.createElement("span");d.id="closebox";d.role="button";d.tabIndex=0;d.classList.add("imageSprite");d.classList.add("core-sprite-close");d.classList.add("dismiss");d.title=h.Close;f.appendChild(d);var a=this;d.addEventListener("click",function(){a.close()},!1);d.addEventListener("keydown",function(b){(b.keyCode===g.KEY.ENTER||b.keyCode===g.KEY.SPACE)&&a.close()},!1)}this._activeElements.slideContainer.classList.add("slideContainerActive");this._toolbarLayoutFunction(this._activeElements);
if(b)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){b.focus();b.select()},0);this._activeElements.commandNode&&this._activeElements.commandNode.classList.add("activeCommand");return!0}return!1},_collectAndCall:function(d,f){g.$$array("input",f).forEach(function(c){c.type==="checkbox"?d.parameters.setValue(c.parameterName,c.checked):c.type!=="button"&&d.parameters.setValue(c.parameterName,c.value.trim())});g.$$array("textArea",f).forEach(function(c){d.parameters.setValue(c.parameterName,
c.value.trim())});d.command.callback&&d.command.callback.call(d.handler,d)},collectParameters:function(d){return d.parameters?(d.domNode&&d.domNode.classList.add("commandMarker"),this.open(d.domNode||d.domParent,this.getFillFunction(d))):!1},getFillFunction:function(d,f){var c=this;return function(b,a){var e=null,k=function(){f&&f();c.close()},i=function(a){a.keyCode===g.KEY.ENTER&&c._collectAndCall(d,b);if(a.keyCode===g.KEY.ESCAPE||a.keyCode===g.KEY.ENTER)k(),g.stop(a)};d.parameters.forEach(function(a){var c=
null;if(a.label)c=document.createElement("label"),c.classList.add("parameterInput"),c.setAttribute("for",a.name+"parameterCollector"),c.textContent=a.label,b.appendChild(c);var d=a.name+"parameterCollector",f=c||b;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)c=document.createElement("textarea"),c.rows=a.lines,c.type="textarea",c.id=d,f.appendChild(c),i=function(a){a.keyCode===g.KEY.ESCAPE&&(k(),g.stop(a))};else if(a.type==="boolean"){if(c=document.createElement("input"),c.type="checkbox",
c.id=d,f.appendChild(c),a.value)c.checked=!0}else if(c=document.createElement("input"),c.type=a.type,c.id=d,f.appendChild(c),a.value)c.value=a.value;c.classList.add("parameterInput");c.classList.add("parameterInput"+c.type);c.setAttribute("speech","speech");c.setAttribute("x-webkit-speech","x-webkit-speech");c.parameterName=a.name;e||(e=c);c.addEventListener("keydown",i,!1)});var l=a;if(!l)l=document.createElement("span"),l.className="layoutRight parametersDismiss",b.appendChild(l);var q=function(a){a._collectAndCall(d,
b);k()},r=function(a,b){var c=document.createElement("span");c.role="button";c.tabIndex=0;b.appendChild(c);a&&c.appendChild(document.createTextNode(a));c.classList.add("dismiss");return c};if(d.parameters.hasOptionalParameters()){d.parameters.optionsRequested=!1;var o=r(h.More,l);o.addEventListener("click",function(){d.parameters.optionsRequested=!0;q(c)},!1);o.addEventListener("keydown",function(a){if(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)d.parameters.optionsRequested=!0,q(c)},!1)}o=r(h.Submit,
l);o.addEventListener("click",function(){q(c)},!1);o.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&q(c)},!1);l=r(null,l);l.id="closebox";l.classList.add("imageSprite");l.classList.add("core-sprite-close");l.title=h.Close;l.addEventListener("click",function(){k()},!1);l.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&k()},!1);return e}}};e.prototype.constructor=e;return{CommandParameterCollector:e}});
(function(){function h(a){return a?a.slice(1).split("&"):[]}function i(a){return a.length===0?"":"?"+a.join("&")}function g(a){var b=/([^=]*)(?:=?)(.*)/.exec(a),a=b[1]?decodeURIComponent(b[1]):"",b=b[2]?decodeURIComponent(b[2]):"";return[a,b]}function e(a){var b=encodeURIComponent(a[0]);a[1]&&(b+="="+encodeURIComponent(a[1]));return b}function d(a,b){var c="",d=[],f=0;return{next:function(){if(c!==a.search)c=a.search,d=h(c);if(f<d.length){var e=g(d[f++]);switch(b){case "keys":return e[0];case "values":return e[1];
case "keys+values":return[e[0],e[1]];default:throw new TypeError;}}throw n;}}}function f(a){if(typeof a!=="string")throw new TypeError;}function c(a){var b=a.protocol;return!b||b===":"||b==="http:"&&!a.hostname?!1:!0}function b(a){Object.defineProperty(this,"_anchor",{value:a})}function a(a,d){a=a||"";if(typeof a!=="string")throw new TypeError("url");d=d?d.href||d:"";if(typeof d!=="string")throw new TypeError("base");Object.defineProperty(this,"_input",{value:a,writable:!0});var f=document.implementation.createHTMLDocument("");
if(d){var e=f.createElement("a");e.href=d;if(e.protocol.length<2||!e.host)throw Error("InvalidStateError");var j=f.createElement("base");j.href=e.href;f.head.appendChild(j)}var g=f.createElement("a");g.href=a;f.body.appendChild(g);Object.defineProperty(this,"_urlAnchor",{value:g});var k=new b(g);Object.defineProperty(this,"query",{get:function(){return c(g)?k:null},enumerable:!0})}try{if(typeof window.URL==="function"&&window.URL.length!==0&&(new window.URL("http://www.w3.org")).protocol==="http:")return}catch(j){}var k=
/([^:]*):?(.*)/,n=typeof StopIteration!=="undefined"?StopIteration:Error("Stop Iteration");Object.defineProperties(b.prototype,{get:{value:function(a){f(a);var b;h(this._anchor.search).some(function(c){c=g(c);if(c[0]===a)return b=c[1],!0});return b},enumerable:!0},set:{value:function(a,b){f(a);f(b);var c=h(this._anchor.search);c.some(function(d,f){var j=g(d);if(j[0]===a)return j[1]=b,c[f]=e(j),!0})||c.push(e([a,b]));this._anchor.search=i(c)},enumerable:!0},has:{value:function(a){f(a);return h(this._anchor.search).some(function(b){if(g(b)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){f(a);var b=h(this._anchor.search),c=b.filter(function(b){return g(b)[0]!==a});return c.length!==b.length?(this._anchor.search=i(c),!0):!1},enumerable:!0},clear:{value:function(){this._anchor.search=""},enumerable:!0},forEach:{value:function(a,b){if(typeof a!=="function")throw new TypeError;var c=d(this._anchor,"keys+values");try{for(;;){var f=c.next();a.call(b,f[1],f[0],this)}}catch(e){if(e!==n)throw e;}},enumerable:!0},keys:{value:function(){return d(this._anchor,
"keys")},enumerable:!0},values:{value:function(){return d(this._anchor,"values")},enumerable:!0},items:{value:function(){return d(this._anchor,"keys+values")}},size:{get:function(){return h(this._anchor.search).length},enumerable:!0},getAll:{value:function(a){f(a);var b=[];h(this._anchor.search).forEach(function(c){c=g(c);c[0]===a&&b.push(c[1])});return b},enumerable:!0},append:{value:function(a,b){f(a);f(b);var c=h(this._anchor.search);c.push(e([a,b]));this._anchor.search=i(c)},enumerable:!0}});
Object.defineProperties(a.prototype,{href:{get:function(){return c(this._urlAnchor)?this._urlAnchor.href:this._input},set:function(a){f(a);this._input=a;this._urlAnchor.href=a},enumerable:!0},origin:{get:function(){return c(this._urlAnchor)?this._urlAnchor.protocol+"//"+this._urlAnchor.host:""},enumerable:!0},protocol:{get:function(){return c(this._urlAnchor)?this._urlAnchor.protocol:":"},set:function(a){f(a);this._urlAnchor.protocol=a},enumerable:!0},_userinfo:{get:function(){return!c(this._urlAnchor)?
"":RegExp("^"+this._urlAnchor.protocol+"(\\/\\/)(?:([^@]*)?@)?"+this._urlAnchor.host).exec(this._urlAnchor.href)[2]||""},set:function(a){f(a);this._urlAnchor.href=this._urlAnchor.href.replace(RegExp("^"+this._urlAnchor.protocol+"(\\/\\/)(?:([^@]*)?@)?"+this._urlAnchor.host),this._urlAnchor.protocol+"//"+(a?a+"@":"")+this._urlAnchor.host)}},username:{get:function(){if(!c(this._urlAnchor))return"";var a=k.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){f(a);var b=k.exec(this._userinfo),
a=[encodeURIComponent(a||"")];b[2]&&a.push(b[2]);this._userinfo=a.join(":")},enumerable:!0},password:{get:function(){if(!c(this._urlAnchor))return"";var a=k.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){f(a);var b=[k.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")},enumerable:!0},host:{get:function(){return c(this._urlAnchor)?this._urlAnchor.host:""},set:function(a){f(a);this._urlAnchor.host=a},enumerable:!0},hostname:{get:function(){return c(this._urlAnchor)?
this._urlAnchor.hostname:""},set:function(a){f(a);this._urlAnchor.hostname=a},enumerable:!0},port:{get:function(){return c(this._urlAnchor)?this._urlAnchor.port:""},set:function(a){f(a);this._urlAnchor.port=a},enumerable:!0},pathname:{get:function(){return c(this._urlAnchor)?this._urlAnchor.pathname:""},set:function(a){f(a);this._urlAnchor.pathname=a},enumerable:!0},search:{get:function(){return c(this._urlAnchor)?this._urlAnchor.search:""},set:function(a){f(a);this._urlAnchor.search=a},enumerable:!0},
hash:{get:function(){return c(this._urlAnchor)?this._urlAnchor.hash:""},set:function(a){f(a);this._urlAnchor.hash=a},enumerable:!0}});window.URL&&window.URL.createObjectURL&&(Object.defineProperty(a,"createObjectURL",{value:window.URL.createObjectURL.bind(window.URL),enumerable:!1}),Object.defineProperty(a,"revokeObjectURL",{value:window.URL.revokeObjectURL.bind(window.URL),enumerable:!1}));window.URL=a})();define("orion/URL-shim",function(){});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(h,i,g,e,d,f,c){var b={},a=(new URL(h.toUrl("."),window.location)).href.slice(0,-1);b._cloneItemWithoutChildren=function k(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=k(a[c]));return b};b._createOpenWithCommands=function(a){function b(a,c){for(var d=
a.getServiceReferences("orion.navigate.openWith"),f=[],e=0;e<d.length;e++){var g=d[e];g.getProperty("editor")===c.id&&(g=g.getProperty("contentType"),g instanceof Array?f=f.concat(g):g!==null&&typeof g!=="undefined"&&f.push(g))}return f}for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],d=0;d<b.length;d++){var f=b[d],e=f.getProperty("id");c.push({id:e,name:f.getProperty("name"),nameKey:f.getProperty("nameKey"),nls:f.getProperty("nls"),uriTemplate:f.getProperty("orionTemplate")||
f.getProperty("uriTemplate")})}return c}(),d=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),f=[],e=0;e<c.length;e++){var g=c[e],h=d&&d.editor===g.id,i=b(a,g);i.length&&f.push({properties:{name:g.name||g.id,nameKey:g.nameKey,id:"eclipse.openWithCommand."+g.id,tooltip:g.name,tooltipKey:g.nameKey,contentType:i,uriTemplate:g.uriTemplate,nls:g.nls,forceSingleItem:!0,isEditor:h?"default":"editor"},service:{}})}return f};
b._makeValidator=function(b,c,e,g){function h(a,b,c,d){var f=c.match,e;if(b.indexOf("|")>=0)return e=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),h(a,e,c,d)?!0:h(a,b,c,d);else if(b.indexOf(":")>=0)return e=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[e]?h(a[e],b,c,d):!1;else{a:{e=!1;var g;if(a[b]){if(f)if(typeof f==="string"){if(!typeof(a[b]==="string")){c=!1;break a}if(c.variableName){if(f=RegExp(f).exec(a[b]))e=f[0],g=c.variableMatchPosition==="before"?a[b].substring(0,
f.index):c.variableMatchPosition==="after"?a[b].substring(f.index+e.length):c.variableMatchPosition==="only"?e:a[b],e=!0}else{c=RegExp(f).test(a[b]);break a}}else a[b]===f&&(g=a[b],e=!0);else g=a[b],e=!0;if(e&&c.variableName&&(d[c.variableName]=g,d.itemCached=a,c.replacements))for(a=0;a<c.replacements.length;a++)b=!1,c.replacements[a].pattern?d[c.variableName]=d[c.variableName].replace(RegExp(c.replacements[a].pattern),c.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+
c.replacements[a]);c=e}else c=!1}return c}}return{info:b,validationFunction:function(a){typeof g==="function"&&(a=g.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++){var f;a:{var i=a[c],n=e;if(this.info.validationProperties)for(f=0;f<this.info.validationProperties.length;f++){var u=this.info.validationProperties[f];if(u.source){if(!h(i,u.source,u,this)){f=!1;break a}}else{window.console.log("Invalid validationProperties in "+
b.id+".  No source property specified.");f=!1;break a}}if(this.info.contentType&&n){u=!1;if(i=d.getFilenameContentType(i.Name,n))for(f=0;f<this.info.contentType.length;f++)if(i.id===this.info.contentType[f]){u=!0;break}f=u}else f=!0}if(!f)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(b){if(this.info.uriTemplate){var c={},d;for(d in b)b.hasOwnProperty(d)&&(c[d]=b[d]);if(this.info.validationProperties)for(d=0;d<this.info.validationProperties.length;d++){var e=
this.info.validationProperties[d];e.source&&e.variableName&&(this.itemCached===b&&this[e.variableName]||h(b,e.source,e,this),b[e.variableName]?window.console.log("Variable name "+e.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):c[e.variableName]=this[e.variableName])}c.OrionHome=a;b=new f(this.info.uriTemplate);return window.decodeURIComponent(b.expand(c))}return null}}};b._createCommandOptions=function(a,d,f,e,g,h){function m(c,i){var m=
b._makeValidator(a,f,e,h);c.visibleWhen=m.validationFunction.bind(m);if(g)if(m.generatesURI.bind(m)())c.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return m.getURI.bind(m)(a)};else{var p=a;c.callback=function(a){var e;if(p.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,e=b._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){e=[];for(var g=0;g<a.items.length;g++)e.push(b._cloneItemWithoutChildren(a.items[g]))}else e=b._cloneItemWithoutChildren(a.items);
if(f)var k=f.getService("orion.page.progress");d.run?k?k.progress(d.run(e),"Running command: "+c.name):d.run(e):f&&(k?k.progress(f.getService(d).run(e),"Running command: "+c.name):f.getService(d).run(e))}}i.resolve(c)}var p=new i;a.nls?c.getMessageBundle(a.nls).then(function(b){m({name:a.nameKey?b[a.nameKey]:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltipKey?b[a.tooltipKey]:a.tooltip,isEditor:a.isEditor},p)}):m({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor},
p);return p};b.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var d=a._commandList[c];d.isEditor&&b.push(d)}return b};return b});
define("orion/editor/util",[],function(){var h=navigator.userAgent,i=parseFloat(h.split("MSIE")[1])||void 0,g=parseFloat(h.split("Firefox/")[1]||h.split("Minefield/")[1])||void 0,e=h.indexOf("Opera")!==-1,d=parseFloat(h.split("Chrome/")[1])||void 0,f=h.indexOf("Safari")!==-1&&!d,c=parseFloat(h.split("WebKit/")[1])||void 0,b=h.indexOf("Android")!==-1,a=h.indexOf("iPad")!==-1,h=h.indexOf("iPhone")!==-1,j=a||h,k=navigator.platform.indexOf("Mac")!==-1,n=navigator.platform.indexOf("Win")!==-1,l=navigator.platform.indexOf("Linux")!==
-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,c){return b[(c<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:i,isFirefox:g,isOpera:e,isChrome:d,isSafari:f,isWebkit:c,isAndroid:b,isIPad:a,isIPhone:h,isIOS:j,isMac:k,isWindows:n,isLinux:l,platformDelimiter:n?"\r\n":"\n"}});
define("orion/editor/keyBinding",["orion/editor/util"],function(h){function i(g,e,d,f,c){this.keyCode=typeof g==="string"?g.toUpperCase().charCodeAt(0):g;this.mod1=e!==void 0&&e!==null?e:!1;this.mod2=d!==void 0&&d!==null?d:!1;this.mod3=f!==void 0&&f!==null?f:!1;this.mod4=c!==void 0&&c!==null?c:!1}i.prototype={match:function(g){return this.keyCode===g.keyCode?this.mod1!==(h.isMac?g.metaKey:g.ctrlKey)?!1:this.mod2!==g.shiftKey?!1:this.mod3!==g.altKey?!1:h.isMac&&this.mod4!==g.ctrlKey?!1:!0:!1},equals:function(g){return!g?
!1:this.keyCode!==g.keyCode?!1:this.mod1!==g.mod1?!1:this.mod2!==g.mod2?!1:this.mod3!==g.mod3?!1:this.mod4!==g.mod4?!1:!0}};return{KeyBinding:i}});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(h,i){function g(e){this._init(e)}g.prototype={_init:function(e){var d=i.node(e.container);if(!d)throw"no parent container";this._container=d;d.classList.remove("currentLocation");this._id=e.id||"eclipse.breadcrumbs";this._resource=e.resource||null;this._rootSegmentName=e.rootSegmentName;this._workspaceRootSegmentName=e.workspaceRootSegmentName;this._makeHref=e.makeHref;this.path="";this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var e;
this._resource&&this._resource.Parents?(e=document.createElement("a"),this._makeHref?this._makeHref(e,""):e.href=h.toUrl("navigate/table.html")+"#"):e=document.createElement("span");i.empty(e);e.appendChild(document.createTextNode(this._workspaceRootSegmentName));return e}return null},render:function(){var e=this._container,d=i.node(this._id);d?i.empty(d):(d=document.createElement("span"),d.id=this._id,e.appendChild(d));var f;if(f=this.getNavigatorWorkspaceRootSegment())if(f.classList.add("breadcrumb"),
d.appendChild(f),this._resource&&this._resource.Parents)f=document.createElement("span"),f.appendChild(document.createTextNode(" / ")),this.path+="/",f.classList.add("breadcrumbSeparator"),d.appendChild(f);else{f.href="";f.classList.remove("breadcrumb");f.classList.add("currentLocation");return}e=this._rootSegmentName;if(this._resource){if(this._resource.Parents)for(var c=this._resource.Parents,b=c.length;--b>=0;)f=document.createElement("a"),f.classList.add("breadcrumb"),e?(f.appendChild(document.createTextNode(e)),
e=null):f.appendChild(document.createTextNode(c[b].Name)),this.path+=c[b].Name,this._makeHref?this._makeHref(f,c[b].Location):f.href=h.toUrl("navigate/table.html")+"#"+c[b].ChildrenLocation,d.appendChild(f),f=document.createElement("span"),f.appendChild(document.createTextNode(" / ")),this.path+="/",f.classList.add("breadcrumbSeparator"),d.appendChild(f);f=document.createElement("span");e?(f.appendChild(document.createTextNode(e)),e=null):f.appendChild(document.createTextNode(this._resource.Name));
f.classList.add("currentLocation");this.path+=this._resource.Name;d.appendChild(f)}d.childNodes.length===0&&(f=document.createElement("span"),f.appendChild(document.createTextNode(e||document.title)),f.classList.add("breadcrumb"),f.classList.add("currentLocation"),d.appendChild(f))}};g.prototype.constructor=g;return{BreadCrumbs:g}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(h,i){function g(e){this._init(e)}g.prototype={_init:function(e){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=i.node(e.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=i.node(e.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=i.node(e.mainPanel);if(!this.$mainNode)throw"no dom node for main panel found";this._vertical=e.vertical;
this._prefix="/orion/splitter/"+(this.$node.id||document.body.id||"");if(e.toggle)this._thumb=document.createElement("div"),this.$node.appendChild(this._thumb),this._thumb.classList.add("splitThumb"),this._thumb.classList.add("splitThumbLayout");this._initializeFromStoredSettings();this._closed?(this._closed=!1,this._thumbDown()):this._adjustToSplitPosition();this.$node.style.visibility="visible";this.$mainNode.style.display="block";this.$sideNode.style.display="block";this.$node.addEventListener("mousedown",
this._mouseDown.bind(this),!1);window.addEventListener("mouseup",this._mouseUp.bind(this),!1);window.addEventListener("resize",this._resize.bind(this),!1)},toggleSidePanel:function(){this._thumbDown()},openSidePanel:function(){this._closed||this._thumbDown()},addResizeListener:function(e){this._resizeListeners.push(e)},_initializeFromStoredSettings:function(){this._closed=localStorage.getItem(this._prefix+"/toggleState")==="closed";var e;if(this._vertical){if(e=localStorage.getItem(this._prefix+"/yPosition"))this._splitTop=
parseInt(e,10)}else if(e=localStorage.getItem(this._prefix+"/xPosition"))this._splitLeft=parseInt(e,10)},_adjustToSplitPosition:function(e){var d=i.bounds(this.$node),f=i.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=d.height;if(e||!this._splitTop)this._splitTop=d.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);e=this._splitTop;this.$node.parentNode.style.position==="relative"&&(e=this._splitTop-f.top);this.$sideNode.style.height=e+"px";this.$sideNode.style.bottom=
e-1+"px";this.$sideNode.style.display="block";this.$node.style.top=e+"px"}else{this._splitWidth=d.width;if(e||!this._splitLeft)this._splitLeft=d.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);e=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(e=this._splitLeft-f.left);this.$sideNode.style.width=e+"px";this.$sideNode.style.right=e-1+"px";this.$sideNode.style.display="block";this.$node.style.left=e+"px"}this._resize()},_resize:function(e){var e=e||0,d=i.bounds(this.$node.parentNode),
f=i.bounds(this.$node);this._vertical?this.$mainNode.style.height=d.height-(f.top-d.top+f.height)+"px":this.$mainNode.style.width=d.width-(f.left-d.left+f.width)+"px";var c=this;window.setTimeout(function(){c._notifyResizeListeners(c.$mainNode)},e);window.setTimeout(function(){c._notifyResizeListeners(c.$sideNode)},e)},_notifyResizeListeners:function(e){for(var d=0;d<this._resizeListeners.length;d++)this._resizeListeners[d](e)},_thumbDown:function(){this._closed?(this._closed=!1,this._addAnimation(),
this._vertical?(this.$sideNode.style.height=this._splitTop+"px",this.$node.style.top=this._splitTop+"px"):(this.$sideNode.style.width=this._splitLeft+"px",this.$node.style.left=this._splitLeft+"px")):(this._closed=!0,this._addAnimation(),this._vertical?(this.$sideNode.style.top=0,this.$node.style.top="1px"):(this.$sideNode.style.width=0,this.$node.style.left="1px"));this._resize(this._animationDelay);this._removeAnimation();localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null)},
_removeAnimation:function(){var e=this;window.setTimeout(function(){e.$sideNode.classList.remove("sidePanelLayoutAnimation");e.$mainNode.classList.remove("mainPanelLayoutAnimation");e.$node.classList.remove("splitLayoutAnimation");e._thumb.classList.remove("splitLayoutAnimation")},this._animationDelay)},_addAnimation:function(){this.$sideNode.classList.add("sidePanelLayoutAnimation");this.$mainNode.classList.add("mainPanelLayoutAnimation");this.$node.classList.add("splitLayoutAnimation");this._thumb&&
this._thumb.classList.add("splitLayoutAnimation")},_mouseDown:function(e){if(e.target===this._thumb)return i.stop(e),this._thumbDown(e);if(!this._tracking)this.$node.classList.add("splitTracking"),this.$mainNode.classList.add("panelTracking"),this.$sideNode.classList.add("panelTracking"),this._tracking=this._mouseMove.bind(this),window.addEventListener("mousemove",this._tracking),i.stop(e)},_mouseMove:function(e){if(this._tracking){var d;this._vertical?(d=this._splitTop=e.clientY,this.$node.parentNode.style.position===
"relative"&&(d=i.bounds(this.$node.parentNode),d=this._splitTop-d.top),this.$node.style.top=d+"px"):(d=this._splitLeft=e.clientX,this.$node.parentNode.style.position==="relative"&&(d=i.bounds(this.$node.parentNode),d=this._splitLeft-d.left),this.$node.style.left=d+"px");this._adjustToSplitPosition(!0);i.stop(e)}},_mouseUp:function(e){if(this._tracking)window.removeEventListener("mousemove",this._tracking),this._tracking=null,this.$node.classList.remove("splitTracking"),this.$mainNode.classList.remove("panelTracking"),
this.$sideNode.classList.remove("panelTracking"),i.stop(e)}};g.prototype.constructor=g;return{Splitter:g}});define("orion/fileUtils",["i18n!orion/nls/messages"],function(){return{makeRelative:function(h){if(!h)return h;var i=window.location.protocol+"//"+window.location.host;return h.indexOf(i)===0?h.substring(i.length):h},isAtRoot:function(h){return this.makeRelative(h).indexOf("/workspace")===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(h,i,g){function e(d){this._favorites=[];g.attach(this);this._init(d);this._initializeFavorites()}e.prototype={_init:function(d){this._registry=d.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(d){for(var d=Array.isArray(d)?
d:[d],f=0;f<d.length;f++){var c=d[f],b=c.ChildrenLocation?c.ChildrenLocation:c.Location,b=i.makeRelative(b);this.addFavorite(c.Name,b,c.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(d){this.addFavorite(d,d,!1,!0)},addFavorite:function(d,f,c){this._favorites.push({name:d,path:f,directory:c,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(d){for(var f in this._favorites)if(this._favorites[f].path===
d){this._favorites.splice(f,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(d,f){var c=!1,b;for(b in this._favorites)if(this._favorites[b].path===d){var a=this._favorites[b];if(a.name!==f)a.name=f,c=!0}c&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(d){for(var f in this._favorites)if(this._favorites[f].path===d)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(d){var f;
if(!d)return this._favorites;var c="";for(f=0;f<d.length;f++){var b=d.charAt(f);c+=b==="*"?".*":b==="?"?".?":this._SPECIAL_CHARS.indexOf(b)>=0?"\\"+b:b}c+=".*";d=RegExp(c);c=[];for(f in this._favorites)this._favorites[f].name.search(d)===0&&c.push(this._favorites[f]);return c},_initializeFavorites:function(){var d=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){var c,f=f.get("navigate");typeof f==="string"&&(f=JSON.parse(f));if(f)for(c in f)f[c].isFavorite=
!0,d._favorites.push(f[c]);d._favorites.sort(d._sorter);d._notifyListeners()})},_storeFavorites:function(){var d=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(f){f.put("navigate",d)})},_sorter:function(d,f){var c=d.name.toLowerCase(),b=f.name.toLowerCase();return c>b?1:c<b?-1:0},getFavorites:function(){return{navigator:this._favorites}}};e.prototype.constructor=e;return{FavoritesService:e}});
define("orion/widgets/themes/ThemeClass",[],function(){function h(h){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=h;this.classString="."+h+"{ "}h.prototype.className=null;h.prototype.classString=void 0;h.prototype.style=void 0;h.prototype.closeString=" }\n";h.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:h}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(h){function i(){}i.prototype.navbar="#333";i.prototype.button="#777777";i.prototype.location="#EFEFEF";i.prototype.selection="FEC";i.prototype.sidepanel="#FBFBFB";i.prototype.mainpanel="white";i.prototype.navtext="#bfbfbf";i.prototype.content="#3087B3";i.prototype.search="#444";i.prototype.toolpanel="white";i.prototype.writeNavigationStyle=function(){var g="",e=[],d=new h.ThemeClass("orionPage");
d.style.backgroundColor="#fdfdfd";d.style.width="100%";d.style.height="100%";e.push(d);d=new h.ThemeClass("topRowBanner");d.style.margin="0";d.style.border="0";d.style.backgroundColor=this.navbar;d.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.navbar+"), color-stop(100%,"+this.navbar+"))";d.style.background="-moz-linear-gradient(top,"+this.navbar+"0%,"+this.navbar+"100%)";d.style.height="28px";e.push(d);d=new h.ThemeClass("a");d.style.textDecoration="none";
d.style.color=this.content;e.push(d);d=new h.ThemeClass("navlink");d.style.display="inline-block";d.style.padding="2px";d.style.color=this.content;e.push(d);d=new h.ThemeClass("primaryNav");d.style.color=this.navtext;d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.paddingTop="6px";d.style.verticalAlign="baseline";e.push(d);d=new h.ThemeClass("primaryNav a");d.style.fontSize="8pt";d.style.color=this.navtext;d.style.marginRight="6px";d.style.marginLeft="6px";d.style.verticalAlign="baseline";
d.style.textDecoration="none";e.push(d);d=new h.ThemeClass("primaryNav a:hover");d.style.color="#bfbfbf";d.style.cursor="hand";d.style.color="white";d.style.fontWeight="normal";e.push(d);for(var f in e)g+=e[f].toString();return g};i.prototype.writeLocationStyle=function(){var g="",e=[],d=new h.ThemeClass("titleArea");d.style.margin="0";d.style.paddingTop="5px";d.style.border="0";d.style.background=this.location;d.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+
"), color-stop(100%,"+this.location+"))";d.style.borderBottom="1px solid "+this.location;d.style.minHeight="20px";e.push(d);d=new h.ThemeClass("breadcrumb");d.style.fontSize="8pt";d.style.textDecoration="none";d.style.color=this.content;d.style.paddingTop="2px";e.push(d);d=new h.ThemeClass("a.breadcrumb:hover");d.style.textDecoration="none";d.style.borderBottom="1px dotted";d.style.color="#F58B0F";d.style.cursor="pointer";e.push(d);d=new h.ThemeClass("breadcrumbSeparator");d.style.fontSize="8pt";
d.style.textDecoration="none";d.style.color=this.navbar;d.style.fontWeight="bold";e.push(d);d=new h.ThemeClass("currentLocation");d.style.fontWeight="bold";d.style.fontSize="8pt";d.style.color=this.navbar;d.style.textDecoration="none";d.style.textWrap="normal";d.style.lineHeight="10pt";e.push(d);d=new h.ThemeClass("a.currentLocation:hover");d.style.fontWeight="bold";d.style.fontSize="10pt";d.style.color="#666666";d.style.textDecoration="none";d.style.borderBottom="0";e.push(d);d=new h.ThemeClass("navlinkonpage");
d.style.color=this.content;e.push(d);for(var f in e)g+=e[f].toString();return g};i.prototype.writeButtonStyle=function(){var g="",e=[],d=new h.ThemeClass("commandButton");d.style.color="#222";d.style.border="1px solid #dedede";d.style.backgroundColor=this.button;d.style.textAlign="center";d.style.verticalAlign="baseline";d.style.cursor="pointer";d.style.display="inline-block";d.style.padding="6px";d.style.paddingTop="4px";d.style.borderRadius="1px";d.style.lineHeight="12px";d.style.fontSize="8pt";
d.style.userSelect="none";e.push(d);d=new h.ThemeClass("commandButton:over");d.style.backgroundColor="#e6e6e6";d.style.border="1px solid #808080";e.push(d);d=new h.ThemeClass("commandMenu");d.style.color="#222";d.style.display="inline-block";d.style.verticalAlign="baseline";d.style.margin="0";d.style.fontSize="8pt";d.style.fontWeight="normal";d.style.border="1px solid #dedede";d.style.backgroundColor="#efefef";d.style.cursor="pointer";d.style.borderRadius="1px";e.push(d);d=new h.ThemeClass("commandMenuItem");
d.style.border="0";d.style.padding="0";d.style.margin="0";e.push(d);for(var f in e)g+=e[f].toString();return g};i.prototype.writeMainStyle=function(){var g="",e=[],d=new h.ThemeClass("searchbox");d.style.backgroundImage="url(../images/core_sprites.png)";d.style.backgroundRepeat="no-repeat";d.style.backgroundPosition="4px -297px";d.style.width="12px";d.style.height="12px";d.style.backgroundColor=this.search;d.style.border="1px solid "+this.search;d.style.fontSize="11px";d.style.width="15em";d.style.height=
"16px";d.style.borderRadius="10px";d.style.color="#999";d.style.padding="0";d.style.paddingLeft="20px";d.style.marginLeft="5px";d.style.marginTop="6px !important";d.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";e.push(d);d=new h.ThemeClass("searchbox:focus");d.style.color="white";d.style.outline="none";e.push(d);d=new h.ThemeClass("checkedRow");d.style.cssText="background-color:"+this.selection+" !important;";e.push(d);d=new h.ThemeClass("navbar-item-selected");
d.style.background=this.selection;d.style.color=this.content;e.push(d);d=new h.ThemeClass("auxpane");d.style.border="0";d.style.background=this.sidepanel;d.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";d.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";d.style.overflowX="auto";d.style.minWidth="200px";d.style.paddingTop="16px";e.push(d);d=new h.ThemeClass("mainpane");
d.style.background=this.mainpanel;d.style.border=0;e.push(d);d=new h.ThemeClass("mainToolbar");d.style.background=this.toolpanel;d.style.height="31px";d.style.borderBottom="1px solid #ebebeb";e.push(d);for(var f in e)g+=e[f].toString();return g};i.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};i.prototype.getSheet=function(g){g.navbar.value?(this.navbar=g.navbar.value,
this.button=g.button.value,this.location=g.location.value,this.selection=g.selection.value,this.sidepanel=g.sidepanel.value,this.mainpanel=g.mainpanel.value,this.navtext=g.navtext.value,this.search=g.search.value,this.content=g.content.value,this.toolpanel=g.toolpanel.value):(this.navbar=g.navbar,this.button=g.button,this.location=g.location,this.selection=g.selection,this.sidepanel=g.sidepanel,this.mainpanel=g.mainpanel,this.navtext=g.navtext,this.search=g.search,this.content=g.content,this.toolpanel=
g.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:i}});
define("orion/inputCompletion/inputCompletion",[],function(){function h(h,g,e){this._inputField=h;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);this._binderFunc=g;(h=e?e.group:null)||(h=this._inputField.id?this._inputField.id:"default__input__group");this._completionIdPrefix=h+"__completion__";this._proposeFromStart=e?e.proposeFromStart:!1;this._extendedProvider=e?e.extendedProvider:null;this._proposalIndex=-1;this._dismissed=!0;this._mouseDown=!1;
this._dataList=[];this._initUI();var d=this;this._completionUIContainer.addEventListener("mousedown",function(){d._mouseDown=!0});this._completionUIContainer.addEventListener("mouseup",function(){d._mouseDown=!1});this._inputField.addEventListener("blur",function(){d._mouseDown?window.setTimeout(function(){d._inputField.focus()},200):d._dismiss()});this._inputField.addEventListener("keydown",function(f){d.onKeyDown(f)});this._inputField.addEventListener("input",function(){d._proposeOn(d._inputField.value)});
this._inputField.addEventListener("focus",function(){if(d._dismissed&&d._binderFunc)d._dismissing?d._dismissing=!1:d._binderFunc&&d._binderFunc(function(f){d._bind(f);d._proposeOn(d._inputField.value)})})}h.prototype.onKeyDown=function(h){if(this._dismissed)return!0;var g=h.charCode||h.keyCode;if(g===13){if(this._proposalList&&this._proposalList.length>0&&this._proposalIndex>=0&&this._proposalIndex<this._proposalList.length)return h.preventDefault(),this._dismiss(this._proposalList[this._proposalIndex].item.value,
h.ctrlKey),h.stopPropagation(),!1}else if((g===40||g===38)&&this._proposalList&&this._proposalList.length>0)return h.preventDefault(),this._walk(g===40),h.stopPropagation(),!1;else if(g===27)return h.preventDefault(),this._dismiss(),!1;return!0};h.prototype._bind=function(h){this._dataList=h};h.prototype._getUIContainerID=function(){return this._completionIdPrefix+"UIContainer"};h.prototype._getUIProposalListId=function(){return this._completionIdPrefix+"UIProposalList"};h.prototype._initUI=function(){this._completionUIContainer=
document.getElementById(this._getUIContainerID());if(!this._completionUIContainer)this._completionUIContainer=document.createElement("div"),this._completionUIContainer.id=this._getUIContainerID(),this._completionUIContainer.style.display="none",this._completionUIContainer.className="inputCompletionContainer",this._completionUIContainer.setAttribute("role","list"),this._completionUIContainer.setAttribute("aria-atomic","true"),this._completionUIContainer.setAttribute("aria-live","assertive"),document.body.appendChild(this._completionUIContainer);
this._completionUIContainer.textContent="";this._completionUL=document.getElementById(this._getUIProposalListId());if(!this._completionUL)this._completionUL=document.createElement("ul"),this._completionUL.id=this._getUIProposalListId(),this._completionUL.className="inputCompletionUL";this._completionUL.textContent="";this._completionUIContainer.appendChild(this._completionUL)};h.prototype._createProposalLink=function(h,g,e,d){var f=document.createElement("a");f.href=require.toUrl(g);f.appendChild(this._createBoldText(h,
e,d));return f};h.prototype._createBoldText=function(h,g,e){if(g<0)return document.createTextNode(h);var d=document.createElement("span"),f;0!==g&&(f=document.createTextNode(h.substring(0,g)),d.appendChild(f));var c=document.createElement("b");d.appendChild(c);f=document.createTextNode(h.substring(g,g+e));c.appendChild(f);g+e<h.length-1&&(f=document.createTextNode(h.substring(g+e)),d.appendChild(f));return d};h.prototype._proposeOnCategory=function(h,g){if(g.length!==0){var e=this;if(h){var d=document.createElement("li");
d.className="inputCompletionLICategory";var f=document.createTextNode(h);d.appendChild(f);this._completionUL.appendChild(d)}for(f=0;f<g.length;f++){d=document.createElement("li");d.onmouseover=function(b){e._selectProposal(b.currentTarget)};d.onclick=function(b){e._dismiss(b.currentTarget.completionItem.value)};d.className="inputCompletionLINormal";d.completionItem=g[f].item;if(typeof g[f].item.value==="string"){var c=this._createBoldText(g[f].item.value,g[f].boldIndex,g[f].boldLength);d.appendChild(c)}else g[f].item.value.name&&
g[f].item.value.type==="link"&&d.appendChild(this._createProposalLink(g[f].item.value.name,g[f].item.value.value,g[f].boldIndex,g[f].boldLength));this._completionUL.appendChild(d);this._proposalList.push({item:g[f].item,domNode:d})}}};h.prototype._domNode2Index=function(h){for(var g=0;g<this._proposalList.length;g++)if(this._proposalList[g].domNode===h)return g;return-1};h.prototype._highlight=function(h,g){var e=h,d=!1;isNaN(e)||(d=!0,e=this._proposalList&&h>=0&&h<this._proposalList.length?this._proposalList[h].domNode:
null);if(e)e.className=g?"inputCompletionLISelected":"inputCompletionLINormal",g&&d&&(e.offsetTop<this._completionUIContainer.scrollTop?e.scrollIntoView(!0):e.offsetTop+e.offsetHeight>this._completionUIContainer.scrollTop+this._completionUIContainer.clientHeight&&e.scrollIntoView(!1))};h.prototype._selectProposal=function(h){var g=h;isNaN(g)&&(g=this._domNode2Index(h));if(g!==this._proposalIndex)this._highlight(this._proposalIndex,!1),this._proposalIndex=g,this._highlight(this._proposalIndex,!0)};
h.prototype._dismiss=function(h,g){if(!this._mouseDown){this._dismissed=!0;this._proposalList=null;this._proposalIndex=-1;if(typeof h==="string")this._inputField.value=h,this._dismissing=!0,this._inputField.focus();else if(h&&h.name&&h.type==="link")g?window.open(h.value):window.location.href=h.value;var e=this;window.setTimeout(function(){e._completionUIContainer.style.display="none"},200)}};h.prototype._show=function(){if(this._proposalList&&this._proposalList.length>0){for(var h=0,g=0,e=this._inputField;e;)h+=
e.offsetLeft,g+=e.offsetTop,e=e.offsetParent;this._completionUIContainer.style.display="block";this._completionUIContainer.style.top=g+this._inputField.offsetHeight+2+"px";this._completionUIContainer.style.left=h+"px";this._completionUIContainer.style.width=this._inputField.offsetWidth+"px";this._dismissed=this._mouseDown=!1}else this._dismissed=!0,this._proposalList=null,this._proposalIndex=-1,this._completionUIContainer.style.display="none"};h.prototype._walk=function(h){h=this._proposalIndex+(h?
1:-1);h<-1?h=this._proposalList.length-1:h>=this._proposalList.length&&(h=-1);this._selectProposal(h)};h.prototype._proposeOnList=function(h,g,e){for(var d="",f=[],c=g?g.length:0,b=0;b<h.length;b++)if(h[b].type==="category")this._proposeOnCategory(d,f),d=h[b].label,f=[];else{var a=!0,j=-1;if(g&&e){var k;typeof h[b].value==="string"?k=h[b].value.toLowerCase():h[b].value.name&&(k=h[b].value.name.toLowerCase());j=k.indexOf(g);j<0?a=!1:this._proposeFromStart&&(a=j===0)}a&&f.push({item:h[b],boldIndex:j,
boldLength:c})}this._proposeOnCategory(d,f)};h.prototype._proposeOn=function(h){this._completionUL.textContent="";var g=h?h.toLowerCase():null;this._proposalList=[];this._proposeOnList(this._dataList,g,!0);if(this._extendedProvider&&g){var e=this;this._extendedProvider(h,function(d){if(d)for(var f=0;f<d.length;f++)e._proposeOnList(d[f].proposals,d[f].filterForMe?g:h,d[f].filterForMe);e._show()},[])}else this._show()};h.prototype.constructor=h;return{InputCompletion:h}});
define("orion/globalSearch/nls/root/messages",{"Files that contain:":"Files that contain:",Search:"Search","All types":"All types","File type:":"File type:","All ${0} files":"All ${0} files","Type a search term":"Type a search term","Case sensitive":"Case sensitive","Regular expression":"Regular expression"});
define("orion/globalSearch/nls/messages",["orion/i18n!orion/globalSearch/nls/messages","orion/globalSearch/nls/root/messages"],function(h,i){var g={root:i};Object.keys(h).forEach(function(e){typeof g[e]==="undefined"&&(g[e]=h[e])});return g});
define("orion/globalSearch/advSearchOptContainer",["i18n!orion/globalSearch/nls/messages","require","orion/searchUtils","orion/contentTypes","orion/i18nUtil"],function(h,i,g,e,d){function f(b,a,d,f){this._inputField=b;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);(b=f?f.group:null)||(b=this._inputField.id?this._inputField.id:"default__dropDown__group");this._idPrefix=b+"__dropDown__";this.containerId=this._idPrefix+"UIContainer";this._dismissed=!0;
var e=this;this._optRenderer=new c(a,d,function(){e.dismiss();e._inputField.focus()});this._initUI()}function c(b,a,c){this._searcher=b;this._serviceRegistry=a;this._cancelCallBack=c}f.prototype._initUI=function(){this._optUIContainer=document.getElementById(this.containerId);if(!this._optUIContainer)this._optUIContainer=document.createElement("div"),this._optUIContainer.id=this.containerId,this._optUIContainer.style.display="none",this._optUIContainer.className="advSearchOptContainer",document.body.appendChild(this._optUIContainer),
this._optRenderer.render(this._optUIContainer)};f.prototype.dismiss=function(){this._dismissed=!0;this._optUIContainer.style.display="none"};f.prototype.show=function(b){for(var a=0,c=0,d=this._inputField;d;)a+=d.offsetLeft,c+=d.offsetTop,d=d.offsetParent;this._optUIContainer.style.display="block";this._optUIContainer.style.top=c+this._inputField.offsetHeight+2+"px";this._optUIContainer.style.left=a+"px";this._optUIContainer.style.width=this._inputField.offsetWidth+"px";this._optRenderer._searchBox.value=
b;this._optRenderer._searchBox.focus();this._dismissed=this._mouseDown=!1};f.prototype.toggle=function(){this._dismissed?this.show(this._inputField.value):this.dismiss()};f.prototype.constructor=f;c.prototype.getOptions=function(){return{searchStr:this._searchBox.value,caseSensitive:this._caseSensitiveCB.checked,regEx:this._regExCB.checked,type:this._fileTypes.options[this._fileTypes.selectedIndex].value}};c.prototype.render=function(b,a){this._parentDiv=b;if(typeof this._parentDiv==="string")this._parentDiv=
document.getElementById(this._parentDiv);var c=this._serviceRegistry.getService("orion.core.contenttypes");if(c){var d=this;c.getContentTypes().then(function(b){d.contentTypesCache=b;d._render(a)})}else c=new e.ContentTypeService(this._serviceRegistry),this.contentTypesCache=c.getContentTypes(),this._render(a)};c.prototype._render=function(b){b?this._renderHTML(b):this._renderRaw()};c.prototype._submitSearch=function(){var b=this.getOptions();g.doSearch(this._searcher,this._serviceRegistry,b.searchStr,
b)};c.prototype._initControls=function(){this._searchBox=document.getElementById("advSearchInput");this._fileTypes=document.getElementById("advSearchTypes");this._caseSensitiveCB=document.getElementById("advSearchCaseSensitive");this._regExCB=document.getElementById("advSearchRegEx");this._submitButton=document.getElementById("advSearchSubmit");for(var b=[{label:h["All types"],value:g.ALL_FILE_TYPE}],a=0;a<this.contentTypesCache.length;a++)if(this.contentTypesCache[a]["extends"]==="text/plain"||this.contentTypesCache[a].id===
"text/plain")for(var c=0;c<this.contentTypesCache[a].extension.length;c++)b.push({label:this.contentTypesCache[a].extension[c],value:this.contentTypesCache[a].extension[c]});for(a=0;a<b.length;a++){var c=document.createElement("option"),f=document.createTextNode(b[a].label);c.appendChild(f);this._fileTypes.appendChild(c);c.value=b[a].value}var e=this;this._searchBox.addEventListener("keydown",function(a){a=a.charCode||a.keyCode;a===13&&e._submitSearch();a===27&&e._cancelCallBack&&e._cancelCallBack()});
this._fileTypes.addEventListener("change",function(){var a=e._fileTypes.options[e._fileTypes.selectedIndex].value;e._searchBox.placeholder=a===g.ALL_FILE_TYPE?h["Type a search term"]:d.formatMessage(h["All ${0} files"],a)});this._submitButton.onclick=function(){e._submitSearch()}};c.prototype._initHTMLLabels=function(){document.getElementById("advSearchLabel").appendChild(document.createTextNode(h["Files that contain:"]));document.getElementById("advSearchInput").placeholder=h["Type a search term"];
document.getElementById("advSearchTypeLabel").appendChild(document.createTextNode(h["File type:"]));document.getElementById("advSearchCaseSensitiveLabel").appendChild(document.createTextNode(h["Case sensitive"]));document.getElementById("advSearchRegExLabel").appendChild(document.createTextNode(h["Regular expression"]));document.getElementById("advSearchSubmit").value=h.Search};c.prototype._renderHTML=function(b){var a=this,c=new XMLHttpRequest;c.open("GET",i.toUrl(b),!0);c.onreadystatechange=function(){if(this.readyState===
4&&this.status===200)a._parentDiv.innerHTML=this.responseText,a._initHTMLLabels(),a._initControls()};c.send()};c.prototype._htmlTemplate='<ul class="advSearchOptUL"><li class="advSearchOptLILabel"><label>'+h["Files that contain:"]+'</label></li><li class="advSearchOptLIControl"><input type="text" id="advSearchInput" placeholder="'+h["Type a search term"]+'"></input></li><li class="advSearchOptLIControl"><label>'+h["File type:"]+'</label><select id="advSearchTypes"></select></li><li class="advSearchOptLIControl"><label>'+
h["Case sensitive"]+'</label><input type="checkbox" id="advSearchCaseSensitive"></input></li><li class="advSearchOptLIControl"><label>'+h["Regular expression"]+'</label><input type="checkbox" id="advSearchRegEx"></input></li><li class="advSearchOptLIControl"><input type="button" class="advSearchOptButton" id="advSearchSubmit" value="'+h.Search+'"></input></li></ul>';c.prototype._renderRaw=function(){this._parentDiv.innerHTML=this._htmlTemplate;this._initControls()};c.prototype.constructor=c;return{advSearchOptContainer:f,
advSearchOptRenderer:c}});
define("orion/PageLinks",["require","orion/Deferred","orion/PageUtil","orion/URITemplate","orion/URL-shim"],function(h,i,g,e){function d(d,c){for(var b=d.getServiceReferences(c||"orion.page.link"),a=g.matchResourceParameters(window.location.href),j={OrionHome:(new URL(h.toUrl("."),window.location)).href.slice(0,-1),Location:a.resource},a=[],k=0;k<b.length;k++){for(var n={},l=b[k].getPropertyKeys(),q=0;q<l.length;q++)n[l[q]]=b[k].getProperty(l[q]);if(n.uriTemplate&&n.nls&&(n.name||n.nameKey)){var r=
new i;h(["i18n!"+n.nls],function(a){var b=new e(n.uriTemplate),b=window.decodeURIComponent(b.expand(j)),b=g.validateURLScheme(b);n.href=b;n.textContent=n.nameKey?a[n.nameKey]:n.name;r.resolve(n)});a.push(r)}else if(n.uriTemplate&&n.name)l=new e(n.uriTemplate),l=window.decodeURIComponent(l.expand(j)),l=g.validateURLScheme(l),n.href=l,n.textContent=n.name,a.push((new i).resolve(n))}return i.all(a)}return{createPageLinks:function(f,c){return d(f,c).then(function(b){return b.map(function(a){var b=a.href,
a=a.textContent,c=document.createElement("a");c.href=b;c.target="_self";c.classList.add("targetSelector");c.textContent=a;return c})})},getPageLinksInfo:d}});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(h,i,g,e){function d(d){this._init(d)}d.prototype={_init:function(d){this._dropdownNode=g.node(d.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=d.dropdown;this._serviceRegistry=d.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices={}},isSingleService:function(){return this.length(this.unauthenticatedServices)+
this.length(this.authenticatedServices)===1},hasServices:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)>0},length:function(d){var c=0,b;for(b in d)d.hasOwnProperty(b)&&c++;return c},_makeMenuItem:function(d,c){var b=document.createElement("span");b.role="menuitem";b.tabIndex=0;var a=document.createTextNode(d);b.appendChild(a);b.classList.add("dropdownMenuItem");b.addEventListener("click",c,!1);b.addEventListener("keydown",function(a){(a.keyCode===
g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&c()},!1);return b},_renderAuthenticatedService:function(d){var c=this,b=this.authenticatedServices[d].authService;if(b&&b.logout){var a=document.createElement("li"),e=this._makeMenuItem(h["Sign Out"],function(){b.logout().then(function(){c.addUserItem(d,b,c.authenticatedServices[d].label);localStorage.removeItem(d);localStorage.removeItem("lastLogin");for(var a=localStorage.length-1;a>=0;a--){var e=localStorage.key(a);e&&e.indexOf("/orion/preferences/user")===
0&&localStorage.removeItem(e)}b.getAuthForm(window.location.href).then(function(a){window.location=a})})});a.appendChild(e);this._dropdownNode.appendChild(a)}},renderServices:function(){function d(a){b[a]||(b[a]=c.createDocumentFragment());return b[a]}var c=document,b=[];e.getPageLinksInfo(this._serviceRegistry,"orion.page.link.user").then(function(a){this._dropdown.empty();a.forEach(function(a){var b=d(typeof a.category==="number"?a.category:1),e=c.createElement("li"),j=c.createElement("a");j.role=
"menuitem";j.classList.add("dropdownMenuItem");j.href=a.href;j.textContent=a.textContent;e.appendChild(j);b.appendChild(e)});if(this.keyAssistFunction){var a=document.createElement("li"),e=this._makeMenuItem(h["Keyboard Shortcuts"],this.keyAssistFunction);e.classList.add("key-assist-menuitem");a.appendChild(e);d(0).appendChild(a)}var g=this;b.sort(function(a,b){return a-b}).forEach(function(a,c){if(c<b.length-1){var d=document.createElement("li");d.classList.add("dropdownSeparator");var f=document.createElement("span");
f.classList.add("dropdownSeparator");d.appendChild(f);a.appendChild(d)}g._dropdownNode.appendChild(a)});if(this.isSingleService())for(var i in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(i)&&this._renderAuthenticatedService(i,0)}.bind(this))},setKeyAssist:function(d){this.keyAssistFunction=d;this.renderServices()},addUserItem:function(d,c,b,a){a?(this.unauthenticatedServices[d]&&delete this.unauthenticatedServices[d],this.authenticatedServices[d]={authService:c,label:b,data:a}):
(this.authenticatedServices[d]&&delete this.authenticatedServices[d],this.unauthenticatedServices[d]=this.unauthenticatedServices[d]?{authService:c,label:b,pending:this.unauthenticatedServices[d].pending}:{authService:c,label:b});this.renderServices()}};d.prototype.constructor=d;return{UserMenu:d}});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(h,i,g,e){function d(){}d.prototype={DISABLED:"disabled",CONTAINERTEMPLATE:'<div class="dialog" role="dialog"><div class="dialogTitle"><span id="title" class="dialogTitleText layoutLeft"></span><span tabindex="0" role="button" aria-label="Close" class="dialogDismiss layoutRight core-sprite-close imageSprite" id="closeDialog"></span></div><div id="dialogContent" class="dialogContent layoutBlock"></div><div id="buttons" class="dialogButtons"></div></div>',_initialize:function(){var d=
document.body;this.$frameParent=d;this.$$modalExclusions=this.$$modalExclusions||[];var c=document.createRange();c.selectNode(d);c=c.createContextualFragment(this.CONTAINERTEMPLATE);d.appendChild(c);this.$frame=d.lastChild;this.title&&g.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=g.$("#closeDialog",this.$frame);var b=this;this.$close.addEventListener("click",function(){b.hide()},!1);this.$parent=g.$(".dialogContent",this.$frame);c=document.createRange();c.selectNode(this.$parent);
d=c.createContextualFragment(this.TEMPLATE);this.messages&&g.processTextNodes(d,this.messages);this.$parent.appendChild(d);this.$buttonContainer=g.$(".dialogButtons",this.$frame);this._makeButtons();this.$close.addEventListener("keydown",function(a){(a.keyCode===g.KEY.ENTER||a.keyCode===g.KEY.SPACE)&&b.hide()},!1);this.$frame.addEventListener("keydown",function(a){a.keyCode===g.KEY.ESCAPE?b.hide():a.keyCode===g.KEY.ENTER&&typeof b._defaultCallback==="function"&&b._defaultCallback()},!1);this._bindElements(this.$parent);
typeof this._bindToDom==="function"&&this._bindToDom(this.$parent);this.modal&&this._makeModal()},_makeButtons:function(){if(this.$buttonContainer&&Array.isArray(this.buttons)){var d=this;this.buttons.forEach(function(c){var b=e.createButton(c.text,c.callback);if(c.id)b.id=c.id,d["$"+b.id]=b;if(c.isDefault)d._defaultCallback=c.callback,d._defaultButton=b;d.$buttonContainer.appendChild(b)})}},_makeModal:function(){var d=this;this.$frame.addEventListener("blur",function(a){d.$lastFocusedElement=a.target},
!0);this._modalListener=function(a){var b=!g.contains(d.$frame,a.target);if(b)for(var c=0;c<d.$$modalExclusions.length;c++)if(g.contains(d.$$modalExclusions[c],a.target)){b=!1;break}b&&(window.setTimeout(function(){(d.$lastFocusedElement||d.$parent).focus()},0),g.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var c=this.$frameParent.childNodes,b=!1;this._addedBackdrop=[];for(var a=0;a<c.length;a++){for(var e=
0;e<this.$$modalExclusions.length;e++)if(g.contains(this.$$modalExclusions[e],c[a])){b=!0;break}!b&&c[a]!==d.$frame&&c[a].classList&&!c[a].classList.contains("tooltipContainer")&&(e=c[a],e.classList.contains("modalBackdrop")||(e.classList.add("modalBackdrop"),this._addedBackdrop.push(e)))}(c=g.lastTabbable(this.$buttonContainer)||g.lastTabbable(this.$parent))&&c.addEventListener("keydown",function(a){if(a.keyCode===g.KEY.TAB){var b=d._getFirstFocusField();b&&b!==a.target&&b.focus();g.stop(a)}},!1)},
_addChildDialog:function(d){this.$$modalExclusions.push(d.$frame||d.$parent)},_bindElements:function(d){for(var c=0;c<d.childNodes.length;c++){var b=d.childNodes[c];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},hide:function(){typeof this._beforeHiding==="function"&&this._beforeHiding();this._modalListener&&(this.$frameParent.removeEventListener("focus",this._modalListener,!0),this.$frameParent.removeEventListener("click",this._modalListener,!0));this.$frame.classList.remove("dialogShowing");typeof this._afterHiding===
"function"&&this._afterHiding();var d=this;this.keepAlive||window.setTimeout(function(){d.destroy()},0)},show:function(d){typeof this._beforeShowing==="function"&&this._beforeShowing();var c=g.bounds(this.$frame),b=g.bounds(document.documentElement),a;d?(a=g.bounds(d),d=a.top+a.height+4,a=a.left+4,d+c.height>b.height&&(d=Math.max(0,b.height-c.height-4)),a+c.width>b.width&&(a=Math.max(0,b.width-c.width-4))):(a=Math.max(0,(b.width-c.width)/2),d=Math.max(0,(b.height-c.height)/2));this.$lastFocusedElement=
document.activeElement;this.$frame.style.top=d+"px";this.$frame.style.left=a+"px";this.$frame.classList.add("dialogShowing");typeof this._afterShowing==="function"&&this._afterShowing();this.customFocus||this._getFirstFocusField().focus()},_getFirstFocusField:function(){return g.firstTabbable(this.$parent)||this._defaultButton||g.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(d){d.classList.remove("modalBackdrop")});
this.$frameParent.removeEventListener("focus",this._modalListener,!0);this.$frameParent.removeEventListener("click",this._modalListener,!0);this.$frameParent.removeChild(this.$frame);this.$parent=this.$frame=void 0}};d.prototype.constructor=d;return{Dialog:d}});
define("orion/webui/dialogs/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,orion/webui/littlelib,orion/webui/dialog".split(","),function(h,i,g,e,d,f){function c(b){this._init(b)}c.prototype=new f.Dialog;c.prototype.TEMPLATE='<div role="search"><div><label for="fileName">${Type the name of a file to open (? = any character, * = any string):}</label></div><div><input id="fileName" type="text" class="setting-control" style="width:90%;"/></div><div id="progress" style="padding: 2px 0 0; width: 100%;"><img src="'+
e.toUrl("../../../images/progress_running.gif")+'" class="progressPane_running_dialog" id="crawlingProgress"></img></div><div id="favresults" style="max-height:400px; height:auto; overflow-y:auto;"></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div><div id="statusbar"></div></div>';c.prototype._init=function(b){this.title=b.title||h["Find File Named"];this.modal=!0;this.messages=h;this._searcher=b.searcher;this._progress=b.progress;this._onHide=b.onHide;
this._contentTypeService=new g.ContentTypeService(this._searcher.registry);if(!this._searcher)throw Error("Missing required argument: searcher");this._searchDelay=b.searchDelay||500;this._time=0;this._searcher.setCrawler(null);this._forceUseCrawler=!1;this._searchOnRoot=!0;this._fileService=this._searcher.getFileService();if(!this._fileService)throw Error(h["Missing required argument: fileService"]);this._searchRenderer=b.searchRenderer;if(!this._searchRenderer||typeof this._searchRenderer.makeRenderFunction!==
"function")throw Error(h["Missing required argument: searchRenderer"]);this._favService=b.favoriteService;if(!this._favService)throw Error(h["Missing required argument: favService"]);this._initialize()};c.prototype._bindToDom=function(b){var a=this;a.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",h.Search);this.$fileName.addEventListener("input",function(){a._time=+new Date;a._timeoutId&&clearTimeout(a._timeoutId);a._timeoutId=setTimeout(a.checkSearch.bind(a),0)},
!1);this.$fileName.addEventListener("keydown",function(b){if(b.keyCode===d.KEY.ENTER){var c=d.$("a",a.$results);c&&(d.stop(b),window.open(c.href),a.hide())}},!1);b.addEventListener("keydown",function(b){var c,e,f,g,h;if(b.keyCode===d.KEY.DOWN||b.keyCode===d.KEY.UP)e=d.$$array("a",a.$results),c=d.$$array("a",a.$favresults),f=document.activeElement,h=e.indexOf(f),g=c.indexOf(f),b.keyCode===d.KEY.DOWN?g>=0?(g<c.length-1?c[g+1]:e.length>0?e[0]:c[0]).focus():h>=0?(h<e.length-1?e[h+1]:c.length>0?c[0]:e[0]).focus():
(e.length>0||c.length>0)&&(-1<c.length-1?c[0]:e[0]).focus():g>=0?(f=a.$fileName,(g>0?c[g-1]:f).focus()):h>=0?(f=a.$fileName,(h>0?e[h-1]:c.length>0?c[c.length-1]:f).focus()):e.length>0?e[e.length-1].focus():c.length>0&&c[c.length-1].focus(),d.stop(b)});b.addEventListener("mouseup",function(a){a.target.focus()},!1);this.populateFavorites();setTimeout(function(){if(a._forceUseCrawler||!a._fileService.getService(a._searcher.getSearchLocation()).search){var b=a._searchOnRoot?a._searcher.getSearchRootLocation():
a._searcher.getChildrenLocation(),b=new i.SearchCrawler(a._searcher.registry,a._fileService,"",{searchOnName:!0,location:b});a._searcher.setCrawler(b);b.buildSkeleton(function(){a.$crawlingProgress.style.display="inline";a.$progress.appendChild(document.createTextNode(h["Building file skeleton..."]))},function(){a.$crawlingProgress.style.display="none";a.$progress.removeChild(a.$progress.lastChild)})}},0)};c.prototype.populateFavorites=function(){var b=document.createElement("div");b.appendChild(document.createTextNode(h["Populating favorites&#x2026;"]));
d.empty(this.$favresults);this.$favresults.appendChild(b);this._progress?this._progress.progress(this._favService.getFavorites(),"Getting favorites").then(this.showFavorites()):this._favService.getFavorites().then(this.showFavorites());this._favService.addEventListener("favoritesChanged",this.showFavorites())};c.prototype.showFavorites=function(){var b=this;return function(a){if(a.navigator)a=a.navigator;b._searchRenderer.makeRenderFunction(b._contentTypeService,b.$favresults,!1,b.decorateResult.bind(b),
b.showFavoritesImage)(a);if(a&&a.length>0)a=document.createElement("div"),a.style.borderBottom="1px dashed #BBBBBB",a.style.padding="5px",b.$favresults.appendChild(a)}};c.prototype.showFavoritesImage=function(b){var a=new Image;a.classList.add("modelDecorationSprite");a.classList.add("core-sprite-makeFavorite");a.src=e.toUrl("images/none.png");a.title=h.Favorite;b.appendChild(a);a.style.verticalAlign="middle"};c.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var b=(new Date).getTime();
b-this._time>this._searchDelay?(this._time=b,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};c.prototype.doSearch=function(){var b=this.$fileName.value,a=this.showFavorites();this._progress?this._progress.progress(this._favService.queryFavorites(b),"Getting favorites for: "+b).then(function(b){a(b)}):this._favService.queryFavorites(b).then(function(b){a(b)});if(b){var c=document.createElement("div");c.appendChild(document.createTextNode(h["Searching..."]));d.empty(this.$favresults);
this.$results.appendChild(c);var e=this;setTimeout(function(){var a=e._searcher.createSearchParams(b,!0,e._searchOnRoot),c=e._searchRenderer.makeRenderFunction(e._contentTypeService,e.$results,!1,e.decorateResult.bind(e));e._searcher.search(a,!1,c)},0)}};c.prototype.decorateResult=function(b){for(var a=this,b=d.$$array("a",b),c=0;c<b.length;c++){var e=b[c];e.addEventListener("mouseup",function(b){b.button===0&&!b.ctrlKey&&!b.metaKey&&a.hide()},!1);e.addEventListener("keyup",function(b){b.keyCode===
d.KEY.ENTER&&a.hide()},!1)}};c.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};c.prototype._afterHiding=function(){this._onHide&&this._onHide()};c.prototype.constructor=c;return{OpenResourceDialog:c}});
(function(){var h=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,g=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=typeof location!=="undefined"&&location.href,d=e&&location.protocol&&location.protocol.replace(/\:/,""),f=e&&location.hostname,c=e&&(location.port||void 0),b=[];define("text",[],function(){var a,j,k;typeof window!=="undefined"&&window.navigator&&window.document?j=function(b,c){var d=a.createXhr();d.open("GET",b,!0);d.onreadystatechange=
function(){d.readyState===4&&c(d.responseText)};d.send(null)}:typeof process!=="undefined"&&process.versions&&process.versions.node?(k=require.nodeRequire("fs"),j=function(a,b){var c=k.readFileSync(a,"utf8");c.indexOf("\ufeff")===0&&(c=c.substring(1));b(c)}):typeof Packages!=="undefined"&&(j=function(a,b){var c=new java.io.File(a),d=java.lang.System.getProperty("line.separator"),c=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(c),"utf-8")),e,f,g="";try{e=new java.lang.StringBuffer;
(f=c.readLine())&&f.length()&&f.charAt(0)===65279&&(f=f.substring(1));for(e.append(f);(f=c.readLine())!==null;)e.append(d),e.append(f);g=String(e.toString())}finally{c.close()}b(g)});return a={version:"1.0.7",strip:function(a){if(a){var a=a.replace(i,""),b=a.match(g);b&&(a=b[1])}else a="";return a},jsEscape:function(a){return a.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")},createXhr:function(){var a,b,
c;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(b=0;b<3;b++){c=h[b];try{a=new ActiveXObject(c)}catch(d){}if(a){h=[c];break}}if(!a)throw Error("createXhr(): XMLHttpRequest not available");return a},get:j,parseName:function(a){var b=!1,c=a.indexOf("."),d=a.substring(0,c),a=a.substring(c+1,a.length),c=a.indexOf("!");c!==-1&&(b=a.substring(c+1,a.length),b=b==="strip",a=a.substring(0,c));return{moduleName:d,ext:a,strip:b}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(b,
c,d,e){var f=a.xdRegExp.exec(b),g;if(!f)return!0;b=f[2];f=f[3];f=f.split(":");g=f[1];f=f[0];return(!b||b===c)&&(!f||f===d)&&(!g&&!f||g===e)},finishLoad:function(c,d,e,f,g){e=d?a.strip(e):e;g.isBuild&&(b[c]=e);f(e)},load:function(b,g,j,h){if(h.isBuild&&!h.inlineText)j();else{var k=a.parseName(b),i=k.moduleName+"."+k.ext,p=g.toUrl(i),x=h&&h.text&&h.text.useXhr||a.useXhr;!e||x(p,d,f,c)?a.get(p,function(c){a.finishLoad(b,k.strip,c,j,h)}):g([i],function(b){a.finishLoad(k.moduleName+"."+k.ext,k.strip,b,
j,h)})}},write:function(c,d,e){if(d in b){var f=a.jsEscape(b[d]);e.asModule(c+"!"+d,"define(function () { return '"+f+"';});\n")}},writeFile:function(b,c,d,e,f){var c=a.parseName(c),g=c.moduleName+"."+c.ext,j=d.toUrl(c.moduleName+"."+c.ext)+".js";a.load(g,d,function(){var c=function(a){return e(j,a)};c.asModule=function(a,b){return e.asModule(a,j,b)};a.write(b,g,c,f)},f)}}})})();define("text!orion/banner/banner.html",[],function(){return'<header id="banner" role="banner" class="headerLayout">\n\t<\!-- Requires some js code to bind the home link, link to progress image, and binding NLS variables  --\>\n\t<\!-- Top row:  Logo + discovery links + search + user --\>\n\t<div id="staticBanner" class="primaryNav layoutBlock topRowBanner">\n\t\t<a id="home" class="layoutLeft logo"></a>\n\t\t<nav id="primaryNav" class="layoutLeft" role="navigation"></nav>\n\t\t<div class="layoutRight">\n\t\t\t<div id="globalActions" class="spacingLeft layoutLeft"></div>\n\t\t\t<div id="relatedLinks" class="spacingLeft layoutLeft" style="padding-top:1px;">\n\t\t\t\t<span tabindex="0" role="button" id="relatedTrigger" class="dropdownTrigger hidden">${Related}<span class="dropdownArrowDown"></span></span>\n\t\t\t\t<ul id="relatedDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t\t<input type="text" id="search" autocomplete="off" class="layoutLeft spacingLeft searchbox" role="search">\n\t\t\t<div id="searchOptions" class="layoutLeft" style="padding-top:1px;"></div>\n\t\t\t<div id="userMenu" class="spacingLeft layoutLeft">\n\t\t\t\t<span id="userTrigger" tabindex="0" role="button" class="dropdownTrigger">${Options}<span class="dropdownArrowDown"></span></span>\n\t\t\t\t<ul id="userDropdown" class="dropdownMenu" role="menu"></ul>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<\!-- Task + resource (title) area --\>\n\t<div id="titleArea" class="layoutBlock titleArea">\n\t\t<div class="clear" style="padding-bottom:5px;display:inline;"><span id="location" class="currentLocation"></span><span id="dirty" class="currentLocation"></span></div>\n\t\t<div class="layoutRight pageNav">\n\t\t\t<img class="progressPane" id="progressPane" tabindex="0" role="progressbar"></img>\n\t\t</div>\n\t</div>\n</header>'});
define("text!orion/banner/footer.html",[],function(){return'<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo">\n\t<\!-- Requires some js code to bind the NLS variables  --\>\n\t<div class="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<a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">${FAQ}</a>\n\t\t<a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=2.0" target="_blank">${Report a Bug}</a>|\n\t\t<a href="http://www.eclipse.org/legal/privacy.php" target="_blank">${Privacy Policy}</a>|\n\t\t<a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">${Terms of Use}</a>|\n\t\t<a href="http://www.eclipse.org/legal/copyright.php" target="_blank">${Copyright Agent}</a>\n\t</div>\n</footer>'});
define("text!orion/banner/toolbar.html",[],function(){return'<ul class="layoutLeft commandList pageActions" id="pageActions"></ul>\n<ul class="layoutLeft commandList pageActions" id="selectionTools"></ul>\n<div class="layoutRight" style="padding-left:7px;padding-right:7px;margin-top:3px;" id="settingsTab" style="visibility:hidden;">\n\t<div class="layoutRight core-sprite-settings" id="settingsAction" role="settings" aria-live="off" style="visibility:hidden;"></div>\n</div>\n<div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div>\n<ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul>\n<div id="notificationArea" class="layoutLeft layoutBlock slideContainer">\n\t<div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div>\n\t<div class="layoutRight"><span tabindex="0" role="button" class="layoutRight core-sprite-close imageSprite" id="closeNotifications"></span></div>\n</div>\n\t\t\n\t'});
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,g){return{slideoutHTMLFragment:function(e){var d=document.createElement("div");d.innerHTML=g;var f=i.$("#slideContainer",d);f.id=e+f.id;f=i.$("#pageCommandParameters",d);f.id=e+f.id;f=i.$("#pageCommandDismiss",d);f.id=e+f.id;return d.innerHTML}}});
define("orion/globalCommands","i18n!orion/nls/messages,require,orion/commonHTMLFragments,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/editor/keyBinding,orion/breadcrumbs,orion/webui/littlelib,orion/webui/splitter,orion/webui/dropdown,orion/webui/tooltip,orion/favorites,orion/contentTypes,orion/URITemplate,orion/PageUtil,orion/widgets/themes/container/ThemeSheetWriter,orion/searchUtils,orion/inputCompletion/inputCompletion,orion/globalSearch/advSearchOptContainer,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".split(","),function(h,
i,g,e,d,f,c,b,a,j,k,n,l,q,r,o,m,p,x,s,u,v,w,t,G,C,A,y){function I(a,b){if(a.getLabel)return a.getLabel();else{var c=new v;c.resolve(b.properties.name);return c}}function J(a){j.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 F(a,b){var c=a.getService("orion.core.auth");c!==null&&c.getUser().then(function(a){var c;a.Name?c=document.createTextNode(a.Name):a.login&&
(c=document.createTextNode(a.login));c&&(b.childNodes.length>0?b.childNodes[0].nodeType===3?b.replaceChild(c,b.childNodes[0]):b.insertBefore(c,b.childNodes[0]):b.appendChild(c))})}function O(a,b){var c=a.getServiceReferences("orion.core.auth");T=[];if(j.node("userMenu")){var d=j.node("userDropdown"),e=new n.Dropdown({dropdown:d}),f=new w.UserMenu({dropdownNode:d,dropdown:e,serviceRegistry:a}),d=j.node("userTrigger");new l.Tooltip({node:d,text:h.Options,position:["below","left"]});F(a,d);f.setKeyAssist(b);
for(d=0;d<c.length;d++){var e=c[d],g=a.getService(e);I(g,e).then(function(a){g.getKey().then(function(b){T.push(b);g.getUser().then(function(c){f.addUserItem(b,g,a,c)},function(c,d){f.addUserItem(b,g,a,d)});window.addEventListener("storage",function(){S[b]!==localStorage.getItem(b)&&(S[b]=localStorage.getItem(b),g.getUser().then(function(c){f.addUserItem(b,g,a,c)},function(){f.addUserItem(b,g,a)}))},!1)})})}}}function M(a){var b=document.createElement("span");b.id="advancedSearchDropDown";j.node("searchOptions").appendChild(b);
b.tabIndex=0;b.classList.add("advancedSearchDecorationSprite");b.classList.add("core-sprite-openarrow");b.title=h["Advanced search"];b.onclick=function(){a.toggle()};b.addEventListener("keydown",function(b){(b.charCode||b.keyCode)===13&&a.toggle()});b.classList.add("bannerMenuSearchOptions")}function H(a,b){var c=j.node("relatedDropdown");B||(B=new n.Dropdown({dropdown:c}));a._addMenuItem(c,b)}function E(a,b,c,d,g){var h,k=a.getServiceReferences("orion.page.link.related");k.length<=0||j.node("relatedLinks")&&
v.when(function(){if(h)return h;var b=a.getService("orion.core.contenttypes");b||(b=new r.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return h=a})}(),function(){var i;j.node("relatedLinks")&&B&&(B.close(),B.empty());for(var l=[],n=0;n<k.length;n++){var q={},m,p=k[n].getPropertyKeys();for(m=0;m<p.length;m++)q[p[m]]=k[n].getProperty(p[m]);if(q.id){var r=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(b)){var c=new e.CommandInvocation(d,
b,b,null,a);H(a,c)}else typeof g==="function"&&(i||(i=g()),v.when(i,function(c){c&&b===U&&(!a.visibleWhen||a.visibleWhen(c))&&H(a,new e.CommandInvocation(d,c,c,null,a))}))},o=null;m=null;if(c.indexOf(q.id)<0)if((q.nls&&q.nameKey||q.name)&&q.uriTemplate)m=f._createCommandOptions(q,k[n],a,h,!0),l.push(m),m.then(function(a){a=new e.Command(a);r(a)});else{if(!o&&(o=d.findCommand(q.id))){r(o);continue}if(!o){var L=a.getServiceReferences("orion.navigate.command");for(m=0;m<L.length;m++)if(L[m].getProperty("id")===
q.id){for(var q={},p=L[m].getPropertyKeys(),N=0;N<p.length;N++)q[p[N]]=L[m].getProperty(p[N]);m=f._createCommandOptions(q,L[m],a,h,!0);l.push(m);m.then(function(a){o=new e.Command(a);r(o)});break}}}}}v.all(l,function(a){return a}).then(function(){var a=j.node("relatedTrigger");if(B&&a)a.style.visibility=B.getItems().length===0?"hidden":"visible"})})}function P(a){var b=j.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function W(a){a.getPreferences("/themes",2).then(function(a){var b=
a.get("selected");if(b&&(b=JSON.parse(b),a=a.get("styles"))){var a=JSON.parse(a),c;for(c in a)if(a[c].name===b.selected){c=a[c];c=(new p.ThemeSheetWriter).getSheet(c);b=document.createElement("STYLE");b.appendChild(document.createTextNode(c));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(b);break}}})}function Q(a){var b={},c=null;typeof a==="string"&&(a=j.node(a));a||(a=j.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=j.$(".slideParameters",c),b.parameterArea=j.$(".parameters",c),b.dismissArea=j.$(".parametersDismiss",c),b.notifications=j.$("#notificationArea",c),c.parentNode&&(b.toolbarTarget=j.$(".toolbarTarget",c.parentNode),b.toolbarTarget)))a=j.bounds(c),b.toolbarTargetY=a.height+1;return b}function R(a){if(a.toolbarTarget&&a.toolbarTargetY){var b=0,c;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&
(c=j.bounds(a.notifications),b+=c.height);a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(c=j.bounds(a.slideContainer),b+=c.height);b>0&&(b+=8);a.toolbarTarget.style.top=a.toolbarTargetY+b+"px";a.toolbarTarget.style.bottom=0}}var o=function(a){var b=document.createElement("a");b.href=a;return b.href}(i.toUrl("auth/NotifyAuthentication.html")),S={},T=[],B,U,V=[],D,K=null;return{addSettings:function(a){var b=document.getElementById("settingsTab"),c=document.getElementById("settingsAction"),
d=!1,e;b.style.visibility="";c.style.visibility="";c.onclick=function(){if(!d){d=!0;b.style.backgroundColor="#555";b.style.zIndex="99";b.style.borderTopRightRadius="3px";b.style.borderTopLeftRadius="3px";c.className="core-sprite-settings-white";b.id="settingsNode";c.id="settingsButton";var f=document.getElementById("innerPanels"),g=f.getBoundingClientRect(),h=b.getBoundingClientRect();e?e.style.visibility="visible":(e=document.createElement("div"),e.className="settingsPanel",e.style.width="150px",
e.style.height="150px",e.style.backgroundColor="#555",e.style.zIndex="99",e.style.top=h.top-g.top+24-4+"px",e.id="settingsPanel",e.style.borderTopLeftRadius="3px",e.style.borderBottomRightRadius="3px",e.style.borderBottomLeftRadius="3px",f.appendChild(e),j.addAutoDismiss([c,b,e],function(){c.className="core-sprite-settings";b.style.backgroundColor="white";e.style.visibility="hidden";d=!1}));j.empty(e);a.appendTo(e)}}},generateBanner:function(a,f,n,m,p,r,o,w){function D(a){a.registerService("orion.cm.managedservice",
{updated:function(a){for(var a=a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self",b=j.$$array(".targetSelector"),c=0;c<b.length;c++)b[c].target=a}},{pid:"nav.config"})}W(m);m=j.node(a);if(!m)throw h["could not find banner parent, id was "]+a;a=document.createRange();a.selectNode(m);a=a.createContextualFragment(C);j.processTextNodes(a,h);m.firstChild?m.insertBefore(a,m.firstChild):m.appendChild(a);a=j.node("home");a.href=i.toUrl("navigate/table.html");a.setAttribute("aria-label",
h["Orion Home"]);j.node("progressPane").src=i.toUrl("images/none.png");if(a=j.node("pageToolbar"))a.classList.add("toolbarLayout"),a.innerHTML=y+g.slideoutHTMLFragment("mainToolbar");(a=j.node("closeNotifications"))&&a.setAttribute("aria-label",h["Close notification"]);if(a=j.node("footer"))a.innerHTML=A,j.processTextNodes(a,h);n.setParameterCollector(new d.CommandParameterCollector(Q,R));var z=document.createElement("div");z.id="keyAssist";z.style.display="none";z.classList.add("keyAssistFloat");
z.role="list";z.setAttribute("aria-atomic","true");z.setAttribute("aria-live","assertive");document.body.appendChild(z);document.addEventListener("keydown",function(a){if(a.charOrCode===j.KEY.ESCAPE)z.style.display="none"},!1);j.addAutoDismiss([z],function(){z.style.display="none"});var E=j.node("primaryNav");E&&t.createPageLinks(f,"orion.page.link").then(function(a){a.forEach(function(a){E.appendChild(a)})});var B=j.node("search");if(!B)throw"failed to generate HTML for banner";B.setAttribute("placeholder",
h.Search);new l.Tooltip({node:B,text:h["Type a keyword or wild card to search in root"],position:["below","left"]});var H=new u.advSearchOptContainer(B,p,f,{group:"advancedSearch"});new s.InputCompletion(B,function(a){x.getMixedSearches(f,!0,!1,function(b){var c,d=[],e=!1,f=!1;for(c in b)b[c].label&&b[c].value?(e||(d.push({type:"category",label:h["Saved searches"]}),e=!0),d.push({type:"proposal",value:{name:b[c].label,value:i.toUrl("search/search.html")+"#"+b[c].value,type:"link"}})):(f||(d.push({type:"category",
label:h["Recent searches"]}),f=!0),d.push({type:"proposal",label:b[c].name,value:b[c].name}));a(d)})},{group:"globalSearch",extendedProvider:function(a,b){var c=f.getServiceReferences("orion.search.proposal");if(!c||c.length===0)b(null);else{var d=[];c.forEach(function(b){var c=b.getProperty("filterForMe");d.push(f.getService(b).run(a).then(function(a){for(var b={filterForMe:c,proposals:[]},d=0;d<a.length;d++){b.proposals.push({type:"category",label:a[d].category});for(var e=0;e<a[d].datalist.length;e++)b.proposals.push({type:"proposal",
label:a[d].datalist[e],value:a[d].datalist[e]})}return b}))});v.all(d).then(function(a){b(a)})}}});B.addEventListener("keydown",function(a){a.defaultPrevented||(a.charCode||a.keyCode)===13&&x.doSearch(p,f,B.value)});M(H);j.addAutoDismiss([j.node(H.containerId),j.node("advancedSearchDropDown")],function(){H.dismiss()});if(a=j.$(".split")){var m=j.$(".sidePanelLayout"),F=j.$(".mainPanelLayout");if(m&&F)K={side:m,main:F},K.splitter=new k.Splitter({node:a,sidePanel:m,mainPanel:F,toggle:!0}),a=new e.Command({name:h["Toggle side panel"],
tooltip:h["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){K.splitter.toggleSidePanel()}}),n.addCommand(a),n.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new e.CommandKeyBinding("o",!0)),o&&(K.splitter.addResizeListener(function(a){o&&a===F&&o.getTextView().resize()}),o.getTextView().setKeyBinding(new b.KeyBinding("o",!0),"toggleOutliner"),o.getTextView().setAction("toggleOutliner",function(){K.splitter.toggleSidePanel();return!0},{name:h["Toggle Outliner"]}))}a=
new e.Command({name:h["Make Favorite"],tooltip:h["Add to the favorites list"],imageClass:"core-sprite-makeFavorite",id:"orion.makeFavorite",visibleWhen:function(a){a=Array.isArray(a)?a:[a];if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!a[b].Location)return!1;return!0},callback:function(a){for(var a=Array.isArray(a.items)?a.items:[a.items],b=f.getService("orion.core.favorite"),c=f.getService("orion.page.progress"),d=function(a){return function(d){d?f.getService("orion.page.message").setMessage(a.Name+
h[" is already a favorite."],2E3):c.progress(b.makeFavorites(a),"Making favorite "+a.Name)}},e=0;e<a.length;e++){var g=a[e];c.progress(b.hasFavorite(g.ChildrenLocation||g.Location),"Checking favorite "+g.Name).then(d(g))}}});n.addCommand(a);var I=function(a,b,c){var d=b.getService("orion.core.favorite"),e=b.getService("orion.page.progress");d||(d=new q.FavoritesService({serviceRegistry:b}),d=b.getService("orion.core.favorite"));var f=new G.OpenResourceDialog({searcher:a,progress:e,searchRenderer:a.defaultRenderer,
favoriteService:d,onHide:function(){c&&c.getTextView().focus()}});window.setTimeout(function(){f.show()},0)},a=new e.Command({name:h["Find File Named..."],tooltip:h["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){I(p,f,o)}});o&&(o.getTextView().setKeyBinding(new b.KeyBinding("f",!0,!0,!1),a.id),o.getTextView().setAction(a.id,function(){I(p,f,o);return!0},a));n.addCommand(a);n.registerCommandContribution("globalActions","eclipse.openResource",100,null,
!0,new e.CommandKeyBinding("f",!0,!0));a=new e.Command({name:h["Global search"],tooltip:h["Global search"],id:"eclipse.globalSearch",callback:function(){var a=j.node("search");a&&a.focus()}});o&&(o.getTextView().setKeyBinding(new b.KeyBinding("h",!0,!1,!0),a.id),o.getTextView().setAction(a.id,function(){var a=o.getSelection(),b=null;a.end>a.start&&(b=o.getModel().getText(a.start,a.end));if(a=j.node("search")){if(b)a.value=b;a.focus()}return!0},a));n.addCommand(a);n.registerCommandContribution("globalActions",
"eclipse.globalSearch",101,null,!0,new e.CommandKeyBinding("h",!0,!1,!0));a=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=j.node("banner"),b=j.node("footer"),c=j.$(".content-fixedHeight");a.style.display==="none"?(a.style.display="block",b.style.display="block",c.classList.remove("content-fixedHeight-maximized")):(a.style.display="none",b.style.display="none",c.classList.add("content-fixedHeight-maximized"));
o&&o.getTextView().resize();return!0}});n.addCommand(a);n.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new e.CommandKeyBinding("m",!0,!0));o&&(o.getTextView().setKeyBinding(new e.CommandKeyBinding("m",!0,!0),a.id),o.getTextView().setAction(a.id,a.callback,a));w&&w.addHandler({isActive:function(){return z.style.display==="block"},cancel:function(){return this.isActive()?(z.style.display="none",!0):!1}});w=new e.Command({name:h["System Configuration Details"],tooltip:h["System Config Tooltip"],
id:"orion.configDetailsPage",hrefCallback:function(){return i.toUrl("help/about.html")}});n.addCommand(w);n.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new e.CommandKeyBinding(112,!0,!0));w=new e.Command({name:h["Background Operations"],tooltip:h["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return i.toUrl("operations/list.html")}});n.addCommand(w);n.registerCommandContribution("globalActions","orion.backgroundOperations",
100,null,!0,new e.CommandKeyBinding("o",!0,!0));w=new e.Command({name:h["Show Keys"],tooltip:h["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){if(z.style.display==="none"){var a;j.empty(z);if(o){a=document.createElement("h2");a.appendChild(document.createTextNode(h.Editor));z.appendChild(a);a=o.getTextView().getActions(!1);for(var b=0;b<a.length;b++){var d=a[b],e=d,f=o.getTextView(),g=f.getActionDescription(d);if(g&&g.name)e=g.name;d=f.getKeyBindings(d);
for(f=0;f<d.length;f++){var g=c.getUserKeyString(d[f]),k=document.createElement("span");k.role="listitem";k.appendChild(document.createTextNode(g+" = "+e));k.appendChild(document.createElement("br"));z.appendChild(k)}}}a=document.createElement("h2");a.appendChild(document.createTextNode(h.Global));z.appendChild(a);n.showKeyBindings(z);z.style.display="block"}else z.style.display="none";return!0}});n.addCommand(w);n.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new e.CommandKeyBinding(191,
!1,!0));o&&(a=window.navigator.platform.indexOf("Mac")!==-1,o.getTextView().setKeyBinding(new e.CommandKeyBinding(191,!1,!0,!a,a),w.id),o.getTextView().setAction(w.id,w.callback,w));P(n);O(f,w.callback);J(f);window.addEventListener("hashchange",function(){n.processURL(window.location.href)},!1);window.setTimeout(function(){D(f)},0)},getToolbarElements:Q,getMainSplitter:function(){return K},layoutToolbarElements:R,setPageTarget:function(b){var c,d,e=b.breadcrumbRootName;b.target?(b.searchService&&
b.searchService.setLocationByMetaData(b.target),b.fileService&&!b.breadcrumbTarget&&(d=e?e+" ":"",d+=b.fileService.fileServiceName(b.target.Location),e=null),c=b.name||b.target.Name,U=b.target,E(b.serviceRegistry,b.target,V,b.commandService,b.makeAlternate)):(b.breadcrumbTarget||(e=e||b.task||b.name),c=b.name);(D=b.title)||(D=c?c+" - "+b.task:b.task);window.document.title=D;j.empty(j.node("location"));new a.BreadCrumbs({container:"location",resource:b.breadcrumbTarget||b.target,rootSegmentName:e,
workspaceRootSegmentName:d,makeHref:b.makeBreadcrumbLink})},setDirtyIndicator:function(a){if(D)D.charAt(0)==="*"&&!a&&(D=D.substring(1)),a&&D.charAt(0)!=="*"&&(D="*"+D),window.document.title=D;var b=j.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){V=a},notifyAuthenticationSite:o}});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands"],function(h,i,g){function e(d,c,b,a,e){this._serviceRegistry=d;this._serviceRegistration=d.registerService("orion.page.message",this);this._operationsClient=c;this.notificationContainerDomId=e;this.domId=b;this.progressDomId=a||b;this._hookedClose=!1}function d(d,c,b,a){this.statusService=d;this.progressId=c;if(b){this.deferred=b;this.begin(a);var e=this;b.then(function(){e.done.bind(e)()},function(){e.done.bind(e)()})}}
e.prototype={_init:function(){var d=i.node("closeNotifications"),c=this;d&&!this._hookedClose&&(d.addEventListener("click",function(){c.setProgressMessage("")},!1),d.addEventListener("keydown",function(b){(b.keyCode===i.KEY.ENTER||b.keyCode===i.KEY.SPACE)&&c.setProgressMessage("")},!1))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=g.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(d,c,b){this._init();this.currentMessage=
d;var a=i.node(this.domId);if(typeof b==="boolean"){var e=this,g=a.getAttribute("aria-live");a.setAttribute("aria-live",b?"polite":"off");window.setTimeout(function(){d===e.currentMessage&&(i.empty(a),a.appendChild(document.createTextNode(d)),window.setTimeout(function(){a.setAttribute("aria-live",g)},100))},100)}else i.empty(a),a.appendChild(document.createTextNode(d));typeof c==="number"&&(e=this,window.setTimeout(function(){d===e.currentMessage&&(i.empty(a),a.appendChild(document.createTextNode("")))},
c))},setErrorMessage:function(d){this.currentMessage=d;this._init();var c=d.responseText||d.message||d;try{c=JSON.parse(c)}catch(b){}var d=c.Message||c,a="red";if(c.Severity)switch(c.Severity){case "Warning":a="#FFCC00";break;case "Error":a="red";break;case "Info":case "Ok":a="green"}c=document.createElement("span");c.style.color=a;c.appendChild(document.createTextNode(d));d=i.node(this.domId);i.empty(d);d.appendChild(c)},setProgressMessage:function(d){this._init();this.currentMessage=d;var c=document.createElement("span");
c.classList.add("imageSprite");c.classList.add("core-sprite-progress");var b=i.node(this.progressDomId);i.empty(b);b.appendChild(c);b.appendChild(document.createTextNode(d));c=i.node(this.notificationContainerDomId);c.classList.add("progressNormal");if(d&&d.length>0)c.classList.add("slideContainerActive");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else c.classList.remove("slideContainerActive");g.layoutToolbarElements(this._getNotifierElements())},
setProgressResult:function(d){this.currentMessage=d;var c=d.responseText||d;try{c=JSON.parse(c)}catch(b){}this._init();var a=c.Message||c,e="core-sprite-info",h="progressInfo",n=document.createElement("span");n.classList.add("imageSprite");d=[];if(c.Severity)switch(c.Severity){case "Warning":e="core-sprite-warning";h="progressWarning";d.push("progressInfo");d.push("progressError");d.push("progressNormal");break;case "Error":e="core-sprite-error";h="progressError";d.push("progressWarning");d.push("progressInfo");
d.push("progressNormal");break;default:d.push("progressWarning"),d.push("progressError"),d.push("progressNormal")}n.classList.add(e);var l=i.node(this.progressDomId),e=i.node(this.notificationContainerDomId);i.empty(l);l.appendChild(n);c.HTML?(c=document.createElement("span"),c.innerHTML=a,l.appendChild(c)):l.appendChild(document.createTextNode("   "+a));if(h&&this.progressDomId!==this.domId){e.classList.add(h);for(a=0;a<d.length;a++)e.classList.remove(d[a])}e.classList.add("slideContainerActive");
g.layoutToolbarElements(this._getNotifierElements())},showWhile:function(d,c){var b=this;if(c){b.setProgressMessage(c);var a=function(){c===b.currentMessage&&b.setProgressMessage("")};d.then(a,a)}return d},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(e,c){return new d(this,++this._lastProgressId,e,c)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var d="",c=!0,b;for(b in this._progressMonitors)this._progressMonitors[b].status&&(c||(d+=", "),
d+=this._progressMonitors[b].status,c=!1);this.setProgressMessage(d)}else this.setProgressMessage("")},_beginProgressMonitor:function(d){this._progressMonitors[d.progressId]=d;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(d){this._progressMonitors[d.progressId]=d;this._renderOngoingMonitors()},_doneProgressMonitor:function(d){delete this._progressMonitors[d.progressId];this._progressMonitors.length--;d.status?this.setProgressResult(d.status):this._renderOngoingMonitors()}};
e.prototype.constructor=e;d.prototype.begin=function(d){this.status=d;this.statusService._beginProgressMonitor(this)};d.prototype.done=function(d){this.status=d;this.statusService._doneProgressMonitor(this)};d.prototype.worked=function(d){this.status=d;this.statusService._workedProgressMonitor(this)};d.prototype.constructor=d;return{StatusReportingService:e,ProgressMonitor:d}});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(h,i){function g(e){this._init(e)}g.prototype={_init:function(e){var d=e.parent,f=this,d=i.node(d);if(!d)throw h["no parent"];if(!e.model)throw h["no tree model"];if(!e.renderer)throw h["no renderer"];this._parent=d;this._treeModel=e.model;this._renderer=e.renderer;this._showRoot=e.showRoot===void 0?!1:e.showRoot;this._indent=e.indent===void 0?16:e.indent;this._onCollapse=e.onCollapse;this._labelColumnIndex=
e.labelColumnIndex===void 0?0:e.labelColumnIndex;this._id=e.id===void 0?"treetable":e.id;this._tableStyle=e.tableStyle;this._tableElement=e.tableElement||"table";this._tableBodyElement=e.tableBodyElement||"tbody";this._tableRowElement=e.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(c){f._showRoot?(c._depth=0,f._generate([c],0)):f._treeModel.getChildren(c,function(b){f._generate(b,0)})})},_generate:function(e,d){i.empty(this._parent);var f=document.createElement(this._tableElement);
f.id=this._id;this._tableStyle&&f.classList.add(this._tableStyle);this._renderer.initTable(f,this);this._bodyElement=document.createElement(this._tableBodyElement);this._bodyElement.id=this._id+"tbody";this._generateChildren(e,d);f.appendChild(this._bodyElement);this._parent.appendChild(f);this._rowsChanged()},_generateChildren:function(e,d,f){for(var c=0;c<e.length;c++){var b=document.createElement(this._tableRowElement);b.id=this._treeModel.getId(e[c]);b._depth=d;b._item=e[c];this._renderer.render(e[c],
b);b.childNodes[this._labelColumnIndex].style.paddingLeft=this._indent*d+"px";f?(this._bodyElement.insertBefore(b,f.nextSibling),f&&(f=b)):this._bodyElement.appendChild(b)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(e,d,f){var c=this._treeModel.getId(e),b;if(c===this._id)this._removeChildRows(c),this._generateChildren(d,0),this._rowsChanged();else{var a=i.node(c);a?(a._item=e,a&&(f||
a._expanded)?(a._expanded=!0,this._removeChildRows(c),this._renderer.updateExpandVisuals(a,!0),d?(this._generateChildren(d,a._depth+1,a),this._rowsChanged()):(b=this,d=this._treeModel.getChildren(a._item,function(c){b._generateChildren(c,a._depth+1,a);b._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(h["could not find table row "]+c)}},getItem:function(e){var d=i.node(e);return d&&d._item?d._item:e},toggle:function(e){var d=i.node(e);d&&(d._expanded?(this.collapse(e),this._renderer.updateExpandVisuals(d,
!1)):(this.expand(e),this._renderer.updateExpandVisuals(d,!0)))},isExpanded:function(e){return(e=i.node(e))?e._expanded:!1},expand:function(e,d,f){var e=typeof e==="string"?e:this._treeModel.getId(e),c=i.node(e);if(c&&!c._expanded){c._expanded=!0;var b=this;this._renderer.updateExpandVisuals(c,!0);this._treeModel.getChildren(c._item,function(a){b._generateChildren(a,c._depth+1,c);b._rowsChanged();d&&d.apply(b,f)})}},_removeChildRows:function(e){for(var d=e===this._id,f=!1,c=-1,b=[],a=i.$$array(".treeTableRow",
this._parent),g=0;g<a.length;g++){var h=a[g];if(f)break;if(d)h._depth>c?b.push(h):f=!0;else if(h.id===e)d=!0,c=h._depth}for(e=0;e<b.length;e++)d=b[e],d.parentNode.removeChild(d)},collapse:function(e){var e=typeof e==="string"?e:this._treeModel.getId(e),d=i.node(e);if(d){if(!d._expanded)return;d._expanded=!1;this._renderer.updateExpandVisuals(d,!1);this._removeChildRows(e);this._rowsChanged()}this._onCollapse&&this._onCollapse(d._item)}};g.prototype.constructor=g;return{TableTree:g}});
define("orion/treeModelIterator",[],function(){var h={};h.TreeModelIterator=function(){function h(g,e){this.firstLevelChildren=g;this.reset();this._init(e)}h.prototype={_init:function(g){if(g)this.isExpanded=g.isExpanded,this.isExpandable=g.isExpandable,this.forceExpandFunc=g.forceExpandFunc},topLevel:function(g){return g.parent?g.parent===this.root:!0},_expanded:function(g){if(!g)return!0;var e=g.children&&g.children.length>0;this.isExpanded&&e&&(e=this.isExpanded(g));return e},_expandable:function(g){return!g?
!0:this.isExpandable?this.isExpandable(g):!1},_diveIn:function(g){return this._expanded(g)?(this.setCursor(g.children[0]),this.cursor()):null},_drillToLast:function(g){return this._expanded(g)?this._drillToLast(g.children[g.children.length-1]):g},_forward:function(g){if(!this._cursor)return null;var e=this._diveIn(this._cursor);if(!e){if(g&&this._expandable(this._cursor)&&this.forceExpandFunc){var d=this;return this.forceExpandFunc(this._cursor,"first",function(e){e&&d.setCursor(e)})}(e=this._findSibling(this._cursor,
!0))&&this.setCursor(e)}return e},_backward:function(g){if(!this._cursor)return null;var e=this._findSibling(this._cursor,!1);e&&e!==this._cursor.parent&&(e=this._drillToLast(e));if(g&&e&&this._expandable(e)&&this.forceExpandFunc&&e!==this._cursor.parent){var d=this;return this.forceExpandFunc(e,"last",function(e){e&&d.setCursor(e)})}e&&this.setCursor(e);return e},_findSibling:function(g,e){for(var d=this.topLevel(g),f=d?this.firstLevelChildren:g.parent.children,c=0;c<f.length;c++)if(f[c]===g)return c===
0&&!e?d?null:g.parent:c===f.length-1&&e?d?null:this._findSibling(g.parent,e):e?f[c+1]:f[c-1];return null},_inParentChain:function(g,e){for(var d=g.parent;d;){if(d===e)return!0;d=d.parent}return!1},_getTopLevelParent:function(g){if(this.topLevel(g))return g;for(g=g.parent;g;){if(this.topLevel(g))return g;g=g.parent}return null},_onCollapse:function(g){return this._expanded(g.parent)?g:this._onCollapse(g.parent)},_scan:function(g,e,d){this.setCursor(e);var f=[];for(f.push(e);;){if(this.iterate(g))f.push(this.cursor());
else break;if(d===this.cursor())return f}return null},setCursor:function(g){this._prevCursor=this._cursor;this._cursor=g},setTree:function(g){this.firstLevelChildren=g;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(g,e){var d=this.cursor(),f=this._scan(!0,g,e);f||(f=this._scan(!1,g,e));this.setCursor(d);return f},iterate:function(g,e){return g?this._forward(e):this._backward(e)},iterateOnTop:function(g,e){var d=this._findSibling(this._getTopLevelParent(this.cursor()),
g);d?this.setCursor(d):e&&this.firstLevelChildren.length>0&&this.setCursor(g?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(g){if(!this._cursor)return null;return this._inParentChain(this._cursor,g)?(this.setCursor(g),this._cursor):null},reset:function(){this.root=this._prevCursor=this._cursor=null;if(this.firstLevelChildren.length>0)this._cursor=this.firstLevelChildren[0],this.root=this.firstLevelChildren[0].parent},cursorMoved:function(){return this._cursor!==
this._prevCursor},cursor:function(){return this._cursor},prevCursor:function(){return this._prevCursor}};return h}();return h});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator"],function(h,i,g){var h={},e=navigator.userAgent.indexOf("iPad")!==-1,d=window.navigator.platform.indexOf("Mac")!==-1;h.ExplorerNavHandler=function(){function f(c,b,a){this.explorer=c;this.model=this.explorer.model;this._navDict=b;this._listeners=[];this._selections=[];this._currentColumn=0;var d=this._getEventListeningDiv();d.tabIndex=0;d.classList.add("selectionModelContainer");
var e=this;this._modelIterator=new g.TreeModelIterator([],{isExpanded:this.isExpanded.bind(this),isExpandable:this.explorer.renderer.isExpandable?function(a){return e.explorer.renderer.isExpandable(a)}:function(a){return e.isExpandable(a)},forceExpandFunc:this.explorer.forceExpandFunc?function(a,b,c){return e.explorer.forceExpandFunc(a,b,c)}:void 0});this._init(a);(!a||a.setFocus!==!1)&&d.focus();c=function(a){if(a.target===d){if(e.explorer.preventDefaultFunc&&e.explorer.preventDefaultFunc(a,e._modelIterator.cursor()))return!0;
if(a.keyCode===i.KEY.DOWN)return e.onDownArrow(a);else if(a.keyCode===i.KEY.UP)return e.onUpArrow(a);else if(a.keyCode===i.KEY.RIGHT)return e.onRightArrow(a);else if(a.keyCode===i.KEY.LEFT)return e.onLeftArrow(a);else if(a.keyCode===i.KEY.SPACE)return e.onSpace(a);else if(a.keyCode===i.KEY.ENTER)return e.onEnter(a)}};d.addEventListener("keydown",c,!1);this._listeners.push({type:"keydown",listener:c});c=function(){if(e.explorer.onFocus)e.explorer.onFocus(!1);else e.toggleCursor(null,!1)};d.addEventListener("blur",
c,!1);this._listeners.push({type:"blur",listener:c});c=function(){if(e.explorer.onFocus)e.explorer.onFocus(!0);else e.toggleCursor(null,!0)};d.addEventListener("focus",c,!1);this._listeners.push({type:"focus",listener:c});this._parentDiv=d}f.prototype={_init:function(c){this._linearGridMove=!1;if(c)this._selectionPolicy=c.selectionPolicy,this.preventDefaultFunc=c.preventDefaultFunc,this.postDefaultFunc=c.postDefaultFunc},_ctrlKeyOn:function(c){return d?c.metaKey:c.ctrlKey},removeListeners:function(){if(this._listeners)for(var c=
0;c<this._listeners.length;c++)this._parentDiv.removeEventListener(this._listeners[c].type,this._listeners[c].listener,!1)},focus:function(){var c=this._getEventListeningDiv();c&&c.focus()},_getEventListeningDiv:function(c){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv==="function"?this.explorer.keyEventListeningDiv(c):i.node(this.explorer._parentId)},isExpandable:function(c){return!c?!1:i.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)))?
!0:!1},isExpanded:function(c){return!c?!1:this.explorer.myTree.isExpanded(this.model.getId(c))},refreshSelection:function(c){var b=this;this.explorer.selection&&this.explorer.selection.getSelections(function(a){b._clearSelection();for(var d=0;d<a.length;d++)b._selections.push(a[d]);b._selections.length>0&&b.cursorOn(b._selections[0],!0,!1,c)})},refreshModel:function(c,b,a,d){this._currentColumn=0;this.topIterationNodes=[];this.model=b;this._navDict=c;if(this.model.getTopIterationNodes)this.topIterationNodes=
this.model.getTopIterationNodes();else if(a)this.topIterationNodes=a;this._modelIterator.setTree(this.topIterationNodes);!d&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(c){for(var b=0;b<this._selections.length;b++)if(c===this._selections[b])return b;return-1},_clearSelection:function(c){if(c)for(c=0;c<this._selections.length;c++)this._checkRow(this._selections[c],!0);
this._selections=[]},setSelection:function(c,b){if(this._selectionPolicy==="cursorOnly")b&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(c,!0);else if(this._isRowSelectable(c)){if(!b||this._selectionPolicy==="singleSelection")this._clearSelection(!0),this._checkRow(c,!1),this._selections.push(c),this._lastSelection=c;else{var a=this._inSelection(c);a>=0?(this._checkRow(c,!0),this._selections.splice(a,1)):(this._checkRow(c,!1),this._selections.push(c),this._lastSelection=c)}this.explorer.selection&&
(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(c,b){c||(c=this.currentModel());var a=this._getGridChildren(c);if(a&&a.length>1||b===0&&a){b!==0&&this.toggleCursor(c,!1);var d=this._currentColumn,e=!0;d+=b;d<0?(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!1)?c=this.currentModel():e=!1),d=e?a.length-1:this._currentColumn):d>=a.length&&(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!0)?c=this.currentModel():
e=!1),d=e?0:this._currentColumn);this._currentColumn=d;b!==0&&this.toggleCursor(c,!0);return!0}return!1},_getGridChildren:function(c){return this._navDict?this._navDict.getGridNavHolder(c):null},getCurrentGrid:function(c){c||(c=this.currentModel());return(c=this._getGridChildren(c))&&c.length>0?c[this._currentColumn]:null},toggleCursor:function(c,b){var a=this.getRowDiv(c),d=this.getCurrentGrid(c);d?(a&&(b?a.classList.add("treeIterationCursorRow"):a.classList.remove("treeIterationCursorRow")),d.domNode&&
(b?d.domNode.classList.add("treeIterationCursor"):d.domNode.classList.remove("treeIterationCursor"))):a&&(b?a.classList.add("treeIterationCursorRow_Dotted"):a.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(c,b,a,d){var a=a===void 0?!1:a,e,f;if(c||b){if(f===this._modelIterator.cursor())return;e=this._modelIterator.cursor();f=c;this._modelIterator.setCursor(f)}else e=this._modelIterator.prevCursor(),f=this._modelIterator.cursor();
if(e!==f||b)if(this.toggleCursor(e,!1),!b||f)if(this.moveColumn(null,0),this.toggleCursor(f,!0),(c=this.getRowDiv())&&!d&&!this._visible(c)&&c.scrollIntoView(!a),this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,f)},getSelection:function(){return this._selections},getSelectionIds:function(){for(var c=[],b=0;b<this._selections.length;b++)c.push(this.model.getId(this._selections[b]));return c},getRowDiv:function(c){c=c?c:this._modelIterator.cursor();if(!c)return null;var c=this.model.getId(c),
b=this._navDict.getValue(c);return b&&b.rowDomNode?b.rowDomNode:i.node(c)},iterate:function(c,b,a){this.topIterationNodes.length!==0&&this._modelIterator.iterate(c,b)&&(this.cursorOn(null,!1,c),a&&this.setSelection(this.currentModel(),!0))},_checkRow:function(c,b){if(this.explorer.renderer._useCheckboxSelection){var a=this.getRowDiv(c);if(a){var d=i.node(this.explorer.renderer.getCheckBoxId(a.id)),e=b?!d.checked:!0;if(e!==d.checked)this.explorer.renderer.onCheck(a,d,e,!0)}}else this._select(c,b)},
_vpWidth:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},_vpHeight:function(){return window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},_getToolBarHeight:function(c){return(c=i.node(c))?i.bounds(c).height:0},_visible:function(c){if(c.offsetWidth===0||c.offsetHeight===0)return!1;var b=0;b+=this._getToolBarHeight("staticBanner");b+=this._getToolBarHeight("titleArea");b+=this._getToolBarHeight("pageToolbar");var a=
this._getEventListeningDiv(!0).getClientRects()[0],d=this._vpHeight();this._vpWidth();for(var b=a.top>b?a.top:b,a=a.bottom<d?a.bottom:d,c=c.getClientRects(),d=0,e=c.length;d<e;d++){var f=c[d];if(f.top>=b&&f.top<=a&&f.bottom>=b&&f.bottom<=a)return!0}return!1},_select:function(c){c||(c=this._modelIterator.cursor());var b=this.getRowDiv(c);b&&(this._inSelection(c)<0?b.classList.add("checkedRow"):b.classList.remove("checkedRow"))},_onModelGrid:function(c,b){var a=this._getGridChildren(c);if(a)for(var d=
0;d<a.length;d++)if(b.target===a[d].domNode)return!0;return!1},onClick:function(c,b){var a=i.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(c)));if(b.target!==a&&!this._onModelGrid(c,b))if(this.cursorOn(c,!0,!1,!0),e)this.setSelection(c,!0);else if(this._ctrlKeyOn(b))this.setSelection(c,!0);else if(b.shiftKey&&this._lastSelection){if(a=this._modelIterator.scan(this._lastSelection,c)){this._clearSelection(!0);for(var d=0;d<a.length;d++)this.setSelection(a[d],!0)}}else this.setSelection(c,
!1)},onCollapse:function(c){this._modelIterator.collapse(c)&&this.cursorOn()},onUpArrow:function(c){this.iterate(!1,!1,c.shiftKey);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1);c.preventDefault();return!1},onDownArrow:function(c){this.iterate(!0,!1,c.shiftKey);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1);c.preventDefault();return!1},_shouldMoveColumn:function(c){var b=this.currentModel(),a=this._getGridChildren(b);return a&&a.length>1?this.isExpandable(b)?
this._ctrlKeyOn(c):!0:!1},onLeftArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,-1),c.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&this.isExpanded(b))return this.explorer.myTree.collapse(b),c.preventDefault(),!0;this._modelIterator.topLevel(b)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(b.parent),this.setSelection(b.parent,!1))},onRightArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,
1),c.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&!this.isExpanded(b))return this.explorer.myTree.expand(b),c.preventDefault(),!1},_isRowSelectable:function(c){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(c):!0},onSpace:function(c){this.setSelection(this.currentModel(),!0);c.preventDefault()},onEnter:function(c){var b=this.getCurrentGrid(this._modelIterator.cursor());if(b)if(b.widget)if(typeof b.onClick==="function")b.onClick();
else typeof b.widget.focus==="function"&&b.widget.focus();else{var a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(c),!1,!1,!1,0,null);b.domNode.dispatchEvent(a)}else if(this.explorer.renderer.getRowActionElement&&(b=this._modelIterator.cursor()))if(b=this.explorer.renderer.getRowActionElement(this.model.getId(b)),b.href)this._ctrlKeyOn(c)?window.open(b.href):window.location.href=b.href}};return f}();h.ExplorerNavDict=function(){function d(c){this._dict=
{};this._model=c}d.prototype={addRow:function(c,b){this._dict[this._model.getId(c)]={model:c,rowDomNode:b}},getValue:function(c){return this._dict[c]},getGridNavHolder:function(c,b){if(!c)return null;var a=this._model.getId(c);if(this._dict[a]){if(!this._dict[a].gridChildren&&b)this._dict[a].gridChildren=[];return this._dict[a].gridChildren}return null},initGridNavHolder:function(c){if(!c)return null;c=this._model.getId(c);if(this._dict[c])this._dict[c].gridChildren=null}};return d}();return h});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(h,i,g,e,d,f){var c={};c.Explorer=function(){function b(a,b,c){this.registry=a;this.renderer=c;this.selection=b;this.myTree=null}b.prototype={changedItem:function(a,b){this.myTree&&this.myTree.refresh.bind(this.myTree)(a,b,!0)},updateCommands:function(a){this.myTree&&this.myTree._renderer.updateCommands.bind(this.myTree._renderer)(a)},
makeNewItemPlaceHolder:function(a,b,c){a=this.getRow(a);if(c)return a=a.childNodes[c],a.appendChild(document.createElement("br")),c=document.createElement("span"),c.id=b+"placeHolderRow",a.appendChild(c),{tempNode:c,refNode:c};if(a){c=document.createElement("tr");c.id=b+"placeHolderRow";var d=document.createElement("td");d.id=b+"placeHolderCol";c.appendChild(d);a.appendChild(c);c=g.node(b+"placeHolderRow");a=g.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=
this.model.getId(a))return g.node(a)},collapseAll:function(){for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this.myTree.collapse(a[b])},expandAll:function(a){if(a)this._expandRecursively(a);else if(this._navHandler)for(var a=this._navHandler.getTopLevelNodes(),b=0;b<a.length;b++)this._expandRecursively(a[b])},_expandRecursively:function(a){if(this._navHandler&&this._navHandler.isExpandable(a)){var b=this;this.myTree.expand(a,function(){b.model.getChildren(a,function(a){if(!(a===
void 0||a===null))for(var c=a.length,d=0;d<c;d++)b._expandRecursively(a[d])})})}},createTree:function(a,b,c){this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var f=a+"innerTree",h=g.node(f);h&&g.empty(h);if(b)b.rootId=f;this.model=b;this._parentId=a;this._treeOptions=c;if(!c||c&&!c.noSelection)this.selectionPolicy=c?c.selectionPolicy:"",this._navDict=new d.ExplorerNavDict(this.model);this.myTree=new e.TableTree({id:f,model:b,parent:a,labelColumnIndex:this.renderer.getLabelColumnIndex(),
renderer:this.renderer,showRoot:c?!!c.showRoot:!1,indent:c?c.indent:void 0,onCollapse:c?c.onCollapse:void 0,tableElement:c?c.tableElement:void 0,tableBodyElement:c?c.tableBodyElement:void 0,tableRowElement:c?c.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy==="cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),b=[];
if(a&&this.getNavDict())for(var c=a.getSelection(),d=0;d<c.length;d++){var e=a.getRowDiv(c[d]);e&&e.parentNode&&(e=this.getNavDict().getValue(this.model.getId(c[d])),e.model&&b.push(e.model))}this.selection.setSelections(b)}},getRootPath:function(){return this.model&&this.model.root?this.model.root.Location:null},initNavHandler:function(){var a=this._treeOptions;if(!a||a&&!a.noSelection){if(!this.getNavHandler())this._navHandler=new d.ExplorerNavHandler(this,this._navDict,{setFocus:a&&a.setFocus,
selectionPolicy:a?a.selectionPolicy:null});var b=this;this.model.getRoot(function(c){c instanceof Array?b.getNavHandler().refreshModel(b.getNavDict(),b.model,c):c.children&&c.children instanceof Array&&b.getNavHandler().refreshModel(b.getNavDict(),b.model,c.children);a&&a.setFocus&&b.getNavHandler().cursorOn(null,!1,!1,!0)})}},_lastHash:null,checkbox:!1};return b}();c.createExplorerCommands=function(b,a){function c(b){return typeof b.getItemCount==="function"?b.getItemCount()>0?a?a(b):!0:!1:!1}var d=
new f.Command({tooltip:h["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.expandAll()}}),e=new f.Command({tooltip:h["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.collapseAll()}});b.addCommand(d);b.addCommand(e)};c.ExplorerModel=function(){function b(a,
b,c){this.rootPath=a;this.fetchItems=b;this.idPrefix=c||""}b.prototype={destroy:function(){},getRoot:function(a){var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})},getChildren:function(a,b){a.Children?b(a.Children):a.ChildrenLocation?this.fetchItems(a.ChildrenLocation).then(function(c){a.Children=c;b(c)}):b([])},getId:function(a){if(a.Location===this.root.Location)return this.rootId;for(var a=a.Location.replace(/[\\\/]/g,""),b=this.idPrefix,c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?
a.charCodeAt(c):a[c];return b}};return b}();c.ExplorerFlatModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.root=c}b.prototype=new c.ExplorerModel;b.prototype.getRoot=function(a){if(this.root)a(this.root);else{var b=this;this.fetchItems(this.rootPath).then(function(c){b.root=c;a(c)})}};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return b}();c.ExplorerRenderer=function(){function b(a,b){this.explorer=b;this._init(a);this._expandImageClass="core-sprite-openarrow";
this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite"}b.prototype={_init:function(a){if(a){this._useCheckboxSelection=a.checkbox===void 0?!1:a.checkbox;this.selectionPolicy=a.singleSelection?"singleSelection":"";this._cachePrefix=a.cachePrefix;this.getCheckedFunc=a.getCheckedFunc;this.onCheckedFunc=a.onCheckedFunc;this._highlightSelection=!0;this._treeTableClass=a.treeTableClass||"treetable";if(a.highlightSelection===!1)this._highlightSelection=!1;if(!this.actionScopeId)this.actionScopeId=
a.actionScopeId}},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(a,b){this.tableTree=b;g.empty(a);this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){var c=c||"tool",f=this.explorer.registry.getService("orion.page.command"),g=document.createElement("td");g.id=b.id+"actionswrapper";d&&g.classList.add(d);this.actionScopeId?f.renderCommands(this.actionScopeId,g,a,this.explorer,c,null,e&&this.explorer.getNavDict()?
this.explorer.getNavDict().getGridNavHolder(a,!0):null):window.console.log("Warning, no action scope was specified.  No commands rendered.");return g},initCheckboxColumn:function(){if(this._useCheckboxSelection)return document.createElement("th")},getCheckboxColumn:function(a,b){if(this._useCheckboxSelection){var c=document.createElement("td"),d=document.createElement("span");d.id=this.getCheckBoxId(b.id);d.classList.add("core-sprite-check");d.classList.add("selectionCheckmarkSprite");d.rowId=b.id;
if(this.getCheckedFunc)d.checked=this.getCheckedFunc(a),d.checked?(this._highlightSelection&&b.classList.add("checkedRow"),d.classList.add("core-sprite-check_on")):(this._highlightSelection&&b.classList.remove("checkedRow"),d.classList.remove("core-sprite-check_on"));c.appendChild(d);var e=this;d.addEventListener("click",function(a){e.onCheck(b,a.target,a.target.checked?!1:!0,!0)},!1);return c}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(a,b,c,d,e){(b.checked=c)?b.classList.add("core-sprite-check_on"):
b.classList.remove("core-sprite-check_on");if(this.onCheckedFunc)this.onCheckedFunc(b.rowId,c,d);this.explorer.getNavHandler()&&e&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(a.id).model,!0)},storeSelections:function(){if(this.explorer.getNavHandler()){var a=this.explorer.getNavHandler().getSelectionIds(),b=this._getUIStatePreferencePath();b&&window.sessionStorage&&(window.sessionStorage[b+"selection"]=JSON.stringify(a))}},_restoreSelections:function(a){a=window.sessionStorage[a+
"selection"];typeof a==="string"&&(a=a.length>0?JSON.parse(a):null);var b;if(a&&this.explorer.getNavDict()){var c=[];for(b=0;b<a.length;b++){var d=this.explorer.getNavDict().getValue(a[b]);if(d&&d.rowDomNode&&d.model&&(c.push(d.model),this._highlightSelection&&d.rowDomNode.classList.add("checkedRow"),d=g.node(this.getCheckBoxId(d.rowDomNode.id))))d.checked=!0,d.classList.add("core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(c),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},
_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(a){var b=!1,c=window.sessionStorage[a+"expanded"];typeof c==="string"&&(c=c.length>0?JSON.parse(c):null);var d;if(c)for(d=0;d<c.length;d++)if(g.node(c[d])){this._expanded.push(c[d]);var e=this;this.tableTree.expand(c[d],function(){e._restoreSelections(a)});b=!0}return!b},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&
a)return"/"+this._cachePrefix+"/"+a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(a){return a+"__expand"},updateExpandVisuals:function(a,b){var c=g.node(this.expandCollapseImageId(a.id));c&&(c.classList.add(b?this._expandImageClass:this._collapseImageClass),c.classList.remove(b?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(a,b,c,d){var e=document.createElement("span");e.id=this.expandCollapseImageId(a.id);b.appendChild(e);e.classList.add(this._twistieSpriteClass);
e.classList.add(this._collapseImageClass);if(c){var f=document.createElement("span");b.appendChild(f);f.classList.add(d||"imageSprite");f.classList.add(c)}var g=this;e.onclick=function(){g.tableTree.toggle(a.id);if(g.tableTree.isExpanded(a.id))g._expanded.push(a.id);else for(var b in g._expanded)if(g._expanded[b]===a.id){g._expanded.splice(b,1);break}(b=g._getUIStatePreferencePath())&&window.sessionStorage&&g._storeExpansions(b)};return e},render:function(a,b){b.classList.add("navRow");this.renderRow(a,
b)},rowsChanged:function(){this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler())},updateCommands:function(){for(var a=this.explorer.registry,b=g.$$array(".treeTableRow"),c=0;c<b.length;c++){var d=b[c],e=g.node(d.id+"actionswrapper"),f=a.getService("orion.page.command");f.destroy(e);this.actionScopeId&&f.renderCommands(this.actionScopeId,e,d._item,this.explorer,"tool")}},_initializeUIState:function(){this._expanded=[];var a=this._getUIStatePreferencePath();
a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return b}();c.SelectionRenderer=function(){function b(a,b){this._init(a);this.explorer=b}b.prototype=new c.ExplorerRenderer;b.prototype.renderTableHeader=function(a){var b=document.createElement("thead"),c=document.createElement("tr");b.classList.add("navTableHeading");this._useCheckboxSelection&&c.appendChild(this.initCheckboxColumn(a));for(var d=0,e=this.getCellHeaderElement(d);e;)e.innerHTML.length>0&&e.classList.add("navColumn"),
c.appendChild(e),e=this.getCellHeaderElement(++d);b.appendChild(c);a.appendChild(b)};b.prototype.renderRow=function(a,b){b.verticalAlign="baseline";b.classList.add("treeTableRow");var c=this.explorer.getNavDict();if(c){c.addRow(a,b);var d=this;b.addEventListener("click",function(b){if(d.explorer.getNavHandler())d.explorer.getNavHandler().onClick(a,b)},!1)}if(c=this.getCheckboxColumn(a,b))c.classList.add("checkColumn"),b.appendChild(c);for(var c=0,e=this.getCellElement(c,a,b);e;)b.appendChild(e),c===
0?this.getPrimColumnStyle?e.classList.add(this.getPrimColumnStyle()):e.classList.add("navColumn"):this.getSecondaryColumnStyle?e.classList.add(this.getSecondaryColumnStyle()):e.classList.add("secondaryColumn"),e=this.getCellElement(++c,a,b)};b.prototype.getCellHeaderElement=function(){};b.prototype.getCellElement=function(){};return b}();c.SimpleFlatModel=function(){function b(a,b,c){this.items=a;this.getKey=c;this.idPrefix=b;this.root={children:a}}b.prototype=new c.ExplorerModel;b.prototype.getRoot=
function(a){a(this.root)};b.prototype.destroy=function(){};b.prototype.getId=function(a){for(var a=this.getKey(a).replace(/[\\\/]/g,""),b="",c=0;c<a.length;c++)b+=a[c].match(/[^\.\:\-\_0-9A-Za-z]/g)?a.charCodeAt(c):a[c];return this.idPrefix+b};b.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return b}();return c});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(h,i,g,e){var d={};(function(){var f=!1;d.updateNavTools=function(c,b,a,d,e){var i=c.getService("orion.page.command"),l=g.node(a);if(l)i.destroy(l);else throw h["could not find toolbar "]+a;i.renderCommands(a,l,e,b,"button");if(d&&(a=g.node(d)))i.destroy(a),i.renderCommands(d,a,null,b,"button");f||(f=!0,c.getService("orion.page.selection").addEventListener("selectionChanged",
function(a){var e=g.node(d);if(e){var f=c.getService("orion.page.command");f.destroy(e);f.renderCommands(d,e,a.selections,b,"button")}}))};d.createOperationsCommands=function(c,b,a){function d(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var f=new e.Command({name:h["Remove Completed"],tooltip:h["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){b.loadOperations.bind(b)()})},
visibleWhen:function(){return!0}});c.addCommand(f);f=new e.Command({name:h.Remove,tooltip:h["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(c){for(var c=Array.isArray(c.items)?c.items:[c.items],d=0;d<c.length;d++){var e=c[d];a.removeOperation.bind(a)(e.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!d(a);for(var b in a)if(d(a[b]))return!1;
return!0}});c.addCommand(f);f=new e.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 d(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!d(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;
return!0}});c.addCommand(f)}})();return d});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(h,i,g,e,d){function f(c){this._options=c}f.prototype=new e.PopupDialog;f.prototype.TEMPLATE='<table style="width: 360px;"><tr><td><h2>Recent operations</h2></td><td style="text-align: right;"><a id="allOperationsLink">All Operations</a></td></tr></table><span id="operationsExist"><span class="secondaryColumn" id="myOperationsListEmpty">No operations running on this page.</span><table id="myOperationsList" style="display: none;"></table></span><span class="secondaryColumn" id="operationsDontExist">No operations running.</span>';f.prototype._init=
function(c){this._myOperations=[];this._operationsDeferreds=[];this._commandService=c.serviceRegistry.getService("orion.page.command");d.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(c.triggerNode)};f.prototype._bindToDom=function(){this.$allOperationsLink.href=i.toUrl("operations/list.html");this._setOperationsVisibility()};f.prototype.setOperations=function(c,b){this._myOperations||
this._init(this._options);this._myOperations=[];this._operationsDeferreds=[];if(c)for(var a in c)this._myOperations.push(c[a]),this._operationsDeferreds.push(b[a]);this._renderOperations()};f.prototype.parseProgressResult=function(c){if(!c)return{};c=c.responseText||c;try{c=JSON.parse(c)}catch(b){}var a={Message:c.Message||c,Severity:c.Severity};if(c.DetailedMessage&&c.DetailedMessage!==a.Message)a.DetailedMessage=c.DetailedMessage;return a};f.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,
this._myOperations,this._operationsDeferreds)};f.prototype._renderOperationsTable=function(c,b,a){g.empty(c);for(var d=0;d<b.length;d++){var e=b[d],f=document.createElement("tr"),i=document.createElement("td");i.style.paddingLeft="5px;";i.style.paddingRight="5px;";i.textContent=e.Name;f.appendChild(i);var q=document.createElement("div");i.appendChild(q);i=document.createElement("span");q.appendChild(i);i.classList.add("imageSprite");var r=document.createElement("span");r.classList.add("primaryColumn");
q.appendChild(r);r.appendChild(document.createTextNode(e.Name));switch(e.type){case "Warning":i.classList.add("core-sprite-warning");i.setAttribute("aria-label",h["Operation resulted in a warning."]);break;case "error":i.classList.add("core-sprite-error");i.setAttribute("aria-label",h["Operation resulted in an error."]);break;case "loadstart":case "progress":i.classList.add("core-sprite-start");i.setAttribute("aria-label",h["Operation is running."]);break;case "abort":i.classList.add("core-sprite-stop");
i.setAttribute("aria-label",h["Operation is canceled."]);break;case "load":case "loadend":i.classList.add("core-sprite-ok"),i.setAttribute("aria-label","Operation ok.")}if(e.error)i=e.error.Message||e.error,e.error.DetailedMessage&&e.error.DetailedMessage!==""&&(i+=": "+e.error.DetailedMessage),q.appendChild(document.createElement("br")),r=document.createElement("span"),r.classList.add("secondaryColumn"),r.style.marginLeft="18px;",q.appendChild(r),r.textContent=i;i=document.createElement("span");
q.appendChild(i);this._commandService.renderCommands("operationsDialogItems",q,{operation:e,deferred:a[d]},this,"tool");c.appendChild(f)}this._setOperationsVisibility()};f.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"};f.prototype.constructor=f;return{OperationsDialog:f}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(h,i,g,e,d){function f(b,a){if(!this._progressPane){this._progressPane=e.node(b);this._operationsDialog=new d.OperationsDialog({triggerNode:this._progressPane,serviceRegistry:a});var c=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===e.KEY.ENTER)&&c._operationsDialog.show()})}}function c(b,a,c){this._serviceRegistry=
b;this._serviceRegistration=b.registerService("orion.page.progress",this);this._operationsClient=a;this._operations={};this._operationDeferrds={};this._operationsIndex=0;this._lastIconClass=this._lastOperation=null;this._progressMonitorClass=c}f.prototype={_switchIconTo:function(b){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=b;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(b,a){var c={},d;for(d in b)b[d].progressMonitor||
(c[d]=b[d]);if(this._isEmpty(c))this._switchIconTo("progressPane_empty"),this._progressPane.title=h.Operations,this._progressPane.alt=h.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var e="";for(d in c){var f=c[d];if(f.type&&(f.type==="loadstart"||f.type==="progress")){e="running";break}}switch(e){case "running":this._progressPane.title=h["Operations running"];this._progressPane.alt=h["Operations running"];this._progressPane.setAttribute("aria-valuetext",
h["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=h["Some operations finished with warning"];this._progressPane.alt=h["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",h["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=h["Some operations finished with error"];this._progressPane.alt=h["Some operations finished with error"];
this._progressPane.setAttribute("aria-valuetext",h["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=h.Operations,this._progressPane.alt=h.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(c,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};f.prototype.constructon=f;c.prototype=
{init:function(b){if(!this._progressMonitorClass)this._progressMonitorTool=new f(b,this._serviceRegistry)},progress:function(b,a,c){var d=this,e=this._operationsIndex++;!c&&this._progressMonitorClass&&(c=new this._progressMonitorClass,c.begin(a));b.then(function(){if(d._operations[e]){var f=d._operations[e];if(a)f.Name=a;d._lastOperation=f;f.type="loadend";if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b);f.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(d._operations[e]){var g=
d._operations[e];if(a)g.Name=a;if(c)g.progressMonitor=c;d._lastOperation=g;g.type=f.canceled?"abort":"error";g.error=f;d.writeOperation.bind(d)(e,g,b);g.Location||d._removeOperationFromTheList.bind(d)(e)}},function(f){if(a)f.Name=a;if(c)f.progressMonitor=c;d.writeOperation.bind(d)(e,f,b)});return b},removeOperation:function(b){for(var a in this._operations)if(this._operations[a].Location&&this._operations[a].Location===b){this._removeOperationFromTheList(a);break}this._operationsClient.removeOperation.bind(this._operationsClient)(b)},
_removeOperationFromTheList:function(b){var a=this._operations[b].progressMonitor;delete this._operations[b];delete this._operationDeferrds[b];a?a.done():this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)},removeCompletedOperations:function(){for(var b in this._operations){var a=this._operations[b];if(a.type&&a.type!=="loadstart"&&a.type!=="progress")(a=this._operations[b].progressMonitor)&&a.done(),delete this._operations[b],delete this._operationDeferrds[b]}this._progressMonitorTool.generateOperationsInfo(operations,
this._operationDeferrds)},setProgressResult:function(b){this._serviceRegistry.getService("orion.page.message").setProgressResult(b)},showWhile:function(b,a){a&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(a);var c=this;b.then(function(){c._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){c.setProgressResult.bind(c)(a);return a});return this.progress(b,a)},writeOperation:function(b,a,c){this._operations[b]=a;this._operationDeferrds[b]=
c;a.Location&&serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(b){b.put(a.Location,{Name:a.Name,expires:a.expires})});a.progressMonitor?a.progressMonitor.progress(a.Name):this._progressMonitorTool.generateOperationsInfo(this._operations,this._operationDeferrds)}};c.prototype.constructor=c;return{ProgressService:c}});
define("orion/operationsTable",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/explorers/explorer","orion/operationsCommands"],function(h,i,g,e,d){var f={};f.OperationsExplorer=function(){function c(b,a,c,d,e,g,h){this.parentId=d;this.registry=b;this.selection=a;this.toolbarId=e;this.selectionToolsId=g;this.operationsClient=c;this.actionScopeId=h;this.renderer=new f.OperationsRenderer({actionScopeId:this.actionScopeId},this)}c.prototype=new e.Explorer;c.prototype.loadOperations=
function(){var b=this;this.operationsClient.getOperations().then(function(a){for(var c=a.keys(),d={},e=0;e<c.length;e++){var f=c[e],g=a.get(f);g.Location=f;d[f]=g;if(g.expires&&(new Date).getTime()>g.expires)a.remove(f),delete d[f];else{var h=function(){d[this].operation=d[this].operation||{};d[this].operation.type="loadend";b.changedItem(this)},i=function(c){c.canceled?(g.deferred=b.operationsClient.getOperation(this),g.deferred.then(h.bind(this),i.bind(this),m.bind(this))):c.HttpCode==404&&c.JsonData&&
c.JsonData.taskNotFound?(a.remove(this),delete d[this],b._loadOperationsList.bind(b)(d)):(d[this].operation=d[this].operation||{},d[this].operation.type=c.Severity=="Cancel"?"abort":"error",d[this].operation.error=c,b.changedItem(this))},m=function(a){d[this].operation=a;b.changedItem(this)};g.deferred=b.operationsClient.getOperation(f);g.deferred.then(h.bind(f),i.bind(f),m.bind(f))}}b._loadOperationsList.bind(b)(d)},function(a){var c=[];c.Severity="Error";c.HTML=!1;try{var d=JSON.parse(a);c.Message=
d.DetailedMessage?d.DetailedMessage:d.Message}catch(e){c.Message=a}b.serviceRegistry.getService("orion.page.message").setProgressResult(c)})};c.prototype._loadOperationsList=function(b){this.operations=b;d.updateNavTools(this.registry,this,this.toolbarId,this.selectionToolsId,this.operations);this.model=new f.OperationsModel(b);this.createTree(this.parentId,this.model);this.getNavHandler().refreshModel(this.getNavDict(),this.model,b)};c.prototype.changedItem=function(b){var b=this.model.getItem.bind(this.model)(b),
a=this.getRow(b);g.empty(a);this.renderer.renderRow(b,a)};return c}();f.OperationsModel=function(){function c(b){this.operations=b;this.rootId="operations";this.root={type:"operations"}}c.prototype=new e.ExplorerModel;c.prototype.getRoot=function(b){b(this.root)};c.prototype.getItem=function(b){var a=this.operations[b];a.Location=b;return a};c.prototype.getChildren=function(b,a){if(!b||!b.type==="operations")a([]);else{var c=[],d;for(d in this.operations)c.push(this.getItem(d));a(c)}};return c}();
f.OperationsRenderer=function(){function c(b,a){this._init(b);this.options=b;this.explorer=a}c.prototype=new e.SelectionRenderer;c.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}}};c.prototype.getCellElement=function(b,a,c){switch(b){case 0:b=document.createElement("td");c=document.createElement("div");b.appendChild(c);var d=document.createElement("span");c.appendChild(d);d.classList.add("imageSprite");var e=
document.createElement("span");c.appendChild(e);e.classList.add("mainNavColumn");e.appendChild(document.createTextNode(a.Name));if(a.operation)switch(a.operation.type){case "Warning":d.classList.add("core-sprite-warning");break;case "error":d.classList.add("core-sprite-error");break;case "loadstart":case "progress":d.classList.add("core-sprite-start");break;case "abort":d.classList.add("core-sprite-stop");break;case "load":case "loadend":d.classList.add("core-sprite-ok")}return b;case 1:return this.getActionsColumn(a,
c);case 2:return c="",a.operation&&a.operation.error&&(c=a.operation.error.Message||a.operation.error,a.operation.error.DetailedMessage&&a.operation.error.DetailedMessage!==""&&(c+=": "+a.operation.error.DetailedMessage)),b=document.createElement("td"),b.textContent=c,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 c}();
return f});
define("operations/list","i18n!orion/operations/nls/messages,require,orion/bootstrap,orion/commands,orion/selection,orion/fileClient,orion/searchClient,orion/operationsClient,orion/status,orion/progress,orion/globalCommands,orion/operationsTable,orion/operationsCommands".split(","),function(h,i,g,e,d,f,c,b,a,j,k,n,l){g.startup().then(function(g){var i=g.serviceRegistry,g=g.preferences,o=new d.Selection(i),m=new e.CommandService({serviceRegistry:i,selection:o}),p=new f.FileClient(i),p=new c.Searcher({serviceRegistry:i,commandService:m,
fileService:p}),x=new b.OperationsClient(i);new a.StatusReportingService(i,x,"statusPane","notifications","notificationArea");new j.ProgressService(i,x);o=new n.OperationsExplorer(i,o,x,"tasks-list","pageActions","selectionTools","operationItems");k.generateBanner("orion-operationList",i,m,g,p);k.setPageTarget({task:"Operations"});l.createOperationsCommands(m,o,x);m.addCommandGroup("pageActions","eclipse.taskGroup.unlabeled",100);m.addCommandGroup("selectionTools","eclipse.selectionGroup",500,h.More);
m.registerCommandContribution("pageActions","eclipse.removeCompletedOperations",1,"eclipse.taskGroup.unlabeled");m.registerCommandContribution("operationItems","eclipse.removeOperation",1);m.registerCommandContribution("selectionTools","eclipse.removeOperation",1,"eclipse.selectionGroup");m.registerCommandContribution("operationItems","eclipse.cancelOperation",2);m.registerCommandContribution("selectionTools","eclipse.cancelOperation",2,"eclipse.selectionGroup");o.loadOperations.bind(o)()})});