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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 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) 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
 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 g(c,h,d,b,a,f){h[c]&&(d.push(c),(h[c]===!0||h[c]===1)&&b.push(a+c+"/"+f))}function k(c,h,d,b,a){h=b+h+"/"+a;require._fileExists(c.toUrl(h))&&d.push(h)}var i=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,e={};define("i18n",{version:"1.0.0",load:function(c,h,d,b){var b=b||{},a=i.exec(c),f=a[1],j=a[4],l=a[5],m=j.split("-"),r=[],p={},n,o,q="";a[5]?(f=a[1],c=f+l):(l=a[4],j=b.locale||(b.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
m=j.split("-"));if(b.isBuild){r.push(c);k(h,"root",r,f,l);for(n=0;o=m[n];n++)q+=(q?"-":"")+o,k(h,q,r,f,l);h(r,function(){d()})}else h([c],function(a){var j=[];g("root",a,j,r,f,l);for(n=0;o=m[n];n++)q+=(q?"-":"")+o,g(q,a,j,r,f,l);h(r,function(){var b,m;for(b=j.length-1;b>-1&&(o=j[b]);b--){m=a[o];if(m===!0||m===1)m=h(f+o+"/"+l);var c=p,q=void 0;for(q in m)!(q in e)&&!(q in c)&&(c[q]=m[q])}d(p)})})}})})();
define("orion/i18n",[],function(){return{load:function(g,k,i,e){var e=e||{},c=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,h=c.exec(g);if(h)if(k.defined(g))i(k(g));else if(e.isBuild||e.isTest)i({});else{var d=h[1],b=h[3]?h[2]:"",a=h[3]||h[2];k(["orion/bootstrap"],function(f){f.startup().then(function(f){var l=f.serviceRegistry,f=l.getServiceReferences("orion.i18n.message");if(b)f.some(function(a){return g===a.getProperty("name")?(l.getService(a).getMessageBundle().then(function(a){i(a)},function(){i({})}),
!0):!1})||i({});else{var m={},r;f.forEach(function(f){var j=f.getProperty("name");if((h=c.exec(j))&&d===h[1]&&a===(h[3]||h[2]))if(b=h[3]?h[2]:""){if((f=e.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&f.indexOf(b)===0)m[b]=!0,k.specified(j)||define(j,["orion/i18n!"+j],function(a){return a})}else r=f});k.specified(g)?i(m):r?l.getService(r).getMessageBundle().then(function(a){Object.keys(m).forEach(function(f){typeof a[f]==="undefined"&&(a[f]=m[f])});define(g,
[],a);i(a)},function(){define(g,[],m);i(m)}):(define(g,[],m),i(m))}})})}else i(null)}}});
define("orion/sites/nls/root/messages",{OK:"OK","Name:":"Name:",Path:"Path","Mount at (server path)":"Mount at (server path)","Mappings:":"Mappings:","Hostname hint:":"Hostname hint:","Status:":"Status:","Not a valid name":"Not a valid name","Not a valid hostname":"Not a valid hostname","Convert to Self-Hosting":"Convert to Self-Hosting","Enable the site configuration to launch an Orion server running your local client code":"Enable the site configuration to launch an Orion server running your local client code",Save:"Save",
"Save the site configuration":"Save the site configuration","Choose folder...":"Choose folder\u2026","Choose Orion Source Folder":"Choose Orion Source Folder",SelectRepoSourceFolder:"Select the folder where you checked out the ${0} repository:","Loading...":"Loading...",Add:"Add","Add a directory mapping to the site configuration":"Add a directory mapping to the site configuration","There are unsaved changes. Do you still want to navigate away?":"There are unsaved changes. Do you still want to navigate away?",
"There are unsaved changes.":"There are unsaved changes.","Service method missing: ":"Service method missing: ","No Matching SiteService for ":"No Matching SiteService for ",Create:"Create","Create a new site configuration":"Create a new site configuration",Edit:"Edit","Edit the site configuration":"Edit the site configuration",Delete:"Delete","Delete the site configuration":"Delete the site configuration",ConfirmDeleteSingle:"Are you sure you want to delete the site configuration '${0}'?",ConfirmDeleteMultiple:"Are you sure you want to delete these ${0} site configurations?",
ViewOnSiteTitle:"View on Site",ViewOnSiteCaption:"Choose a site configuration to view '${0}' on.","Add to site":"Add to site","Add the file to this site":"Add the file to this site",View:"View","View the file on the site":"View the file on the site",Started:"Started at",Unknown:"Unknown",Name:"Name",Actions:"Actions",Status:"Status",URL:"URL","New Site":"New Site",WorkspaceFile:"Workspace file: ${0}",WorkspaceFolder:"Workspace folder: ${0}",WorkspaceResourceNotFound:"Workspace resource not found: ${0}",
ExternalLinkTo:"External link to ${0}","Move Up":"Move Up","Move Down":"Move Down",HostHint:"HostHint",Start:"Start",Stop:"Stop","Optional; used to determine the URL where a started site can be accessed.":"Optional; used to determine the URL where a started site can be accessed.","Changes you make here won't affect the running site.":"Changes you make here won't affect the running site.",Stopped:"Stopped","Started at ":"Started at ",EnterPortNumber:"Enter the HTTP port number that the Orion server is running on (default is ${0}):",
SitesCommandScope:"Sites"});define("orion/sites/nls/messages",["orion/i18n!orion/sites/nls/messages","orion/sites/nls/root/messages"],function(g,k){var i={root:k};Object.keys(g).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=g[e])});return i});
(function(g,k){typeof define==="function"&&define.amd?define("orion/Deferred",[],k):typeof exports==="object"?module.exports=k():(g.orion=g.orion||{},g.orion.Deferred=k())})(this,function(){function g(){for(var f;f=d.shift()||b.shift();)f();a=!1}function k(f,j){(j?b:d).push(f);a||(a=!0,j?setTimeout(g,0):g())}function i(a){return function(){a.apply(null,arguments)}}function e(){}function c(){var a=Error("Cancel");a.name="Cancel";return a}function h(){function a(){for(var f;f=m.shift();){var d=f.deferred,
c=b==="resolved"?"resolve":"reject";if(typeof f[c]==="function")try{var h=f[c](j);h&&typeof h.then==="function"?(d.cancel=h.cancel||e,h.then(i(d.resolve),i(d.reject),d.progress)):d.resolve(h)}catch(r){d.reject(r)}else d[c](j)}}var j,b,m=[],d=this;this.reject=function(c){b||(b="rejected",j=c,m.length&&k(a));return d.promise};this.resolve=function(c){b||(b="resolved",j=c,m.length&&k(a));return d.promise};this.progress=function(a){b||m.forEach(function(f){f.progress&&f.progress(a)});return d.promise};
this.cancel=function(){b||d.reject(c())};this.then=function(j,d,c){var j={resolve:j,reject:d,progress:c,deferred:new h},e=j.deferred,r=this.cancel.bind(this),i=function(){k(function(){(e.cancel===i?r:e.cancel)()},!0)};e.cancel=i;d=e.promise;d.cancel=function(){e.cancel()};m.push(j);b&&k(a,!0);return d};this.promise={then:this.then,cancel:this.cancel}}var d=[],b=[],a=!1;h.all=function(a,b){function l(a,f){i||(e[a]=f,--c===0&&g.resolve(e))}function d(a,f){if(!i){if(b)try{l(a,b(f));return}catch(m){f=
m}g.reject(f)}}var c=a.length,e=[],i=!1,g=new h;g.then(null,function(){i=!0;a.forEach(function(a){a.cancel&&a.cancel()})});c===0?g.resolve(e):a.forEach(function(a,f){a.then(l.bind(null,f),d.bind(null,f))});return g.promise};h.when=function(a,b,l,d){var c;if(!(a&&typeof a.then==="function"))c=new h,c.resolve(a),a=c.promise;return a.then(b,l,d)};return h});
define("orion/EventTarget",[],function(){function g(){this._namedListeners={}}g.prototype={dispatchEvent:function(g){if(!g.type)throw Error("unspecified type");var i=this._namedListeners[g.type];i&&i.forEach(function(e){try{typeof e==="function"?e(g):e.handleEvent(g)}catch(c){typeof console!=="undefined"&&console.log(c)}});return!g.defaultPrevented},addEventListener:function(g,i){if(typeof i==="function"||i.handleEvent)this._namedListeners[g]=this._namedListeners[g]||[],this._namedListeners[g].push(i)},
removeEventListener:function(g,i){var e=this._namedListeners[g];if(e)for(var c=0;c<e.length;c++)if(e[c]===i){e.length===1?delete this._namedListeners[g]:e.splice(c,1);break}}};g.prototype.constructor=g;g.attach=function(k){var i=new g;k.dispatchEvent=i.dispatchEvent.bind(i);k.addEventListener=i.addEventListener.bind(i);k.removeEventListener=i.removeEventListener.bind(i)};return g});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(g,k){function i(b,a,f){this._properties=f||{};this._properties["service.id"]=b;this._properties.objectClass=a;this._properties["service.names"]=a}function e(b,a,f){this._serviceId=b;this._serviceReference=a;this._internalRegistry=f}function c(b,a){function f(f){return function(){var j;try{if(!a())throw Error("Service was unregistered");var d=b[f].apply(b,Array.prototype.slice.call(arguments));if(d&&typeof d.then==="function")return d;
else j=new g,j.resolve(d)}catch(c){j=new g,j.reject(c)}return j.promise}}for(var j in b)typeof b[j]==="function"&&(this[j]=f(j))}function h(b,a){this.type=b;this.serviceReference=a}function d(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new k;var b=this;this._internalRegistry={isRegistered:function(a){return b._entries[a]?!0:!1},unregisterService:function(a){var f=b._entries[a];if(!f)throw Error("already unregistered");var j=f.reference;b._serviceEventTarget.dispatchEvent(new h("unregistering",
j));b._entries[a]=null;j.getProperty("objectClass").forEach(function(a){for(var f=b._namedReferences[a],d=0;d<f.length;d++)if(f[d]===j){f.length===1?delete b._namedReferences[a]:f.splice(d,1);break}})},modifyService:function(a){a=b._entries[a];if(!a)throw Error("already unregistered");b._serviceEventTarget.dispatchEvent(new h("modified",a.reference))}}}i.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]}};
i.prototype.constructor=i;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;d.prototype={getService:function(b){var a;if(typeof b==="string")(b=this._namedReferences[b])&&b.some(function(f){a=this._entries[f.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(f){f&&a.push(f.reference)});return a},registerService:function(b,a,f){if(typeof a===
"undefined"||a===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var j=this._entries.length,l=new i(j,b,f),d=this._namedReferences;b.forEach(function(a){d[a]=d[a]||[];d[a].push(l)});b=new c(a,this._internalRegistry.isRegistered.bind(null,j));this._entries.push({reference:l,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new h("registered",l));return new e(j,l,b)},addEventListener:function(b,a){this._serviceEventTarget.addEventListener(b,
a)},removeEventListener:function(b,a){this._serviceEventTarget.removeEventListener(b,a)}};d.prototype.constructor=d;return{ServiceRegistry:d}});
define("orion/xhr",["orion/Deferred"],function(g){function k(i,e,c,h){var d=typeof c.response!=="undefined"?c.response:c.responseText,b;try{b=c.status}catch(a){b=0}i={args:e,response:d,responseText:typeof d==="string"?d:null,status:b,url:i,xhr:c};if(typeof h!=="undefined")i.error=h;return i}return function(i,e,c){var c=c||{},h=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,d=new g,b=c.headers||{},a=c.log||!1,f;typeof b["X-Requested-With"]==="undefined"&&(b["X-Requested-With"]="XMLHttpRequest");
if(typeof c.data!=="undefined"&&(i==="POST"||i==="PUT"))f=c.data;if(typeof c.responseType==="string")h.responseType=c.responseType;h.onprogress=function(a){a.xhr=h;d.progress(a)};h.onreadystatechange=function(){if(h.readyState===4){var f=k(e,c,h),b=h.status;200<=b&&b<400?d.resolve(f):(a&&typeof console!=="undefined"&&console.log(Error(h.statusText)),d.reject(f))}};try{h.open(i,e,!0);if(typeof c.timeout==="number")if(typeof h.timeout==="number")h.timeout=c.timeout,h.addEventListener("timeout",function(){d.reject(k(e,
c,h,"Timeout exceeded"))});else{var j=setTimeout(function(){d.reject(k(e,c,h,"Timeout exceeded"))},c.timeout);d.then(clearTimeout.bind(null,j),clearTimeout.bind(null,j))}Object.keys(b).forEach(function(a){h.setRequestHeader(a,b[a])});h.send(f)}catch(l){d.reject(k(e,c,h,l))}return d.promise}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(g,k,i){function e(a,b){this._name=a;this._providers=b;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function c(a,b){return{get:function(l,d){if(b===0)return null;var c=localStorage.getItem(a+l);if(c===null)return null;c=JSON.parse(c);return d||b===-1||c._expires&&c._expires>(new Date).getTime()?(delete c._expires,c):null},set:function(l,d){if(b!==0){if(b!==-1)d._expires=(new Date).getTime()+1E3*b;
if(Object.keys(d).length===0)localStorage.removeItem(a+l);else{var c=JSON.stringify(d);localStorage.setItem(a+l,c);delete d._expires}}},remove:function(b){localStorage.removeItem(a+b)}}}function h(a){this._currentPromises={};this._cache=new c("/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 d(a){this._location=
a;this._currentPromise=null;this._cache=new c("/orion/preferences/default",3600)}function b(){this._cache=new c("/orion/preferences/local",-1)}function a(a,j){this._userProvider=new h(a);this._localProvider=new b;j=j||"defaults.pref";j.indexOf("://")===-1&&(j=g.toUrl(j));this._defaultsProvider=new d(j);this._serviceRegistration=a.registerService("orion.core.preference",this)}e.prototype={_flush:function(){for(var a=[],b=0;b<this._stores.length;++b){var l=this._stores[b];this._dirty.indexOf(l)!==-1&&
a.push(this._providers[b].put(this._name,l))}this._dirty=[];return k.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],l;for(l in b)b.hasOwnProperty(l)&&typeof this._cached[l]==="undefined"&&(this._cached[l]=
b[l])}}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 l=this._stores[0];if(l[a]!==b)l[a]=b,this._cached=null,this._scheduleFlush(l)}},remove:function(a){for(var b=0;b<this._stores.length;++b){var l=this._stores[b];if(l.hasOwnProperty(a))return delete l[a],this._cached=null,this._scheduleFlush(l),!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,l=[],d=0;d<this._providers.length;++d)l.push(this._providers[d].get(this._name,a).then(function(a){return function(f){b._stores[a]=f}}(d)));return k.all(l).then(function(){b._cached=null;b._getCached()})},flush:function(){this._flush()}};h.prototype={get:function(a,b){if(this._currentPromises[a])return this._currentPromises[a];var l=new k,d=null;
b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)l.resolve(d);else{this._currentPromises[a]=l;var c=this;this._service.get(a).then(function(b){c._cache.set(a,b);delete c._currentPromises[a];l.resolve(b)},function(b){b.status===404?(b={},c._cache.set(a,b),delete c._currentPromises[a],l.resolve(b)):(delete c._currentPromises[a],l.resolve(c._cache.get(a,!0)||{}))})}return l},put:function(a,b){this._cache.set(a,b);return this._service.put(a,b)}};d.prototype={get:function(a,b){if(this._currentPromise)return this._currentPromise;
var l=new k,d=null;b?this._cache.remove(a):d=this._cache.get(a);if(d!==null)l.resolve(d);else{this._currentPromise=l;var c=this;i("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(b){b=JSON.parse(b.response);c._cache.set(a,b[a]||{});c._currentPromise=null;l.resolve(b[a]||{})},function(b){b.xhr.status===401||b.xhr.status===404?(c._cache.set(a,{}),c._currentPromise=null,l.resolve({})):(c._currentPromise=null,b=c._cache.get(a,!0),b!==null?l.resolve(b[a]||{}):l.resolve({}))})}return l},
put:function(){var a=new k;a.resolve();return a}};b.prototype={get:function(a){var b=new k,a=this._cache.get(a);a!==null?b.resolve(a):b.resolve({});return b},put:function(a,b){var l=new k;this._cache.set(a,b);l.resolve();return l}};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,j){if(!j||typeof j!=="number"||j>7||j<1)j=a.DEFAULT_SCOPE|a.LOCAL_SCOPE|
a.USER_SCOPE;var l=[];a.USER_SCOPE&j&&this._userProvider.available()&&l.push(this._userProvider);a.LOCAL_SCOPE&j&&l.push(this._localProvider);a.DEFAULT_SCOPE&j&&l.push(this._defaultsProvider);var d=new e(b,l);return d.sync().then(function(){return d})},getSetting:function(a,b,l){for(var d,c=0;c<a.length;c++)if(a[c].label===b)for(var e=0;e<a[c].data.length;e++)if(a[c].data[e].label===l){d=a[c].data[e].value;break}return d}};return{PreferencesService:a}});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget"],function(g,k){function i(a,b){var j=Object.keys(a),l=Object.keys(b);if(j.length!==l.length)return!1;j.sort();l.sort();for(var d=0,c=j.length;d<c;d++){var e=j[d];if(e!==l[d])return!1;var h=a[e],e=b[e];if(h!==e&&JSON.stringify(h)!==JSON.stringify(e))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 c(a){var b=null;return{key:function(j){return(b=b||
Object.keys(a))[j]},getItem:function(b){return a[b]},setItem:function(j,l){a[j]=l;b=null},removeItem:function(j){delete a[j];b=null},clear:function(){(b=b||Object.keys(a)).forEach(function(b){delete a[b]}.bind(this));b=null}}}function h(a,b){return{type:a,plugin:b}}function d(a,b,j){function l(a,b,f){if(!A)return(new g).reject(Error("plugin not connected"));var l=I++,d=new g;d.then(null,function(a){v==="active"&&a instanceof Error&&a.name==="Cancel"&&j.postMessage({id:l,cancel:a.message||"Cancel"},
A)});J[String(l)]=d;j.postMessage({id:l,serviceId:a,method:b,params:f},A);return d.promise}function d(a){var b={};if(a.methods&&(a.methods.forEach(function(f){b[f]=function(){var b=Array.prototype.slice.call(arguments);return v==="active"?l(a.serviceId,f,b):q.start({"transient":!0}).then(function(){return l(a.serviceId,f,b)})}}),b.addEventListener&&b.removeEventListener)){var f=new k;b.dispatchEvent=f.dispatchEvent.bind(f);var j=b.addEventListener;b.addEventListener=function(a,b){f._namedListeners[a]||
j(a);f.addEventListener(a,b)};var c=b.removeEventListener;b.removeEventListener=function(a,b){f.removeEventListener(a,b);f._namedListeners[a]&&c(a)}}return b}function c(b){var f=JSON.parse(JSON.stringify(b.properties));f.__plugin__=a;b=b.names||b.type||[];Array.isArray(b)||(b=[b]);f.objectClass=b;return f}function e(a){var b=d(a),f=c(a),f=j.registerService(a.names||a.type,b,f);y[a.serviceId]={registration:f,proxy:b}}function n(){j.persist(a,{created:u,headers:s,services:w,autostart:x,lastModified:t})}
function o(a){var b;try{if(a.method)if("manifest"===a.method||"plugin"===a.method){var f=a.params[0];F({headers:f.headers,services:f.services}).then(function(){C.resolve(q)})}else if("dispatchEvent"===a.method){var l=y[a.serviceId].proxy;l.dispatchEvent.apply(l,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 d=j.handleServiceError(q,a.error);b.reject(d)}else b.resolve(a.result)}catch(c){console.log("Plugin._responseHandler "+c)}}var q=this,b=b||{},u=b.created||(new Date).getTime(),s=b.headers||{},w=b.services||[],x=b.autostart,t=b.lastModified||0,v="installed",G,C,A,y={},I=0,J={},F;this._persist=n;this._resolve=function(){v="resolved";j.dispatchEvent(new h("resolved",q))};this._getAutostart=function(){return x};this._getCreated=function(){return u};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 t};this.getServiceReferences=function(){var a=[];Object.keys(y).forEach(function(b){a.push(y[b].registration.getReference())});return a};this.getState=function(){return v};this.start=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));
if(G)return G.promise.then(this.start.bind(this,b));if(v==="active")return(new g).resolve();if(!b||!b["transient"]){var f=b&&b.lazy?"lazy":"started";f!==x&&(x=f,n())}f=j.getState();if(f!=="starting"&&f!=="active")return b["transient"]?(new g).reject(Error("start transient error")):(new g).resolve();if(v==="installed")try{this._resolve()}catch(l){return(new g).reject(l)}v==="resolved"&&w.forEach(function(a){e(a)});if(b&&b.lazy)return v!=="starting"&&(v="starting",j.dispatchEvent(new h("lazy activation",
q))),(new g).resolve();var d=new g;G=d;v="starting";j.dispatchEvent(new h("starting",q));C=new g;A=j.connect(a,o);C.then(function(){C=null;v="active";j.dispatchEvent(new h("started",q));G=null;d.resolve()},function(){C=null;v="stopping";j.dispatchEvent(new h("stopping",q));Object.keys(y).forEach(function(a){y[a].registration.unregister();delete y[a]});j.disconnect(A);A=null;v="resolved";G=null;j.dispatchEvent(new h("stopped",q));d.reject(Error("plugin activation error"))});return d.promise};this.stop=
function(a){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(G)return G.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==x)x="stopped",n();if(v!=="active"&&v!=="starting")return(new g).resolve();G=a=new g;v="stopping";j.dispatchEvent(new h("stopping",q));Object.keys(y).forEach(function(a){y[a].registration.unregister();delete y[a]});A&&(j.disconnect(A),A=null);v="resolved";G=null;j.dispatchEvent(new h("stopped",q));a.resolve();return a.promise};
F=function(b){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(!b)return t===0&&(t=(new Date).getTime(),n()),j.loadManifest(a).then(F);var f=s,d=w,l=x;s=b.headers||{};w=b.services||{};x=b.autostart||x;b.lastModified?t=b.lastModified:(t=(new Date).getTime(),n());if(i(s,f)&&i(w,d)&&x===l)return(new g).resolve();if(v==="active"||v==="starting"){var m=[];Object.keys(w).forEach(function(a){var b=w[a];m.push(a);var f=y[a];if(f){if(i(b.methods,Object.keys(f.proxy))){var a=c(b),
j=f.registration.getReference(),d={};j.getPropertyKeys().forEach(function(a){d[a]=j.getProperty(a)});i(a,d)||f.registration.setProperties(a);return}f.registration.unregister();delete y[a]}e(b)});Object.keys(y).forEach(function(a){m.indexOf(a)===-1&&(y[a].registration.unregister(),delete y[a])})}v==="active"&&(j.disconnect(A),C=new g,A=j.connect(a,o),C.then(function(){C=null},function(){C=null;v="stopping";j.dispatchEvent(new h("stopping"),q);Object.keys(y).forEach(function(a){y[a].registration.unregister();
delete y[a]});j.disconnect(A);A=null;v="resolved";j.dispatchEvent(new h("stopped",q))}));return(new g).resolve()};this.update=function(a){return F(a).then(function(){j.dispatchEvent(new h("updated",q))})};this.uninstall=function(){if(v==="uninstalled")return(new g).reject(Error("Plugin is uninstalled"));if(v==="active"||v==="starting"||v==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));j.removePlugin(this);v="uninstalled";j.dispatchEvent(new h("uninstalled",
q));return(new g).resolve()}}var b=/^http[s]?/i;return{Plugin:d,PluginRegistry:function(a,f){function j(a){var b=a.source;i.some(function(f){if(b===f.target){if(typeof f.useStructuredClone==="undefined")f.useStructuredClone=typeof a.data!=="string";f.handler(f.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var f=f||{},l=f.storage||localStorage;l.getItem||(l=c(l));var m="installed",r=[],i=[],n=new k,o={},q={registerService:a.registerService.bind(a),connect:function(a,b,j){function d(a){a=
Error(a);a.name="timeout";b({method:"timeout",error:a})}var l={handler:b,url:a},c=setTimeout(d.bind(null,"Load timeout for: "+a),j||15E3),m=document.createElement("iframe");m.name=a+"_"+(new Date).getTime();if(!f.visible)m.style.display="none",m.style.visibility="hidden";m.src=a;m.onload=function(){clearTimeout(c);setTimeout(d.bind(null,"Plugin handshake timeout for: "+a),5E3)};m.sandbox="allow-scripts allow-same-origin";document.body.appendChild(m);l.target=m.contentWindow;l.close=function(){m&&
(document.body.removeChild(m),m=null)};i.push(l);return l},disconnect:function(a){for(var b=0;b<i.length;b++)if(a===i[b]){i.splice(b,1);try{a.close()}catch(f){}break}},removePlugin:function(a){for(var b=0;b<r.length;b++)if(a===r[b]){r.splice(b,1);break}l.removeItem("plugin."+a.getLocation())},persist:function(a,b){l.setItem("plugin."+a,JSON.stringify(b))},postMessage:function(a,b){b.target.postMessage(b.useStructuredClone?a:JSON.stringify(a),b.url)},dispatchEvent:function(a){try{n.dispatchEvent(a)}catch(b){console&&
console.log("PluginRegistry.dispatchEvent "+b)}},loadManifest:function(a){var b=new g,f=q.connect(a,function(a){f&&a.method&&("manifest"===a.method||"plugin"===a.method?(a=a.params[0],q.disconnect(f),f=null,b.resolve(a)):"timeout"===a.method&&(q.disconnect(f),f=null,b.reject(a.error)))});return b.promise},getState:function(){return m},handleServiceError:function(a,f){if(f&&f.status===401){var j=a.getHeaders(),d=a.getName()||a.getLocation(),l=document.createElement("span");l.appendChild(document.createTextNode("Authentication required for: "+
d+"."));if(j.login)l.appendChild(document.createTextNode(" ")),d=document.createElement("a"),d.target="_blank",d.textContent="Login",d.href=j.login,b.test(d.href)?(l.appendChild(d),l.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+j.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(l)}}if(f.__isError){var c=f,f=Error(c.message);Object.keys(c).forEach(function(a){f[a]=c[a]});delete f.__isError}return f}};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=q.getState;this.init=function(){if(!(m==="starting"||m==="active"||m==="stopping")){addEventListener("message",j,!1);for(var a=[],b=0,c=l.length;b<c;b++)a.push(l.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var b=a.substring(7),a=JSON.parse(l.getItem(a));a.created&&r.push(new d(b,a,q))}});
r.sort(function(a,b){return a._getCreated()<b._getCreated()?-1:1});f.plugins&&Object.keys(f.plugins).forEach(function(a){a=e(a);if(!this.getPlugin(a)){var b=f.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||f.defaultAutostart||"lazy";r.push(new d(a,b,q))}}.bind(this));m="starting"}};this.start=function(){m!=="starting"&&this.init();if(m!=="starting")return(new g).reject("Cannot start framework. Framework is already "+m+".");var a=[],b=(new Date).getTime();r.forEach(function(f){var j=
f._getAutostart();f.getLastModified()===0?a.push(f.update().then(function(){if("started"===j)return f.start({"transient":!0});if("lazy"===j)return f.start({lazy:!0,"transient":!0});f._resolve()})):"started"===j?a.push(f.start({"transient":!0})):"lazy"===j?(a.push(f.start({lazy:!0,"transient":!0})),b>f.getLastModified()+864E5&&f.update()):f._resolve()});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){m="active"})};this.stop=function(){if(m!=="starting"&&m!=="active")return(new g).reject("Cannot stop registry. Registry is already "+
m+".");m="stopping";var a=[];r.forEach(function(b){a.push(b.stop({"transient":!0}))});return g.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",j);m="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new g).reject("Cannot uninstall registry")};this.installPlugin=function(a,b){var a=e(a),f=this.getPlugin(a);if(f)return(new g).resolve(f);if(o[a])return o[a];if(b)return f=new d(a,b,q),r.push(f),
f._persist(),q.dispatchEvent(new h("installed",f)),(new g).resolve(f);var j=q.loadManifest(a).then(function(b){f=new d(a,b,q);r.push(f);f._persist();delete o[a];q.dispatchEvent(new h("installed",f));return f},function(b){delete o[a];throw b;});return o[a]=j};this.getPlugins=function(){return r.slice()};this.getPlugin=function(a){var b=null,a=e(a);r.some(function(f){if(a===f.getLocation())return b=f,!0});return b};this.addEventListener=n.addEventListener.bind(n);this.removeEventListener=n.removeEventListener.bind(n);
this.resolvePlugins=function(){var a=!0;r.forEach(function(b){a=a&&b._resolve()});return a}}}});
define("orion/serviceTracker",[],function(){function g(e,c){function h(f){var j=f.getProperty("service.id"),d=this.addingService(f);d&&(b[j]=f,a[j]=d)}function d(f){var j=f.getProperty("service.id"),d=a[j];delete b[j];delete a[j];this.removedService(f,d)}this.serviceRegistry=e;var b={},a={},f=k,j,l;this.close=function(){if(f!==i)throw"Already closed";f=k;e.removeEventListener("registered",j);e.removeEventListener("unregistering",l);l=j=null;var a=this;this.getServiceReferences().forEach(function(b){d.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(f!==k)throw"Already open";f=i;var a=this;j=function(b){if(b.serviceReference.getProperty("objectClass").indexOf(c)!==-1&&(h.call(a,b.serviceReference),typeof a.onServiceAdded==="function"))return a.onServiceAdded(b.serviceReference,a.serviceRegistry.getService(b.serviceReference))};l=function(b){b.serviceReference.getProperty("objectClass").indexOf(c)!==
-1&&d.call(a,b.serviceReference)};e.addEventListener("registered",j);e.addEventListener("unregistering",l);e.getServiceReferences(c).forEach(function(b){h.call(a,b)});if(typeof this.onOpen==="function")this.onOpen()}}var k=0,i=1;g.prototype={addingService:function(e){return this.serviceRegistry.getService(e)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return g});
define("orion/config",["orion/Deferred","orion/serviceTracker"],function(g,k){var i,e,c,h,d,b="pid";i=function(a,j,d){function c(a,b,f){b.forEach(function(d,l){try{var c=a[l].getProperty("__plugin__"),m=c&&j.getPlugin(c);(!c||m&&m.getState()==="active")&&b[l].updated(f)}catch(e){typeof console!=="undefined"&&console.log(e)}})}k.call(this,a,"orion.cm.managedservice");var e={},h={},i=function(j){var c=[];j.plugin.getServiceReferences().forEach(function(j){if(j.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var m=j.getProperty(b),j=a.getService(j);m&&j&&(m=(m=d._find(m))&&m.getProperties(),c.push(j.updated(m)))}});return g.all(c)};this.addingService=function(j){var d=j.getProperty(b),l=a.getService(j);if(!d||!l)return null;e[d]||(e[d]=[]);h[d]||(h[d]=[]);e[d].push(j);h[d].push(l);return l};this.onServiceAdded=function(a,f){var j=a.getProperty(b),j=d._find(j);c([a],[f],j&&j.getProperties())};this.onOpen=function(){j.addEventListener("started",i)};this.onClose=function(){j.removeEventListener("started",
i)};this.notifyUpdated=function(a){var b=a.getPid();c(e[b]||[],h[b]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();c(e[a]||[],h[a]||[],null)};this.removedService=function(a,f){var j=a.getProperty(b),d=e[j],l=h[j];d.length>1?d.splice(d.indexOf(a),1):delete e[j];l.length>1?l.splice(l.indexOf(f),1):delete h[j]}};e=function(){function a(b,f,d){this.store=new c(this,d);this.configAdmin=new h(this,this.store);this.tracker=new i(b,f,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}();h=function(){function a(b,f){this.factory=b;this.store=f}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";
c=function(){function f(f,l){this.factory=f;this.prefsService=l;this.configs=Object.create(null);this.pref=null;var c=this;this.initPromise=this.prefsService.getPreferences(a).then(function(a){c.pref=a;a.keys().forEach(function(f){if(!c.configs[f]){var j=a.get(f);typeof j==="object"&&j!==null&&Object.keys(j).length>0&&(j[b]=f,c.configs[f]=new d(c.factory,c,j))}})})}f.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 d(this.factory,this,a),this.configs[a]=b);return b},list:function(){var a=this,b=[];this.pref.keys().forEach(function(f){(f=a._find(f))&&f.getProperties()!==null&&b.push(f)});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 f}();d=function(){function a(b){for(var f={},d=Object.keys(b),j=0;j<d.length;j++){var c=d[j],e=b[c];f[c]=e instanceof Array?e.slice():e}return f}function d(j,c,e){this.factory=
j;this.store=c;if(e!==null&&typeof e==="object")this.pid=e[b],j=a(e),delete j[b],this.properties=j;else if(typeof e==="string")this.pid=e,this.properties=null;else throw Error("Invalid pid/properties "+e);}d.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(d){this._checkRemoved();var j=null;if(this.properties&&(j=a(this.properties),!d))j[b]=this.pid;return j},remove:function(){this._checkRemoved();
this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=!0},update:function(j){this._checkRemoved();j=a(j);delete j[b];this.properties=j;this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return d}();return{ConfigurationAdminFactory:e}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(g,k,i,e,c,h){var d;return{startup:function(){if(d)return d;d=new k;var b=window.serviceRegistry=new i.ServiceRegistry,a=new e.PreferencesService(b);return a.getPreferences("/plugins").then(function(f){var j={plugins:{}};f.keys().forEach(function(a){var b=g.toUrl(a);j.plugins[b]=f[a]});var l=window.pluginRegistry=new c.PluginRegistry(b,j);return l.start().then(function(){if(b.getServiceReferences("orion.core.preference.provider").length>
0)return a.getPreferences("/plugins",a.USER_SCOPE).then(function(a){var b=[];a.keys().forEach(function(a){a=g.toUrl(a);l.getPlugin(a)||b.push(l.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return k.all(b,function(a){console.log(a)})})}).then(function(){return(new h.ConfigurationAdminFactory(b,l,a)).getConfigurationAdmin().then(b.registerService.bind(b,"orion.cm.configadmin"))}).then(function(){var a=b.getService("orion.core.auth");
if(a){var f=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 f}}).then(function(){var f={serviceRegistry:b,preferences:a,pluginRegistry:l};d.resolve(f);return f})})}}});
define("orion/webui/littlelib",["require"],function(){function g(b,a){a||(a=document);return a.querySelectorAll(b)}function k(b,a){var f=b.compareDocumentPosition(a);return b===a||Boolean(f&16)}function i(b){if(b.tabIndex>=0)return b;if(b.hasChildNodes())for(var a=0;a<b.childNodes.length;a++){var f=i(b.childNodes[a]);if(f)return f}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 f=e(b.childNodes[a]);if(f)return f}return null}function c(b,
a){if(b.nodeType===3){var f=h.exec(b.nodeValue);f&&f.length>1&&b.parentNode.replaceChild(document.createTextNode(a[f[1]]||f[1]),b)}if(b.hasChildNodes())for(f=0;f<b.childNodes.length;f++)c(b.childNodes[f],a)}var h=/\$\{([^\}]+)\}/,d=[];return{$:function(b,a){a||(a=document);return a.querySelector(b)},$$:g,$$array:function(b,a){return Array.prototype.slice.call(g(b,a))},node:function(b){var a=b;typeof b==="string"&&(a=document.getElementById(b));return a},contains:k,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:i,lastTabbable:e,stop:function(b){window.document.all?b.keyCode=0:(b.preventDefault(),b.stopPropagation())},processTextNodes:c,addAutoDismiss:function(b,a){d.length===0&&document.addEventListener("click",function(a){for(var b=[],l=0;l<d.length;l++){for(var c=d[l].excludeNodes,e=d[l].dismiss,h=!1,i=!0,g=0;g<
c.length;g++)if((h=document.compareDocumentPosition(document,c[g])!==1)&&k(c[g],a.target)){i=!1;break}i&&(e(),h=document.compareDocumentPosition(document,c[g])!==1);h&&b.push(d[l])}d=b},!0);d.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/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(g,k){var i={root:k};Object.keys(g).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=g[e])});return i});
define("orion/operations/nls/root/messages",{More:"More","No Matching OperationService for location:":"No Matching OperationService for location:","No operations services registered.":"No operations services registered.","could not find toolbar ":"could not find toolbar ","Remove Completed":"Remove Completed","Remove all completed operations":"Remove all completed operations",Remove:"Remove","Remove operations from the operations list.":"Remove operations from the operations list.",Cancel:"Cancel",
"Cancel operations from the operations list.":"Cancel operations from the operations list.","Operation resulted in a warning.":"Operation resulted in a warning.","Operation resulted in an error.":"Operation resulted in an error.","Operation is running.":"Operation is running.","Operation is canceled.":"Operation is canceled.","Operation failed.":"Operation failed.",Name:"Name",Actions:"Actions",Status:"Status",Scheduled:"Scheduled"});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages","orion/operations/nls/root/messages"],function(g,k){var i={root:k};Object.keys(g).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=g[e])});return i});
define("orion/webui/tooltip",["require","orion/webui/littlelib"],function(g,k){function i(e){this._init(e)}i.prototype={_init:function(e){this._node=k.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 c=this;if(this._trigger===
"click")this._showDelay=0,this._node.addEventListener("click",function(d){d.target===c._node&&(c.show(),k.stop(d))},!1);else if(this._trigger==="mouseover"){this._showDelay=e.showDelay===void 0?1E3:e.showDelay;e=["mouseout","click"];this._node.addEventListener("mouseover",function(d){k.contains(c._node,d.target)&&(c.show(),k.stop(d))},!1);for(var h=0;h<e.length;h++)this._node.addEventListener(e[h],function(d){k.contains(c._node,d.target)&&c.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;k.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(c){k.contains(e._tip,c.target)&&(e.hide(),k.stop(c))},!1)},!1)}return this._tip},_positionTip:function(e,c){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 h=k.bounds(this._node),d=k.bounds(this._tipInner),b;switch(e){case "above":b=h.top-d.height-this._tailSize-1;h=h.left-this._tailSize;break;case "below":b=h.top+h.height+this._tailSize+1;h=h.left-this._tailSize;break;case "left":b=h.top-this._tailSize/2;h=h.left-d.width-this._tailSize-1;break;default:b=h.top-this._tailSize/2,h=h.left+h.width+this._tailSize+1}var a=k.bounds(document.documentElement);if(b+d.height>a.height)if(c)b=a.height-d.height-1;else return!1;
if(h+d.width>a.width)if(c)h=a.width-d.width-1;else return!1;if(h<0)if(c)h=4;else return!1;if(b<0)if(c)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=h+"px";this._tip.style.width=d.width+"px";this._tip.style.height=d.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 c=!1,h=0;!c&&h<e._position.length;)c=e._positionTip(e._position[h]),
h++;c||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 c=this;this._timeout=window.setTimeout(function(){c._tip.classList.remove("tooltipShowing");c._afterHiding&&c._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}};i.prototype.constructor=i;return{Tooltip:i}});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Port:":"SFTP Port:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a file here":"Drag a file here","unzip zips":"Unzip *.zip files","or if you prefer":"(or upload a file using the buttons below)",Upload:"Upload","Browse...":"Browse...","Import a file or zip":"Import a file or zip",
"Missing required argument: searchRenderer":"Missing required argument: searchRenderer","Missing required argument: favService":"Missing required argument: favService","Find File Named":"Find File Named","Type the name of a file to open (? = any character, * = any string):":"Type the name of a file to open (? = any character, * = any string):",Search:"Search","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(g,k){var i={root:k};Object.keys(g).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=g[e])});return i});
define("orion/webui/popupdialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/webui/tooltip"],function(g,k,i,e){function c(){}c.prototype={_initialize:function(c,d,b,a,f){this._tooltip=new e.Tooltip({node:c,hideDelay:f||0,afterShowing:this._afterShowingFunction(d).bind(this),afterHiding:b,trigger:a?a:"click"});this.$parent=this._tooltip.contentContainer();this.$parent.role="dialog";c=document.createRange();c.selectNode(this.$parent);c=c.createContextualFragment(this.TEMPLATE);
this.messages&&i.processTextNodes(c,g);this.$parent.appendChild(c);var j=this._tooltip;this.$parent.addEventListener("keydown",function(a){a.keyCode===i.KEY.ESCAPE&&j.hide()},!1);this._bindElements(this.$parent);typeof this._bindToDom==="function"&&this._bindToDom(this.$parent)},_bindElements:function(c){for(var d=0;d<c.childNodes.length;d++){var b=c.childNodes[d];b.id&&(this["$"+b.id]=b);this._bindElements(b)}},_afterShowingFunction:function(c){return function(){c&&c.bind(this)();if(!this.customFocus){var d=
i.firstTabbable(this.$parent);d&&d.focus()}}},hide:function(){this._tooltip.hide()},show:function(){this._tooltip.show()}};c.prototype.constructor=c;return{PopupDialog:c}});
define("orion/uiUtils",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,k){function i(e){var c=window.navigator.platform.indexOf("Mac")!==-1;return c&&e.metaKey||!c&&e.ctrlKey}return{getUserKeyString:function(e){var c="",h=navigator.platform.indexOf("Mac")!==-1;e.mod1&&(c+=h?"Cmd+":"Ctrl+");e.mod2&&(c+="Shift+");e.mod3&&(c+="Alt+");e.mod4&&h&&(c+="Ctrl+");if(e.alphaKey)return c+e.alphaKey;for(var d in k.KEY)if(typeof(k.KEY[d]==="number")&&k.KEY[d]===e.keyCode)return c+d;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?c+b:e.keyCode>=112&&e.keyCode<=123?c+"F"+(e.keyCode-111):c+String.fromCharCode(e.keyCode)},getUserText:function(e,c,h,d,b,a,f,j,l){var m=!1,f=function(f){return function(j){if(!m){var i=k.node(e),
q=i.value;if(i)if(f&&j.keyCode===k.KEY.ESCAPE){if(h)c.style.display="inline";i.parentNode.removeChild(i);m=!0;a&&a()}else if(!(f&&j.keyCode!==k.KEY.ENTER)){if(q.length===0||!l&&q===d){if(h)c.style.display="inline"}else b(q);m=!0;i.parentNode&&i.parentNode.removeChild(i);a&&a()}}}},i=document.createElement("input");i.id=e;i.value=d||"";c.parentNode.insertBefore(i,c.nextSibling);i.classList.add("userEditBoxPrompt");if(h)c.style.display="none";i.addEventListener("keydown",f(!0),!1);i.addEventListener("blur",
f(!1),!1);window.setTimeout(function(){i.focus();if(d){var a=k.node(e),b=j?d.indexOf(j):-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:i,followLink:function(e,c){c&&i(c)?window.open(e):window.location=e},createButton:function(e,c){var h=document.createElement("span");
h.role="button";h.tabIndex=0;h.appendChild(document.createTextNode(e));h.className="commandButton commandMargins";h.addEventListener("click",function(d){c();k.stop(d)},!1);h.addEventListener("keydown",function(d){if(d.keyCode===k.KEY.ENTER||d.keyCode===k.KEY.SPACE)c(),k.stop(d)},!1);return h}}});
define("orion/webui/dropdown",["require","orion/webui/littlelib"],function(g,k){function i(e){this._init(e)}i.prototype={_init:function(e){this._dropdownNode=k.node(e.dropdown);if(!this._dropdownNode)throw"no dom node for dropdown found";this._triggerNode=k.$(".dropdownTrigger",this._dropdownNode.parentNode);if(!this._triggerNode)throw"no dom node for dropdown trigger found";this._populate=e.populate;var c=this;this._triggerNode.addEventListener("click",function(e){c.toggle()&&k.stop(e)},!1);this._triggerNode.tagName.toLowerCase()===
"span"&&this._triggerNode.addEventListener("keydown",function(e){if(e.keyCode===k.KEY.ENTER||e.keyCode===k.KEY.SPACE)c.toggle(),k.stop(e)},!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)k.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=k.bounds(this._dropdownNode),c=k.bounds(this._boundingNode(this._triggerNode));if(e.left+e.width>c.left+c.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=[],c=this;k.$$array("li:not(.dropdownSeparator) > .dropdownMenuItem",this._dropdownNode,!0).forEach(function(h){h.parentNode.parentNode===c._dropdownNode&&e.push(h)});return e},empty:function(){var e=this;
k.$$array("li",this._dropdownNode).forEach(function(c){c.parentNode===e._dropdownNode&&c.parentNode.removeChild(c)})},_dropdownKeyDown:function(e){if(e.keyCode===k.KEY.UP||e.keyCode===k.KEY.DOWN||e.keyCode===k.KEY.RIGHT||e.keyCode===k.KEY.ENTER||e.keyCode===k.KEY.LEFT){var c=this.getItems(),h=document.activeElement;if(c.length&&c.length>0&&h){var d=c.indexOf(h);d>=0&&(e.keyCode===k.KEY.UP&&d>0?(d--,c[d].focus()):e.keyCode===k.KEY.DOWN&&d<c.length-1?(d++,c[d].focus()):e.keyCode===k.KEY.ENTER||e.keyCode===
k.KEY.RIGHT?h.classList.contains("dropdownTrigger")&&h.dropdown&&h.dropdown.open():e.keyCode===k.KEY.LEFT&&h.parentNode.parentNode.classList.contains("dropdownMenuOpen")&&this.close(!0),k.stop(e))}}else e.keyCode===k.KEY.ESCAPE&&(this.close(!0),k.stop(e))}};i.prototype.constructor=i;return{Dropdown:i}});
define("orion/explorers/navigationUtils",[],function(){function g(i,e){if(!k&&i)i.push({domNode:e}),e.tabIndex=-1,e.style.outline="none"}var k=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(i,e,c){i&&(i=i.getGridNavHolder(e,!0))&&g(i,c)},generateNavGrid:g,removeNavGrid:function(i,e){if(i)for(var c=0;c<i.length;c++)if(i[c].domNode===e){i.splice(c,1);break}}}});
define("orion/i18nUtil",["require","orion/Deferred"],function(g,k){function i(c){if(c=localStorage.getItem("orion/messageBundle/"+c))if(c=JSON.parse(c),c._expires&&c._expires>(new Date).getTime())return delete c._expires,c;return null}var e={};return{getMessageBundle:function(c){function h(){g(["i18n!"+c],function(a){if(a){var b=c;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+b,JSON.stringify(a));delete a._expires}d.resolve(a)})}if(e[c])return e[c];var d=new k;e[c]=
d;var b=i(c);if(b)return d.resolve(b),d;try{g([c],h)}catch(a){g(["orion/i18n!"+c],h)}return d},formatMessage:function(c){var e=arguments;return c.replace(/\$\{([^\}]+)\}/g,function(d,b){return e[(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(g,k){var i={root:k};Object.keys(g).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=g[e])});return i});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(g,k,i){function e(d,b,a){if(!d[b])throw b+g[" is not supported in this file system"];return d[b].apply(d,a)}function c(d,b,a,f){if(!d.readBlob)throw g["source file service does not support binary read"];if(!a.writeBlob)throw g["target file service does not support binary write"];if(b[b.length-1]!=="/")return e(d,"readBlob",[b]).then(function(b){return e(a,"writeBlob",[f,b])});var j=f.substring(0,
f.length-1),l=decodeURIComponent(j.substring(j.lastIndexOf("/")+1)),j=j.substring(0,j.lastIndexOf("/")+1);return e(a,"createFolder",[j,l]).then(function(){},function(){}).then(function(){return e(d,"fetchChildren",[b]).then(function(b){for(var j=[],l=0;l<b.length;++l){var e=b[l].Location,h=e;b[l].Directory&&(h=e.substring(0,e.length-1));h=decodeURIComponent(h.substring(h.lastIndexOf("/")+1));h=f+encodeURIComponent(h);b[l].Directory&&(h+="/");j[l]=c(d,e,a,h)}return k.all(j)})})}function h(d,b){function a(a){var b=
new k;b.reject(g["No Matching FileService for location:"]+a);return b}var f=d.getServiceReferences("orion.core.file"),j=f;if(b)for(var j=[],l=0;l<f.length;++l)b(f[l])&&j.push(f[l]);for(var c=[],e=[],h=[],n=[],o={fetchChildren:function(){var a=new k;a.resolve(n);return a},createWorkspace:function(){var a=new k;a.reject(g["no file service"]);return a},loadWorkspaces:function(){var a=new k;a.reject(g["no file service"]);return a},loadWorkspace:function(){var a=new k;window.setTimeout(function(){a.resolve({Directory:!0,
Length:0,LocalTimeStamp:0,Name:g["File Servers"],Location:"/",Children:n,ChildrenLocation:"/"})},100);return a},search:a,createProject:a,createFolder:a,createFile:a,deleteFile:a,moveFile:a,copyFile:a,read:a,write:a},f=0;f<j.length;++f)n[f]={Directory:!0,Length:0,LocalTimeStamp:0,Location:j[f].getProperty("top"),ChildrenLocation:j[f].getProperty("top"),Name:j[f].getProperty("Name")},l=j[f].getProperty("pattern")||".*",l[0]!=="^"&&(l="^"+l),c[f]=RegExp(l),e[f]=d.getService(j[f]),h[f]=j[f].getProperty("Name"),
j[f].getProperty("NameKey")&&j[f].getProperty("nls")&&i.getMessageBundle(j[f].getProperty("nls")).then(function(a,b){n[a].Name=b[j[a].getProperty("NameKey")];h[a]=b[j[a].getProperty("NameKey")]}.bind(this,f));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return e[0]?0:-1;for(var b=0;b<c.length;++b)if(c[b].test(a))return b;throw g["No Matching FileService for location:"]+a;};this._getService=function(a){a=this._getServiceIndex(a);return a===-1?o:e[a]};this._getServiceName=
function(a){a=this._getServiceIndex(a);return a===-1?o.Name:h[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?o.Location:n[a].Location}}h.prototype={getService:function(d){return this._getService(d)},fileServiceName:function(d){return this._getServiceName(d)},fileServiceRootURL:function(d){return this._getServiceRootURL(d)},fetchChildren:function(d){return e(this._getService(d),"fetchChildren",arguments)},createWorkspace:function(d){return e(this._getService(),"createWorkspace",
arguments)},loadWorkspaces:function(){return e(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(d){return e(this._getService(d),"loadWorkspace",arguments)},createProject:function(d,b,a,f){return e(this._getService(d),"createProject",arguments)},createFolder:function(d,b){return e(this._getService(d),"createFolder",arguments)},createFile:function(d,b){return e(this._getService(d),"createFile",arguments)},deleteFile:function(d){return e(this._getService(d),"deleteFile",arguments)},
moveFile:function(d,b,a){var f=this._getService(d),j=this._getService(b);if(f===j)return e(f,"moveFile",arguments);var l=d[d.length-1]==="/",m=b;m[m.length-1]!=="/"&&(m+="/");if(a)m+=encodeURIComponent(a);else{var h=d;l&&(h=h.substring(0,h.length-1));m+=h.substring(h.lastIndexOf("/")+1)}l&&m[m.length-1]!=="/"&&(m+="/");return c(f,d,j,m).then(function(){return e(f,"deleteFile",[d])})},copyFile:function(d,b,a){var f=this._getService(d),j=this._getService(b);if(f===j)return e(f,"copyFile",arguments);
var l=d[d.length-1]==="/",m=b;m[m.length-1]!=="/"&&(m+="/");if(a)m+=encodeURIComponent(a);else{var h=d;l&&(h=h.substring(0,h.length-1));m+=h.substring(h.lastIndexOf("/")+1)}l&&m[m.length-1]!=="/"&&(m+="/");return c(f,d,j,m)},read:function(d,b){return e(this._getService(d),"read",arguments)},write:function(d,b,a){return e(this._getService(d),"write",arguments)},remoteImport:function(d,b){return e(this._getService(d),"remoteImport",arguments)},remoteExport:function(d,b){return e(this._getService(d),
"remoteExport",arguments)},search:function(d){return e(this._getService(d.resource),"search",arguments)}};h.prototype.constructor=h;return{FileClient:h}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(g,k){function i(d,b,a){return d[b].apply(d,a)}function e(d){this._location=d}function c(){var d=new k;d.reject(g["No Matching OperationService for location:"]+this._location);return d}function h(d){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];this._preferenceService=d.getService("orion.core.preference");for(var b=d.getServiceReferences("orion.core.operation"),
a=0;a<b.length;a++){var f=d.getService(b[a]);this._services[a]=f;f=b[a].getProperty("pattern")||".*";f[0]!=="^"&&(f="^"+f);this._patterns[a]=RegExp(f)}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:c,getOperations:c,removeCompletedOperations:c,removeOperation:c,cancelOperation:c};e.prototype.constructor=e;h.prototype={getOperations:function(){var d=
new k;if(this._operations)return d.resolve(this._operations),d;var b=this;this._preferenceService.getPreferences("/operations").then(function(a){b._operations=a;d.resolve(b._operations)});return d},getOperation:function(d){return i(this._getService(d),"getOperation",arguments)},removeCompletedOperations:function(){for(var d=[],b=this,a=0;a<this._services.length;a++){var f=this._patterns[a],j=new k;d[a]=j.promise;i(this._services[a],"removeCompletedOperations").then(function(a){return function(j){Array.isArray(j)&&
b.getOperations.bind(b)().then(function(b){for(var d=b.keys(),c=0;c<d.length;c++){var e=d[c];f.test(e)&&j.indexOf(e)<0&&b.remove(e)}a.resolve()})}}(j),function(a){return function(b){a.reject(b)}}(j))}return k.all(d)},removeOperation:function(d){var b=this;return i(this._getService(d),"removeOperation",arguments).then(function(){b.getOperations.bind(b)().then(function(a){a.remove(d)})},function(a){return a},function(a){return a})}};h.prototype.constructor=h;return{OperationsClient:h}});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","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(g,k){var i={root:k};Object.keys(g).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=g[e])});return i});
define("orion/editor/regex",[],function(){return{escape:function(g){return g.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(g){return(g=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(g))?{pattern:g[1],flags:g[2]}:null}}});
define("orion/URITemplate",[],function(){function g(a){this._text=a}function k(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 i(a,b,j){for(var d=[],c=0;c<a.length;c++)typeof a[c]!=="undefined"&&
d.push(k(a[c],b));return d.join(j)}function e(a,b,j,d){for(var c=Object.keys(a),e=[],h=0;h<c.length;h++)typeof a[c[h]]!=="undefined"&&e.push(k(c[h],b)+j+k(a[c[h]],b));return e.join(d)}function c(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=d[a[0]])?a=a.substring(1):this._operator=d.NUL;for(var f=[],j=a.split(","),c=0;c<j.length;c++){var e=j[c].match(b);if(e===null)throw Error("Bad VarSpec: "+a);f.push({name:e[1],explode:!!e[2],prefix:e[3]?parseInt(e[3],
10):-1})}this._varSpecList=f}function h(a){for(var b=[],d=0,l=a.indexOf("{",d);l!==-1;){b.push(new g(a.substring(d,l)));d=a.indexOf("}",l+1);if(d===-1)throw Error("Invalid template: "+a);b.push(new c(a.substring(l+1,d)));d+=1;l=a.indexOf("{",d)}b.push(new g(a.substring(d)));this._templateComponents=b}var d={NUL:{first:"",sep:",",named:!1,ifemp:"",allow:"U"},"+":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R"},".":{first:".",sep:",",named:!1,ifemp:"",allow:"U"},"/":{first:"/",sep:"/",named:!1,ifemp:"",
allow:"U"},";":{first:";",sep:";",named:!0,ifemp:"",allow:"U"},"?":{first:"?",sep:"&",named:!0,ifemp:"=",allow:"U"},"&":{first:"&",sep:"&",named:!0,ifemp:"=",allow:"U"},"#":{first:"#",sep:",",named:!1,ifemp:"",allow:"U+R"},",":{first:"",sep:",",named:!1,ifemp:"",allow:"U+R-,"}},b=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;g.prototype={expand:function(){return encodeURI(this._text)}};c.prototype={expand:function(a){for(var b=[],d=
0;d<this._varSpecList.length;d++){var c=this._varSpecList[d],h=c.name,g=a[h],p=typeof g;if(p!=="undefined"&&g!==null){var n=b.length===0?this._operator.first:this._operator.sep;if(p==="string")this._operator.named&&(n+=k(h,"U+R"),n+=g.length===0?this._operator.ifemp:"="),c.prefix!==-1&&c.prefix<g.length&&(g=g.substring(0,c.prefix)),n+=k(g,this._operator.allow);else if(Array.isArray(g))c.explode?n+=i(g,this._operator.allow,this._operator.sep):(this._operator.named&&(n+=k(h,"U+R"),n+=g.length===0?this._operator.ifemp:
"="),n+=i(g,this._operator.allow,","));else if(p==="object")c.explode?n+=e(g,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(n+=k(h,"U+R"),n+=Object.keys(g).length===0?this._operator.ifemp:"="),n+=e(g,this._operator.allow,",",","));else throw Error("bad param type: "+h+" : "+p);b.push(n)}}return b.join("")}};h.prototype={expand:function(a){for(var b=[],d=0;d<this._templateComponents.length;d++)b.push(this._templateComponents[d].expand(a));return b.join("")}};return h});
define("orion/contentTypes",[],function(){function g(c,d){function b(a,b,f,d){var f=b.filename.indexOf(f)>=0,j=b.extension.indexOf(d)>=0;if(f||j)if(!a||f&&a.extension.indexOf(d)>=0)return b;return a}for(var a=c&&c.split(".").pop(),f=null,j=0;j<d.length;j++){var l=d[j];b(f,l,c,a)===l&&(f=l)}return f}function k(h){this.serviceRegistry=h;this.map=function(d){function b(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var d=d.getServiceReferences(e).concat(d.getServiceReferences(c)),
a={},f=0;f<d.length;f++)for(var j=b(d[f].getProperty("contentTypes")),l=0;l<j.length;l++){var h=j[l];a[h.id]||(a[h.id]={id:h.id,name:h.name,image:h.image,"extends":h["extends"],extension:b(h.extension),filename:b(h.filename)})}return a}(h);h.registerService(i,this)}var i="orion.core.contenttypes",e="orion.core.contenttype",c="orion.file.contenttype";k.prototype={getContentTypes:function(){var c=this.getContentTypesMap(),d=[],b;for(b in c)c.hasOwnProperty(b)&&d.push(c[b]);return d},getContentTypesMap:function(){return this.map},
getFileContentType:function(c){return g(c.Name,this.getContentTypes())},getFilenameContentType:function(c){return g(c,this.getContentTypes())},getContentType:function(c){return this.map[c]||null},isExtensionOf:function(c,d){c=typeof c==="string"?this.getContentType(c):c;d=typeof d==="string"?this.getContentType(d):d;if(!c||!d)return!1;if(c.id===d.id)return!0;else for(var b=c,a={};b&&(b=this.getContentType(b["extends"]));){if(b.id===d.id)return!0;if(a[b.id])throw Error("Cycle: "+b.id);a[b.id]=!0}return!1},
isSomeExtensionOf:function(c,d){for(var b=0;b<d.length;b++)if(this.isExtensionOf(c,d[b]))return!0;return!1}};return{ContentTypeService:k,getFilenameContentType:g}});
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(g,k){var i={root:k};Object.keys(g).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=g[e])});return i});define("orion/dialogs",[],function(){function g(g){this._serviceRegistry=g;this._serviceRegistration=g.registerService("orion.page.dialog",this)}g.prototype={confirm:function(g,i){i(window.confirm(g))},openFiles:function(){}};g.prototype.constructor=g;return{DialogService:g}});
define("orion/parameterCollectors",["i18n!orion/nls/messages","require","orion/webui/littlelib"],function(g,k,i){function e(c,e){this._activeContainer=null;this._getElementsFunction=c;this._toolbarLayoutFunction=e}e.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&i.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&this._activeElements.slideContainer.classList.remove("slideContainerActive");this._activeElements.dismissArea&&i.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(c,e,d){typeof c==="string"&&(c=i.node(c));if(this._activeElements&&this._activeElements.slideContainer&&this._activeElements.commandNode===c)return this._activeElements.focusNode&&
this._activeElements.focusNode.focus(),!0;this.close();this._activeElements=null;if((this._activeElements=this._getElementsFunction(c))&&this._activeElements.parameterArea&&this._activeElements.slideContainer){this._activeElements.onClose=d;var b=e(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!b)return!1;this._activeElements.focusNode=b;c=i.$$array("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(c.length===0){e=this._activeElements.dismissArea||
this._activeElements.parameterArea;c=document.createElement("span");c.id="closebox";c.role="button";c.tabIndex=0;c.classList.add("imageSprite");c.classList.add("core-sprite-close");c.classList.add("dismiss");c.title=g.Close;e.appendChild(c);var a=this;c.addEventListener("click",function(){a.close()},!1);c.addEventListener("keydown",function(b){(b.keyCode===i.KEY.ENTER||b.keyCode===i.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(c,e){i.$$array("input",e).forEach(function(d){d.type==="checkbox"?c.parameters.setValue(d.parameterName,d.checked):d.type!=="button"&&c.parameters.setValue(d.parameterName,d.value.trim())});i.$$array("textArea",e).forEach(function(d){c.parameters.setValue(d.parameterName,
d.value.trim())});c.command.callback&&c.command.callback.call(c.handler,c)},collectParameters:function(c){return c.parameters?(c.domNode&&c.domNode.classList.add("commandMarker"),this.open(c.domNode||c.domParent,this.getFillFunction(c))):!1},getFillFunction:function(c,e){var d=this;return function(b,a){var f=null,j=function(){e&&e();d.close()},l=function(a){a.keyCode===i.KEY.ENTER&&d._collectAndCall(c,b);if(a.keyCode===i.KEY.ESCAPE||a.keyCode===i.KEY.ENTER)j(),i.stop(a)};c.parameters.forEach(function(a){var d=
null;if(a.label)d=document.createElement("label"),d.classList.add("parameterInput"),d.setAttribute("for",a.name+"parameterCollector"),d.textContent=a.label,b.appendChild(d);var c=a.name+"parameterCollector",e=d||b;if(a.type==="text"&&typeof a.lines==="number"&&a.lines>1)d=document.createElement("textarea"),d.rows=a.lines,d.type="textarea",d.id=c,e.appendChild(d),l=function(a){a.keyCode===i.KEY.ESCAPE&&(j(),i.stop(a))};else if(a.type==="boolean"){if(d=document.createElement("input"),d.type="checkbox",
d.id=c,e.appendChild(d),a.value)d.checked=!0}else if(d=document.createElement("input"),d.type=a.type,d.id=c,e.appendChild(d),a.value)d.value=a.value;d.classList.add("parameterInput");d.classList.add("parameterInput"+d.type);d.setAttribute("speech","speech");d.setAttribute("x-webkit-speech","x-webkit-speech");d.parameterName=a.name;f||(f=d);d.addEventListener("keydown",l,!1)});var m=a;if(!m)m=document.createElement("span"),m.className="layoutRight parametersDismiss",b.appendChild(m);var r=function(a){a._collectAndCall(c,
b);j()},k=function(a,b){var f=document.createElement("span");f.role="button";f.tabIndex=0;b.appendChild(f);a&&f.appendChild(document.createTextNode(a));f.classList.add("dismiss");return f};if(c.parameters.hasOptionalParameters()){c.parameters.optionsRequested=!1;var n=k(g.More,m);n.addEventListener("click",function(){c.parameters.optionsRequested=!0;r(d)},!1);n.addEventListener("keydown",function(a){if(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)c.parameters.optionsRequested=!0,r(d)},!1)}n=k(g.Submit,
m);n.addEventListener("click",function(){r(d)},!1);n.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&r(d)},!1);m=k(null,m);m.id="closebox";m.classList.add("imageSprite");m.classList.add("core-sprite-close");m.title=g.Close;m.addEventListener("click",function(){j()},!1);m.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&j()},!1);return f}}};e.prototype.constructor=e;return{CommandParameterCollector:e}});
(function(){function g(a){return a?a.slice(1).split("&"):[]}function k(a){return a.length===0?"":"?"+a.join("&")}function i(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 c(a,b){var f="",d=[],j=0;return{next:function(){if(f!==a.search)f=a.search,d=g(f);if(j<d.length){var c=i(d[j++]);switch(b){case "keys":return c[0];case "values":return c[1];
case "keys+values":return[c[0],c[1]];default:throw new TypeError;}}throw l;}}}function h(a){if(typeof a!=="string")throw new TypeError;}function d(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,f){a=a||"";if(typeof a!=="string")throw new TypeError("url");f=f?f.href||f:"";if(typeof f!=="string")throw new TypeError("base");Object.defineProperty(this,"_input",{value:a,writable:!0});var j=document.implementation.createHTMLDocument("");
if(f){var c=j.createElement("a");c.href=f;if(c.protocol.length<2||!c.host)throw Error("InvalidStateError");var l=j.createElement("base");l.href=c.href;j.head.appendChild(l)}var e=j.createElement("a");e.href=a;j.body.appendChild(e);Object.defineProperty(this,"_urlAnchor",{value:e});var h=new b(e);Object.defineProperty(this,"query",{get:function(){return d(e)?h:null},enumerable:!0})}try{if(typeof window.URL==="function"&&window.URL.length!==0&&(new window.URL("http://www.w3.org")).protocol==="http:")return}catch(f){}var j=
/([^:]*):?(.*)/,l=typeof StopIteration!=="undefined"?StopIteration:Error("Stop Iteration");Object.defineProperties(b.prototype,{get:{value:function(a){h(a);var b;g(this._anchor.search).some(function(f){f=i(f);if(f[0]===a)return b=f[1],!0});return b},enumerable:!0},set:{value:function(a,b){h(a);h(b);var f=g(this._anchor.search);f.some(function(d,j){var c=i(d);if(c[0]===a)return c[1]=b,f[j]=e(c),!0})||f.push(e([a,b]));this._anchor.search=k(f)},enumerable:!0},has:{value:function(a){h(a);return g(this._anchor.search).some(function(b){if(i(b)[0]===
a)return!0})},enumerable:!0},"delete":{value:function(a){h(a);var b=g(this._anchor.search),f=b.filter(function(b){return i(b)[0]!==a});return f.length!==b.length?(this._anchor.search=k(f),!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 f=c(this._anchor,"keys+values");try{for(;;){var d=f.next();a.call(b,d[1],d[0],this)}}catch(j){if(j!==l)throw j;}},enumerable:!0},keys:{value:function(){return c(this._anchor,
"keys")},enumerable:!0},values:{value:function(){return c(this._anchor,"values")},enumerable:!0},items:{value:function(){return c(this._anchor,"keys+values")}},size:{get:function(){return g(this._anchor.search).length},enumerable:!0},getAll:{value:function(a){h(a);var b=[];g(this._anchor.search).forEach(function(f){f=i(f);f[0]===a&&b.push(f[1])});return b},enumerable:!0},append:{value:function(a,b){h(a);h(b);var f=g(this._anchor.search);f.push(e([a,b]));this._anchor.search=k(f)},enumerable:!0}});
Object.defineProperties(a.prototype,{href:{get:function(){return d(this._urlAnchor)?this._urlAnchor.href:this._input},set:function(a){h(a);this._input=a;this._urlAnchor.href=a},enumerable:!0},origin:{get:function(){return d(this._urlAnchor)?this._urlAnchor.protocol+"//"+this._urlAnchor.host:""},enumerable:!0},protocol:{get:function(){return d(this._urlAnchor)?this._urlAnchor.protocol:":"},set:function(a){h(a);this._urlAnchor.protocol=a},enumerable:!0},_userinfo:{get:function(){return!d(this._urlAnchor)?
"":RegExp("^"+this._urlAnchor.protocol+"(\\/\\/)(?:([^@]*)?@)?"+this._urlAnchor.host).exec(this._urlAnchor.href)[2]||""},set:function(a){h(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(!d(this._urlAnchor))return"";var a=j.exec(this._userinfo);return decodeURIComponent(a[1]||"")},set:function(a){h(a);var b=j.exec(this._userinfo),
a=[encodeURIComponent(a||"")];b[2]&&a.push(b[2]);this._userinfo=a.join(":")},enumerable:!0},password:{get:function(){if(!d(this._urlAnchor))return"";var a=j.exec(this._userinfo);return decodeURIComponent(a[2]||"")},set:function(a){h(a);var b=[j.exec(this._userinfo)[1]||""];a&&b.push(encodeURIComponent(a));this._userinfo=b.join(":")},enumerable:!0},host:{get:function(){return d(this._urlAnchor)?this._urlAnchor.host:""},set:function(a){h(a);this._urlAnchor.host=a},enumerable:!0},hostname:{get:function(){return d(this._urlAnchor)?
this._urlAnchor.hostname:""},set:function(a){h(a);this._urlAnchor.hostname=a},enumerable:!0},port:{get:function(){return d(this._urlAnchor)?this._urlAnchor.port:""},set:function(a){h(a);this._urlAnchor.port=a},enumerable:!0},pathname:{get:function(){return d(this._urlAnchor)?this._urlAnchor.pathname:""},set:function(a){h(a);this._urlAnchor.pathname=a},enumerable:!0},search:{get:function(){return d(this._urlAnchor)?this._urlAnchor.search:""},set:function(a){h(a);this._urlAnchor.search=a},enumerable:!0},
hash:{get:function(){return d(this._urlAnchor)?this._urlAnchor.hash:""},set:function(a){h(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/editor/util",[],function(){var g=navigator.userAgent,k=parseFloat(g.split("MSIE")[1])||void 0,i=parseFloat(g.split("Firefox/")[1]||g.split("Minefield/")[1])||void 0,e=g.indexOf("Opera")!==-1,c=parseFloat(g.split("Chrome/")[1])||void 0,h=g.indexOf("Safari")!==-1&&!c,d=parseFloat(g.split("WebKit/")[1])||void 0,b=g.indexOf("Android")!==-1,a=g.indexOf("iPad")!==-1,g=g.indexOf("iPhone")!==-1,f=a||g,j=navigator.platform.indexOf("Mac")!==-1,l=navigator.platform.indexOf("Win")!==-1,m=navigator.platform.indexOf("Linux")!==
-1;return{formatMessage:function(a){var b=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,f){return b[(f<<0)+1]})},createElement:function(a,b){return a.createElementNS?a.createElementNS("http://www.w3.org/1999/xhtml",b):a.createElement(b)},isIE:k,isFirefox:i,isOpera:e,isChrome:c,isSafari:h,isWebkit:d,isAndroid:b,isIPad:a,isIPhone:g,isIOS:f,isMac:j,isWindows:l,isLinux:m,platformDelimiter:l?"\r\n":"\n"}});
define("orion/editor/keyBinding",["orion/editor/util"],function(g){function k(i,e,c,h,d){this.keyCode=typeof i==="string"?i.toUpperCase().charCodeAt(0):i;this.mod1=e!==void 0&&e!==null?e:!1;this.mod2=c!==void 0&&c!==null?c:!1;this.mod3=h!==void 0&&h!==null?h:!1;this.mod4=d!==void 0&&d!==null?d:!1}k.prototype={match:function(i){return this.keyCode===i.keyCode?this.mod1!==(g.isMac?i.metaKey:i.ctrlKey)?!1:this.mod2!==i.shiftKey?!1:this.mod3!==i.altKey?!1:g.isMac&&this.mod4!==i.ctrlKey?!1:!0:!1},equals:function(i){return!i?
!1:this.keyCode!==i.keyCode?!1:this.mod1!==i.mod1?!1:this.mod2!==i.mod2?!1:this.mod3!==i.mod3?!1:this.mod4!==i.mod4?!1:!0}};return{KeyBinding:k}});
define("orion/breadcrumbs",["require","orion/webui/littlelib"],function(g,k){function i(e){this._init(e)}i.prototype={_init:function(e){var c=k.node(e.container);if(!c)throw"no parent container";this._container=c;c.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=g.toUrl("navigate/table.html")+"#"):e=document.createElement("span");k.empty(e);e.appendChild(document.createTextNode(this._workspaceRootSegmentName));return e}return null},render:function(){var e=this._container,c=k.node(this._id);c?k.empty(c):(c=document.createElement("span"),c.id=this._id,e.appendChild(c));var h;if(h=this.getNavigatorWorkspaceRootSegment())if(h.classList.add("breadcrumb"),
c.appendChild(h),this._resource&&this._resource.Parents)h=document.createElement("span"),h.appendChild(document.createTextNode(" / ")),this.path+="/",h.classList.add("breadcrumbSeparator"),c.appendChild(h);else{h.href="";h.classList.remove("breadcrumb");h.classList.add("currentLocation");return}e=this._rootSegmentName;if(this._resource){if(this._resource.Parents)for(var d=this._resource.Parents,b=d.length;--b>=0;)h=document.createElement("a"),h.classList.add("breadcrumb"),e?(h.appendChild(document.createTextNode(e)),
e=null):h.appendChild(document.createTextNode(d[b].Name)),this.path+=d[b].Name,this._makeHref?this._makeHref(h,d[b].Location):h.href=g.toUrl("navigate/table.html")+"#"+d[b].ChildrenLocation,c.appendChild(h),h=document.createElement("span"),h.appendChild(document.createTextNode(" / ")),this.path+="/",h.classList.add("breadcrumbSeparator"),c.appendChild(h);h=document.createElement("span");e?(h.appendChild(document.createTextNode(e)),e=null):h.appendChild(document.createTextNode(this._resource.Name));
h.classList.add("currentLocation");this.path+=this._resource.Name;c.appendChild(h)}c.childNodes.length===0&&(h=document.createElement("span"),h.appendChild(document.createTextNode(e||document.title)),h.classList.add("breadcrumb"),h.classList.add("currentLocation"),c.appendChild(h))}};i.prototype.constructor=i;return{BreadCrumbs:i}});
define("orion/webui/splitter",["require","orion/webui/littlelib"],function(g,k){function i(e){this._init(e)}i.prototype={_init:function(e){this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this.$node=k.node(e.node);if(!this.$node)throw"no dom node for splitter found";this.$sideNode=k.node(e.sidePanel);if(!this.$sideNode)throw"no dom node for side panel found";this.$mainNode=k.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 c=k.bounds(this.$node),h=k.bounds(this.$node.parentNode);if(this._vertical){this._splitHeight=c.height;if(e||!this._splitTop)this._splitTop=c.top,localStorage.setItem(this._prefix+"/yPosition",this._splitTop);e=this._splitTop;this.$node.parentNode.style.position==="relative"&&(e=this._splitTop-h.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=c.width;if(e||!this._splitLeft)this._splitLeft=c.left,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);e=this._splitLeft;this.$node.parentNode.style.position==="relative"&&(e=this._splitLeft-h.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,c=k.bounds(this.$node.parentNode),
h=k.bounds(this.$node);this._vertical?this.$mainNode.style.height=c.height-(h.top-c.top+h.height)+"px":this.$mainNode.style.width=c.width-(h.left-c.left+h.width)+"px";var d=this;window.setTimeout(function(){d._notifyResizeListeners(d.$mainNode)},e);window.setTimeout(function(){d._notifyResizeListeners(d.$sideNode)},e)},_notifyResizeListeners:function(e){for(var c=0;c<this._resizeListeners.length;c++)this._resizeListeners[c](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 k.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),k.stop(e)},_mouseMove:function(e){if(this._tracking){var c;this._vertical?(c=this._splitTop=e.clientY,this.$node.parentNode.style.position===
"relative"&&(c=k.bounds(this.$node.parentNode),c=this._splitTop-c.top),this.$node.style.top=c+"px"):(c=this._splitLeft=e.clientX,this.$node.parentNode.style.position==="relative"&&(c=k.bounds(this.$node.parentNode),c=this._splitLeft-c.left),this.$node.style.left=c+"px");this._adjustToSplitPosition(!0);k.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"),k.stop(e)}};i.prototype.constructor=i;return{Splitter:i}});define("orion/fileUtils",["i18n!orion/nls/messages"],function(){return{makeRelative:function(g){if(!g)return g;var k=window.location.protocol+"//"+window.location.host;return g.indexOf(k)===0?g.substring(k.length):g},isAtRoot:function(g){return this.makeRelative(g).indexOf("/workspace")===0}}});
define("orion/favorites",["require","orion/fileUtils","orion/EventTarget"],function(g,k,i){function e(c){this._favorites=[];i.attach(this);this._init(c);this._initializeFavorites()}e.prototype={_init:function(c){this._registry=c.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(c){for(var c=Array.isArray(c)?
c:[c],e=0;e<c.length;e++){var d=c[e],b=d.ChildrenLocation?d.ChildrenLocation:d.Location,b=k.makeRelative(b);this.addFavorite(d.Name,b,d.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(c){this.addFavorite(c,c,!1,!0)},addFavorite:function(c,e,d){this._favorites.push({name:c,path:e,directory:d,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(c){for(var e in this._favorites)if(this._favorites[e].path===
c){this._favorites.splice(e,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(c,e){var d=!1,b;for(b in this._favorites)if(this._favorites[b].path===c){var a=this._favorites[b];if(a.name!==e)a.name=e,d=!0}d&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(c){for(var e in this._favorites)if(this._favorites[e].path===c)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(c){var e;
if(!c)return this._favorites;var d="";for(e=0;e<c.length;e++){var b=c.charAt(e);d+=b==="*"?".*":b==="?"?".?":this._SPECIAL_CHARS.indexOf(b)>=0?"\\"+b:b}d+=".*";c=RegExp(d);d=[];for(e in this._favorites)this._favorites[e].name.search(c)===0&&d.push(this._favorites[e]);return d},_initializeFavorites:function(){var c=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var d,e=e.get("navigate");typeof e==="string"&&(e=JSON.parse(e));if(e)for(d in e)e[d].isFavorite=
!0,c._favorites.push(e[d]);c._favorites.sort(c._sorter);c._notifyListeners()})},_storeFavorites:function(){var c=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){e.put("navigate",c)})},_sorter:function(c,e){var d=c.name.toLowerCase(),b=e.name.toLowerCase();return d>b?1:d<b?-1:0},getFavorites:function(){return{navigator:this._favorites}}};e.prototype.constructor=e;return{FavoritesService:e}});
define("orion/widgets/themes/ThemeClass",[],function(){function g(g){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=g;this.classString="."+g+"{ "}g.prototype.className=null;g.prototype.classString=void 0;g.prototype.style=void 0;g.prototype.closeString=" }\n";g.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:g}});
define("orion/widgets/themes/container/ThemeSheetWriter",["orion/widgets/themes/ThemeClass"],function(g){function k(){}k.prototype.navbar="#333";k.prototype.button="#777777";k.prototype.location="#EFEFEF";k.prototype.selection="FEC";k.prototype.sidepanel="#FBFBFB";k.prototype.mainpanel="white";k.prototype.navtext="#bfbfbf";k.prototype.content="#3087B3";k.prototype.search="#444";k.prototype.toolpanel="white";k.prototype.writeNavigationStyle=function(){var i="",e=[],c=new g.ThemeClass("orionPage");
c.style.backgroundColor="#fdfdfd";c.style.width="100%";c.style.height="100%";e.push(c);c=new g.ThemeClass("topRowBanner");c.style.margin="0";c.style.border="0";c.style.backgroundColor=this.navbar;c.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.navbar+"), color-stop(100%,"+this.navbar+"))";c.style.background="-moz-linear-gradient(top,"+this.navbar+"0%,"+this.navbar+"100%)";c.style.height="28px";e.push(c);c=new g.ThemeClass("a");c.style.textDecoration="none";
c.style.color=this.content;e.push(c);c=new g.ThemeClass("navlink");c.style.display="inline-block";c.style.padding="2px";c.style.color=this.content;e.push(c);c=new g.ThemeClass("primaryNav");c.style.color=this.navtext;c.style.fontSize="8pt";c.style.fontWeight="normal";c.style.paddingTop="6px";c.style.verticalAlign="baseline";e.push(c);c=new g.ThemeClass("primaryNav a");c.style.fontSize="8pt";c.style.color=this.navtext;c.style.marginRight="6px";c.style.marginLeft="6px";c.style.verticalAlign="baseline";
c.style.textDecoration="none";e.push(c);c=new g.ThemeClass("primaryNav a:hover");c.style.color="#bfbfbf";c.style.cursor="hand";c.style.color="white";c.style.fontWeight="normal";e.push(c);for(var h in e)i+=e[h].toString();return i};k.prototype.writeLocationStyle=function(){var i="",e=[],c=new g.ThemeClass("titleArea");c.style.margin="0";c.style.paddingTop="5px";c.style.border="0";c.style.background=this.location;c.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.location+
"), color-stop(100%,"+this.location+"))";c.style.borderBottom="1px solid "+this.location;c.style.minHeight="20px";e.push(c);c=new g.ThemeClass("breadcrumb");c.style.fontSize="8pt";c.style.textDecoration="none";c.style.color=this.content;c.style.paddingTop="2px";e.push(c);c=new g.ThemeClass("a.breadcrumb:hover");c.style.textDecoration="none";c.style.borderBottom="1px dotted";c.style.color="#F58B0F";c.style.cursor="pointer";e.push(c);c=new g.ThemeClass("breadcrumbSeparator");c.style.fontSize="8pt";
c.style.textDecoration="none";c.style.color=this.navbar;c.style.fontWeight="bold";e.push(c);c=new g.ThemeClass("currentLocation");c.style.fontWeight="bold";c.style.fontSize="8pt";c.style.color=this.navbar;c.style.textDecoration="none";c.style.textWrap="normal";c.style.lineHeight="10pt";e.push(c);c=new g.ThemeClass("a.currentLocation:hover");c.style.fontWeight="bold";c.style.fontSize="10pt";c.style.color="#666666";c.style.textDecoration="none";c.style.borderBottom="0";e.push(c);c=new g.ThemeClass("navlinkonpage");
c.style.color=this.content;e.push(c);for(var h in e)i+=e[h].toString();return i};k.prototype.writeButtonStyle=function(){var i="",e=[],c=new g.ThemeClass("commandButton");c.style.color="#222";c.style.border="1px solid #dedede";c.style.backgroundColor=this.button;c.style.textAlign="center";c.style.verticalAlign="baseline";c.style.cursor="pointer";c.style.display="inline-block";c.style.padding="6px";c.style.paddingTop="4px";c.style.borderRadius="1px";c.style.lineHeight="12px";c.style.fontSize="8pt";
c.style.userSelect="none";e.push(c);c=new g.ThemeClass("commandButton:over");c.style.backgroundColor="#e6e6e6";c.style.border="1px solid #808080";e.push(c);c=new g.ThemeClass("commandMenu");c.style.color="#222";c.style.display="inline-block";c.style.verticalAlign="baseline";c.style.margin="0";c.style.fontSize="8pt";c.style.fontWeight="normal";c.style.border="1px solid #dedede";c.style.backgroundColor="#efefef";c.style.cursor="pointer";c.style.borderRadius="1px";e.push(c);c=new g.ThemeClass("commandMenuItem");
c.style.border="0";c.style.padding="0";c.style.margin="0";e.push(c);for(var h in e)i+=e[h].toString();return i};k.prototype.writeMainStyle=function(){var i="",e=[],c=new g.ThemeClass("searchbox");c.style.backgroundImage="url(../images/core_sprites.png)";c.style.backgroundRepeat="no-repeat";c.style.backgroundPosition="4px -297px";c.style.width="12px";c.style.height="12px";c.style.backgroundColor=this.search;c.style.border="1px solid "+this.search;c.style.fontSize="11px";c.style.width="15em";c.style.height=
"16px";c.style.borderRadius="10px";c.style.color="#999";c.style.padding="0";c.style.paddingLeft="20px";c.style.marginLeft="5px";c.style.marginTop="6px !important";c.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";e.push(c);c=new g.ThemeClass("searchbox:focus");c.style.color="white";c.style.outline="none";e.push(c);c=new g.ThemeClass("checkedRow");c.style.cssText="background-color:"+this.selection+" !important;";e.push(c);c=new g.ThemeClass("navbar-item-selected");
c.style.background=this.selection;c.style.color=this.content;e.push(c);c=new g.ThemeClass("auxpane");c.style.border="0";c.style.background=this.sidepanel;c.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";c.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";c.style.overflowX="auto";c.style.minWidth="200px";c.style.paddingTop="16px";e.push(c);c=new g.ThemeClass("mainpane");
c.style.background=this.mainpanel;c.style.border=0;e.push(c);c=new g.ThemeClass("mainToolbar");c.style.background=this.toolpanel;c.style.height="31px";c.style.borderBottom="1px solid #ebebeb";e.push(c);for(var h in e)i+=e[h].toString();return i};k.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};k.prototype.getSheet=function(i){i.navbar.value?(this.navbar=i.navbar.value,
this.button=i.button.value,this.location=i.location.value,this.selection=i.selection.value,this.sidepanel=i.sidepanel.value,this.mainpanel=i.mainpanel.value,this.navtext=i.navtext.value,this.search=i.search.value,this.content=i.content.value,this.toolpanel=i.toolpanel.value):(this.navbar=i.navbar,this.button=i.button,this.location=i.location,this.selection=i.selection,this.sidepanel=i.sidepanel,this.mainpanel=i.mainpanel,this.navtext=i.navtext,this.search=i.search,this.content=i.content,this.toolpanel=
i.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:k}});
define("orion/inputCompletion/inputCompletion",[],function(){function g(g,i,e){this._inputField=g;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);this._binderFunc=i;(g=e?e.group:null)||(g=this._inputField.id?this._inputField.id:"default__input__group");this._completionIdPrefix=g+"__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 c=this;this._completionUIContainer.addEventListener("mousedown",function(){c._mouseDown=!0});this._completionUIContainer.addEventListener("mouseup",function(){c._mouseDown=!1});this._inputField.addEventListener("blur",function(){c._mouseDown?window.setTimeout(function(){c._inputField.focus()},200):c._dismiss()});this._inputField.addEventListener("keydown",function(e){c.onKeyDown(e)});this._inputField.addEventListener("input",function(){c._proposeOn(c._inputField.value)});
this._inputField.addEventListener("focus",function(){if(c._dismissed&&c._binderFunc)c._dismissing?c._dismissing=!1:c._binderFunc&&c._binderFunc(function(e){c._bind(e);c._proposeOn(c._inputField.value)})})}g.prototype.onKeyDown=function(g){if(this._dismissed)return!0;var i=g.charCode||g.keyCode;if(i===13){if(this._proposalList&&this._proposalList.length>0&&this._proposalIndex>=0&&this._proposalIndex<this._proposalList.length)return g.preventDefault(),this._dismiss(this._proposalList[this._proposalIndex].item.value,
g.ctrlKey),g.stopPropagation(),!1}else if((i===40||i===38)&&this._proposalList&&this._proposalList.length>0)return g.preventDefault(),this._walk(i===40),g.stopPropagation(),!1;else if(i===27)return g.preventDefault(),this._dismiss(),!1;return!0};g.prototype._bind=function(g){this._dataList=g};g.prototype._getUIContainerID=function(){return this._completionIdPrefix+"UIContainer"};g.prototype._getUIProposalListId=function(){return this._completionIdPrefix+"UIProposalList"};g.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)};g.prototype._createProposalLink=function(g,i,e,c){var h=document.createElement("a");h.href=require.toUrl(i);h.appendChild(this._createBoldText(g,
e,c));return h};g.prototype._createBoldText=function(g,i,e){if(i<0)return document.createTextNode(g);var c=document.createElement("span"),h;0!==i&&(h=document.createTextNode(g.substring(0,i)),c.appendChild(h));var d=document.createElement("b");c.appendChild(d);h=document.createTextNode(g.substring(i,i+e));d.appendChild(h);i+e<g.length-1&&(h=document.createTextNode(g.substring(i+e)),c.appendChild(h));return c};g.prototype._proposeOnCategory=function(g,i){if(i.length!==0){var e=this;if(g){var c=document.createElement("li");
c.className="inputCompletionLICategory";var h=document.createTextNode(g);c.appendChild(h);this._completionUL.appendChild(c)}for(h=0;h<i.length;h++){c=document.createElement("li");c.onmouseover=function(b){e._selectProposal(b.currentTarget)};c.onclick=function(b){e._dismiss(b.currentTarget.completionItem.value)};c.className="inputCompletionLINormal";c.completionItem=i[h].item;if(typeof i[h].item.value==="string"){var d=this._createBoldText(i[h].item.value,i[h].boldIndex,i[h].boldLength);c.appendChild(d)}else i[h].item.value.name&&
i[h].item.value.type==="link"&&c.appendChild(this._createProposalLink(i[h].item.value.name,i[h].item.value.value,i[h].boldIndex,i[h].boldLength));this._completionUL.appendChild(c);this._proposalList.push({item:i[h].item,domNode:c})}}};g.prototype._domNode2Index=function(g){for(var i=0;i<this._proposalList.length;i++)if(this._proposalList[i].domNode===g)return i;return-1};g.prototype._highlight=function(g,i){var e=g,c=!1;isNaN(e)||(c=!0,e=this._proposalList&&g>=0&&g<this._proposalList.length?this._proposalList[g].domNode:
null);if(e)e.className=i?"inputCompletionLISelected":"inputCompletionLINormal",i&&c&&(e.offsetTop<this._completionUIContainer.scrollTop?e.scrollIntoView(!0):e.offsetTop+e.offsetHeight>this._completionUIContainer.scrollTop+this._completionUIContainer.clientHeight&&e.scrollIntoView(!1))};g.prototype._selectProposal=function(g){var i=g;isNaN(i)&&(i=this._domNode2Index(g));if(i!==this._proposalIndex)this._highlight(this._proposalIndex,!1),this._proposalIndex=i,this._highlight(this._proposalIndex,!0)};
g.prototype._dismiss=function(g,i){if(!this._mouseDown){this._dismissed=!0;this._proposalList=null;this._proposalIndex=-1;if(typeof g==="string")this._inputField.value=g,this._dismissing=!0,this._inputField.focus();else if(g&&g.name&&g.type==="link")i?window.open(g.value):window.location.href=g.value;var e=this;window.setTimeout(function(){e._completionUIContainer.style.display="none"},200)}};g.prototype._show=function(){if(this._proposalList&&this._proposalList.length>0){for(var g=0,i=0,e=this._inputField;e;)g+=
e.offsetLeft,i+=e.offsetTop,e=e.offsetParent;this._completionUIContainer.style.display="block";this._completionUIContainer.style.top=i+this._inputField.offsetHeight+2+"px";this._completionUIContainer.style.left=g+"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"};g.prototype._walk=function(g){g=this._proposalIndex+(g?
1:-1);g<-1?g=this._proposalList.length-1:g>=this._proposalList.length&&(g=-1);this._selectProposal(g)};g.prototype._proposeOnList=function(g,i,e){for(var c="",h=[],d=i?i.length:0,b=0;b<g.length;b++)if(g[b].type==="category")this._proposeOnCategory(c,h),c=g[b].label,h=[];else{var a=!0,f=-1;if(i&&e){var j;typeof g[b].value==="string"?j=g[b].value.toLowerCase():g[b].value.name&&(j=g[b].value.name.toLowerCase());f=j.indexOf(i);f<0?a=!1:this._proposeFromStart&&(a=f===0)}a&&h.push({item:g[b],boldIndex:f,
boldLength:d})}this._proposeOnCategory(c,h)};g.prototype._proposeOn=function(g){this._completionUL.textContent="";var i=g?g.toLowerCase():null;this._proposalList=[];this._proposeOnList(this._dataList,i,!0);if(this._extendedProvider&&i){var e=this;this._extendedProvider(g,function(c){if(c)for(var h=0;h<c.length;h++)e._proposeOnList(c[h].proposals,c[h].filterForMe?i:g,c[h].filterForMe);e._show()},[])}else this._show()};g.prototype.constructor=g;return{InputCompletion:g}});
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(g,k){var i={root:k};Object.keys(g).forEach(function(e){typeof i[e]==="undefined"&&(i[e]=g[e])});return i});
define("orion/webui/dialog",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/uiUtils"],function(g,k,i,e){function c(){}c.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 c=
document.body;this.$frameParent=c;this.$$modalExclusions=this.$$modalExclusions||[];var d=document.createRange();d.selectNode(c);d=d.createContextualFragment(this.CONTAINERTEMPLATE);c.appendChild(d);this.$frame=c.lastChild;this.title&&i.$("#title",this.$frame).appendChild(document.createTextNode(this.title));this.$close=i.$("#closeDialog",this.$frame);var b=this;this.$close.addEventListener("click",function(){b.hide()},!1);this.$parent=i.$(".dialogContent",this.$frame);d=document.createRange();d.selectNode(this.$parent);
c=d.createContextualFragment(this.TEMPLATE);this.messages&&i.processTextNodes(c,this.messages);this.$parent.appendChild(c);this.$buttonContainer=i.$(".dialogButtons",this.$frame);this._makeButtons();this.$close.addEventListener("keydown",function(a){(a.keyCode===i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&b.hide()},!1);this.$frame.addEventListener("keydown",function(a){a.keyCode===i.KEY.ESCAPE?b.hide():a.keyCode===i.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 c=this;this.buttons.forEach(function(d){var b=e.createButton(d.text,d.callback);if(d.id)b.id=d.id,c["$"+b.id]=b;if(d.isDefault)c._defaultCallback=d.callback,c._defaultButton=b;c.$buttonContainer.appendChild(b)})}},_makeModal:function(){var c=this;this.$frame.addEventListener("blur",function(a){c.$lastFocusedElement=a.target},
!0);this._modalListener=function(a){var b=!i.contains(c.$frame,a.target);if(b)for(var f=0;f<c.$$modalExclusions.length;f++)if(i.contains(c.$$modalExclusions[f],a.target)){b=!1;break}b&&(window.setTimeout(function(){(c.$lastFocusedElement||c.$parent).focus()},0),i.stop(a))};this.$frameParent.addEventListener("focus",this._modalListener,!0);this.$frameParent.addEventListener("click",this._modalListener,!0);var d=this.$frameParent.childNodes,b=!1;this._addedBackdrop=[];for(var a=0;a<d.length;a++){for(var f=
0;f<this.$$modalExclusions.length;f++)if(i.contains(this.$$modalExclusions[f],d[a])){b=!0;break}!b&&d[a]!==c.$frame&&d[a].classList&&!d[a].classList.contains("tooltipContainer")&&(f=d[a],f.classList.contains("modalBackdrop")||(f.classList.add("modalBackdrop"),this._addedBackdrop.push(f)))}(d=i.lastTabbable(this.$buttonContainer)||i.lastTabbable(this.$parent))&&d.addEventListener("keydown",function(a){if(a.keyCode===i.KEY.TAB){var b=c._getFirstFocusField();b&&b!==a.target&&b.focus();i.stop(a)}},!1)},
_addChildDialog:function(c){this.$$modalExclusions.push(c.$frame||c.$parent)},_bindElements:function(c){for(var d=0;d<c.childNodes.length;d++){var b=c.childNodes[d];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 c=this;this.keepAlive||window.setTimeout(function(){c.destroy()},0)},show:function(c){typeof this._beforeShowing==="function"&&this._beforeShowing();var d=i.bounds(this.$frame),b=i.bounds(document.documentElement),a;c?(a=i.bounds(c),c=a.top+a.height+4,a=a.left+4,c+d.height>b.height&&(c=Math.max(0,b.height-d.height-4)),a+d.width>b.width&&(a=Math.max(0,b.width-d.width-4))):(a=Math.max(0,(b.width-d.width)/2),c=Math.max(0,(b.height-d.height)/2));this.$lastFocusedElement=
document.activeElement;this.$frame.style.top=c+"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 i.firstTabbable(this.$parent)||this._defaultButton||i.firstTabbable(this.$buttonContainer)||this.$close},destroy:function(){this._addedBackdrop&&this._addedBackdrop.length>0&&this._addedBackdrop.forEach(function(c){c.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}};c.prototype.constructor=c;return{Dialog:c}});
(function(){var g=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],k=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,i=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,e=typeof location!=="undefined"&&location.href,c=e&&location.protocol&&location.protocol.replace(/\:/,""),h=e&&location.hostname,d=e&&(location.port||void 0),b=[];define("text",[],function(){var a,f,j;typeof window!=="undefined"&&window.navigator&&window.document?f=function(b,f){var d=a.createXhr();d.open("GET",b,!0);d.onreadystatechange=
function(){d.readyState===4&&f(d.responseText)};d.send(null)}:typeof process!=="undefined"&&process.versions&&process.versions.node?(j=require.nodeRequire("fs"),f=function(a,b){var f=j.readFileSync(a,"utf8");f.indexOf("\ufeff")===0&&(f=f.substring(1));b(f)}):typeof Packages!=="undefined"&&(f=function(a,b){var f=new java.io.File(a),d=java.lang.System.getProperty("line.separator"),f=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(f),"utf-8")),c,j,e="";try{c=new java.lang.StringBuffer;
(j=f.readLine())&&j.length()&&j.charAt(0)===65279&&(j=j.substring(1));for(c.append(j);(j=f.readLine())!==null;)c.append(d),c.append(j);e=String(c.toString())}finally{f.close()}b(e)});return a={version:"1.0.7",strip:function(a){if(a){var a=a.replace(k,""),b=a.match(i);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,
f;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(b=0;b<3;b++){f=g[b];try{a=new ActiveXObject(f)}catch(d){}if(a){g=[f];break}}if(!a)throw Error("createXhr(): XMLHttpRequest not available");return a},get:f,parseName:function(a){var b=!1,f=a.indexOf("."),d=a.substring(0,f),a=a.substring(f+1,a.length),f=a.indexOf("!");f!==-1&&(b=a.substring(f+1,a.length),b=b==="strip",a=a.substring(0,f));return{moduleName:d,ext:a,strip:b}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(b,
f,d,c){var j=a.xdRegExp.exec(b),e;if(!j)return!0;b=j[2];j=j[3];j=j.split(":");e=j[1];j=j[0];return(!b||b===f)&&(!j||j===d)&&(!e&&!j||e===c)},finishLoad:function(f,d,c,j,e){c=d?a.strip(c):c;e.isBuild&&(b[f]=c);j(c)},load:function(b,f,j,g){if(g.isBuild&&!g.inlineText)j();else{var i=a.parseName(b),k=i.moduleName+"."+i.ext,q=f.toUrl(k),u=g&&g.text&&g.text.useXhr||a.useXhr;!e||u(q,c,h,d)?a.get(q,function(f){a.finishLoad(b,i.strip,f,j,g)}):f([k],function(b){a.finishLoad(i.moduleName+"."+i.ext,i.strip,b,
j,g)})}},write:function(f,d,c){if(d in b){var j=a.jsEscape(b[d]);c.asModule(f+"!"+d,"define(function () { return '"+j+"';});\n")}},writeFile:function(b,f,d,c,j){var f=a.parseName(f),e=f.moduleName+"."+f.ext,h=d.toUrl(f.moduleName+"."+f.ext)+".js";a.load(e,d,function(){var f=function(a){return c(h,a)};f.asModule=function(a,b){return c.asModule(a,h,b)};a.write(b,e,f,j)},j)}}})})();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(g,k,i){return{slideoutHTMLFragment:function(e){var c=document.createElement("div");c.innerHTML=i;var h=k.$("#slideContainer",c);h.id=e+h.id;h=k.$("#pageCommandParameters",c);h.id=e+h.id;h=k.$("#pageCommandDismiss",c);h.id=e+h.id;return c.innerHTML}}});
define("orion/sites/siteClient",["i18n!orion/sites/nls/messages","require","orion/Deferred","orion/fileClient"],function(g,k,i,e){function c(a,b,d){var c=a[b],e=new i;if(typeof c!=="function")throw g["Service method missing: "]+b;c.apply(a,d).then(function(a){e.resolve(a)},function(a){e.reject(a)});return e}function h(a,b){return new e.FileClient(a,function(a){return(a=a.getProperty("top"))&&a.indexOf(b)===0})}function d(a,b,d){this._serviceRegistry=a;this._siteService=b;this._selfHost=d.getProperty("canSelfHost");
this._sitePattern=d.getProperty("sitePattern");this._filePattern=d.getProperty("filePattern");this._name=d.getProperty("name");this._id=d.getProperty("id");this._getService=function(){return this._siteService};this._getFilePattern=function(){return this._filePattern};this._getFileClient=function(){return h(this._serviceRegistry,this._getFilePattern())};this._canSelfHost=function(){return this._selfHost}}function b(a,b){a[b]=function(){return c(this._getService(),b,Array.prototype.slice.call(arguments))}}
function a(a,b,c){for(var e=a.getServiceReferences("orion.site"),h=[],i=[],n=[],k=0;k<e.length;k++){var q=e[k].getProperty(b),q=q[0]!=="^"?"^"+q:q;h.push(e[k]);i.push(RegExp(q));n.push(a.getService(e[k]))}c=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return 0;for(var f=0;f<i.length;f++)if(i[f].test(a))return f;throw g["No Matching SiteService for "]+b+": "+a;}(c);return new d(a,n[c],h[c])}d.prototype={isFileMapped:function(a,b){if(!a){var d=new i;d.resolve(!1);return d}return this.getURLOnSite(a,
b).then(function(a){return a!==null})},mapOnSiteAndStart:function(a,b,d){function c(d,l,h){return e.isFileMapped(a,b).then(function(a){a||h.push({Source:d,Target:l,FriendlyPath:d});a=new i;a.resolve();return a})}var e=this,h="/"+b.Name,g;if(a){if(a.HostingStatus.Status==="started")a.HostingStatus.Status="stopped";g=e.toInternalForm(b.Location).then(function(b){return c(h,b,a.Mappings).then(function(){return e.updateSiteConfiguration(a.Location,a).then(function(a){return e.updateSiteConfiguration(a.Location,
{HostingStatus:{Status:"started"}})})})})}else{var k=b.Name+" site";g=e.toInternalForm(b.Location).then(function(a){var b=[];return c(h,a,b).then(function(){return e.createSiteConfiguration(k,d,b,null,{Status:"started"}).then(function(a){return a})})})}return g.then(function(a){return e.getURLOnSite(a,b)})}};"createSiteConfiguration,getSiteConfigurations,deleteSiteConfiguration,loadSiteConfiguration,updateSiteConfiguration,toFileLocation,toInternalForm,getMappingObject,getMappingProposals,updateMappingsDisplayStrings,parseInternalForm,isSelfHostingSite,convertToSelfHosting,getURLOnSite".split(",").forEach(function(a){b(d.prototype,
a)});d.prototype.constructor=d;return{forLocation:function(b,d){return a(b,"pattern",d)},forFileLocation:function(b,d){return a(b,"filePattern",d)},getFileClient:h,SiteClient:d}});define("orion/sites/siteUtils",["require","orion/fileUtils","orion/URITemplate"],function(g,k,i){return{generateEditSiteHref:function(e){var c=g.toUrl("sites/site.html");return(new i(c+"#{,resource,params*}")).expand({resource:k.makeRelative(e.Location)})}}});
define("orion/PageUtil",[],function(){var g=/^http[s]?/i;return{matchResourceParameters:function(g){var g=g||window.location.toString(),i={resource:""},e=g.indexOf("#");if(e!==-1&&(g=g.substring(e+1),g.length!==0)){g=g.split(",");Object.defineProperty(i,"resourceRaw",{value:g[0]});i.resource=decodeURIComponent(g[0]);for(e=1;e<g.length;e++){var c=/([^=]*)(=?)(.*)/.exec(g[e]),h=decodeURIComponent(c[1]||""),c=decodeURIComponent(c[3]||"");h!==""&&h!=="resource"&&(i[h]=c)}}return i},validateURLScheme:function(k,
i){var e=k;if(k.indexOf("://")===-1){var c=document.createElement("a");c.href=k;e=c.href}c=!1;return(c=i?i.some(function(c){return RegExp("^"+c+":","i").test(e)}):g.test(e))?k:(console.log("Illegal URL Scheme: '"+k+"'"),"")}}});
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(g,k,i,e,c,h,d,b){function a(a,b,f,d,c){this.commandService=a;this.handler=b;this.items=f;this.userData=d;this.command=c;if(c.parameters)this.parameters=c.parameters.makeCopy();this.id=c.id}function f(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};
this._init(a);this._parameterCollector=null}function j(a,b,f){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=f,d.id=f,d.src=a.image,b.appendChild(d));return d}function l(a){this._init(a)}function m(a,b,f,d,j,e,l){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=b!==void 0&&b!==null?b:!1;this.mod2=f!==void 0&&f!==null?f:!1;this.mod3=
d!==void 0&&d!==null?d:!1;this.mod4=j!==void 0&&j!==null?j:!1;this.domScope=c.node(e);this.scopeName=l||(e?e.id:null)}function r(a,b){this.token=a;this.parameterName=b}function p(a,b,f,d,c){this.name=a;this.type=b;this.label=f;this.value=d;this.lines=c||1}function n(a,b,f){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=f;this.clientCollect=b&&b.clientCollect}var o=window.navigator.platform.indexOf("Mac")!==
-1;a.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()},makeCopy:function(b){var f=new a(this.commandService,this.handler,this.items,this.userData,this.command);f.domNode=this.domNode;f.domParent=this.domParent;if(b)f.parameters=b.makeCopy();else if(this.parameters)f.parameters=this.parameters.makeCopy();return f}};a.prototype.constructor=a;f.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(o){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 f=a.target.nodeName.toLowerCase();if(f==="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(f===
"textarea")return}b._processKey(a)},!1)},_processKey:function(a){function b(a){window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())}for(var f in this._activeBindings)if(this._activeBindings[f]&&this._activeBindings[f].keyBinding&&this._activeBindings[f].command&&this._activeBindings[f].keyBinding.match(a)){var d=this._activeBindings[f],c=d.invocation;if(c)if(d=d.command,d.hrefCallback){b(a);a=d.hrefCallback.call(c.handler||window,c);a.then?a.then(function(a){window.open(a)}):window.open(a);
break}else if(d.callback){b(a);var j=this;window.setTimeout(function(){j._invoke(c)},0);break}}},processURL:function(a){for(var b in this._urlBindings)if(this._urlBindings[b]&&this._urlBindings[b].urlBinding&&this._urlBindings[b].command){var f=this._urlBindings[b].urlBinding.match(a);if(f){var d=this._urlBindings[b],c=d.command,j=d.invocation;if(j&&j.parameters&&c.callback){j.parameters.setValue(f.parameterName,f.parameterValue);var e=this;window.setTimeout(function(){e._invoke(j)},0);break}}}},
findCommand:function(a){return this._commandList[a]},runCommand:function(b,f,d,c){f?(b=this._commandList[b])&&(b.visibleWhen?b.visibleWhen(f):1)&&b.callback&&this._invoke(new a(this,d,f,null,b),c):(f=this._urlBindings[b])&&f.command&&f.command.callback&&this._invoke(f.invocation,c)},getSelectionService:function(){return this._defaultSelectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,f){this._parameterCollector&&(this._parameterCollector.close(),
this._parameterCollector.open(a,b,f))},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 f=!1;a.parameters.updateParameters(a);f=this._parameterCollector.collectParameters(a);
if(!f){var c=new d.Tooltip({node:a.domNode,trigger:"click",position:["below","right","above","left"]}),f=c.contentContainer();f.classList.add("parameterPopup");var j=window.document.activeElement,e=this._parameterCollector.getFillFunction(a,function(){j&&j.focus();c.destroy()})(f);c.show();window.setTimeout(function(){e.focus();e.select()},0);f=!0}f||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={},f,d,c,j;for(j in this._activeBindings)if((d=this._activeBindings[j])&&d.keyBinding&&d.command)d.keyBinding.scopeName?(b[d.keyBinding.scopeName]||(b[d.keyBinding.scopeName]=[]),b[d.keyBinding.scopeName].push(d)):(f=i.getUserKeyString(d.keyBinding),c=document.createElement("span"),c.role="listitem",c.appendChild(document.createTextNode(f+" = "+d.command.name)),c.appendChild(document.createElement("br")),
a.appendChild(c));for(var e in b)if(b[e].length&&b[e].length>0){f=document.createElement("h2");a.appendChild(f);f.appendChild(document.createTextNode(e));for(j=0;j<b[e].length;j++)d=b[e][j],f=i.getUserKeyString(d.keyBinding),c=document.createElement("span"),c.role="listitem",c.appendChild(document.createTextNode(f+" = "+d.command.name)),c.appendChild(document.createElement("br")),a.appendChild(c)}},addCommand:function(a){this._commandList[a.id]=a},addCommandGroup:function(a,b,f,d,c,j){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];c&&(a=this._createEntryForPath(a,c));if(a[b]){if(d)a[b].title=d;if(f)a[b].position=f;a[b].emptyGroupMessage=j}else a[b]={title:d,position:f,emptyGroupMessage:j,children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){if(b)for(var f=b.split("/"),d=0;d<f.length;d++)if(f[d].length>1)a[f[d]]||(a[f[d]]={position:0,children:{}}),a=a[f[d]].children;return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||
(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,f,d,c,j,e){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));a[b]={position:f};j&&(f=this._commandList[b])&&(this._activeBindings[b]={command:f,keyBinding:j,bindingOnly:c});e&&(f=this._commandList[b])&&(this._urlBindings[b]={command:f,urlBinding:e,bindingOnly:c});a.sortedContributions=
null},_checkForTrailingSeparator:function(a,b,f){var d;if(b==="tool"||b==="button")if((d=a.childNodes.length>0?a.childNodes[a.childNodes.length-1]:null)&&d.classList.contains("commandSeparator"))return f?(a.removeChild(d),!1):!0;if(b==="menu"&&(a=c.$$array("li > *",a),a.length>0&&a[a.length-1].classList.contains("dropdownSeparator")))if(d=a[a.length-1],f)d.parentNode.parentNode.removeChild(d.parentNode);else return!0;return!1},renderCommands:function(a,b,f,d,j,e,l){if(typeof a!=="string")throw"a scope id for rendering must be specified";
b=c.node(b);if(!b)throw"no parent";var h=this._contributionsByScopeId[a];if(!f&&h){var f=h.localSelectionService||this._defaultSelectionService,g=this;f&&f.getSelections(function(f){g.renderCommands(a,b,f,d,j,e)})}else h&&(this._render(this._contributionsByScopeId[a],b,f,d,j||"button",e,l),this._checkForTrailingSeparator(b,j,!0))},destroy:function(a){a=c.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(f,c,j,e,l,h,g){var i=f.sortedContributions;if(!i){var i=[],m=!1,n;for(n in f)if(!f.hasOwnProperty||f.hasOwnProperty(n)){var k=f[n];if(k&&typeof k.position==="number")k.id=n,i.push(k),m=!0}if(m)i.sort(function(a,b){return a.position-b.position}),f.sortedContributions=i}for(f=0;f<i.length;f++){var r;if(i[f].children&&Object.getOwnPropertyNames(i[f].children).length>0){var k=i[f],m=i[f].children,o=this,p;if(l==="tool"||l==="button")if(k.title){p=this._createDropdownMenu(c,
k.title);g&&b.generateNavGrid(g,p.menuButton);var M=m,L=k;window.setTimeout(function(){o._render(M,p.menu,j,e,"menu",h,g);o._checkForTrailingSeparator(p.menu,"menu",!0);if(p.menu.childNodes.length===0)if(L.emptyGroupMessage){if(!p.menuButton.emptyGroupTooltip)p.menuButton.emptyGroupTooltip=new d.Tooltip({node:p.menuButton,text:L.emptyGroupMessage,trigger:"click",position:["below","right","above","left"]})}else g&&b.removeNavGrid(g,p.menuButton),p.menu.parentNode&&p.menu.parentNode.removeChild(p.menu),
p.destroyButton&&p.destroyButton.parentNode&&p.destroyButton.parentNode.removeChild(p.destroyButton);else p.menuButton.style.visibility="visible"},0)}else{var H;c.childNodes.length>0&&!this._checkForTrailingSeparator(c,l)&&(H=this.generateSeparatorImage(c));o._render(m,c,j,e,l,h,g);c.childNodes.length>0&&c.childNodes[c.childNodes.length-1]!==H&&(H=this.generateSeparatorImage(c))}else k.title?(n=document.createElement("li"),c.appendChild(n),k=this._createDropdownMenu(n,k.title,!0),o._render(m,k.menu,
j,e,"menu",h,g),k.menu.childNodes.length===0&&c.removeChild(n)):(c.childNodes.length>0&&this._generateMenuSeparator(c),o._render(m,c,j,e,l,h,g),this._generateMenuSeparator(c))}else{n=(m=this._commandList[i[f].id])?!0:!1;var E=null,E=null;if(m){r=new a(this,e,j,h,m);r.domParent=c;k=n&&(m.visibleWhen?m.visibleWhen(j):!0);if(this._activeBindings[m.id]&&this._activeBindings[m.id].keyBinding)E=this._activeBindings[m.id],E.invocation=k?r:null,E.bindingOnly&&(n=!1);if(this._urlBindings[m.id]&&this._urlBindings[m.id].urlBinding)E=
this._urlBindings[m.id],E.invocation=k?r:null,E.bindingOnly&&(n=!1);n=n&&k}if(n)if(m.choiceCallback){l==="tool"||l==="button"?(n=c,k=!1,c.nodeName.toLowerCase()==="ul"&&(n=document.createElement("li"),c.appendChild(n))):(n=c,k=!0);var N=this;this._createDropdownMenu(n,m.name,k,function(a){this.populateChoicesMenu(a,j,e,h,N)}.bind(m))}else l==="tool"?(n="tool"+m.id+f,m._addTool(c,n,r,g)):l==="button"?(n="button"+m.id+f,m._addButton(c,n,r,g)):l==="menu"&&m._addMenuItem(c,r,g)}}},_createDropdownMenu:function(a,
b,f,d){var a=c.node(a),j,e=document.createElement("span");e.classList.add("dropdownTrigger");f?(e.classList.add("dropdownMenuItem"),j="dropdownSubMenu",f="dropdownArrowRight",e.tabIndex=0,e.role="menuitem"):(e.classList.add("commandButton"),f="dropdownArrowDown",e.tabIndex=0,e.role="button");b=document.createTextNode(b);e.appendChild(b);b=document.createElement("span");b.classList.add(f);e.appendChild(b);f=a;a.nodeName.toLowerCase()==="ul"?(f=document.createElement("li"),a.appendChild(f),a=f):(e.classList.add("commandMargins"),
a=e);f.appendChild(e);j&&f.classList.add(j);j=document.createElement("ul");f.appendChild(j);j.classList.add("dropdownMenu");e.dropdown=new h.Dropdown({dropdown:j,populate:d});j.dropdown=e.dropdown;return{menuButton:e,menu:j,dropdown:e.dropdown,destroyButton:a}},_generateCheckedMenuItem:function(a,b,f,d){var c=document.createElement("li");a.appendChild(c);a=document.createElement("label");a.classList.add("dropdownMenuItem");var j=document.createElement("input");j.type="checkbox";j.role="menuitem";
j.checked=f;j.classList.add("checkedMenuItem");a.appendChild(j);b=document.createTextNode(b);a.appendChild(b);c.appendChild(a);j.addEventListener("change",d,!1)},_generateMenuSeparator:function(a){if(!this._checkForTrailingSeparator(a,"menu")){var b=document.createElement("li");b.classList.add("dropdownSeparator");var f=document.createElement("span");f.classList.add("dropdownSeparator");b.appendChild(f);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}};f.prototype.constructor=f;l.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||k.toUrl("images/none.png");this.imageClass=a.imageClass;this.spriteClass=a.spriteClass||
"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},_addTool:function(a,f,c,e){c.handler=c.handler||this;var l;if(this.hrefCallback){if(l=this._makeLink(a,c,"commandLink"),!l)return}else l=document.createElement("span"),l.tabIndex=e?-1:0,l.role="button",this.hasImage()?(j(this,l,f),this.name&&l.setAttribute("aria-label",this.name)):(f=window.document.createTextNode(this.name),l.appendChild(f),l.classList.add("commandMissingImageButton"),l.classList.add("commandButton")),this._hookCallback(l,
c);c.domNode=l;c.domParent=a;if(this.tooltip)l.commandTooltip=new d.Tooltip({node:l,text:this.tooltip,position:["above","below","right","left"]});a.nodeName.toLowerCase()==="ul"?(f=document.createElement("li"),a.appendChild(f),a=f):l.classList.add("commandMargins");a.appendChild(l);b.generateNavGrid(e,c.domNode)},_addButton:function(a,f,c,e){c.handler=c.handler||this;var l;if(this.hrefCallback)l=this._makeLink(a,c,"commandLink");else if(!this.name&&this.hasImage()){if(l=document.createElement("span"),
l.tabIndex=0,l.role="button",j(this,l,f),this.tooltip&&l.setAttribute("aria-label",this.tooltip),this._hookCallback(l,c),this.tooltip)l.commandTooltip=new d.Tooltip({node:l,text:this.tooltip,position:["above","below","right","left"]})}else l=this._makeButton(a,c,"commandButton"),this._hookCallback(l,c);c.domParent=a;a.nodeName.toLowerCase()==="ul"?(f=document.createElement("li"),a.appendChild(f),a=f):l.classList.add("commandMargins");a.appendChild(l);b.generateNavGrid(e,c.domNode)},_addMenuItem:function(a,
f,d){f.domParent=a;var c,j=a.dropdown;this.hrefCallback?c=this._makeLink(a,f,"dropdownMenuItem",["right","left","above","below"]):(c=this._makeButton(a,f,"dropdownMenuItem",["right","left","above","below"]),this.callback&&this._hookCallback(c,f,function(){j.close(!0)}));c.role="menuitem";b.generateNavGrid(d,f.domNode);a.nodeName.toLowerCase()==="ul"?(f=document.createElement("li"),a.appendChild(f),a=f):c.classList.add("commandMargins");a.appendChild(c)},_makeButton:function(a,b,f,c){a=document.createElement("span");
a.role="button";a.tabIndex=0;a.id=this.name;var j=document.createTextNode(this.name);a.appendChild(j);f&&a.classList.add(f);if(this.tooltip)a.commandTooltip=new d.Tooltip({node:a,text:this.tooltip,position:c||["above","below","right","left"]});return b.domNode=a},_makeLink:function(a,b,f,c){var j=document.createElement("a");j.id=this.name;f&&j.classList.add(f);j.appendChild(document.createTextNode(this.name));if(this.hrefCallback)a=this.hrefCallback.call(b.handler,b),a.then?a.then(function(a){j.href=
a}):j.href=a?a:"#";if(this.tooltip)j.commandTooltip=new d.Tooltip({node:j,text:this.tooltip,position:c||["above","below","right","left"]});return b.domNode=j},_hookCallback:function(a,b,f,d){a.addEventListener("click",function(a){f&&f();b.commandService._invoke(b);d&&d();c.stop(a)},!1);a.addEventListener("keydown",function(a){if(a.keyCode===c.KEY.ENTER||a.keyCode===c.KEY.SPACE)f&&f(),b.commandService._invoke(b),d&&d(),c.stop(a)},!1)},populateChoicesMenu:function(a,b,f,d,j){f=this.getChoices(b,f,d);
for(d=0;d<f.length;d++){var e=f[d];if(e.name){var l=document.createElement("li");a.appendChild(l);var h=document.createElement("span");h.tabIndex=0;h.role="menuitem";h.classList.add("dropdownMenuItem");var g=document.createTextNode(e.name);h.appendChild(g);l.appendChild(h);h.choice=e;h.addEventListener("click",function(a){a.target.choice&&a.target.choice.callback.call(a.target.choice,b)},!1);h.addEventListener("keydown",function(a){(a.keyCode===c.KEY.ENTER||a.keyCode===c.KEY.SPACE)&&a.target.choice&&
a.target.choice.callback.call(a.target.choice,b)},!1)}else j._generateMenuSeparator(a)}},getChoices:function(a,b,f){return this.choiceCallback?this.choiceCallback.call(b,a,f):null},makeChoiceCallback:function(a,b){return function(f){a.callback&&a.callback.call(a,b,f)}},hasImage:function(){return this.imageClass||this.image!==k.toUrl("images/none.png")}};l.prototype.constructor=l;m.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(o?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==
a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(o&&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}};m.prototype.constructor=m;r.prototype={match:function(a){a=e.matchResourceParameters(a);return typeof a[this.token]!==
"undefined"?(this.parameterValue=a[this.token],this):null}};r.prototype.constructor=r;p.prototype={optionsRequested:function(){return this.optionsRequested}};p.prototype.constructor=p;n.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 f=this.parameterTable[a];if(f)f.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 p(b.name,b.type,b.label,
b.value,b.lines);a.push(b)});var b=new n(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};n.prototype.constructor=n;return{CommandService:f,CommandKeyBinding:m,Command:l,CommandInvocation:a,URLBinding:r,ParametersDescription:n,CommandParameter:p}});
define("orion/operationsCommands",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/commands"],function(g,k,i,e){var c={};(function(){var h=!1;c.updateNavTools=function(d,b,a,f,c){var e=d.getService("orion.page.command"),m=i.node(a);if(m)e.destroy(m);else throw g["could not find toolbar "]+a;e.renderCommands(a,m,c,b,"button");if(f&&(a=i.node(f)))e.destroy(a),e.renderCommands(f,a,null,b,"button");h||(h=!0,d.getService("orion.page.selection").addEventListener("selectionChanged",
function(a){var c=i.node(f);if(c){var j=d.getService("orion.page.command");j.destroy(c);j.renderCommands(f,c,a.selections,b,"button")}}))};c.createOperationsCommands=function(d,b,a){function f(a){return!a.operation||!a.operation.type?!1:a.operation.type==="loadstart"||a.operation.type==="progress"}var c=new e.Command({name:g["Remove Completed"],tooltip:g["Remove all completed operations"],id:"eclipse.removeCompletedOperations",callback:function(){a.removeCompletedOperations().then(function(){b.loadOperations.bind(b)()})},
visibleWhen:function(){return!0}});d.addCommand(c);c=new e.Command({name:g.Remove,tooltip:g["Remove operations from the operations list."],imageClass:"core-sprite-delete",id:"eclipse.removeOperation",callback:function(f){for(var f=Array.isArray(f.items)?f.items:[f.items],d=0;d<f.length;d++){var c=f[d];a.removeOperation.bind(a)(c.Location).then(function(){b.loadOperations.bind(b)()},function(){b.loadOperations.bind(b)()})}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return!f(a);for(var b in a)if(f(a[b]))return!1;
return!0}});d.addCommand(c);c=new e.Command({name:g.Cancel,tooltip:g["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 f=a[b];f.deferred&&f.deferred.cancel()}},visibleWhen:function(a){if(!Array.isArray(a)||a.length===0)return f(a)&&(a.operation&&a.operation.cancelable?!0:!1);for(var b in a)if(!f(a[b])||!a[b].operation||!a[b].operation.cancelable)return!1;
return!0}});d.addCommand(c)}})();return c});
define("orion/webui/dialogs/OperationsDialog",["i18n!orion/operations/nls/messages","require","orion/webui/littlelib","orion/webui/popupdialog","orion/operationsCommands"],function(g,k,i,e,c){function h(d){this._options=d}h.prototype=new e.PopupDialog;h.prototype.TEMPLATE='<table style="width: 360px;"><tr><td><h2>Recent operations</h2></td><td style="text-align: right;"><a id="allOperationsLink">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>';h.prototype._init=
function(d){this._myOperations=[];this._operationsDeferreds=[];this._commandService=d.serviceRegistry.getService("orion.page.command");c.createOperationsCommands(this._commandService);this._commandService.registerCommandContribution("operationsDialogItems","eclipse.cancelOperation",1);this._initialize(d.triggerNode)};h.prototype._bindToDom=function(){this.$allOperationsLink.href=k.toUrl("operations/list.html");this._setOperationsVisibility()};h.prototype.setOperations=function(d,b){this._myOperations||
this._init(this._options);this._myOperations=[];this._operationsDeferreds=[];if(d)for(var a in d)this._myOperations.push(d[a]),this._operationsDeferreds.push(b[a]);this._renderOperations()};h.prototype.parseProgressResult=function(d){if(!d)return{};d=d.responseText||d;try{d=JSON.parse(d)}catch(b){}var a={Message:d.Message||d,Severity:d.Severity};if(d.DetailedMessage&&d.DetailedMessage!==a.Message)a.DetailedMessage=d.DetailedMessage;return a};h.prototype._renderOperations=function(){this._renderOperationsTable(this.$myOperationsList,
this._myOperations,this._operationsDeferreds)};h.prototype._renderOperationsTable=function(d,b,a){i.empty(d);for(var f=0;f<b.length;f++){var c=b[f],e=document.createElement("tr"),h=document.createElement("td");h.style.paddingLeft="5px;";h.style.paddingRight="5px;";h.textContent=c.Name;e.appendChild(h);var k=document.createElement("div");h.appendChild(k);h=document.createElement("span");k.appendChild(h);h.classList.add("imageSprite");var p=document.createElement("span");p.classList.add("primaryColumn");
k.appendChild(p);p.appendChild(document.createTextNode(c.Name));switch(c.type){case "Warning":h.classList.add("core-sprite-warning");h.setAttribute("aria-label",g["Operation resulted in a warning."]);break;case "error":h.classList.add("core-sprite-error");h.setAttribute("aria-label",g["Operation resulted in an error."]);break;case "loadstart":case "progress":h.classList.add("core-sprite-start");h.setAttribute("aria-label",g["Operation is running."]);break;case "abort":h.classList.add("core-sprite-stop");
h.setAttribute("aria-label",g["Operation is canceled."]);break;case "load":case "loadend":h.classList.add("core-sprite-ok"),h.setAttribute("aria-label","Operation ok.")}if(c.error)h=c.error.Message||c.error,c.error.DetailedMessage&&c.error.DetailedMessage!==""&&(h+=": "+c.error.DetailedMessage),k.appendChild(document.createElement("br")),p=document.createElement("span"),p.classList.add("secondaryColumn"),p.style.marginLeft="18px;",k.appendChild(p),p.textContent=h;h=document.createElement("span");
k.appendChild(h);this._commandService.renderCommands("operationsDialogItems",k,{operation:c,deferred:a[f]},this,"tool");d.appendChild(e)}this._setOperationsVisibility()};h.prototype._setOperationsVisibility=function(){this.$myOperationsList.style.display=this._myOperations.length>0?"":"none";this.$myOperationsListEmpty.style.display=this._myOperations.length>0?"none":"";this.$operationsDontExist.style.display=this._myOperations.length>0?"none":"";this.$operationsExist.style.display=this._myOperations.length>
0?"":"none"};h.prototype.constructor=h;return{OperationsDialog:h}});
define("orion/progress",["i18n!orion/nls/messages","require","orion/Deferred","orion/webui/littlelib","orion/webui/dialogs/OperationsDialog"],function(g,k,i,e,c){function h(b,a){if(!this._progressPane){this._progressPane=e.node(b);this._operationsDialog=new c.OperationsDialog({triggerNode:this._progressPane,serviceRegistry:a});var f=this;this._progressPane.addEventListener("keydown",function(a){(a.charOrCode===" "||a.keyCode===e.KEY.ENTER)&&f._operationsDialog.show()})}}function d(b,a,f){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=f}h.prototype={_switchIconTo:function(b){this._lastIconClass&&this._progressPane.classList.remove(this._lastIconClass);this._lastIconClass=b;this._progressPane.classList.add(this._lastIconClass)},generateOperationsInfo:function(b,a){var f={},d;for(d in b)b[d].progressMonitor||
(f[d]=b[d]);if(this._isEmpty(f))this._switchIconTo("progressPane_empty"),this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext");else{var c="";for(d in f){var e=f[d];if(e.type&&(e.type==="loadstart"||e.type==="progress")){c="running";break}}switch(c){case "running":this._progressPane.title=g["Operations running"];this._progressPane.alt=g["Operations running"];this._progressPane.setAttribute("aria-valuetext",
g["Operations running"]);this._switchIconTo("progressPane_running");break;case "warning":this._progressPane.title=g["Some operations finished with warning"];this._progressPane.alt=g["Some operations finished with warning"];this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=g["Some operations finished with error"];this._progressPane.alt=g["Some operations finished with error"];
this._progressPane.setAttribute("aria-valuetext",g["Some operations finished with error"]);this._switchIconTo("progressPane_error");break;default:this._progressPane.title=g.Operations,this._progressPane.alt=g.Operations,this._progressPane.hasAttribute("aria-valuetext")&&this._progressPane.removeAttribute("aria-valuetext"),this._switchIconTo("progressPane_operations")}}this._operationsDialog.setOperations(f,a)},_isEmpty:function(b){for(var a in b)return!1;return!0}};h.prototype.constructon=h;d.prototype=
{init:function(b){if(!this._progressMonitorClass)this._progressMonitorTool=new h(b,this._serviceRegistry)},progress:function(b,a,f){var d=this,c=this._operationsIndex++;!f&&this._progressMonitorClass&&(f=new this._progressMonitorClass,f.begin(a));b.then(function(){if(d._operations[c]){var e=d._operations[c];if(a)e.Name=a;d._lastOperation=e;e.type="loadend";if(f)e.progressMonitor=f;d.writeOperation.bind(d)(c,e,b);e.Location||d._removeOperationFromTheList.bind(d)(c)}},function(e){if(d._operations[c]){var h=
d._operations[c];if(a)h.Name=a;if(f)h.progressMonitor=f;d._lastOperation=h;h.type=e.canceled?"abort":"error";h.error=e;d.writeOperation.bind(d)(c,h,b);h.Location||d._removeOperationFromTheList.bind(d)(c)}},function(e){if(a)e.Name=a;if(f)e.progressMonitor=f;d.writeOperation.bind(d)(c,e,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 f=this;b.then(function(){f._serviceRegistry.getService("orion.page.message").setProgressMessage("")},function(a){f.setProgressResult.bind(f)(a);return a});return this.progress(b,a)},writeOperation:function(b,a,f){this._operations[b]=a;this._operationDeferrds[b]=
f;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)}};d.prototype.constructor=d;return{ProgressService:d}});
define("orion/extensionCommands","require,orion/Deferred,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/URL-shim".split(","),function(g,k,i,e,c,h,d){var b={},a=(new URL(g.toUrl("."),window.location)).href.slice(0,-1);b._cloneItemWithoutChildren=function j(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),d;for(d in a)d!=="children"&&d!=="Children"&&(b[d]=j(a[d]));return b};b._createOpenWithCommands=function(a){function b(a,d){for(var c=
a.getServiceReferences("orion.navigate.openWith"),j=[],e=0;e<c.length;e++){var l=c[e];l.getProperty("editor")===d.id&&(l=l.getProperty("contentType"),l instanceof Array?j=j.concat(l):l!==null&&typeof l!=="undefined"&&j.push(l))}return j}for(var d=function(){for(var b=a.getServiceReferences("orion.edit.editor"),d=[],c=0;c<b.length;c++){var e=b[c],l=e.getProperty("id");d.push({id:l,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||
e.getProperty("uriTemplate")})}return d}(),c=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),e=[],h=0;h<d.length;h++){var g=d[h],i=c&&c.editor===g.id,k=b(a,g);k.length&&e.push({properties:{name:g.name||g.id,nameKey:g.nameKey,id:"eclipse.openWithCommand."+g.id,tooltip:g.name,tooltipKey:g.nameKey,contentType:k,uriTemplate:g.uriTemplate,nls:g.nls,forceSingleItem:!0,isEditor:i?"default":"editor"},service:{}})}return e};
b._makeValidator=function(b,d,e,g){function i(a,b,d,c){var j=d.match,e;if(b.indexOf("|")>=0)return e=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),i(a,e,d,c)?!0:i(a,b,d,c);else if(b.indexOf(":")>=0)return e=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[e]?i(a[e],b,d,c):!1;else{a:{e=!1;var l;if(a[b]){if(j)if(typeof j==="string"){if(!typeof(a[b]==="string")){d=!1;break a}if(d.variableName){if(j=RegExp(j).exec(a[b]))e=j[0],l=d.variableMatchPosition==="before"?a[b].substring(0,
j.index):d.variableMatchPosition==="after"?a[b].substring(j.index+e.length):d.variableMatchPosition==="only"?e:a[b],e=!0}else{d=RegExp(j).test(a[b]);break a}}else a[b]===j&&(l=a[b],e=!0);else l=a[b],e=!0;if(e&&d.variableName&&(c[d.variableName]=l,c.itemCached=a,d.replacements))for(a=0;a<d.replacements.length;a++)b=!1,d.replacements[a].pattern?c[d.variableName]=c[d.variableName].replace(RegExp(d.replacements[a].pattern),d.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+
d.replacements[a]);d=e}else d=!1}return d}}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 d=0;d<a.length;d++){var l;a:{var h=a[d],k=e;if(this.info.validationProperties)for(l=0;l<this.info.validationProperties.length;l++){var w=this.info.validationProperties[l];if(w.source){if(!i(h,w.source,w,this)){l=!1;break a}}else{window.console.log("Invalid validationProperties in "+
b.id+".  No source property specified.");l=!1;break a}}if(this.info.contentType&&k){w=!1;if(h=c.getFilenameContentType(h.Name,k))for(l=0;l<this.info.contentType.length;l++)if(h.id===this.info.contentType[l]){w=!0;break}l=w}else l=!0}if(!l)return!1}return!0}return!1},generatesURI:function(){return!!this.info.uriTemplate},getURI:function(b){if(this.info.uriTemplate){var d={},c;for(c in b)b.hasOwnProperty(c)&&(d[c]=b[c]);if(this.info.validationProperties)for(c=0;c<this.info.validationProperties.length;c++){var j=
this.info.validationProperties[c];j.source&&j.variableName&&(this.itemCached===b&&this[j.variableName]||i(b,j.source,j,this),b[j.variableName]?window.console.log("Variable name "+j.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):d[j.variableName]=this[j.variableName])}d.OrionHome=a;b=new h(this.info.uriTemplate);return window.decodeURIComponent(b.expand(d))}return null}}};b._createCommandOptions=function(a,c,e,h,g,i){function o(d,k){var o=
b._makeValidator(a,e,h,i);d.visibleWhen=o.validationFunction.bind(o);if(g)if(o.generatesURI.bind(o)())d.hrefCallback=function(a){a=Array.isArray(a.items)?a.items[0]:a.items;return o.getURI.bind(o)(a)};else{var q=a;d.callback=function(a){var j;if(q.forceSingleItem)a=Array.isArray(a.items)?a.items[0]:a.items,j=b._cloneItemWithoutChildren(a);else if(Array.isArray(a.items)){j=[];for(var h=0;h<a.items.length;h++)j.push(b._cloneItemWithoutChildren(a.items[h]))}else j=b._cloneItemWithoutChildren(a.items);
if(e)var g=e.getService("orion.page.progress");c.run?g?g.progress(c.run(j),"Running command: "+d.name):c.run(j):e&&(g?g.progress(e.getService(c).run(j),"Running command: "+d.name):e.getService(c).run(j))}}k.resolve(d)}var q=new k;a.nls?d.getMessageBundle(a.nls).then(function(b){o({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},q)}):o({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor},
q);return q};b.getOpenWithCommands=function(a){var b=[],d;for(d in a._commandList){var c=a._commandList[d];c.isEditor&&b.push(c)}return b};return b});
define("orion/sites/siteCommands","i18n!orion/sites/nls/messages,require,orion/commands,orion/sites/siteUtils,orion/sites/siteClient,orion/Deferred,orion/i18nUtil".split(","),function(g,k,i,e,c,h,d){function b(a){return a instanceof Array?a:[a]}function a(a){return function(b){if(b instanceof Array&&b.length===1&&!(a instanceof Array))return b[0]}}var f=i.Command,j=d.formatMessage;return{createSiteServiceCommands:function(a,b){var b=b||{},f=a.getService("orion.page.command"),d=new i.Command({name:g.Create,
tooltip:g["Create a new site configuration"],id:"orion.site.create",parameters:new i.ParametersDescription([new i.CommandParameter("name","string",g.Name)]),visibleWhen:function(){return!0},callback:function(f){var d=f.items,j=a.getService(d),d=c.getFileClient(a,d.getProperty("filePattern")),h=f.parameters&&f.parameters.valueFor("name"),f=a.getService("orion.page.progress");(f?f.progress(d.loadWorkspaces(),"Loading workspaces"):d.loadWorkspaces()).then(function(a){(a=a&&a[0]&&a[0].Id)&&h&&j.createSiteConfiguration(h,
a).then(function(a){b.createCallback(e.generateEditSiteHref(a),a)},b.errorCallback)})}});f.addCommand(d)},createSiteCommands:function(d){var i=d.getService("orion.page.command"),k=d.getService("orion.page.dialog"),p=d.getService("orion.page.progress"),n=new f({name:g.Edit,tooltip:g["Edit the site configuration"],imageClass:"core-sprite-edit",id:"orion.site.edit",visibleWhen:function(a){a instanceof Array&&a.length===1&&(a=a[0]);return a.HostingStatus},hrefCallback:function(a){return e.generateEditSiteHref(a.items instanceof
Array?a.items[0]:a.items)}});i.addCommand(n);n=new f({name:g.Start,tooltip:g["Start the site"],imageClass:"core-sprite-start",id:"orion.site.start",visibleWhen:function(a){return b(a).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"})},callback:function(f){var e=b(f.items),j=f.userData;if(j.site&&e.length>1)throw Error("userData.site requires a single site configuration to act upon");e=e.map(function(a){var b=j.site||{};b.HostingStatus={Status:"started"};a=a.Location;return c.forLocation(d,
a).updateSiteConfiguration(a,b)});p.showWhile(h.all(e)).then(a(f.items)).then(j.startCallback,j.errorCallback)}});i.addCommand(n);n=new f({name:g.Stop,tooltip:g["Stop the site"],imageClass:"core-sprite-stop",id:"orion.site.stop",visibleWhen:function(a){return b(a).some(function(a){return a.HostingStatus&&a.HostingStatus.Status==="started"})},callback:function(f){var e=b(f.items),j=f.userData;if(j.site&&e.length>1)throw Error("userData.site requires a single site configuration to act upon");e=e.map(function(a){var b=
j.site||{};b.HostingStatus={Status:"stopped"};a=a.Location;return c.forLocation(d,a).updateSiteConfiguration(a,b)});p.showWhile(h.all(e)).then(a(f.items)).then(j.stopCallback,j.errorCallback)}});i.addCommand(n);n=new f({name:g.Delete,tooltip:g["Delete the site configuration"],imageClass:"core-sprite-delete",id:"orion.site.delete",visibleWhen:function(a){a=b(a);return a.length>0?a.every(function(a){return a.HostingStatus&&a.HostingStatus.Status==="stopped"}):!1},callback:function(f){var e=b(f.items),
i=f.userData,m=e.length===1?j(g.ConfirmDeleteSingle,e[0].Name):j(g.ConfirmDeleteMultiple,e.length);k.confirm(m,function(b){b&&(b=e.map(function(a){a=a.Location;return c.forLocation(d,a).deleteSiteConfiguration(a)}),h.all(b).then(a(f.items)).then(i.deleteCallback,i.errorCallback))})}});i.addCommand(n)},createViewOnSiteCommands:function(a){var b=a.getService("orion.core.file"),d=a.getService("orion.page.command");d.addCommand(new f({name:g["Add to site"],tooltip:g["Add the file to this site"],id:"orion.site.add-to",
imageClass:"core-sprite-add",visibleWhen:function(a){return!a.IsFileRunningOn},callback:function(f){var d=f.userData.file,e=f.items.SiteConfiguration,j=a.getService("orion.page.progress");return(j?j.progress(b.loadWorkspaces(),"Loading workspaces"):b.loadWorkspaces()).then(function(b){return c.forFileLocation(a,d.Location).mapOnSiteAndStart(e,d,b[0].Id)}).then(f.userData.addToCallback,f.userData.errorCallback)}}));d.addCommand(new f({name:g.View,tooltip:g["View the file on the site"],id:"orion.site.view-on-link",
visibleWhen:function(a){return a.IsFileRunningOn},hrefCallback:function(b){var f=b.userData.file,b=b.items.SiteConfiguration;return c.forFileLocation(a,f.Location).getURLOnSite(b,f)}}))}}});
define("orion/searchUtils","i18n!orion/nls/messages,require,orion/editor/regex,orion/commands,orion/PageUtil,orion/URITemplate".split(","),function(g,k,i,e,c,h){function d(a,b,d){var c="";d&&(c="^");if(c=i.parse("/"+c+a.searchStr+"/"))d=c.pattern,c=c.flags,c.indexOf("i")===-1&&!b.caseSensitive&&(c+="i"),a.regExp={pattern:d,flags:c},a.wildCard=!0}var b=b||{};b.searchUtils=b.searchUtils||{};b.searchUtils.ALL_FILE_TYPE="*.*";b.searchUtils.doSearch=function(a,f,d,c){if(a){var e=!0;d==="*"&&(d="");d===
""&&(e=c&&c.type!==b.searchUtils.ALL_FILE_TYPE);if(e){d!==""&&b.searchUtils.addRecentSearch(f,d,c?c.regEx:!1);var a=a.createSearchParams(d,!1,!1,c),h=b.searchUtils.generateSearchHref(a);b.searchUtils.getOpenSearchPref(f,function(a){a?window.open(h):window.location=h})}}else window.alert(g["Can't search: no search service is available"])};b.searchUtils.generateSearchHelper=function(a,f){var c=a.keyword,e=c,h={};a.fileType&&a.fileType!==b.searchUtils.ALL_FILE_TYPE&&c===""&&(e="*."+a.fileType);if(a.regEx)h.searchStr=
c,d(h,a,f);else{var g=c.indexOf("*")>-1,i=c.indexOf("?")>-1;g&&(c=c.split("*").join(".*"));i&&(c=c.split("?").join("."));!g&&!i&&!a.nameSearch?(h.searchStr=a.caseSensitive?c.split("\\").join(""):c.split("\\").join("").toLowerCase(),h.wildCard=!1):(h.searchStr=a.caseSensitive?c:c.toLowerCase(),d(h,a,f),h.wildCard=!0)}h.searchStrLength=h.searchStr.length;return{params:a,inFileQuery:h,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 d={},c;for(c in a)if(a[c]!==void 0&&a[c]!==null&&(b||c!=="replace"))d[c]=a[c];return d};b.searchUtils.generateSearchHref=function(a){var f=k.toUrl("search/search.html"),a=b.searchUtils.copySearchParams(a,
!0),d=a.resource;a.resource=void 0;return(new h(f+"#{,resource,params*}")).expand({resource:d,params:a})};b.searchUtils.generateFindURLBinding=function(a,b,d,c){a={find:b.searchStr,regEx:b.wildCard?!0:void 0,caseSensitive:a.caseSensitive?!0:void 0,replaceWith:typeof c==="string"?c:void 0,atLine:typeof d==="number"?d:void 0};return","+(new h("{,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,d){return a.replace(RegExp(b.pattern,b.flags),d)};b.searchUtils.replaceStringLiteral=function(a,d,c){d=i.parse("/"+d+"/gim");return b.searchUtils.replaceRegEx(a,d,c)};b.searchUtils.searchOnelineLiteral=function(a,b,d){var c;c=0;for(var e=!1,h=[];;)if(c=b.indexOf(a.searchStr,c),c<0)break;else{h.push({startIndex:c,length:a.searchStrLength});
e=!0;if(d)break;c+=a.searchStrLength}return e?h:null};b.searchUtils.findRegExp=function(a,b,d,c){if(!b)return null;d=d||"";d+=(d.indexOf("g")===-1?"g":"")+(d.indexOf("m")===-1?"m":"");var e=null;return(e=RegExp(b,d).exec(a.substring(c)))&&{startIndex:e.index+c,length:e[0].length}};b.searchUtils.searchOnelineRegEx=function(a,d,c){for(var e=0,h=!1,g=[];;)if(e=b.searchUtils.findRegExp(d,a.regExp.pattern,a.regExp.flags,e)){g.push(e);h=!0;if(c)break;e=e.startIndex+e.length}else break;return h?g:null};
b.searchUtils.generateNewContents=function(a,d,c,e,h,g){if(e&&d){if(!a)c.contents=[];for(var i=0;i<d.length;i++){for(var k=d[i],o=!1,q=!1,u=[],s,w=0,x=0;x<e.children.length;x++)if(e.children[x].lineNumber-1===i){w=x;for(o=0;o<e.children[x].matches.length;o++)e.children[x+o].checked!==!1&&u.push(o);q=u.length>0;s=e.children[x].matches;o=!0;break}if(o){if(q){u=b.searchUtils.replaceCheckedMatches(k,h,s,u,g);k=u.replacedStr;for(o=0;o<e.children[w].matches.length;o++)e.children[w+o].newMatches=u.newMatches}else for(o=
0;o<e.children[w].matches.length;o++)e.children[w+o].newMatches=e.children[w+o].matches;a?c.contents[i]=k:c.contents.push(k)}else a||c.contents.push(k)}}};b.searchUtils.generateMatchContext=function(a,b,d){var c=[],e=a*2+1,h;b.length<=e?(h=0,a=b.length-1):(h=d-a,h<0?(h=0,a=h+e-1):(a=d+a,a>b.length-1&&(a=b.length-1,h=a-e+1)));for(e=h;e<=a;e++)c.push({context:b[e],current:e===d});return c};b.searchUtils.splitFile=function(a){for(var b=0,d=0,c=0,e=0,h=[];;){b!==-1&&b<=c&&(b=a.indexOf("\r",c));d!==-1&&
d<=c&&(d=a.indexOf("\n",c));if(d===-1&&b===-1){h.push(a.substring(e));break}var g=1;b!==-1&&d!==-1?b+1===d?(g=2,c=d+1):c=(b<d?b:d)+1:c=b!==-1?b+1:d+1;h.push(a.substring(e,c-g));e=c}return h};b.searchUtils.searchWithinFile=function(a,d,c,e,h,g){c=b.searchUtils.splitFile(c);if(h)d.contents=c;if(d){d.children=[];for(var i=e=0;i<c.length;i++){var k=c[i];if(k&&k.length>0){var o=g?k:k.toLowerCase();if(o=a.wildCard?b.searchUtils.searchOnelineRegEx(a,o):b.searchUtils.searchOnelineLiteral(a,o)){var q=i+1;
if(h)for(var u=0;u<o.length;u++){var s=u+1,s={parent:d,checked:d.checked,type:"detail",matches:o,lineNumber:q,matchNumber:s,name:k,location:d.location+"-"+q+"-"+s};d.children.push(s)}else s={parent:d,context:b.searchUtils.generateMatchContext(2,c,i),checked:d.checked,type:"detail",matches:o,lineNumber:q,name:k,location:d.location+"-"+q},d.children.push(s);e+=o.length}}}d.totalMatches=e}};b.searchUtils.replaceCheckedMatches=function(a,b,d,c,e){for(var h=0,g="",i=[],k=0;k<d.length;k++){h!==d[k].startIndex&&
(g+=a.substring(h,d[k].startIndex));if(d[k].length)e=d[k].length;for(var h=!1,q=0;q<c.length;q++)if(c[q]===k){h=!0;break}h?(i.push({startIndex:g.length,length:b.length}),g+=b):(i.push({startIndex:g.length,length:e}),g+=a.substring(d[k].startIndex,d[k].startIndex+e));h=d[k].startIndex+e}h<a.length&&(g+=a.substring(h));return{replacedStr:g,newMatches:i}};b.searchUtils.fullPathNameByMeta=function(a){var b=a.length,d="";if(b>0)for(b-=1;b>-1;b--)d=d+(d===""?"":"/")+a[b].Name;return d};b.searchUtils.path2FolderName=
function(a,b,d){return a.substring(0,a.length-b.length-(d?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,d,c){typeof d==="string"&&d&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(e){var h,e=e.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(e){for(h in e)if(e[h].name===d)return;
e.length>=20&&e.splice(19,e.length-20+1)}else e=[];e.splice(0,0,{name:d,regEx:c});b.searchUtils._storeRecentSearch(a,e)})};b.searchUtils.getSearches=function(a,b,d){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&d&&d(a)})};b.searchUtils.getMixedSearches=function(a,d,c,e){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var h,g=a.get("recentSearch");typeof g===
"string"&&(g=JSON.parse(g));if(d)for(h in a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a)if(c){var i=b.searchUtils.parseQueryStr(a[h].query);g.some(function(a){return i.searchStrTitle===a.name})||g.push({name:i.searchStrTitle,label:a[h].name})}else g.push({name:null,label:a[h].name,value:a[h].query});g&&e&&e(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/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/i18nUtil,orion/searchUtils,orion/contentTypes,orion/Deferred".split(","),function(g,k,i,e,c,h){function d(b,a,d,c){this.registry=b;this.fileClient=a;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=c&&c.searchOnName;this._buildSkeletonOnly=c&&c.buildSkeletonOnly;this._fetchChildrenCallBack=c&&c.fetchChildrenCallBack;this._searchParams=d;this.searchHelper=this._searchOnName||
this._buildSkeletonOnly?null:e.generateSearchHelper(d);this._location=c&&c.location;this._childrenLocation=c&&c.childrenLocation?c.childrenLocation:this._location}d.prototype.search=function(b){var a=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=b;var d=this;this.registry.getService("orion.page.dialog").confirm(g["The search term on this location will not use indexed files."]+"\n"+g["It will take longer time. Do you want to proceed?"],function(b){b&&a.getContentTypes().then(function(a){d.contentTypesCache=
a;d._visitRecursively(d._childrenLocation).then(function(){d._sort(d.fileLocations);d._onSearchComplete({response:{numFound:d.fileLocations.length,docs:d.fileLocations}})})})})};d.prototype.searchName=function(b,a){if(b)this.searchHelper=e.generateSearchHelper(b,!0);if(a)this.onSearchNameComplete=a;var d=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var c=0;c<this.fileSkeleton.length;c++){var h=this.fileSkeleton[c].Name.toLowerCase();if(this.searchHelper.inFileQuery.wildCard?
e.searchOnelineRegEx(this.searchHelper.inFileQuery,h,!0):e.searchOnelineLiteral(this.searchHelper.inFileQuery,h,!0))if(d.push(this.fileSkeleton[c]),d.length>=this.searchHelper.params.rows)break}this.onSearchNameComplete({response:{numFound:d.length,docs:d}})}};d.prototype.buildSkeleton=function(b,a){this._buildingSkeleton=!0;var d=this.registry.getService("orion.core.contenttypes"),c=this;b();d.getContentTypes().then(function(b){c.contentTypesCache=b;c._visitRecursively(c._childrenLocation).then(function(){c._buildingSkeleton=
!1;a();c.searchHelper&&!c._buildSkeletonOnly&&c.searchName()})})};d.prototype._searchCompleted=function(){console.log("Search Completed.")};d.prototype._searchFiles=function(){var b=[],a;if(this.fileLocations.length>0){a=this;for(var d=0;d<a.fileLocations.length;d++)b.push(a._sniffSearch(a.fileLocations[d]))}return h.all(b)};d.prototype._sort=function(b){b.sort(function(a,b){var d=a.Name&&a.Name.toLowerCase(),c=b.Name&&b.Name.toLowerCase();return d<c?-1:d>c?1:0})};d.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};d.prototype._visitRecursively=function(b){var a=[],d=this;this._fetchChildrenCallBack&&this._fetchChildrenCallBack(b);var e=d.registry.getService("orion.page.progress");return(e?e.progress(d.fileClient.fetchChildren(b),"Crawling search for children of "+b):d.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(d._searchOnName)a.push(d._buildSingleSkeleton(b[e]));
else if(d._buildSkeletonOnly)a.push(d._buildSingleSkeleton(b[e]));else{var j=c.getFilenameContentType(b[e].Name,d.contentTypesCache);j&&(j["extends"]==="text/plain"||j.id==="text/plain")&&d._onFileType(j)&&a.push(d._sniffSearch(b[e]))}else b[e].Location&&a.push(d._visitRecursively(b[e].ChildrenLocation));return h.all(a)})};d.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)};d.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)};d.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:i.formatMessage(g["${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(d){a._hitOnceWithinFile(d)&&a._reportSingleHit(b);a.registry.getService("orion.page.message").setProgressResult({Message:i.formatMessage(g["${0} files found out of ${1}"],a._hitCounter,a._totalCounter)})},function(a){console.error("Error loading file content: "+a.message)})};d.prototype._buildSingleSkeleton=function(b){this._totalCounter++;
this.fileSkeleton.push(b);this.searchHelper&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();b=new h;b.resolve(this._totalCounter);return b};d.prototype.constructor=d;return{SearchCrawler:d}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,orion/webui/littlelib,orion/i18nUtil,orion/searchUtils,orion/crawler/searchCrawler".split(","),function(g,k,i,e,c,h){function d(b){this.registry=b.serviceRegistry;this._commandService=b.commandService;(this._fileService=b.fileService)||console.error("No file service on search client")}d.prototype={search:function(b,a,d){var e=function(a){for(var b=[],d=0;d<a.response.docs.length;d++){var f=a.response.docs[d];b.push({name:f.Name,path:f.Location,
folderName:c.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){d(e(a),null)});else try{this.registry.getService("orion.page.progress").progress(this._fileService.search(b),"Searching "+b.keyword).then(function(a){var c=b.keyword,c=c.substring(c.indexOf("}")+1),c=c.substring(c.indexOf(":")+1);d(e(a),c)},function(a){d(null,null,a)})}catch(g){typeof g==="string"&&g.indexOf("search")>
-1&&this._crawler?this._crawler.searchName(b,function(a){d(e(a),null)}):typeof g==="string"&&g.indexOf("search")>-1&&!b.nameSearch?(new h.SearchCrawler(this.registry,this._fileService,b,{childrenLocation:this.getChildrenLocation()})).search(function(a){d(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);i.empty(a);a.appendChild(document.createTextNode(b));
return b},setLocationByMetaData:function(b,a){var d="",c=null;this._searchRootLocation=this._fileService.fileServiceRootURL(b.Location);a&&b&&b.Parents&&b.Parents.length>0?c=a.index==="last"?b.Parents[b.Parents.length-1]:b.Parents[0]:b&&b.Directory&&b.Location&&b.Parents&&(c=b);if(c)this.setLocationbyURL(c.Location),d=c.Name,this._childrenLocation=c.ChildrenLocation;else if(b)this.setLocationbyURL(this._searchRootLocation),d=this._fileService.fileServiceName(b.Location),this._childrenLocation=b.ChildrenLocation;
c=i.node("search");d||(d="");if(c&&c.placeholder){c.value="";var h=e.formatMessage(g["Search ${0}"],d);c.placeholder=h.length>30?h.substring(0,27)+"...":e.formatMessage(g["Search ${0}"],d)}if(c&&c.title)c.title=g["Type a keyword or wild card to search in "]+d},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,d,c){d=d?this.getSearchRootLocation():this.getSearchLocation();return a?{resource:d,sort:"NameLower asc",rows:100,start:0,nameSearch:!0,keyword:b}:{resource:d,sort:"Path asc",
rows:40,start:0,caseSensitive:c?c.caseSensitive:void 0,regEx:c?c.regEx:void 0,fileType:c?c.type:void 0,keyword:b}},defaultRenderer:{makeRenderFunction:function(b,a,d,c,h){function m(a){return!b?!0:(a=b.getFilenameContentType(a))&&(a["extends"]==="text/plain"||a.id==="text/plain")?!0:!1}return function(b,p,n){if(n)i.empty(a),b=document.createElement("div"),b.appendChild(document.createTextNode(g["Search failed."])),a.appendChild(b),typeof c==="function"&&c(a);else{var n=function(){function a(b,d){var c=
d.folderName?d.folderName:d.path,f=document.createElement("span");f.id=c.replace(/[^a-zA-Z0-9_\.:\-]/g,"");f.appendChild(document.createTextNode(" - "+c+" "));b.appendChild(f)}var b={};return function(d,c){var f=c.name;if(b.hasOwnProperty(f)){a(d,c);var e=b[f];typeof e==="function"&&(b[f]=null,e())}else b[f]=function(){a(d,c)}}}(),o=!1;i.empty(a);if(b&&b.length>0){var q=document.createElement("table");q.setAttribute("role","presentation");for(var u=0;u<b.length;u++){var s=b[u],w;if(!o&&(o=!0,d))w=
q.insertRow(0).insertCell(0),w.textContent=d;w=q.insertRow(-1).insertCell(0);w.colspan=2;h&&h(w);var x=document.createElement("a");x.appendChild(document.createTextNode(s.name));s.LineNumber&&x.appendChild(document.createTextNode(" (Line "+s.LineNumber+")"));var t=s.location;s.isExternalResource?t=s.path:(t=s.directory?k.toUrl("navigate/table.html")+"#"+s.path:m(s.name)?k.toUrl("edit/edit.html")+"#"+s.path:s.path,t==="#"&&(t=""));x.setAttribute("href",t);x.setAttribute("aria-describedby",(s.folderName?
s.folderName:s.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));x.style.verticalAlign="middle";w.appendChild(x);n(w,s)}a.appendChild(q);typeof c==="function"&&c(a)}!o&&p&&(b=e.formatMessage(g["No matches found for ${0}"],p),i.empty(a),a.appendChild(document.createTextNode(b)),typeof c==="function"&&c(a))}}}}};d.prototype.constructor=d;return{Searcher: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(g,k,i,e,c,h){function d(b){this._init(b)}d.prototype=new h.Dialog;d.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>';d.prototype._init=function(b){this.title=b.title||g["Find File Named"];this.modal=!0;this.messages=g;this._searcher=b.searcher;this._progress=b.progress;this._onHide=b.onHide;
this._contentTypeService=new i.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(g["Missing required argument: fileService"]);this._searchRenderer=b.searchRenderer;if(!this._searchRenderer||typeof this._searchRenderer.makeRenderFunction!==
"function")throw Error(g["Missing required argument: searchRenderer"]);this._favService=b.favoriteService;if(!this._favService)throw Error(g["Missing required argument: favService"]);this._initialize()};d.prototype._bindToDom=function(b){var a=this;a.$crawlingProgress.style.display="none";this.$fileName.setAttribute("placeholder",g.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===c.KEY.ENTER){var d=c.$("a",a.$results);d&&(c.stop(b),window.open(d.href),a.hide())}},!1);b.addEventListener("keydown",function(b){var d,e,h,g,i;if(b.keyCode===c.KEY.DOWN||b.keyCode===c.KEY.UP)e=c.$$array("a",a.$results),d=c.$$array("a",a.$favresults),h=document.activeElement,i=e.indexOf(h),g=d.indexOf(h),b.keyCode===c.KEY.DOWN?g>=0?(g<d.length-1?d[g+1]:e.length>0?e[0]:d[0]).focus():i>=0?(i<e.length-1?e[i+1]:d.length>0?d[0]:e[0]).focus():
(e.length>0||d.length>0)&&(-1<d.length-1?d[0]:e[0]).focus():g>=0?(h=a.$fileName,(g>0?d[g-1]:h).focus()):i>=0?(h=a.$fileName,(i>0?e[i-1]:d.length>0?d[d.length-1]:h).focus()):e.length>0?e[e.length-1].focus():d.length>0&&d[d.length-1].focus(),c.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 k.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(g["Building file skeleton..."]))},function(){a.$crawlingProgress.style.display="none";a.$progress.removeChild(a.$progress.lastChild)})}},0)};d.prototype.populateFavorites=function(){var b=document.createElement("div");b.appendChild(document.createTextNode(g["Populating favorites&#x2026;"]));
c.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())};d.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)}};d.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=g.Favorite;b.appendChild(a);a.style.verticalAlign="middle"};d.prototype.checkSearch=function(){clearTimeout(this._timeoutId);var b=(new Date).getTime();
b-this._time>this._searchDelay?(this._time=b,this.doSearch()):this._timeoutId=setTimeout(this.checkSearch.bind(this),50)};d.prototype.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 d=document.createElement("div");d.appendChild(document.createTextNode(g["Searching..."]));c.empty(this.$favresults);
this.$results.appendChild(d);var e=this;setTimeout(function(){var a=e._searcher.createSearchParams(b,!0,e._searchOnRoot),d=e._searchRenderer.makeRenderFunction(e._contentTypeService,e.$results,!1,e.decorateResult.bind(e));e._searcher.search(a,!1,d)},0)}};d.prototype.decorateResult=function(b){for(var a=this,b=c.$$array("a",b),d=0;d<b.length;d++){var e=b[d];e.addEventListener("mouseup",function(b){b.button===0&&!b.ctrlKey&&!b.metaKey&&a.hide()},!1);e.addEventListener("keyup",function(b){b.keyCode===
c.KEY.ENTER&&a.hide()},!1)}};d.prototype._beforeHiding=function(){clearTimeout(this._timeoutId)};d.prototype._afterHiding=function(){this._onHide&&this._onHide()};d.prototype.constructor=d;return{OpenResourceDialog:d}});
define("orion/globalSearch/advSearchOptContainer",["i18n!orion/globalSearch/nls/messages","require","orion/searchUtils","orion/contentTypes","orion/i18nUtil"],function(g,k,i,e,c){function h(b,a,c,e){this._inputField=b;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);(b=e?e.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 h=this;this._optRenderer=new d(a,c,function(){h.dismiss();h._inputField.focus()});this._initUI()}function d(b,a,d){this._searcher=b;this._serviceRegistry=a;this._cancelCallBack=d}h.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)};h.prototype.dismiss=function(){this._dismissed=!0;this._optUIContainer.style.display="none"};h.prototype.show=function(b){for(var a=0,d=0,c=this._inputField;c;)a+=c.offsetLeft,d+=c.offsetTop,c=c.offsetParent;this._optUIContainer.style.display="block";this._optUIContainer.style.top=d+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};h.prototype.toggle=function(){this._dismissed?this.show(this._inputField.value):this.dismiss()};h.prototype.constructor=h;d.prototype.getOptions=function(){return{searchStr:this._searchBox.value,caseSensitive:this._caseSensitiveCB.checked,regEx:this._regExCB.checked,type:this._fileTypes.options[this._fileTypes.selectedIndex].value}};d.prototype.render=function(b,a){this._parentDiv=b;if(typeof this._parentDiv==="string")this._parentDiv=
document.getElementById(this._parentDiv);var d=this._serviceRegistry.getService("orion.core.contenttypes");if(d){var c=this;d.getContentTypes().then(function(b){c.contentTypesCache=b;c._render(a)})}else d=new e.ContentTypeService(this._serviceRegistry),this.contentTypesCache=d.getContentTypes(),this._render(a)};d.prototype._render=function(b){b?this._renderHTML(b):this._renderRaw()};d.prototype._submitSearch=function(){var b=this.getOptions();i.doSearch(this._searcher,this._serviceRegistry,b.searchStr,
b)};d.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:g["All types"],value:i.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 d=0;d<this.contentTypesCache[a].extension.length;d++)b.push({label:this.contentTypesCache[a].extension[d],value:this.contentTypesCache[a].extension[d]});for(a=0;a<b.length;a++){var d=document.createElement("option"),e=document.createTextNode(b[a].label);d.appendChild(e);this._fileTypes.appendChild(d);d.value=b[a].value}var h=this;this._searchBox.addEventListener("keydown",function(a){a=a.charCode||a.keyCode;a===13&&h._submitSearch();a===27&&h._cancelCallBack&&h._cancelCallBack()});
this._fileTypes.addEventListener("change",function(){var a=h._fileTypes.options[h._fileTypes.selectedIndex].value;h._searchBox.placeholder=a===i.ALL_FILE_TYPE?g["Type a search term"]:c.formatMessage(g["All ${0} files"],a)});this._submitButton.onclick=function(){h._submitSearch()}};d.prototype._initHTMLLabels=function(){document.getElementById("advSearchLabel").appendChild(document.createTextNode(g["Files that contain:"]));document.getElementById("advSearchInput").placeholder=g["Type a search term"];
document.getElementById("advSearchTypeLabel").appendChild(document.createTextNode(g["File type:"]));document.getElementById("advSearchCaseSensitiveLabel").appendChild(document.createTextNode(g["Case sensitive"]));document.getElementById("advSearchRegExLabel").appendChild(document.createTextNode(g["Regular expression"]));document.getElementById("advSearchSubmit").value=g.Search};d.prototype._renderHTML=function(b){var a=this,d=new XMLHttpRequest;d.open("GET",k.toUrl(b),!0);d.onreadystatechange=function(){if(this.readyState===
4&&this.status===200)a._parentDiv.innerHTML=this.responseText,a._initHTMLLabels(),a._initControls()};d.send()};d.prototype._htmlTemplate='<ul class="advSearchOptUL"><li class="advSearchOptLILabel"><label>'+g["Files that contain:"]+'</label></li><li class="advSearchOptLIControl"><input type="text" id="advSearchInput" placeholder="'+g["Type a search term"]+'"></input></li><li class="advSearchOptLIControl"><label>'+g["File type:"]+'</label><select id="advSearchTypes"></select></li><li class="advSearchOptLIControl"><label>'+
g["Case sensitive"]+'</label><input type="checkbox" id="advSearchCaseSensitive"></input></li><li class="advSearchOptLIControl"><label>'+g["Regular expression"]+'</label><input type="checkbox" id="advSearchRegEx"></input></li><li class="advSearchOptLIControl"><input type="button" class="advSearchOptButton" id="advSearchSubmit" value="'+g.Search+'"></input></li></ul>';d.prototype._renderRaw=function(){this._parentDiv.innerHTML=this._htmlTemplate;this._initControls()};d.prototype.constructor=d;return{advSearchOptContainer:h,
advSearchOptRenderer:d}});
define("orion/PageLinks",["require","orion/Deferred","orion/PageUtil","orion/URITemplate","orion/URL-shim"],function(g,k,i,e){function c(c,d){for(var b=c.getServiceReferences(d||"orion.page.link"),a=i.matchResourceParameters(window.location.href),f={OrionHome:(new URL(g.toUrl("."),window.location)).href.slice(0,-1),Location:a.resource},a=[],j=0;j<b.length;j++){for(var l={},m=b[j].getPropertyKeys(),r=0;r<m.length;r++)l[m[r]]=b[j].getProperty(m[r]);if(l.uriTemplate&&l.nls&&(l.name||l.nameKey)){var p=
new k;g(["i18n!"+l.nls],function(a){var b=new e(l.uriTemplate),b=window.decodeURIComponent(b.expand(f)),b=i.validateURLScheme(b);l.href=b;l.textContent=l.nameKey?a[l.nameKey]:l.name;p.resolve(l)});a.push(p)}else if(l.uriTemplate&&l.name)m=new e(l.uriTemplate),m=window.decodeURIComponent(m.expand(f)),m=i.validateURLScheme(m),l.href=m,l.textContent=l.name,a.push((new k).resolve(l))}return k.all(a)}return{createPageLinks:function(e,d){return c(e,d).then(function(b){return b.map(function(a){var b=a.href,
a=a.textContent,d=document.createElement("a");d.href=b;d.target="_self";d.classList.add("targetSelector");d.textContent=a;return d})})},getPageLinksInfo:c}});
define("orion/widgets/UserMenu",["i18n!orion/widgets/nls/messages","require","orion/webui/littlelib","orion/PageLinks"],function(g,k,i,e){function c(c){this._init(c)}c.prototype={_init:function(c){this._dropdownNode=i.node(c.dropdownNode);if(!this._dropdownNode)throw"no dom node for dropdown found";this._dropdown=c.dropdown;this._serviceRegistry=c.serviceRegistry;this.authenticatedServices={};this.unauthenticatedServices={}},isSingleService:function(){return this.length(this.unauthenticatedServices)+
this.length(this.authenticatedServices)===1},hasServices:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)>0},length:function(c){var d=0,b;for(b in c)c.hasOwnProperty(b)&&d++;return d},_makeMenuItem:function(c,d){var b=document.createElement("span");b.role="menuitem";b.tabIndex=0;var a=document.createTextNode(c);b.appendChild(a);b.classList.add("dropdownMenuItem");b.addEventListener("click",d,!1);b.addEventListener("keydown",function(a){(a.keyCode===
i.KEY.ENTER||a.keyCode===i.KEY.SPACE)&&d()},!1);return b},_renderAuthenticatedService:function(c){var d=this,b=this.authenticatedServices[c].authService;if(b&&b.logout){var a=document.createElement("li"),e=this._makeMenuItem(g["Sign Out"],function(){b.logout().then(function(){d.addUserItem(c,b,d.authenticatedServices[c].label);localStorage.removeItem(c);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 c(a){b[a]||(b[a]=d.createDocumentFragment());return b[a]}var d=document,b=[];e.getPageLinksInfo(this._serviceRegistry,"orion.page.link.user").then(function(a){this._dropdown.empty();a.forEach(function(a){var b=c(typeof a.category==="number"?a.category:1),e=d.createElement("li"),f=d.createElement("a");f.role=
"menuitem";f.classList.add("dropdownMenuItem");f.href=a.href;f.textContent=a.textContent;e.appendChild(f);b.appendChild(e)});if(this.keyAssistFunction){var a=document.createElement("li"),e=this._makeMenuItem(g["Keyboard Shortcuts"],this.keyAssistFunction);e.classList.add("key-assist-menuitem");a.appendChild(e);c(0).appendChild(a)}var j=this;b.sort(function(a,b){return a-b}).forEach(function(a,d){if(d<b.length-1){var c=document.createElement("li");c.classList.add("dropdownSeparator");var e=document.createElement("span");
e.classList.add("dropdownSeparator");c.appendChild(e);a.appendChild(c)}j._dropdownNode.appendChild(a)});if(this.isSingleService())for(var i in this.authenticatedServices)this.authenticatedServices.hasOwnProperty(i)&&this._renderAuthenticatedService(i,0)}.bind(this))},setKeyAssist:function(c){this.keyAssistFunction=c;this.renderServices()},addUserItem:function(c,d,b,a){a?(this.unauthenticatedServices[c]&&delete this.unauthenticatedServices[c],this.authenticatedServices[c]={authService:d,label:b,data:a}):
(this.authenticatedServices[c]&&delete this.authenticatedServices[c],this.unauthenticatedServices[c]=this.unauthenticatedServices[c]?{authService:d,label:b,pending:this.unauthenticatedServices[c].pending}:{authService:d,label:b});this.renderServices()}};c.prototype.constructor=c;return{UserMenu:c}});
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(g,
k,i,e,c,h,d,b,a,f,j,l,m,r,p,n,o,q,u,s,w,x,t,v,G,C,A,y){function I(a,b){if(a.getLabel)return a.getLabel();else{var d=new x;d.resolve(b.properties.name);return d}}function J(a){f.node("progressPane").setAttribute("aria-label",g["Operations - Press spacebar to show current operations"]);(a=a.getService("orion.page.progress"))&&a.init.bind(a)("progressPane")}function F(a,b){var d=a.getService("orion.core.auth");d!==null&&d.getUser().then(function(a){var d;a.Name?d=document.createTextNode(a.Name):a.login&&
(d=document.createTextNode(a.login));d&&(b.childNodes.length>0?b.childNodes[0].nodeType===3?b.replaceChild(d,b.childNodes[0]):b.insertBefore(d,b.childNodes[0]):b.appendChild(d))})}function M(a,b){var d=a.getServiceReferences("orion.core.auth");R=[];if(f.node("userMenu")){var c=f.node("userDropdown"),e=new l.Dropdown({dropdown:c}),j=new t.UserMenu({dropdownNode:c,dropdown:e,serviceRegistry:a}),c=f.node("userTrigger");new m.Tooltip({node:c,text:g.Options,position:["below","left"]});F(a,c);j.setKeyAssist(b);
for(c=0;c<d.length;c++){var e=d[c],h=a.getService(e);I(h,e).then(function(a){h.getKey().then(function(b){R.push(b);h.getUser().then(function(d){j.addUserItem(b,h,a,d)},function(d,c){j.addUserItem(b,h,a,c)});window.addEventListener("storage",function(){Q[b]!==localStorage.getItem(b)&&(Q[b]=localStorage.getItem(b),h.getUser().then(function(d){j.addUserItem(b,h,a,d)},function(){j.addUserItem(b,h,a)}))},!1)})})}}}function L(a){var b=document.createElement("span");b.id="advancedSearchDropDown";f.node("searchOptions").appendChild(b);
b.tabIndex=0;b.classList.add("advancedSearchDecorationSprite");b.classList.add("core-sprite-openarrow");b.title=g["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 d=f.node("relatedDropdown");B||(B=new l.Dropdown({dropdown:d}));a._addMenuItem(d,b)}function E(a,b,d,c,j){var g,i=a.getServiceReferences("orion.page.link.related");i.length<=0||f.node("relatedLinks")&&
x.when(function(){if(g)return g;var b=a.getService("orion.core.contenttypes");b||(b=new p.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return g=a})}(),function(){var l;f.node("relatedLinks")&&B&&(B.close(),B.empty());for(var k=[],m=0;m<i.length;m++){var n={},o,r=i[m].getPropertyKeys();for(o=0;o<r.length;o++)n[r[o]]=i[m].getProperty(r[o]);if(n.id){var q=function(a){if(a)if(!a.visibleWhen||a.visibleWhen(b)){var d=new e.CommandInvocation(c,
b,b,null,a);H(a,d)}else typeof j==="function"&&(l||(l=j()),x.when(l,function(d){d&&b===S&&(!a.visibleWhen||a.visibleWhen(d))&&H(a,new e.CommandInvocation(c,d,d,null,a))}))},p=null;o=null;if(d.indexOf(n.id)<0)if((n.nls&&n.nameKey||n.name)&&n.uriTemplate)o=h._createCommandOptions(n,i[m],a,g,!0),k.push(o),o.then(function(a){a=new e.Command(a);q(a)});else{if(!p&&(p=c.findCommand(n.id))){q(p);continue}if(!p){var u=a.getServiceReferences("orion.navigate.command");for(o=0;o<u.length;o++)if(u[o].getProperty("id")===
n.id){for(var n={},r=u[o].getPropertyKeys(),s=0;s<r.length;s++)n[r[s]]=u[o].getProperty(r[s]);o=h._createCommandOptions(n,u[o],a,g,!0);k.push(o);o.then(function(a){p=new e.Command(a);q(p)});break}}}}}x.all(k,function(a){return a}).then(function(){var a=f.node("relatedTrigger");if(B&&a)a.style.visibility=B.getItems().length===0?"hidden":"visible"})})}function N(a){var b=f.node("globalActions");b&&(a.destroy(b),a.renderCommands(b.id,b,{},{},"tool"))}function U(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),d;for(d in a)if(a[d].name===b.selected){d=a[d];d=(new q.ThemeSheetWriter).getSheet(d);b=document.createElement("STYLE");b.appendChild(document.createTextNode(d));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(b);break}}})}function O(a){var b={},d=null;typeof a==="string"&&(a=f.node(a));a||(a=f.node("pageActions"));for(var c=a;c&&c.classList;){if(c.classList.contains("toolComposite")){d=
c;break}c=c.parentNode}if(a.classList.contains("commandMarker"))b.commandNode=a;if(d&&(b.slideContainer=f.$(".slideParameters",d),b.parameterArea=f.$(".parameters",d),b.dismissArea=f.$(".parametersDismiss",d),b.notifications=f.$("#notificationArea",d),d.parentNode&&(b.toolbarTarget=f.$(".toolbarTarget",d.parentNode),b.toolbarTarget)))a=f.bounds(d),b.toolbarTargetY=a.height+1;return b}function P(a){if(a.toolbarTarget&&a.toolbarTargetY){var b=0,d;a.notifications&&a.notifications.classList.contains("slideContainerActive")&&
(d=f.bounds(a.notifications),b+=d.height);a.slideContainer&&a.slideContainer.classList.contains("slideContainerActive")&&(d=f.bounds(a.slideContainer),b+=d.height);b>0&&(b+=8);a.toolbarTarget.style.top=a.toolbarTargetY+b+"px";a.toolbarTarget.style.bottom=0}}var n=function(a){var b=document.createElement("a");b.href=a;return b.href}(k.toUrl("auth/NotifyAuthentication.html")),Q={},R=[],B,S,T=[],D,K=null;return{addSettings:function(a){var b=document.getElementById("settingsTab"),d=document.getElementById("settingsAction"),
c=!1,e;b.style.visibility="";d.style.visibility="";d.onclick=function(){if(!c){c=!0;b.style.backgroundColor="#555";b.style.zIndex="99";b.style.borderTopRightRadius="3px";b.style.borderTopLeftRadius="3px";d.className="core-sprite-settings-white";b.id="settingsNode";d.id="settingsButton";var j=document.getElementById("innerPanels"),h=j.getBoundingClientRect(),g=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=g.top-h.top+24-4+"px",e.id="settingsPanel",e.style.borderTopLeftRadius="3px",e.style.borderBottomRightRadius="3px",e.style.borderBottomLeftRadius="3px",j.appendChild(e),f.addAutoDismiss([d,b,e],function(){d.className="core-sprite-settings";b.style.backgroundColor="white";e.style.visibility="hidden";c=!1}));f.empty(e);a.appendTo(e)}}},generateBanner:function(a,h,l,n,o,q,p,t){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=f.$$array(".targetSelector"),d=0;d<b.length;d++)b[d].target=a}},{pid:"nav.config"})}U(n);n=f.node(a);if(!n)throw g["could not find banner parent, id was "]+a;a=document.createRange();a.selectNode(n);a=a.createContextualFragment(C);f.processTextNodes(a,g);n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a);a=f.node("home");a.href=k.toUrl("navigate/table.html");a.setAttribute("aria-label",
g["Orion Home"]);f.node("progressPane").src=k.toUrl("images/none.png");if(a=f.node("pageToolbar"))a.classList.add("toolbarLayout"),a.innerHTML=y+i.slideoutHTMLFragment("mainToolbar");(a=f.node("closeNotifications"))&&a.setAttribute("aria-label",g["Close notification"]);if(a=f.node("footer"))a.innerHTML=A,f.processTextNodes(a,g);l.setParameterCollector(new c.CommandParameterCollector(O,P));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===f.KEY.ESCAPE)z.style.display="none"},!1);f.addAutoDismiss([z],function(){z.style.display="none"});var E=f.node("primaryNav");E&&v.createPageLinks(h,"orion.page.link").then(function(a){a.forEach(function(a){E.appendChild(a)})});var B=f.node("search");if(!B)throw"failed to generate HTML for banner";B.setAttribute("placeholder",
g.Search);new m.Tooltip({node:B,text:g["Type a keyword or wild card to search in root"],position:["below","left"]});var H=new w.advSearchOptContainer(B,o,h,{group:"advancedSearch"});new s.InputCompletion(B,function(a){u.getMixedSearches(h,!0,!1,function(b){var d,c=[],e=!1,f=!1;for(d in b)b[d].label&&b[d].value?(e||(c.push({type:"category",label:g["Saved searches"]}),e=!0),c.push({type:"proposal",value:{name:b[d].label,value:k.toUrl("search/search.html")+"#"+b[d].value,type:"link"}})):(f||(c.push({type:"category",
label:g["Recent searches"]}),f=!0),c.push({type:"proposal",label:b[d].name,value:b[d].name}));a(c)})},{group:"globalSearch",extendedProvider:function(a,b){var d=h.getServiceReferences("orion.search.proposal");if(!d||d.length===0)b(null);else{var c=[];d.forEach(function(b){var d=b.getProperty("filterForMe");c.push(h.getService(b).run(a).then(function(a){for(var b={filterForMe:d,proposals:[]},c=0;c<a.length;c++){b.proposals.push({type:"category",label:a[c].category});for(var e=0;e<a[c].datalist.length;e++)b.proposals.push({type:"proposal",
label:a[c].datalist[e],value:a[c].datalist[e]})}return b}))});x.all(c).then(function(a){b(a)})}}});B.addEventListener("keydown",function(a){a.defaultPrevented||(a.charCode||a.keyCode)===13&&u.doSearch(o,h,B.value)});L(H);f.addAutoDismiss([f.node(H.containerId),f.node("advancedSearchDropDown")],function(){H.dismiss()});if(a=f.$(".split")){var n=f.$(".sidePanelLayout"),F=f.$(".mainPanelLayout");if(n&&F)K={side:n,main:F},K.splitter=new j.Splitter({node:a,sidePanel:n,mainPanel:F,toggle:!0}),a=new e.Command({name:g["Toggle side panel"],
tooltip:g["Open or close the side panel"],id:"orion.toggleSidePane",callback:function(){K.splitter.toggleSidePanel()}}),l.addCommand(a),l.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new e.CommandKeyBinding("o",!0)),p&&(K.splitter.addResizeListener(function(a){p&&a===F&&p.getTextView().resize()}),p.getTextView().setKeyBinding(new b.KeyBinding("o",!0),"toggleOutliner"),p.getTextView().setAction("toggleOutliner",function(){K.splitter.toggleSidePanel();return!0},{name:g["Toggle Outliner"]}))}a=
new e.Command({name:g["Make Favorite"],tooltip:g["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=h.getService("orion.core.favorite"),d=h.getService("orion.page.progress"),c=function(a){return function(c){c?h.getService("orion.page.message").setMessage(a.Name+
g[" is already a favorite."],2E3):d.progress(b.makeFavorites(a),"Making favorite "+a.Name)}},e=0;e<a.length;e++){var f=a[e];d.progress(b.hasFavorite(f.ChildrenLocation||f.Location),"Checking favorite "+f.Name).then(c(f))}}});l.addCommand(a);var I=function(a,b,d){var c=b.getService("orion.core.favorite"),e=b.getService("orion.page.progress");c||(c=new r.FavoritesService({serviceRegistry:b}),c=b.getService("orion.core.favorite"));var f=new G.OpenResourceDialog({searcher:a,progress:e,searchRenderer:a.defaultRenderer,
favoriteService:c,onHide:function(){d&&d.getTextView().focus()}});window.setTimeout(function(){f.show()},0)},a=new e.Command({name:g["Find File Named..."],tooltip:g["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){I(o,h,p)}});p&&(p.getTextView().setKeyBinding(new b.KeyBinding("f",!0,!0,!1),a.id),p.getTextView().setAction(a.id,function(){I(o,h,p);return!0},a));l.addCommand(a);l.registerCommandContribution("globalActions","eclipse.openResource",100,null,
!0,new e.CommandKeyBinding("f",!0,!0));a=new e.Command({name:g["Global search"],tooltip:g["Global search"],id:"eclipse.globalSearch",callback:function(){var a=f.node("search");a&&a.focus()}});p&&(p.getTextView().setKeyBinding(new b.KeyBinding("h",!0,!1,!0),a.id),p.getTextView().setAction(a.id,function(){var a=p.getSelection(),b=null;a.end>a.start&&(b=p.getModel().getText(a.start,a.end));if(a=f.node("search")){if(b)a.value=b;a.focus()}return!0},a));l.addCommand(a);l.registerCommandContribution("globalActions",
"eclipse.globalSearch",101,null,!0,new e.CommandKeyBinding("h",!0,!1,!0));a=new e.Command({name:g["Toggle banner and footer"],tooltip:g["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var a=f.node("banner"),b=f.node("footer"),d=f.$(".content-fixedHeight");a.style.display==="none"?(a.style.display="block",b.style.display="block",d.classList.remove("content-fixedHeight-maximized")):(a.style.display="none",b.style.display="none",d.classList.add("content-fixedHeight-maximized"));
p&&p.getTextView().resize();return!0}});l.addCommand(a);l.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new e.CommandKeyBinding("m",!0,!0));p&&(p.getTextView().setKeyBinding(new e.CommandKeyBinding("m",!0,!0),a.id),p.getTextView().setAction(a.id,a.callback,a));t&&t.addHandler({isActive:function(){return z.style.display==="block"},cancel:function(){return this.isActive()?(z.style.display="none",!0):!1}});t=new e.Command({name:g["System Configuration Details"],tooltip:g["System Config Tooltip"],
id:"orion.configDetailsPage",hrefCallback:function(){return k.toUrl("help/about.html")}});l.addCommand(t);l.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new e.CommandKeyBinding(112,!0,!0));t=new e.Command({name:g["Background Operations"],tooltip:g["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return k.toUrl("operations/list.html")}});l.addCommand(t);l.registerCommandContribution("globalActions","orion.backgroundOperations",
100,null,!0,new e.CommandKeyBinding("o",!0,!0));t=new e.Command({name:g["Show Keys"],tooltip:g["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){if(z.style.display==="none"){var a;f.empty(z);if(p){a=document.createElement("h2");a.appendChild(document.createTextNode(g.Editor));z.appendChild(a);a=p.getTextView().getActions(!1);for(var b=0;b<a.length;b++){var c=a[b],e=c,h=p.getTextView(),j=h.getActionDescription(c);if(j&&j.name)e=j.name;c=h.getKeyBindings(c);
for(h=0;h<c.length;h++){var j=d.getUserKeyString(c[h]),i=document.createElement("span");i.role="listitem";i.appendChild(document.createTextNode(j+" = "+e));i.appendChild(document.createElement("br"));z.appendChild(i)}}}a=document.createElement("h2");a.appendChild(document.createTextNode(g.Global));z.appendChild(a);l.showKeyBindings(z);z.style.display="block"}else z.style.display="none";return!0}});l.addCommand(t);l.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new e.CommandKeyBinding(191,
!1,!0));p&&(a=window.navigator.platform.indexOf("Mac")!==-1,p.getTextView().setKeyBinding(new e.CommandKeyBinding(191,!1,!0,!a,a),t.id),p.getTextView().setAction(t.id,t.callback,t));N(l);M(h,t.callback);J(h);window.addEventListener("hashchange",function(){l.processURL(window.location.href)},!1);window.setTimeout(function(){D(h)},0)},getToolbarElements:O,getMainSplitter:function(){return K},layoutToolbarElements:P,setPageTarget:function(b){var d,c,e=b.breadcrumbRootName;b.target?(b.searchService&&
b.searchService.setLocationByMetaData(b.target),b.fileService&&!b.breadcrumbTarget&&(c=e?e+" ":"",c+=b.fileService.fileServiceName(b.target.Location),e=null),d=b.name||b.target.Name,S=b.target,E(b.serviceRegistry,b.target,T,b.commandService,b.makeAlternate)):(b.breadcrumbTarget||(e=e||b.task||b.name),d=b.name);(D=b.title)||(D=d?d+" - "+b.task:b.task);window.document.title=D;f.empty(f.node("location"));new a.BreadCrumbs({container:"location",resource:b.breadcrumbTarget||b.target,rootSegmentName:e,
workspaceRootSegmentName:c,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=f.node("dirty");if(b)b.textContent=a?"*":""},setPageCommandExclusions:function(a){T=a},notifyAuthenticationSite:n}});
define("orion/status",["require","orion/webui/littlelib","orion/globalCommands"],function(g,k,i){function e(c,d,b,a,e){this._serviceRegistry=c;this._serviceRegistration=c.registerService("orion.page.message",this);this._operationsClient=d;this.notificationContainerDomId=e;this.domId=b;this.progressDomId=a||b;this._hookedClose=!1}function c(c,d,b,a){this.statusService=c;this.progressId=d;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 c=k.node("closeNotifications"),d=this;c&&!this._hookedClose&&(c.addEventListener("click",function(){d.setProgressMessage("")},!1),c.addEventListener("keydown",function(b){(b.keyCode===k.KEY.ENTER||b.keyCode===k.KEY.SPACE)&&d.setProgressMessage("")},!1))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=i.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(c,d,b){this._init();this.currentMessage=
c;var a=k.node(this.domId);if(typeof b==="boolean"){var e=this,j=a.getAttribute("aria-live");a.setAttribute("aria-live",b?"polite":"off");window.setTimeout(function(){c===e.currentMessage&&(k.empty(a),a.appendChild(document.createTextNode(c)),window.setTimeout(function(){a.setAttribute("aria-live",j)},100))},100)}else k.empty(a),a.appendChild(document.createTextNode(c));typeof d==="number"&&(e=this,window.setTimeout(function(){c===e.currentMessage&&(k.empty(a),a.appendChild(document.createTextNode("")))},
d))},setErrorMessage:function(c){this.currentMessage=c;this._init();var d=c.responseText||c.message||c;try{d=JSON.parse(d)}catch(b){}var c=d.Message||d,a="red";if(d.Severity)switch(d.Severity){case "Warning":a="#FFCC00";break;case "Error":a="red";break;case "Info":case "Ok":a="green"}d=document.createElement("span");d.style.color=a;d.appendChild(document.createTextNode(c));c=k.node(this.domId);k.empty(c);c.appendChild(d)},setProgressMessage:function(c){this._init();this.currentMessage=c;var d=document.createElement("span");
d.classList.add("imageSprite");d.classList.add("core-sprite-progress");var b=k.node(this.progressDomId);k.empty(b);b.appendChild(d);b.appendChild(document.createTextNode(c));d=k.node(this.notificationContainerDomId);d.classList.add("progressNormal");if(c&&c.length>0)d.classList.add("slideContainerActive");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else d.classList.remove("slideContainerActive");i.layoutToolbarElements(this._getNotifierElements())},
setProgressResult:function(c){this.currentMessage=c;var d=c.responseText||c;try{d=JSON.parse(d)}catch(b){}this._init();var a=d.Message||d,e="core-sprite-info",j="progressInfo",g=document.createElement("span");g.classList.add("imageSprite");c=[];if(d.Severity)switch(d.Severity){case "Warning":e="core-sprite-warning";j="progressWarning";c.push("progressInfo");c.push("progressError");c.push("progressNormal");break;case "Error":e="core-sprite-error";j="progressError";c.push("progressWarning");c.push("progressInfo");
c.push("progressNormal");break;default:c.push("progressWarning"),c.push("progressError"),c.push("progressNormal")}g.classList.add(e);var m=k.node(this.progressDomId),e=k.node(this.notificationContainerDomId);k.empty(m);m.appendChild(g);d.HTML?(d=document.createElement("span"),d.innerHTML=a,m.appendChild(d)):m.appendChild(document.createTextNode("   "+a));if(j&&this.progressDomId!==this.domId){e.classList.add(j);for(a=0;a<c.length;a++)e.classList.remove(c[a])}e.classList.add("slideContainerActive");
i.layoutToolbarElements(this._getNotifierElements())},showWhile:function(c,d){var b=this;if(d){b.setProgressMessage(d);var a=function(){d===b.currentMessage&&b.setProgressMessage("")};c.then(a,a)}return c},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(e,d){return new c(this,++this._lastProgressId,e,d)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var c="",d=!0,b;for(b in this._progressMonitors)this._progressMonitors[b].status&&(d||(c+=", "),
c+=this._progressMonitors[b].status,d=!1);this.setProgressMessage(c)}else this.setProgressMessage("")},_beginProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._progressMonitors.length++;this._renderOngoingMonitors()},_workedProgressMonitor:function(c){this._progressMonitors[c.progressId]=c;this._renderOngoingMonitors()},_doneProgressMonitor:function(c){delete this._progressMonitors[c.progressId];this._progressMonitors.length--;c.status?this.setProgressResult(c.status):this._renderOngoingMonitors()}};
e.prototype.constructor=e;c.prototype.begin=function(c){this.status=c;this.statusService._beginProgressMonitor(this)};c.prototype.done=function(c){this.status=c;this.statusService._doneProgressMonitor(this)};c.prototype.worked=function(c){this.status=c;this.statusService._workedProgressMonitor(this)};c.prototype.constructor=c;return{StatusReportingService:e,ProgressMonitor:c}});
define("orion/selection",["orion/EventTarget"],function(g){function k(i,e){e||(e="orion.page.selection");this._serviceRegistry=i;g.attach(this);this._serviceRegistration=i.registerService(e,this);this._selections=null}k.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})}};k.prototype.constructor=k;return{Selection:k}});
define("orion/section",["orion/webui/littlelib","orion/selection","orion/commands","orion/commonHTMLFragments"],function(g,k,i,e){function c(d,b){var a=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!b.id)throw Error("Missing required argument: id");this.id=b.id;if(!b.title)throw Error("Missing required argument: title");var c=b.useAuxStyle?["sectionWrapper","sectionWrapperAux","toolComposite"]:
["sectionWrapper","toolComposite"];this.domNode=document.createElement("div");d.appendChild(this.domNode);for(var j=0;j<c.length;j++)this.domNode.classList.add(c[j]);this.domNode.id=b.id;if(b.canHide)this.twistie=document.createElement("span"),this.twistie.classList.add("modelDecorationSprite"),this.twistie.classList.add("layoutLeft"),this.twistie.classList.add("sectionTitle"),this.domNode.style.cursor="pointer",this.domNode.appendChild(this.twistie),this.domNode.tabIndex=0,this.domNode.addEventListener("click",
function(b){(b.target===a.titleNode||b.target===a.twistie)&&a._changeExpandedState()},!1),this.domNode.addEventListener("keydown",function(b){b.keyCode===g.KEY.ENTER&&(b.target===a.domNode||b.target===a.titleNode||b.target===a.twistie)&&a._changeExpandedState()},!1);if(b.iconClass){var h=document.createElement("span");h.classList.add("sectionIcon");this.domNode.appendChild(h);(Array.isArray(b.iconClass)?b.iconClass:[b.iconClass]).forEach(function(a){h.classList.add(a)})}this.titleNode=document.createElement("div");
this.titleNode.id=b.id+"Title";this.titleNode.classList.add("sectionAnchor");this.titleNode.classList.add("sectionTitle");this.titleNode.classList.add("layoutLeft");this.domNode.appendChild(this.titleNode);this.titleNode.textContent=b.title;if(typeof b.getItemCount==="function")c=document.createElement("div"),c.classList.add("layoutLeft"),c.classList.add("sectionItemCount"),this.domNode.appendChild(c),c.textContent=b.getItemCount(this);this._progressNode=document.createElement("div");this._progressNode.id=
b.id+"Progress";this._progressNode.classList.add("sectionProgress");this._progressNode.classList.add("sectionTitle");this._progressNode.classList.add("layoutLeft");this._progressNode.style.visibility="hidden";this._progressNode.textContent="...";this.domNode.appendChild(this._progressNode);c=document.createElement("div");c.id=b.id+"FilterSearchBox";this.domNode.appendChild(c);this._toolActionsNode=document.createElement("div");this._toolActionsNode.id=b.id+"ToolActionsArea";this._toolActionsNode.classList.add("layoutRight");
this._toolActionsNode.classList.add("sectionActions");this.domNode.appendChild(this._toolActionsNode);this.actionsNode=document.createElement("div");this.actionsNode.id=b.id+"ActionArea";this.actionsNode.classList.add("layoutRight");this.actionsNode.classList.add("sectionActions");this.domNode.appendChild(this.actionsNode);this.selectionNode=document.createElement("div");this.selectionNode.id=b.id+"SelectionArea";this.selectionNode.classList.add("layoutRight");this.selectionNode.classList.add("sectionActions");
this.domNode.appendChild(this.selectionNode);b.slideout&&(c=e.slideoutHTMLFragment(b.id),j=document.createRange(),j.selectNode(this.domNode),c=j.createContextualFragment(c),this.domNode.appendChild(c));this._contentParent=document.createElement("div");this._contentParent.id=this.id+"Content";this._contentParent.role="region";this._contentParent.classList.add("sectionTable");this._contentParent.setAttribute("aria-labelledby",this.titleNode.id);d.appendChild(this._contentParent);b.content&&this.setContent(b.content);
this.hidden=b.hidden;if(typeof b.onExpandCollapse==="function")this._onExpandCollapse=b.onExpandCollapse;this._preferenceService=b.preferenceService;this._contentParent.style.display="none";if(this._preferenceService){var i=this;this._preferenceService.getPreferences("/window/views").then(function(a){a=a.get(i.id);if(a!==void 0)i.hidden=!a;if(!i.hidden)i._contentParent.style.display="block";i._updateExpandedState(!i.hidden,!1)})}else{if(!this.hidden)this._contentParent.style.display="block";this._updateExpandedState(!this.hidden,
!1)}this._commandService=b.commandService;this._lastMonitor=0;this._loading={}}function h(d){this._section=d;this._id=++d._lastMonitor}c.prototype={setTitle:function(d){this.titleNode.textContent=d},setContent:function(d){typeof d==="string"?this._contentParent.innerHTML=d:(this._contentParent.innerHTML="",this._contentParent.appendChild(d))},getContentElement:function(){return this._contentParent},createProgressMonitor:function(){return new h(this)},_setMonitorMessage:function(d,b){this._progressNode.style.visibility=
"visible";this._loading[d]=b;var a="",c;for(c in this._loading)a!==""&&(a+="\n"),a+=this._loading[c];this._progressNode.title=a},_monitorDone:function(d){delete this._loading[d];var d="",b;for(b in this._loading)d!==""&&(d+="\n"),d+=this._loading[b];this._progressNode.title=d;if(d==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){this.hidden?(this._contentParent.style.display="block",this.hidden=!1):(this._contentParent.style.display="none",this.hidden=!0);this._updateExpandedState(!this.hidden,
!0)},_updateExpandedState:function(d,b){var a=this.twistie,c=this.id;a&&(a.classList.add(d?this._expandImageClass:this._collapseImageClass),a.classList.remove(d?this._collapseImageClass:this._expandImageClass));this._preferenceService&&b&&this._preferenceService.getPreferences("/window/views").then(function(a){a.put(c,d)});this._onExpandCollapse&&this._onExpandCollapse(d,this)}};c.prototype.constructor=c;h.prototype={begin:function(d){this.status=d;this._section._setMonitorMessage(this.id,d)},worked:function(d){this.status=
d;this._section._setMonitorMessage(this.id,d)},done:function(d){this.status=d;this._section._monitorDone(this.id)}};h.prototype.constructor=h;return{Section:c}});define("orion/objects",[],function(){return{mixin:function(g){Array.prototype.slice.call(arguments,1).forEach(function(k){for(var i=Object.keys(k),e=0;e<i.length;e++){var c=i[e];g[c]=k[c]}})}}});
define("orion/webui/treetable",["i18n!orion/nls/messages","orion/webui/littlelib"],function(g,k){function i(e){this._init(e)}i.prototype={_init:function(e){var c=e.parent,h=this,c=k.node(c);if(!c)throw g["no parent"];if(!e.model)throw g["no tree model"];if(!e.renderer)throw g["no renderer"];this._parent=c;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(d){h._showRoot?(d._depth=0,h._generate([d],0)):h._treeModel.getChildren(d,function(b){h._generate(b,0)})})},_generate:function(e,c){k.empty(this._parent);var g=document.createElement(this._tableElement);
g.id=this._id;this._tableStyle&&g.classList.add(this._tableStyle);this._renderer.initTable(g,this);this._bodyElement=document.createElement(this._tableBodyElement);this._bodyElement.id=this._id+"tbody";this._generateChildren(e,c);g.appendChild(this._bodyElement);this._parent.appendChild(g);this._rowsChanged()},_generateChildren:function(e,c,g){for(var d=0;d<e.length;d++){var b=document.createElement(this._tableRowElement);b.id=this._treeModel.getId(e[d]);b._depth=c;b._item=e[d];this._renderer.render(e[d],
b);b.childNodes[this._labelColumnIndex].style.paddingLeft=this._indent*c+"px";g?(this._bodyElement.insertBefore(b,g.nextSibling),g&&(g=b)):this._bodyElement.appendChild(b)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(e,c,h){var d=this._treeModel.getId(e),b;if(d===this._id)this._removeChildRows(d),this._generateChildren(c,0),this._rowsChanged();else{var a=k.node(d);a?(a._item=e,a&&(h||
a._expanded)?(a._expanded=!0,this._removeChildRows(d),this._renderer.updateExpandVisuals(a,!0),c?(this._generateChildren(c,a._depth+1,a),this._rowsChanged()):(b=this,c=this._treeModel.getChildren(a._item,function(d){b._generateChildren(d,a._depth+1,a);b._rowsChanged()}))):this._renderer.updateExpandVisuals(a,!1)):console.log(g["could not find table row "]+d)}},getItem:function(e){var c=k.node(e);return c&&c._item?c._item:e},toggle:function(e){var c=k.node(e);c&&(c._expanded?(this.collapse(e),this._renderer.updateExpandVisuals(c,
!1)):(this.expand(e),this._renderer.updateExpandVisuals(c,!0)))},isExpanded:function(e){return(e=k.node(e))?e._expanded:!1},expand:function(e,c,g){var e=typeof e==="string"?e:this._treeModel.getId(e),d=k.node(e);if(d&&!d._expanded){d._expanded=!0;var b=this;this._renderer.updateExpandVisuals(d,!0);this._treeModel.getChildren(d._item,function(a){b._generateChildren(a,d._depth+1,d);b._rowsChanged();c&&c.apply(b,g)})}},_removeChildRows:function(e){for(var c=e===this._id,g=!1,d=-1,b=[],a=k.$$array(".treeTableRow",
this._parent),f=0;f<a.length;f++){var j=a[f];if(g)break;if(c)j._depth>d?b.push(j):g=!0;else if(j.id===e)c=!0,d=j._depth}for(e=0;e<b.length;e++)c=b[e],c.parentNode.removeChild(c)},collapse:function(e){var e=typeof e==="string"?e:this._treeModel.getId(e),c=k.node(e);if(c){if(!c._expanded)return;c._expanded=!1;this._renderer.updateExpandVisuals(c,!1);this._removeChildRows(e);this._rowsChanged()}this._onCollapse&&this._onCollapse(c._item)}};i.prototype.constructor=i;return{TableTree:i}});
define("orion/treeModelIterator",[],function(){var g={};g.TreeModelIterator=function(){function g(i,e){this.firstLevelChildren=i;this.reset();this._init(e)}g.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 c=this;return this.forceExpandFunc(this._cursor,"first",function(e){e&&c.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 c=this;return this.forceExpandFunc(e,"last",function(e){e&&c.setCursor(e)})}e&&this.setCursor(e);return e},_findSibling:function(g,e){for(var c=this.topLevel(g),h=c?this.firstLevelChildren:g.parent.children,d=0;d<h.length;d++)if(h[d]===g)return d===
0&&!e?c?null:g.parent:d===h.length-1&&e?c?null:this._findSibling(g.parent,e):e?h[d+1]:h[d-1];return null},_inParentChain:function(g,e){for(var c=g.parent;c;){if(c===e)return!0;c=c.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,c){this.setCursor(e);var h=[];for(h.push(e);;){if(this.iterate(g))h.push(this.cursor());
else break;if(c===this.cursor())return h}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 c=this.cursor(),h=this._scan(!0,g,e);h||(h=this._scan(!1,g,e));this.setCursor(c);return h},iterate:function(g,e){return g?this._forward(e):this._backward(e)},iterateOnTop:function(g,e){var c=this._findSibling(this._getTopLevelParent(this.cursor()),
g);c?this.setCursor(c):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 g}();return g});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","orion/webui/littlelib","orion/treeModelIterator"],function(g,k,i){var g={},e=navigator.userAgent.indexOf("iPad")!==-1,c=window.navigator.platform.indexOf("Mac")!==-1;g.ExplorerNavHandler=function(){function g(d,b,a){this.explorer=d;this.model=this.explorer.model;this._navDict=b;this._listeners=[];this._selections=[];this._currentColumn=0;var c=this._getEventListeningDiv();c.tabIndex=0;c.classList.add("selectionModelContainer");
var e=this;this._modelIterator=new i.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,d){return e.explorer.forceExpandFunc(a,b,d)}:void 0});this._init(a);(!a||a.setFocus!==!1)&&c.focus();d=function(a){if(a.target===c){if(e.explorer.preventDefaultFunc&&e.explorer.preventDefaultFunc(a,e._modelIterator.cursor()))return!0;
if(a.keyCode===k.KEY.DOWN)return e.onDownArrow(a);else if(a.keyCode===k.KEY.UP)return e.onUpArrow(a);else if(a.keyCode===k.KEY.RIGHT)return e.onRightArrow(a);else if(a.keyCode===k.KEY.LEFT)return e.onLeftArrow(a);else if(a.keyCode===k.KEY.SPACE)return e.onSpace(a);else if(a.keyCode===k.KEY.ENTER)return e.onEnter(a)}};c.addEventListener("keydown",d,!1);this._listeners.push({type:"keydown",listener:d});d=function(){if(e.explorer.onFocus)e.explorer.onFocus(!1);else e.toggleCursor(null,!1)};c.addEventListener("blur",
d,!1);this._listeners.push({type:"blur",listener:d});d=function(){if(e.explorer.onFocus)e.explorer.onFocus(!0);else e.toggleCursor(null,!0)};c.addEventListener("focus",d,!1);this._listeners.push({type:"focus",listener:d});this._parentDiv=c}g.prototype={_init:function(d){this._linearGridMove=!1;if(d)this._selectionPolicy=d.selectionPolicy,this.preventDefaultFunc=d.preventDefaultFunc,this.postDefaultFunc=d.postDefaultFunc},_ctrlKeyOn:function(d){return c?d.metaKey:d.ctrlKey},removeListeners:function(){if(this._listeners)for(var d=
0;d<this._listeners.length;d++)this._parentDiv.removeEventListener(this._listeners[d].type,this._listeners[d].listener,!1)},focus:function(){var d=this._getEventListeningDiv();d&&d.focus()},_getEventListeningDiv:function(d){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv==="function"?this.explorer.keyEventListeningDiv(d):k.node(this.explorer._parentId)},isExpandable:function(d){return!d?!1:k.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(d)))?
!0:!1},isExpanded:function(d){return!d?!1:this.explorer.myTree.isExpanded(this.model.getId(d))},refreshSelection:function(d){var b=this;this.explorer.selection&&this.explorer.selection.getSelections(function(a){b._clearSelection();for(var c=0;c<a.length;c++)b._selections.push(a[c]);b._selections.length>0&&b.cursorOn(b._selections[0],!0,!1,d)})},refreshModel:function(d,b,a,c){this._currentColumn=0;this.topIterationNodes=[];this.model=b;this._navDict=d;if(this.model.getTopIterationNodes)this.topIterationNodes=
this.model.getTopIterationNodes();else if(a)this.topIterationNodes=a;this._modelIterator.setTree(this.topIterationNodes);!c&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(d){for(var b=0;b<this._selections.length;b++)if(d===this._selections[b])return b;return-1},_clearSelection:function(d){if(d)for(d=0;d<this._selections.length;d++)this._checkRow(this._selections[d],!0);
this._selections=[]},setSelection:function(d,b){if(this._selectionPolicy==="cursorOnly")b&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(d,!0);else if(this._isRowSelectable(d)){if(!b||this._selectionPolicy==="singleSelection")this._clearSelection(!0),this._checkRow(d,!1),this._selections.push(d),this._lastSelection=d;else{var a=this._inSelection(d);a>=0?(this._checkRow(d,!0),this._selections.splice(a,1)):(this._checkRow(d,!1),this._selections.push(d),this._lastSelection=d)}this.explorer.selection&&
(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(d,b){d||(d=this.currentModel());var a=this._getGridChildren(d);if(a&&a.length>1||b===0&&a){b!==0&&this.toggleCursor(d,!1);var c=this._currentColumn,e=!0;c+=b;c<0?(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!1)?d=this.currentModel():e=!1),c=e?a.length-1:this._currentColumn):c>=a.length&&(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!0)?d=this.currentModel():
e=!1),c=e?0:this._currentColumn);this._currentColumn=c;b!==0&&this.toggleCursor(d,!0);return!0}return!1},_getGridChildren:function(d){return this._navDict?this._navDict.getGridNavHolder(d):null},getCurrentGrid:function(d){d||(d=this.currentModel());return(d=this._getGridChildren(d))&&d.length>0?d[this._currentColumn]:null},toggleCursor:function(d,b){var a=this.getRowDiv(d),c=this.getCurrentGrid(d);c?(a&&(b?a.classList.add("treeIterationCursorRow"):a.classList.remove("treeIterationCursorRow")),c.domNode&&
(b?c.domNode.classList.add("treeIterationCursor"):c.domNode.classList.remove("treeIterationCursor"))):a&&(b?a.classList.add("treeIterationCursorRow_Dotted"):a.classList.remove("treeIterationCursorRow_Dotted"))},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(d,b,a,c){var a=a===void 0?!1:a,e,g;if(d||b){if(g===this._modelIterator.cursor())return;e=this._modelIterator.cursor();g=d;this._modelIterator.setCursor(g)}else e=this._modelIterator.prevCursor(),g=this._modelIterator.cursor();
if(e!==g||b)if(this.toggleCursor(e,!1),!b||g)if(this.moveColumn(null,0),this.toggleCursor(g,!0),(d=this.getRowDiv())&&!c&&!this._visible(d)&&d.scrollIntoView(!a),this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,g)},getSelection:function(){return this._selections},getSelectionIds:function(){for(var d=[],b=0;b<this._selections.length;b++)d.push(this.model.getId(this._selections[b]));return d},getRowDiv:function(d){d=d?d:this._modelIterator.cursor();if(!d)return null;var d=this.model.getId(d),
b=this._navDict.getValue(d);return b&&b.rowDomNode?b.rowDomNode:k.node(d)},iterate:function(d,b,a){this.topIterationNodes.length!==0&&this._modelIterator.iterate(d,b)&&(this.cursorOn(null,!1,d),a&&this.setSelection(this.currentModel(),!0))},_checkRow:function(d,b){if(this.explorer.renderer._useCheckboxSelection){var a=this.getRowDiv(d);if(a){var c=k.node(this.explorer.renderer.getCheckBoxId(a.id)),e=b?!c.checked:!0;if(e!==c.checked)this.explorer.renderer.onCheck(a,c,e,!0)}}else this._select(d,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(d){return(d=k.node(d))?k.bounds(d).height:0},_visible:function(d){if(d.offsetWidth===0||d.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],c=this._vpHeight();this._vpWidth();for(var b=a.top>b?a.top:b,a=a.bottom<c?a.bottom:c,d=d.getClientRects(),c=0,e=d.length;c<e;c++){var g=d[c];if(g.top>=b&&g.top<=a&&g.bottom>=b&&g.bottom<=a)return!0}return!1},_select:function(d){d||(d=this._modelIterator.cursor());var b=this.getRowDiv(d);b&&(this._inSelection(d)<0?b.classList.add("checkedRow"):b.classList.remove("checkedRow"))},_onModelGrid:function(d,b){var a=this._getGridChildren(d);if(a)for(var c=
0;c<a.length;c++)if(b.target===a[c].domNode)return!0;return!1},onClick:function(d,b){var a=k.node(this.explorer.renderer.expandCollapseImageId(this.model.getId(d)));if(b.target!==a&&!this._onModelGrid(d,b))if(this.cursorOn(d,!0,!1,!0),e)this.setSelection(d,!0);else if(this._ctrlKeyOn(b))this.setSelection(d,!0);else if(b.shiftKey&&this._lastSelection){if(a=this._modelIterator.scan(this._lastSelection,d)){this._clearSelection(!0);for(var c=0;c<a.length;c++)this.setSelection(a[c],!0)}}else this.setSelection(d,
!1)},onCollapse:function(c){this._modelIterator.collapse(c)&&this.cursorOn()},onUpArrow:function(c){this.iterate(!1,!1,c.shiftKey);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1);c.preventDefault();return!1},onDownArrow:function(c){this.iterate(!0,!1,c.shiftKey);!this._ctrlKeyOn(c)&&!c.shiftKey&&this.setSelection(this.currentModel(),!1);c.preventDefault();return!1},_shouldMoveColumn:function(c){var b=this.currentModel(),a=this._getGridChildren(b);return a&&a.length>1?this.isExpandable(b)?
this._ctrlKeyOn(c):!0:!1},onLeftArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,-1),c.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&this.isExpanded(b))return this.explorer.myTree.collapse(b),c.preventDefault(),!0;this._modelIterator.topLevel(b)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(b.parent),this.setSelection(b.parent,!1))},onRightArrow:function(c){if(this._shouldMoveColumn(c))return this.moveColumn(null,
1),c.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&!this.isExpanded(b))return this.explorer.myTree.expand(b),c.preventDefault(),!1},_isRowSelectable:function(c){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(c):!0},onSpace:function(c){this.setSelection(this.currentModel(),!0);c.preventDefault()},onEnter:function(c){var b=this.getCurrentGrid(this._modelIterator.cursor());if(b)if(b.widget)if(typeof b.onClick==="function")b.onClick();
else typeof b.widget.focus==="function"&&b.widget.focus();else{var a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(c),!1,!1,!1,0,null);b.domNode.dispatchEvent(a)}else if(this.explorer.renderer.getRowActionElement&&(b=this._modelIterator.cursor()))if(b=this.explorer.renderer.getRowActionElement(this.model.getId(b)),b.href)this._ctrlKeyOn(c)?window.open(b.href):window.location.href=b.href}};return g}();g.ExplorerNavDict=function(){function c(d){this._dict=
{};this._model=d}c.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 c}();return g});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,orion/webui/littlelib,orion/webui/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(g,k,i,e,c,h){var d={};d.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=i.node(b+"placeHolderRow");a=i.node(b+"placeHolderCol");if(c&&a)return{tempNode:c,refNode:a}}return null},getRow:function(a){if(a=
this.model.getId(a))return i.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,d){this.selection&&this.selection.setSelections([]);this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=a+"innerTree",h=i.node(g);h&&i.empty(h);if(b)b.rootId=g;this.model=b;this._parentId=a;this._treeOptions=d;if(!d||d&&!d.noSelection)this.selectionPolicy=d?d.selectionPolicy:"",this._navDict=new c.ExplorerNavDict(this.model);this.myTree=new e.TableTree({id:g,model:b,parent:a,labelColumnIndex:this.renderer.getLabelColumnIndex(),
renderer:this.renderer,showRoot:d?!!d.showRoot:!1,indent:d?d.indent:void 0,onCollapse:d?d.onCollapse:void 0,tableElement:d?d.tableElement:void 0,tableBodyElement:d?d.tableBodyElement:void 0,tableRowElement:d?d.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 c.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}();d.createExplorerCommands=function(b,a){function c(b){return typeof b.getItemCount==="function"?b.getItemCount()>0?a?a(b):!0:!1:!1}var d=
new h.Command({tooltip:g["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return c(a)},callback:function(a){a.items.expandAll()}}),e=new h.Command({tooltip:g["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)};d.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}();d.ExplorerFlatModel=function(){function b(a,b,c){this.rootPath=a;this.fetchItems=b;this.root=c}b.prototype=new d.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}();d.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;i.empty(a);this._treeTableClass&&a.classList.add(this._treeTableClass);this.renderTableHeader(a)},getActionsColumn:function(a,b,c,d,e){var c=c||"tool",g=this.explorer.registry.getService("orion.page.command"),h=document.createElement("td");h.id=b.id+"actionswrapper";d&&h.classList.add(d);this.actionScopeId?g.renderCommands(this.actionScopeId,h,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 h},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=i.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(i.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=i.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 g=document.createElement("span");b.appendChild(g);g.classList.add(d||"imageSprite");g.classList.add(c)}var h=this;e.onclick=function(){h.tableTree.toggle(a.id);if(h.tableTree.isExpanded(a.id))h._expanded.push(a.id);else for(var b in h._expanded)if(h._expanded[b]===a.id){h._expanded.splice(b,1);break}(b=h._getUIStatePreferencePath())&&window.sessionStorage&&h._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=i.$$array(".treeTableRow"),c=0;c<b.length;c++){var d=b[c],e=i.node(d.id+"actionswrapper"),g=a.getService("orion.page.command");g.destroy(e);this.actionScopeId&&g.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}();d.SelectionRenderer=function(){function b(a,b){this._init(a);this.explorer=b}b.prototype=new d.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}();d.SimpleFlatModel=function(){function b(a,b,c){this.items=a;this.getKey=c;this.idPrefix=b;this.root={children:a}}b.prototype=new d.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 d});
define("orion/sites/siteMappingsTable","i18n!orion/sites/nls/messages,orion/commands,orion/explorers/explorer,orion/i18nUtil,orion/Deferred,orion/webui/littlelib,orion/EventTarget".split(","),function(g,k,i,e,c,h,d){function b(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function a(a){return a.replace(/[\r\n\t]/g,"")}var f={};f.Model=function(){function a(b,c,d){this.rootPath=b;this.fetchItems=c;this.items=d}a.prototype=new i.ExplorerFlatModel;b(a.prototype,{getId:function(a){return a===this.root?
this.rootId:"mapping_"+this.items.indexOf(a)}});return a}();f.Renderer=function(){function a(b,c){this._init(b);this.options=b;this.explorer=c}a.prototype=new i.SelectionRenderer;b(a.prototype,{getCellHeaderElement:function(a){switch(a){case 0:return a=document.createElement("th"),a.textContent=" ",a.classList.add("isValidColumn"),a;case 1:return a=document.createElement("th"),a.textContent=g.Path,a;case 2:return a=document.createElement("th"),a.textContent=g["Mount at (server path)"],a;case 3:return a=
document.createElement("th"),a.textContent=g.Actions,a}},getCellElement:function(a,b,c){var d;switch(a){case 0:return this.getIsValidCell(a,b,c);case 1:return a=document.createElement("td"),c=document.createElement("input"),c.classList.add("pathInput"),c.value=typeof b.FriendlyPath!=="undefined"?b.FriendlyPath:b.Target,d=function(a){this.options.onchange(b,"FriendlyPath",a.target.value,a)}.bind(this),c.onchange=d,c.onkeyup=d,a.appendChild(c),a;case 2:return a=document.createElement("td"),c=document.createElement("input"),
c.classList.add("serverPathInput"),c.value=b.Source,d=function(a){this.options.onchange(b,"Source",a.target.value,a)}.bind(this),c.onchange=d,c.onkeyup=d,a.appendChild(c),a;case 3:return this.getActionsColumn(b,c)}},getIsValidCell:function(a,b){var c=b.Target,d=document.createElement("td"),f,j;if(/^\//.test(c)){var i=this;this.options.siteClient.toFileLocation(c).then(function(a){f=a;var b=document.createElement("span");b.classList.add("validating");h.empty(d);d.appendChild(b);b.textContent="\u2026";
b=i.options.fileClient._getService(a).read(a,!0);i.options.progress&&i.options.progress.progress(b,"Reading metadata of "+a);b.then(function(a){var b=a&&a.Directory,a=b?"core-sprite-folder":"core-sprite-file",b=b?g.WorkspaceFolder:g.WorkspaceFile;j=document.createElement("a");j.href=f;j.target="_new";var c=document.createElement("span");c.className+="imageSprite "+a;c.title=e.formatMessage(b,f);j.appendChild(c);h.empty(d);d.appendChild(j)},function(){j=document.createElement("a");j.href=f;j.target=
"_new";var a=document.createElement("span");a.className+="imageSprite core-sprite error";a.title=e.formatMessage(g.WorkspaceResourceNotFound,f);j.appendChild(a);h.empty(d);d.appendChild(j)})})}else f=c,j=document.createElement("a"),j.href=f,j.target="_new",h.empty(d),c=document.createElement("span"),c.className+="imageSprite core-sprite-link",c.title=e.formatMessage(g.ExternalLinkTo,f),j.appendChild(c),d.appendChild(j);d.classList.add("isValidCell");return d}});return a}();f.MappingsTable=function(){function e(a){this.registry=
a.serviceRegistry;this.commandService=this.registry.getService("orion.page.command");this.registerCommands();this.siteClient=a.siteClient;this.parentId=a.parentId;this.selection=a.selection;this.renderer=new f.Renderer({checkbox:!1,onchange:this.fieldChanged.bind(this),siteConfiguration:a.siteConfiguration,siteClient:a.siteClient,fileClient:a.fileClient,progress:a.serviceRegistry.getService("orion.page.progress"),actionScopeId:"siteMappingCommand"},this);this.myTree=null;this._setSiteConfiguration(a.siteConfiguration);
this.setDirty(!1)}e.prototype=Object.create(i.Explorer.prototype);d.attach(e.prototype);b(e.prototype,{_setSiteConfiguration:function(a){this.siteConfiguration=a;this.refresh()},refresh:function(){var a=function(){return(new c).resolve(this.siteConfiguration.Mappings)}.bind(this),b=this;this.siteClient.updateMappingsDisplayStrings(this.siteConfiguration).then(function(c){b.siteConfiguration.Mappings=c.Mappings;b.createTree(b.parentId,new f.Model(null,a,b.siteConfiguration.Mappings))})},render:function(){this.changedItem(this.siteConfiguration.Mappings,
this.siteConfiguration.Mappings)},renderItemRow:function(a,b){if(b==="FriendlyPath"){var c=document.getElementById(this.myTree._treeModel.getId(a)),d=h.$(".isValidCell",c),c=this.renderer.getIsValidCell(h.$$array("td",c).indexOf(d),a,c);d.parentNode.replaceChild(c,d)}},registerCommands:function(){this.commandService.addCommand(new k.Command({name:g.Delete,imageClass:"core-sprite-delete",id:"orion.site.mappings.remove",visibleWhen:function(a){return"Source"in a||"Target"in a||"FriendlyPath"in a},callback:function(a){this.deleteMapping(a.items);
this.render();this.setDirty(!0)}.bind(this)}));this.commandService.registerCommandContribution("siteMappingCommand","orion.site.mappings.remove",0);this.commandService.addCommand(new k.Command({name:g["Move Up"],imageClass:"core-sprite-move_up",id:"orion.site.mappings.moveUp",visibleWhen:function(a){return"Source"in a||"Target"in a||"FriendlyPath"in a}.bind(this),callback:function(a){var b=this.getItemIndex(a.items);if(b!==0){var c=this.siteConfiguration.Mappings[b-1];this.siteConfiguration.Mappings[b-
1]=a.items;this.siteConfiguration.Mappings[b]=c;this.render();this.setDirty(!0)}}.bind(this)}));this.commandService.registerCommandContribution("siteMappingCommand","orion.site.mappings.moveUp",1);this.commandService.addCommand(new k.Command({name:g["Move Down"],imageClass:"core-sprite-move_down",id:"orion.site.mappings.moveDown",visibleWhen:function(a){return"Source"in a||"Target"in a||"FriendlyPath"in a}.bind(this),callback:function(a){var b=this.getItemIndex(a.items);if(b!==this.siteConfiguration.Mappings.length-
1){var c=this.siteConfiguration.Mappings[b+1];this.siteConfiguration.Mappings[b+1]=a.items;this.siteConfiguration.Mappings[b]=c;this.render();this.setDirty(!0)}}.bind(this)}));this.commandService.registerCommandContribution("siteMappingCommand","orion.site.mappings.moveDown",2)},getItemIndex:function(a){return this.siteConfiguration.Mappings.indexOf(a)},_addMapping:function(b){var c=b.Source,d=b.Target,e=b.FriendlyPath;b.Source=a(typeof c==="string"?c:this.getNextMountPoint(e));b.Target=a(typeof d===
"string"?d:"/");this.mappingExists(c,d)||this.siteConfiguration.Mappings.push(b)},addMapping:function(a){this._addMapping(a);this.render();this.setDirty(!0)},addMappings:function(a){for(var b=0;b<a.length;b++)this.addMapping(a[b]);this.render();this.setDirty(!0)},mappingExists:function(a,b){if(typeof a==="object"&&typeof b==="undefined")b=a.Target,a=a.Source;for(var c=this.siteConfiguration.Mappings,d=0;d<c.length;d++)if(c[d].Source===a&&c[d].Target===b)return!0;return!1},getNextMountPoint:function(a){for(var b=
this.siteConfiguration.Mappings,c=!1,d=0;d<b.length;d++)if(b[d].Source==="/"){c=!0;break}if(!c)return"/";if(!a)return"/web/somePath";a=a.split("/");for(d=a.length-1;d>=0;d--)if(!/\s+/.test(a[d]))return"/"+a[d];return"/web/somePath"},deleteMapping:function(a){a=this.siteConfiguration.Mappings.indexOf(a);a!==-1&&this.siteConfiguration.Mappings.splice(a,1)},deleteAllMappings:function(){this.siteConfiguration.Mappings.splice(0,this.siteConfiguration.Mappings.length)},fieldChanged:function(b,c,d){d=a(d);
if(b[c]!==d&&(b[c]=d,c==="FriendlyPath")){var e=d,f=this;this.siteClient.parseInternalForm(this.siteConfiguration,e).then(function(a){b.Target=a||e;f.renderItemRow(b,c);f.setDirty(!0)})}},setDirty:function(a){this._isDirty=a;this.dispatchEvent({type:"dirty",value:a})},isDirty:function(){return this._isDirty}});return e}();return f});
define("orion/explorers/explorer-table","i18n!orion/navigate/nls/messages,require,orion/Deferred,orion/webui/littlelib,orion/i18nUtil,orion/fileUtils,orion/explorers/explorer".split(","),function(g,k,i,e,c,h,d){function b(a,b,c,d,e,g){this.registry=a;this.root=b;this.fileClient=c;this.idPrefix=d||"";this.excludeFiles=!!e;this.excludeFolders=!!g}function a(a){this.registry=a.serviceRegistry;this.treeRoot=a.treeRoot;this.selection=a.selection;this.fileClient=a.fileClient;this.excludeFiles=a.excludeFiles;
this.excludeFolders=a.excludeFolders;this.parentId=a.parentId;this.renderer=a.rendererFactory(this);this.dragAndDrop=a.dragAndDrop;this.myTree=this.model=null;this._hookedDrag=this.checkbox=!1;var b=this.renderer;this.registry&&this.registry.registerService("orion.cm.managedservice",{updated:function(a){b.setTarget(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?"_blank":"_self":"_self")}},{pid:"nav.config"})}b.prototype=new d.ExplorerModel;b.prototype.getRoot=function(a){a(this.root)};b.prototype.processParent=
function(a,b){if(this.excludeFiles||this.excludeFolders){var c=[],d;for(d in b)if(!(b[d].Directory?this.excludeFolders:this.excludeFiles))c.push(b[d]),b[d].parent=a;b=c}else for(c in b)b[c].parent=a;a.children=b;a.children.sort(function(a,b){var c=a.Directory;if(c!==b.Directory)return c?-1:1;var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0});return b};b.prototype.getChildren=function(a,b){var c=this;a.children?b(a.children):a.Directory!==void 0&&a.Directory===
!1?b([]):a.Location?this.registry.getService("orion.page.progress").progress(this.fileClient.fetchChildren(a.ChildrenLocation),"Fetching children of "+a.Name).then(function(d){b(c.processParent(a,d))}):b([])};b.prototype.constructor=b;a.prototype=new d.Explorer;a.prototype._makeDropTarget=function(a,b,d){function h(a,b,d,e,f,i){b=b||"";if(a.isFile)d.Location.indexOf("/workspace")===0?e.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:g["You cannot copy files directly into the workspace.  Create a folder first."]}):
a.file(function(a){f(d,a,e,a.name.indexOf(".zip")===a.name.length-4&&window.confirm(c.formatMessage(g["Unzip ${0}?"],a.name)))});else if(a.isDirectory){var j=a.createReader(),k=function(c){j.readEntries(function(d){for(var g=0;g<d.length;g++)h(d[g],b+a.name+"/",c,e,f,i)})},l=e.registry.getService("orion.page.progress");d.Location.indexOf("/workspace")===0?l.progress(i.createProject(d.ChildrenLocation,a.name),"Initializing project "+a.name).then(function(a){e.loadResourceList(e.treeRoot.Path,!0);l.progress(i.read(a.ContentLocation,
!0),"Loading project info "+a.name).then(function(a){k(a)})}):l.progress(i.createFolder(d.Location,a.name),"Creating folder "+a.name).then(function(a){e.changedItem(d,!0);k(a)})}}if(this.dragAndDrop){var i=this,k=this.dragAndDrop,n=function(a){b.classList.remove("dragOver");a.preventDefault();a.stopPropagation()};if(d)this._oldDragLeave&&b.removeEventListener("dragleave",this._oldDragLeave,!1),this._oldDragLeave=n;b.addEventListener("dragleave",n,!1);n=function(a){if(a.dataTransfer.effectAllowed===
"all"||a.dataTransfer.effectAllowed==="uninitialized"||a.dataTransfer.effectAllowed.indexOf("copy")>=0)a.dataTransfer.dropEffect="copy";b.classList.add("dragOver");e.stop(a)};if(d)this._oldDragEnter&&b.removeEventListener("dragenter",this._oldDragEnter,!1),this._oldDragEnter=n;b.addEventListener("dragenter",n,!1);n=function(a){if(a.dataTransfer.effectAllowed==="all"||a.dataTransfer.effectAllowed==="uninitialized"||a.dataTransfer.effectAllowed.indexOf("copy")>=0)a.dataTransfer.dropEffect="copy";e.stop(a)};
if(d&&!this._oldDragOver)b.addEventListener("dragover",n,!1),this._oldDragOver=n;n=function(d){b.classList.remove("dragOver");if(d.dataTransfer.items&&d.dataTransfer.items.length>0)for(var l=0;l<d.dataTransfer.items.length;l++){var n=null;typeof d.dataTransfer.items[l].getAsEntry==="function"?n=d.dataTransfer.items[l].getAsEntry():typeof d.dataTransfer.items[l].webkitGetAsEntry==="function"&&(n=d.dataTransfer.items[l].webkitGetAsEntry());n&&h(n,null,a,i,k,i.fileClient)}else if(d.dataTransfer.files&&
d.dataTransfer.files.length>0)for(l=0;l<d.dataTransfer.files.length;l++)n=d.dataTransfer.files[l],!n.length&&(!n.type||n.type==="")?i.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:c.formatMessage(g["Did not drop ${0}.  Folder drop is not supported in this browser."],n.name)}):a.Location.indexOf("/workspace")===0?i.registry.getService("orion.page.message").setProgressResult({Severity:"Error",Message:g["You cannot copy files directly into the workspace.  Create a folder first."]}):
k(a,n,i,n.name.indexOf(".zip")===n.name.length-4&&window.confirm(c.formatMessage(g["Unzip ${0}?"],n.name)));e.stop(d)};if(d)this._oldDrop&&b.removeEventListener("drop",this._oldDrop,!1),this._oldDrop=n;b.addEventListener("drop",n,!1)}};a.prototype.changedItem=function(a,b){var c=this;this.registry.getService("orion.page.progress").progress(this.fileClient.fetchChildren(a.ChildrenLocation),"Fetching children of "+a.Name).then(function(d){d=c.model.processParent(a,d);c.getNavHandler();c.myTree.refresh.bind(c.myTree)(a,
d,b)})};a.prototype.isExpanded=function(a){return this.renderer.tableTree.isExpanded(this.model.getId(a))};a.prototype.getNameNode=function(a){if(a=this.model.getId(a))return e.node(a+"NameLink")};a.prototype.scopeUp=function(){if(this.treeRoot&&this.treeRoot.Parents)if(this.treeRoot.Parents.length===0)window.location.href="#";else if(this.treeRoot.Parents[0].ChildrenLocation)window.location.href="#"+this.treeRoot.Parents[0].ChildrenLocation};a.prototype.loadResourceList=function(a,b,c){a=h.makeRelative(a);
if(b||a!==this._lastPath){this._lastPath=a;var d=this;(b||a!==this.treeRoot.Path)&&this.load(this.fileClient.loadWorkspace(a),"Loading "+a,function(){d.treeRoot.Path=a;typeof c==="function"&&c()})}};a.prototype.load=function(a,c,d){var h=e.node(this.parentId),k=e.node("progress");if(!k)k=document.createElement("div"),k.id="progress",e.empty(h),h.appendChild(k);e.empty(k);var p=setTimeout(function(){e.empty(k);k.appendChild(document.createTextNode(c))},500),n=this;i.when(a,function(a){n.treeRoot={};
clearTimeout(p);for(var c in a)n.treeRoot[c]=a[c];n.model=new b(n.registry,n.treeRoot,n.fileClient,n.parentId,n.excludeFiles,n.excludeFolders);n.model.processParent(n.treeRoot,a.Children);if(n.dragAndDrop)n._hookedDrag?n._makeDropTarget(n.treeRoot,h,!0):(a=(a=h&&("draggable"in h||"ondragstart"in h&&"ondrop"in h))&&!(!window.File||!window.FileList||!window.FileReader),n._hookedDrag=!0,a?n._makeDropTarget(n.treeRoot,h,!0):(n.dragAndDrop=null,window.console.log("Local file drag and drop is not supported in this browser.")));
n.createTree(n.parentId,n.model,{setFocus:!0,selectionPolicy:n.renderer.selectionPolicy,onCollapse:function(a){if(n.getNavHandler())n.getNavHandler().onCollapse(a)}});if(typeof d==="function")try{d()}catch(e){n.registry&&n.registry.getService("orion.page.message").setErrorMessage(e)}if(typeof n.onchange==="function")n.onchange(n.treeRoot)},function(a){clearTimeout(p);if(a.status&&a.status!==401){try{a=JSON.parse(a.responseText)}catch(b){}e.empty(k);k.appendChild(document.createTextNode(g["Sorry, an error occurred: "]+
a.Message))}else n.registry.getService("orion.page.message").setProgressResult(a)})};a.prototype.onchange=function(){};a.prototype.constructor=a;return{FileExplorer:a,FileModel:b}});
define("orion/webui/dialogs/DirectoryPrompterDialog","i18n!orion/widgets/nls/messages,orion/webui/littlelib,orion/webui/dialog,orion/fileUtils,orion/selection,orion/explorers/navigationUtils,orion/explorers/explorer,orion/explorers/explorer-table".split(","),function(g,k,i,e,c,h,d,b){function a(a,b){this.explorer=b;this._init(a)}function f(a){this._init(a)}a.prototype=new d.SelectionRenderer;a.prototype.constructor=a;a.prototype.getLabelColumnIndex=function(){return 0};a.prototype.getCellElement=
function(a,b,c){a=document.createElement("td");c.appendChild(a);var d=document.createElement("span");d.id=c.id+"navSpan";a.appendChild(d);d.className="mainNavColumn singleNavColumn";this.getExpandImage(c,d);d.appendChild(document.createTextNode(b.Name))};f.prototype=new i.Dialog;f.prototype.TEMPLATE='<div id="message" style="width: 25em; padding-bottom: 5px;"></div><div id="directoryTree" class="explorerTreeClass" style="width:25em; min-height: 25em; max-height:30em; height: auto; overflow-y: auto;"></div>';
f.prototype._init=function(a){this.title=a.title||g["Choose a Folder"];this.modal=!0;this.buttons=[{text:g.OK,isDefault:!0,callback:this.done.bind(this)}];this.customFocus=!0;this._fileClient=a.fileClient;this._serviceRegistry=a.serviceRegistry;this._message=a.message||"";this._func=a.func;this._initialize()};f.prototype._bindToDom=function(){this.loadFolderList("/");this._message?this.$message.appendChild(document.createTextNode(this._message)):this.$message.style.display="none";this.$directoryTree.focus()};
f.prototype.loadFolderList=function(d){d=e.makeRelative(d);this.selection=new c.Selection(this._serviceRegistry,"orion.directoryPrompter.selection");this.explorer=new b.FileExplorer({treeRoot:{children:[]},selection:this.selection,serviceRegistry:this._serviceRegistry,fileClient:this._fileClient,parentId:"directoryTree",excludeFiles:!0,rendererFactory:function(b){return new a({checkbox:!1,singleSelection:!0,treeTableClass:"directoryPrompter"},b)}});this.explorer.loadResourceList(d,!0,null)};f.prototype.done=
function(){this.selection.getSelection(function(a){this.hide();this._func(a)}.bind(this))};f.prototype.constructor=f;return{DirectoryPrompterDialog:f}});define("text!orion/sites/templates/SiteEditor.html",[],function(){return'<div class="siteEditor">\n\t<div class="sectionTable" role="region">\n\t\t<div>\n\t\t\t<div class="sectionTableItem ">\n\t\t\t\t\n\t\t\t\t<form id="siteForm" class="siteForm">\n\t\t\t\t\t<table class="siteEditorTable">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<label class="siteConfigNameLabel">${Name:}</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input class="siteConfigName" required="required" pattern="\\s*\\S+\\s*" value="">\n\t\t\t\t\t\t\t\t<div class="nameInvalid">${Not a valid name}</div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<label class="hostHintLabel">${Hostname hint:}</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input class="hostHint" required="required" pattern="^(?:\\s*|[A-Za-z0-9-_]+)$" value="">\n\t\t\t\t\t\t\t\t<em>${Optional; used to determine the URL where a started site can be accessed.}</em>\n\t\t\t\t\t\t\t\t<div class="hostInvalid">${Not a valid hostname}</div>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<label class="hostingStatusLabel">${Status:}</label>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td class="hostingStatusArea">\n\t\t\t\t\t\t\t\t<span class="hostingStatus"></span>\n\t\t\t\t\t\t\t\t<span class="siteStartedWarning">\n\t\t\t\t\t\t\t\t\t<em>${Changes you make here won\'t affect the running site.}</em>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</form>\n\t\t\t\t\n\t\t\t\t\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<table class="siteEditorTable">\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<div class="mappingsGridTable"></div>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<div class="convertToolbar"></div>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t</table>\n\n</div>'});
define("text!orion/sites/templates/ConvertToSelfHostingDialog.html",[],function(){return'<div>\n\t<style>\n\t.form {\n\t\twidth: auto;\n\t\tlist-style-type: none; \n\t\tpadding: 0; \n\t\tmargin: 0;\n\t\t-webkit-padding-start: 0;\n\t\t-webkit-margin-before: 0;\n\t}\n\t.form li {\n\t\tmargin: 0;\n\t}\n\t.msg {\n\t\tclear: both;\n\t\twidth: 25em;\n\t}\n\t.pad1 { padding: 8px 0 0 0; }\n\t.pad2 { padding: 20px 0 0 0; }\n\t.field {\n\t\tfloat: left;\n\t\twidth: 6em;\n\t}\n\t.col { float: left; }\n\t.okButton {\n\t\tfloat: right;\n\t\tclear: both;\n\t}\n\t</style>\n\t<div>\n\t\t<ul class="form">\n\t\t\t<li class="msg">\n\t\t\t\t<div>${SelectRepoSourceFolder}</div>\n\t\t\t</li>\n\t\t\t<li class="pad1">\n\t\t\t\t<div class="col">\n\t\t\t\t\t<button class="browseButton commandButton" id="browseButton">${Browse...}</button>\n\t\t\t\t\t<span class="folderText" id="folderText"></span>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t\t<li class="msg pad2">\n\t\t\t\t<div>${EnterPortNumber}</div>\n\t\t\t</li>\n\t\t\t<li class="pad1">\n\t\t\t\t<input class="field port" id="port" type="number" />\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</div>'});
define("orion/sites/SiteEditor","i18n!orion/sites/nls/messages,orion/commands,orion/Deferred,orion/section,orion/objects,orion/sites/siteMappingsTable,orion/i18nUtil,orion/webui/littlelib,orion/EventTarget,orion/webui/dialogs/DirectoryPrompterDialog,orion/webui/dialog,text!orion/sites/templates/SiteEditor.html,text!orion/sites/templates/ConvertToSelfHostingDialog.html".split(","),function(g,k,i,e,c,h,d,b,a,f,j,l,m){var r=function(a){this.options=a=a||{};c.mixin(this,a);this._init(a)};r.prototype=
new j.Dialog;c.mixin(r.prototype,{DEFAULT_PORT:8080,TEMPLATE:m,_init:function(a){this.title=a.title||g["Convert to Self-Hosting"];this.buttons=[{text:g.OK,callback:this.okButtonClicked.bind(this)}];this.modal=!0;this.messages={};c.mixin(this.messages,g);this.messages.SelectRepoSourceFolder=d.formatMessage(g.SelectRepoSourceFolder,["org.eclipse.orion.client"]);this.messages.EnterPortNumber=d.formatMessage(g.EnterPortNumber,this.DEFAULT_PORT);this._initialize()},_bindToDom:function(){var a=this;this.$okButton=
this.$buttonContainer.firstChild;this.$okButton.classList.add("disabled");this.$browseButton.addEventListener("click",function(){var b=new f.DirectoryPrompterDialog({title:g["Choose Orion Source Folder"],serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:this.onFolderChosen.bind(this)});a._addChildDialog(b);b.show()}.bind(this));this.$port.addEventListener("change",function(){this.portNumber=parseInt(this.$port.value,10);this.updateValidity()}.bind(this));this.portNumber=this.$port.value=
this.DEFAULT_PORT;this.updateValidity()},onFolderChosen:function(a){this.folder=a;this.$folderText.textContent=a?a.Name:"";this.updateValidity()},isValid:function(){return this.folder&&!isNaN(this.portNumber)&&this.portNumber>0},updateValidity:function(){this.isValid()?this.$okButton.classList.remove("disabled"):this.$okButton.classList.add("disabled")},okButtonClicked:function(){this.isValid()&&(this.hide(),typeof this.options.func==="function"&&this.options.func(this.folder,this.portNumber))}});
var p="/",j=function(a,b){a=a||{};c.mixin(this,a);this.options=a;this.checkOptions(this.options,"serviceRegistry,fileClient,siteClient,commandService,statusService,progressService".split(","));this._fileClient=this.options.fileClient;this._siteClient=this.options.siteClient;this._commandService=this.options.commandService;this._statusService=this.options.statusService;this._progressService=this.options.progressService;this._commandsContainer=this.options.commandsContainer;this.options.location&&this.load(this.options.location);
this.node=b||document.createElement("div")};a.attach(j.prototype);c.mixin(j.prototype,{_siteConfiguration:null,_modelListeners:null,mappings:null,_mappingProposals:null,_isSelfHostingSite:!1,_isDirty:!1,_autoSaveTimer:null,show:function(){this.createElements();this.postCreate()},createElements:function(){this.node.innerHTML=l;b.processTextNodes(this.node,g);this.siteForm=b.$(".siteForm",this.node);this.name=b.$(".siteConfigName",this.node);this.name.id=this.id+"_name";this.nameInvalid=b.$(".nameInvalid",
this.node);this.hostHint=b.$(".hostHint",this.node);this.hostHint.id=this.id+"_hostHint";this.hostInvalid=b.$(".hostInvalid",this.node);this.hostingStatus=b.$(".hostingStatus",this.node);this.siteStartedWarning=b.$(".siteStartedWarning",this.node);this.mappingsPlaceholder=b.$(".mappingsGridTable");this.mappingsPlaceholder.id=this.id+"_mappingsPlaceholder";this.convertToolbar=b.$(".convertToolbar");this.convertToolbar.id=this.id+"_convertToolbar";b.$(".siteConfigNameLabel",this.node).htmlFor=name.id;
b.$(".hostHintLabel",this.node).htmlFor=this.hostHint.id},postCreate:function(){var a=this;this.name.addEventListener("input",function(){a.name.checkValidity()?(a.name.classList.remove("invalid"),a.nameInvalid.classList.remove("visible")):(a.name.classList.add("invalid"),a.nameInvalid.classList.add("visible"))});this.hostHint.addEventListener("change",function(){a.hostHint.checkValidity()?(a.hostHint.classList.remove("invalid"),a.hostInvalid.classList.remove("visible")):(a.hostHint.classList.add("invalid"),
a.hostInvalid.classList.add("visible"))});var b=this;i.when(this.siteClient._canSelfHost(),function(a){var c=new k.Command({name:g["Convert to Self-Hosting"],tooltip:g["Enable the site configuration to launch an Orion server running your local client code"],imageClass:"core-sprite-add",id:"orion.site.convert",visibleWhen:function(c){return!!c.Location&&a&&!b._isSelfHostingSite},callback:b.convertToSelfHostedSite.bind(b)});b._commandService.addCommand(c)});this._autoSaveTimer=setTimeout(this.autoSave.bind(this),
8E3)},checkOptions:function(a,b){for(var c=0;c<b.length;c++)if(typeof a[b[c]]==="undefined")throw Error("options."+b[c]+" is required");},_makeAddMenuChoices:function(a,b){function c(a){if(!d.getSiteConfiguration().Mappings.some(function(a){return a.Source===p}))a.Source=p;d.mappings.addMapping(a)}var b=Array.isArray(b)?b[0]:b,a=a.sort(function(a,b){return a.FriendlyPath.toLowerCase().localeCompare(b.FriendlyPath.toLowerCase())}),d=this,e=function(){c(this.mapping)},h=a.map(function(a){return{name:a.FriendlyPath,
imageClass:"core-sprite-folder",mapping:a,callback:e}});a.length>0&&h.push({});h.push({name:g["Choose folder..."],imageClass:"core-sprite-folder",callback:function(){(new f.DirectoryPrompterDialog({serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,func:function(a){a&&this._siteClient.getMappingObject(this.getSiteConfiguration(),a.Location,a.Name).then(function(a){e.call({mapping:a})})}.bind(this)})).show()}.bind(this)});h.push({name:"URL",imageClass:"core-sprite-link",callback:function(){c({Source:"/web/somePath",
Target:"http://",FriendlyPath:"http://"})}});return h},convertToSelfHostedSite:function(){var a=this;(new r({serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,siteClient:this._siteClient,func:function(b,c){a._siteClient.convertToSelfHosting(a.getSiteConfiguration(),b.Location,c).then(function(b){a.mappings.deleteAllMappings();a.mappings.addMappings(b.Mappings);a.save()})}})).show()},load:function(a){var b=new i;this._busyWhile(b,"Loading...");this._siteClient.loadSiteConfiguration(a).then(function(a){this._setSiteConfiguration(a);
this.setDirty(!1);b.resolve(a)}.bind(this),function(a){b.reject(a)});return b},_setSiteConfiguration:function(a){this._detachListeners();this._siteConfiguration=a;if(!this._mappingProposals)this._mappingProposals=this._siteClient.getMappingProposals(a).then(function(a){this._commandService.addCommand(new k.Command({name:g.Add,tooltip:g["Add a directory mapping to the site configuration"],imageClass:"core-sprite-add",id:"orion.site.mappings.add",visibleWhen:function(){return!0},choiceCallback:this._makeAddMenuChoices.bind(this,
a)}));a=this.titleWrapper.actionsNode;this._commandService.registerCommandContribution(a.id,"orion.site.mappings.add",1);this._commandService.renderCommands(a.id,a,this.mappings,this,"button")}.bind(this));this._refreshCommands();this._refreshFields()},setDirty:function(a){this._isDirty=a;this.dispatchEvent({type:"dirty",value:a})},isDirty:function(){return this._isDirty},_refreshCommands:function(){function a(b){c._onError(b)}function b(a){c._setSiteConfiguration(a);c.setDirty(!1)}var c=this;this._siteClient.isSelfHostingSite(this.getSiteConfiguration()).then(function(d){c._isSelfHostingSite=
d;c._commandService.destroy(c._commandsContainer);c._commandService.renderCommands(c._commandsContainer.id,c._commandsContainer,c._siteConfiguration,{},"button",{site:c._siteConfiguration,startCallback:b,stopCallback:b,errorCallback:a})})},_refreshFields:function(){this.name.setAttribute("value",this._siteConfiguration.Name);this.hostHint.setAttribute("value",this._siteConfiguration.HostHint);this.mappings?this.mappings._setSiteConfiguration(this._siteConfiguration):(this.titleWrapper=new e.Section(document.getElementById(this.mappingsPlaceholder.id),
{id:"workingDirectorySection",title:"Mappings",content:'<div id="mappingsNode"/>',canHide:!0}),this.mappings=new h.MappingsTable({serviceRegistry:this.serviceRegistry,siteClient:this._siteClient,fileClient:this._fileClient,selection:null,parentId:"mappingsNode",siteConfiguration:this._siteConfiguration}));var a=this._siteConfiguration.HostingStatus;if(a&&a.Status==="started"){this.siteStartedWarning.style.display="block";this.hostingStatus.textContent=g["Started at "];var b=document.createElement("a");
b.href=a.URL;b.target="_new";this.hostingStatus.appendChild(b);b.textContent=a.URL}else if(a&&a.Status==="stopped")this.siteStartedWarning.style.display="none",this.hostingStatus.textContent=g.Stopped;setTimeout(function(){this._attachListeners(this._siteConfiguration)}.bind(this),0)},_attachListeners:function(a){function b(d,e){function f(){var b=d.value,g=a[e];a[e]=b;c.setDirty(g!==b||c.isDirty())}d.addEventListener("input",f);c._modelListeners.push({target:d,type:"input",listener:f})}this._detachListeners();
this._modelListeners=this._modelListeners||[];var c=this;b(this.name,g.Name);b(this.hostHint,g.HostHint);var d=function(a){c.setDirty(a.value)};this.mappings.addEventListener("dirty",d);this._modelListeners.push({target:this.mappings,type:"dirty",listener:d})},_detachListeners:function(){if(this._modelListeners){for(var a=0;a<this._modelListeners.length;a++){var b=this._modelListeners[a];b.target.removeEventListener(b.type,b.listener)}this._modelListeners.splice(0)}},getSiteConfiguration:function(){return this._siteConfiguration},
getResource:function(){return this._siteConfiguration&&this._siteConfiguration.Location},save:function(a){var a=typeof a==="undefined"?!0:a,b=this._siteConfiguration,c=b.HostingStatus;delete b.HostingStatus;var d=this;this._busyWhile(this._siteClient.updateSiteConfiguration(b.Location,b).then(function(e){d.setDirty(!1);return a?(d._setSiteConfiguration(e),e):(b.HostingStatus=c,d._refreshCommands(),b)}));return!0},autoSave:function(){this.isDirty()&&this.save(!1);setTimeout(this.autoSave.bind(this),
8E3)},_busyWhile:function(a,b){a.then(this._onSuccess.bind(this),this._onError.bind(this));this.progressService.showWhile(a,b)},_onSuccess:function(a){this.onSuccess(a)},_onError:function(a){this._statusService.setErrorMessage(a);this.onError(a)},onSuccess:function(a){this.dispatchEvent({type:"success",deferred:a})},onError:function(a){this.dispatchEvent({type:"error",deferred:a})}});return j});
define("sites/site","i18n!orion/sites/nls/messages,orion/bootstrap,orion/status,orion/progress,orion/commands,orion/fileClient,orion/operationsClient,orion/searchClient,orion/dialogs,orion/globalCommands,orion/sites/siteClient,orion/sites/siteCommands,orion/PageUtil,orion/sites/SiteEditor".split(","),function(g,k,i,e,c,h,d,b,a,f,j,l,m,r){k.startup().then(function(h){var k=h.serviceRegistry,o=h.preferences;new a.DialogService(k);var q=new d.OperationsClient(k),h=new i.StatusReportingService(k,q,"statusPane",
"notifications","notificationArea"),q=new e.ProgressService(k,q),u=new c.CommandService({serviceRegistry:k}),s=m.matchResourceParameters().resource,s=j.forLocation(k,s),w=s._getFileClient(),x=new b.Searcher({serviceRegistry:k,commandService:u,fileService:w});f.generateBanner("orion-site",k,u,o,x);var t,v=function(){var a=t&&t.getSiteConfiguration();if(t&&a){var b={Parents:[]};b.Name=a.Name;b.Parents[0]={};b.Parents[0].Name="Sites";b.Parents[0].Location="";f.setPageTarget({task:"Edit Site",target:a,
breadcrumbTarget:b,makeBreadcrumbLink:function(a){a.href="/sites/sites.html"},serviceRegistry:k,searchService:x,fileService:w,commandService:u});f.setDirtyIndicator(t.isDirty())}},o=function(){var a=m.matchResourceParameters().resource;a&&a!==t.getResource()&&(!t.isDirty()||confirm(g["There are unsaved changes. Do you still want to navigate away?"]))&&t.load(a).then(function(){v()})};window.addEventListener("hashchange",o);t=new r({serviceRegistry:k,fileClient:w,siteClient:s,commandService:u,statusService:h,
progressService:q,commandsContainer:document.getElementById("pageActions"),id:"site-editor"});document.getElementById("site").appendChild(t.node);t.show();t.addEventListener("success",v);t.addEventListener("dirty",v);o();window.onbeforeunload=function(){if(t.isDirty())return g["There are unsaved changes."]};l.createSiteCommands(k);u.registerCommandContribution("pageActions","orion.site.start",1);u.registerCommandContribution("pageActions","orion.site.stop",2);u.registerCommandContribution("pageActions",
"orion.site.convert",3)})});