/**
 * @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 RequireJS domReady 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). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010-2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/**
 * @license RequireJS text 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) 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) 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). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (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, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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: 
 *		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) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 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) 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) 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, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: 
 *		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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: 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: 
 *		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: 
 *		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: 
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation
 *		Silenio Quarti (IBM Corporation) - initial API and implementation
 *		Mihai Sucan (Mozilla Foundation) - fix for Bug#334583 Bug#348471 Bug#349485 Bug#350595 Bug#360726 Bug#361180 Bug#362835 Bug#362428 Bug#362286 Bug#354270 Bug#361474 Bug#363945 Bug#366312 Bug#370584
 ******************************************************************************/
/*******************************************************************************
 * @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) 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) 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) 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
 *               Alex Lakatos - fix for bug#369781
 ******************************************************************************/
/******************************************************************************* 
 * @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: 
 *		Anton McConville (IBM Corporation) - initial API and implementation
 *		Felipe Heidrich (IBM Corporation) - initial API and implementation 
 ******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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) 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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/******************************************************************************* 
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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) 2011,2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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) 2009, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors: IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
/*******************************************************************************
 * @license
 * Copyright (c) 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) 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) 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) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.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
 ******************************************************************************/
/******************************************************************************* 
 * @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
 ******************************************************************************/
/*

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

 Contributors: IBM Corporation - initial API and implementation

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


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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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


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

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


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

 Contributors:
 IBM Corporation - initial API and implementation

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


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


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

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

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


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


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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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


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

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

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

 Contributors: 
 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: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 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: 
 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: 
 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: 
 Felipe Heidrich (IBM Corporation) - initial API and implementation
 Silenio Quarti (IBM Corporation) - initial API and implementation
 Mihai Sucan (Mozilla Foundation) - fix for Bug#334583 Bug#348471 Bug#349485 Bug#350595 Bug#360726 Bug#361180 Bug#362835 Bug#362428 Bug#362286 Bug#354270 Bug#361474 Bug#363945 Bug#366312 Bug#370584

 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) 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) 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) 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
 Alex Lakatos - fix for bug#369781

 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: 
 Anton McConville (IBM Corporation) - initial API and implementation
 Felipe Heidrich (IBM Corporation) - initial API and implementation 

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - _initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation
 RequireJS i18n 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

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.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 b(a,b,c,g,j,d){b[a]&&(c.push(a),(b[a]===!0||b[a]===1)&&g.push(j+a+"/"+d))}function d(a,b,c,g,j){b=g+b+"/"+j;require._fileExists(a.toUrl(b))&&c.push(b)}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,c={};define("i18n",{version:"1.0.0",load:function(f,e,h,g){var g=g||{},j=a.exec(f),k=j[1],l=j[4],m=j[5],n=l.split("-"),o=[],q={},p,r,s="";j[5]?(k=j[1],f=k+m):(m=j[4],l=g.locale||(g.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
n=l.split("-"));if(g.isBuild){o.push(f);d(e,"root",o,k,m);for(p=0;r=n[p];p++)s+=(s?"-":"")+r,d(e,s,o,k,m);e(o,function(){h()})}else e([f],function(a){var f=[];b("root",a,f,o,k,m);for(p=0;r=n[p];p++)s+=(s?"-":"")+r,b(s,a,f,o,k,m);e(o,function(){var b,j;for(b=f.length-1;b>-1&&(r=f[b]);b--){j=a[r];if(j===!0||j===1)j=e(k+r+"/"+m);var g=q,d=void 0;for(d in j)!(d in c)&&!(d in g)&&(g[d]=j[d])}h(q)})})}})})();
define("orion/i18n",[],function(){return{load:function(b,d,a,c){var c=c||{},f=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,e=f.exec(b);if(e)if(d.defined(b))a(d(b));else if(c.isBuild||c.isTest)a({});else{var h=e[1],g=e[3]?e[2]:"",j=e[3]||e[2];d(["orion/bootstrap"],function(k){k.startup().then(function(k){var m=k.serviceRegistry,k=m.getServiceReferences("orion.i18n.message");if(g)k.some(function(c){return b===c.getProperty("name")?(m.getService(c).getMessageBundle().then(function(b){a(b)},function(){a({})}),
!0):!1})||a({});else{var n={},o;k.forEach(function(a){var b=a.getProperty("name");if((e=f.exec(b))&&h===e[1]&&j===(e[3]||e[2]))if(g=e[3]?e[2]:""){if((a=c.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&a.indexOf(g)===0)n[g]=!0,d.specified(b)||define(b,["orion/i18n!"+b],function(a){return a})}else o=a});d.specified(b)?a(n):o?m.getService(o).getMessageBundle().then(function(c){Object.keys(n).forEach(function(a){typeof c[a]==="undefined"&&(c[a]=n[a])});define(b,
[],c);a(c)},function(){define(b,[],n);a(n)}):(define(b,[],n),a(n))}})})}else a(null)}}});define("git/nls/gitmessages",["orion/i18n!git/nls/gitmessages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
define("git/nls/root/gitmessages",{Compare:"Compare","View the side-by-side compare":"View the side-by-side compare","Working Directory Version":"Working Directory Version","Working Directory":"Working Directory","View the working directory version of the file":"View the working directory version of the file","Loading...":"Loading...",Repositories:"Repositories","0 on 1 - Git":"${0} on ${1} - Git",Git:"Git","Show in eclipse.org":"Show in eclipse.org","Show this repository at eclipse.org":"Show this repository at eclipse.org",
"Show in GitHub":"Show in GitHub","Show this repository in GitHub":"Show this repository in GitHub","Commit Details":"Commit Details","No Commits":"No Commits","commit: 0":"commit: ${0}","parent: 0":"parent: ${0}","authored by 0 (1) on 2":"authored by ${0} (${1}) on ${2}","committed by 0 (1)":"committed by ${0} (${1})","Tags:":"Tags:","No Tags":"No Tags",Diffs:"Changes",More:"More","Loading git log...":"Loading git log...",local:"local",remote:"remote","Git Log for ${0} branch ${1} on ":"Git Log for ${0} branch ${1} on ",
"Git Log for ${0} branch ${1}":"Git Log for ${0} branch ${1}","Log for branch ${0} - Git":"Log for branch ${0} - Git","Log for ${0} on ${1} - Git":"Log for ${0} on ${1} - Git","View All":"View All","Error ${0}: ":"Error ${0}: ","Loading ":"Loading ",Message:"Message",Author:"Author",Date:"Date",Actions:"Actions",Branches:"Branches",Tags:"Tags",Stage:"Stage","Unstaged removal":"Unstaged removal",Unstage:"Unstage","Staged removal":"Staged removal","Unstaged change":"Unstaged change","Staged change":"Staged change",
"Unstaged add":"Unstaged add","Staged add":"Staged add","Resolve Conflict":"Resolve Conflict",Conflicting:"Conflicting","Commit message":"Commit message","Record changes in the active branch":"Record changes in the active branch",Commit:"Commit","Amend last commit":"Amend last commit"," Amend":" Amend","Rebase in progress. Choose action:":"Rebase in progress. Choose action:","Committer name:":"Committer name:","email:":"email:","Author name: ":"Author name: ","Select a file on the left to compare...":"Select a file on the left to compare...",
Unstaged:"Unstaged",Staged:"Staged","Recent commits on":"Recent commits on","Git Status":"Git Status","Go to Git Status":"Go to Git Status","Recent commits on ${0}":"Recent commits on ${0}","Status for ${0} - Git":"Status for ${0} - Git","Status (${0})":"Status (${0})","Getting git incoming changes...":"Getting git incoming changes...","Loading recent commits...":"Loading recent commits...","Show the side-by-side compare":"Show the side-by-side compare","Change Committer or Author":"Change Committer or Author",
"Use Default Committer and Author":"Use Default Committer and Author",Checkout:"Checkout","Checkout the file, discarding the unstaged change":"Checkout the file, discarding the unstaged change","Your changes to the file will be lost. Are you sure you want to checkout?":"Your changes to the file will be lost. Are you sure you want to checkout?","Checking out...":"Checking out...","Stage the change":"Stage the change","Stage the selected changes":"Stage the selected changes","Staging...":"Staging...",
"Checkout all the selected files, discarding all changes":"Checkout all the selected files, discarding all changes","Your changes to all the selected files will be lost. Are you sure you want to checkout?":"Your changes to all the selected files will be lost. Are you sure you want to checkout?","Save Patch":"Save Patch","Save workspace changes as a patch":"Save workspace changes as a patch","Unstage the change":"Unstage the change","Unstaging...":"Unstaging...",Reset:"Reset","Reset the branch, discarding all staged and unstaged changes":"Reset the branch, discarding all staged and unstaged changes",
"All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered.":"All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered.","Are you sure you want to continue?":"Are you sure you want to continue?","Resetting local changes...":"Resetting local changes...","Continue rebase...":"Continue rebase...","Skipping patch...":"Skipping patch...","Aborting rebase...":"Aborting rebase...","Complete log":"Complete log",
"local VS index":"local VS index","index VS HEAD":"index VS HEAD","Compare(${0} : ${1})":"Compare(${0} : ${1})","Loading status...":"Loading status...","Committing...":"Committing...","The committer name is required.":"The committer name is required.","The committer mail is required.":"The committer mail is required.","The author name is required.":"The author name is required.","The author mail is required.":"The author mail is required.",". Repository still contains conflicts.":". Repository still contains conflicts.",
". Repository contains unmerged paths. Resolve conflicts first.":". Repository contains unmerged paths. Resolve conflicts first.","Rendering ${0}":"Rendering ${0}",Configuration:"Configuration"," - Git":" - Git","Repositories - Git":"Repositories - Git",Repository:"Repository","Repository Not Found":"Repository Not Found","No Repositories":"No Repositories","Loading repository":"Loading repository","Loading repositories":"Loading repositories","(no remote)":"(no remote)","location: ":"location: ",
"${0} file(s) to stage and ${1} file(s) to commit.":"${0} file(s) to stage and ${1} file(s) to commit.","Nothing to commit.":"Nothing to commit.","Nothing to push.":"Nothing to push."," commit(s) to push.":" commit(s) to push.","You have no changes to commit.":"You have no changes to commit.","You have changes to commit in your workspace!":"You have changes to commit in your workspace!","View all local and remote tracking branches":"View all local and remote tracking branches","tracks no branch, ":"tracks no branch, ",
"tracks ${0}, ":"tracks ${0}, ","last modified ${0} by ${1}":"last modified ${0} by ${1}","No Remote Branches":"No Remote Branches","Rendering branches":"Rendering branches",Commits:"Commits","Getting current branch":"Getting current branch","See Full Log":"See Full Log","See the full log":"See the full log",'Getting commits for "${0}" branch':'Getting commits for "${0}" branch',"Rendering commits":"Rendering commits","Getting outgoing commits":"Getting outgoing commits","The branch is up to date.":"The branch is up to date.",
"You have no outgoing or incoming commits.":"You have no outgoing or incoming commits.",") by ":") by "," (SHA ":" (SHA ","Getting tags":"Getting tags","View all tags":"View all tags"," on ":" on "," by ":" by ",Remotes:"Remotes","Rendering remotes":"Rendering remotes","No Remotes":"No Remotes","Getting confituration":"Getting confituration","View all configuration entries":"View all configuration entries","Unstaged addition":"Unstaged addition","Staged addition":"Staged addition"," (Rebase in Progress)":" (Rebase in Progress)",
Status:"Status","Status for ${0} - Git ":"Status for ${0} - Git ","No Unstaged Changes":"No Unstaged Changes","No Staged Changes":"No Staged Changes",'Commits for "${0}" branch':'Commits for "${0}" branch',"Add Remote":"Add Remote","Remote Name:":"Remote Name:","Remote URI:":"Remote URI:","Apply Patch":"Apply Patch","Git Repository":"Git Repository","Go to the git repository":"Go to the git repository","Clone Git Repository":"Clone Git Repository","Repository URL:":"Repository URL:","Existing directory:":"Existing directory:",
"New folder:":"New folder:","Choose a Folder":"Choose a Folder","Commit Changes":"Commit Changes","Message:":"Message:","Amend:":"Amend:","Committer Name:":"Committer Name:","Committer Email:":"Committer Email:","Author Name:":"Author Name:","Author Email:":"Author Email:","The commit message is required.":"The commit message is required.","Git Credentials":"Git Credentials","Username:":"Username:","Ssh password:":"Ssh password:","Private key:":"Private key:","Passphrase (optional):":"Passphrase (optional):",
" commit: ":" commit: ","parent: ":"parent: ","branches: ":"branches: ","tags: ":"tags: "," authored by ${0} {${1}) on ${2}":" authored by ${0} {${1}) on ${2}",Content:"Content","Go to ${0} section":"Go to ${0} section","Find Commit":"Find Commit","Type the commit name (sha1):":"Type the commit name (sha1):",Search:"Search","Searching&#x2026;":"Searching&#x2026;","Looking for the commit":"Looking for the commit"," authored by ${0} (${1})) on ${2}":" authored by ${0} (${1})) on ${2}","New Branch:":"New Branch:",
OK:"OK"," [New branch]":" [New branch]","Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}.":"Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}.","Link Repository":"Link Repository","Folder name:":"Folder name:","Repository was linked to ":"Repository was linked to ","Checkout the current tag, creating a local branch based on its contents.":"Checkout the current tag, creating a local branch based on its contents.","Checking out tag ${0}":"Checking out tag ${0}",
"Checkout the branch or corresponding local branch and make it active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first.":"Checkout the branch or corresponding local branch and make it active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first.","Checking out branch...":"Checking out branch...","Checking out branch ${0}...":"Checking out branch ${0}...","Branch checked out.":"Branch checked out.",
"New Branch":"New Branch","Add a new local branch to the repository":"Add a new local branch to the repository","Branch name":"Branch name",Delete:"Delete","Delete the local branch from the repository":"Delete the local branch from the repository","Are you sure you want to delete branch ${0}?":"Are you sure you want to delete branch ${0}?","Delete the remote tracking branch from the repository":"Delete the remote tracking branch from the repository","Are you sure?":"Are you sure?","You're going to delete remote branch ${0} and push the change.":"You're going to delete remote branch ${0} and push the change.",
"Removing remote branch: ":"Removing remote branch: ","Delete Remote Branch":"Delete Remote Branch","New Remote":"New Remote","Git Remote":"Git Remote","Go to Git Remote":"Go to Git Remote","Add a new remote to the repository":"Add a new remote to the repository","Delete the remote from the repository":"Delete the remote from the repository","Are you sure you want to delete remote ${0}?":"Are you sure you want to delete remote ${0}?",Pull:"Pull","Pull from the repository":"Pull from the repository",
"Pulling : ":"Pulling : ","Pull Git Repository":"Pull Git Repository","Git Log":"Git Log","Go to Git Log":"Go to Git Log","Open the log for the branch":"Open the log for the branch","Open the log for the repository":"Open the log for the repository","Open the status for the repository":"Open the status for the repository","Show in Navigator":"Show in Navigator","Show the repository folder in the file navigator":"Show the repository folder in the file navigator","Compare With Each Other":"Compare With Each Other",
"Compare With Working Tree":"Compare With Working Tree",Open:"Open",Fetch:"Fetch","Fetch from the remote":"Fetch from the remote","SSH Password:":"SSH Password:","SSH User Name:":"SSH User Name:","Fetching remote: ":"Fetching remote: ","Force Fetch":"Force Fetch","Fetch from the remote branch into your remote tracking branch overriding its current content":"Fetch from the remote branch into your remote tracking branch overriding its current content","You're going to override content of the remote tracking branch. This can cause the branch to lose commits.":"You're going to override content of the remote tracking branch. This can cause the branch to lose commits.",
Merge:"Merge","Merge the content from the branch to your active branch":"Merge the content from the branch to your active branch",". Go to ${0}.":". Go to ${0}.","Git Status page":"Git Status page",Rebase:"Rebase","Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch ":"Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch ",
"Rebase on top of ":"Rebase on top of ",". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing":". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing",". Repository state is invalid (i.e. already during rebasing)":". Repository state is invalid (i.e. already during rebasing)",". Repository contains unmerged paths":". Repository contains unmerged paths",". Repository contains pending changes. Please commit or stash them":". Repository contains pending changes. Please commit or stash them",
"Rebase your commits by removing them from the active branch, ":"Rebase your commits by removing them from the active branch, ","starting the active branch again based on the latest state of '":"starting the active branch again based on the latest state of '","and applying each commit again to the updated active branch.":"and applying each commit again to the updated active branch.","Push All":"Push All","Push commits and tags from your local branch into the remote branch":"Push commits and tags from your local branch into the remote branch",
"Pushing remote: ":"Pushing remote: ","Choose Branch":"Choose Branch","Force Push All":"Force Push All","Push commits and tags from your local branch into the remote branch overriding its current content":"Push commits and tags from your local branch into the remote branch overriding its current content","You're going to override content of the remote branch. This can cause the remote repository to lose commits.":"You're going to override content of the remote branch. This can cause the remote repository to lose commits.",
"< Previous Page":"< Previous Page","Show previous page of git log":"Show previous page of git log","Show previous page of git tags":"Show previous page of git tags","Next Page >":"Next Page >","Show next page of git log":"Show next page of git log","Show next page of git tags":"Show next page of git tags","Push from your local branch into the selected remote branch":"Push from your local branch into the selected remote branch","Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.":"Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes.",
"The content of your active branch will be replaced with ":"The content of your active branch will be replaced with ","All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?":"All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?","Resetting index...":"Resetting index...","Name:":"Name:",Tag:"Tag","Create a tag for the commit":"Create a tag for the commit","Tag name":"Tag name","Delete the tag from the repository":"Delete the tag from the repository",
"Are you sure you want to delete tag ${0}?":"Are you sure you want to delete tag ${0}?","Cherry-Pick":"Cherry-Pick","Apply the change introduced by the commit to your active branch":"Apply the change introduced by the commit to your active branch","Nothing changed.":"Nothing changed.",". Some conflicts occurred":". Some conflicts occurred","Fetch from the remote branch into your remote tracking branch":"Fetch from the remote branch into your remote tracking branch","Fetch Git Repository":"Fetch Git Repository",
Push:"Push","Push from your local branch into the remote branch":"Push from your local branch into the remote branch","Push Git Repository":"Push Git Repository","Key:":"Key:","Value:":"Value:","New Configuration Entry":"New Configuration Entry",Edit:"Edit","Edit the configuration entry":"Edit the configuration entry","Delete the configuration entry":"Delete the configuration entry","Are you sure you want to delete ${0}?":"Are you sure you want to delete ${0}?","Clone Repository":"Clone Repository",
"Clone an existing Git repository to a folder":"Clone an existing Git repository to a folder","Cloning repository: ":"Cloning repository: ","Init Repository":"Init Repository","Create a new Git repository in a new folder":"Create a new Git repository in a new folder","Initializing repository: ":"Initializing repository: ","Init Git Repository":"Init Git Repository","Delete the repository":"Delete the repository","Are you sure you want do delete ${0} repositories?":"Are you sure you want do delete ${0} repositories?",
"Apply a patch on the selected repository":"Apply a patch on the selected repository","Show content":"Show content","Commit name:":"Commit name:","Open Commit":"Open Commit","Open the commit with the given name":"Open the commit with the given name","No commits found":"No commits found","Staging changes":"Staging changes","Commit message:":"Commit message:","Committing changes":"Committing changes","Resetting local changes":"Resetting local changes","Checkout files, discarding all changes":"Checkout files, discarding all changes",
"Show Patch":"Show Patch","Show workspace changes as a patch":"Show workspace changes as a patch",Continue:"Continue","Contibue Rebase":"Contibue Rebase","Skip Patch":"Skip Patch",Abort:"Abort","Abort Rebase":"Abort Rebase","Your changes to the selected files will be discarded and cannot be recovered.":"Your changes to the selected files will be discarded and cannot be recovered.","Active Branch Log":"Git Log (Active Branch)","Show the log for the active local branch":"Show the log for the active local branch",
"Remote Branch Log":"Git Log (Remote Branch)","Show the log for the corresponding remote tracking branch":"Show the log for the corresponding remote tracking branch","See Full Status":"See Full Status","See the status":"See the status","Choose target location":"Choose target location","Default target location":"Default target location","Change...":"Change...","Merge Squash":"Merge Squash","Squash the content of the branch to the index":"Squash the content of the branch to the index","Local Branch Name:":"Local Branch Name:",
"Filter items":"Filter items","Filter remote branches":"Filter remote branches","Paste link in email or IM":"Paste link in email or IM","Show Commit in GitHub":"Show Commit in GitHub","Show Repository in GitHub":"Show Repository in GitHub","Show this commit in GitHub":"Show this commit in GitHub","Show Commit in eclipse.org":"Show Commit in eclipse.org","Show this commit in eclipse.org":"Show this commit in eclipse.org","Show Repository in eclipse.org":"Show Repository in eclipse.org","Show this repository in eclipse.org":"Show this repository in eclipse.org",
"Ask for review":"Ask for review","Ask for review tooltip":"Send email with request for commit review","Reviewer name":"Reviewer name","Contribution Review Request":"Contribution Review Request","Send the link to the reviewer":"Send the link to the reviewer","Private key file (optional):":"Private key file (optional):","Don't prompt me again:":"Don't prompt me again:","Your private key will be saved in the browser for further use":"Your private key will be saved in the browser for further use","Loading Contribution Review Request...":"Loading Contribution Review Request...",
"The commit can be found in the following repositories":"The commit can be found in the following repositories","Try to update your repositories":"Try to update your repositories","Create new repository":"Create new repository","Attach the remote to one of your existing repositories":"Attach the remote to one of your existing repositories","You are reviewing contribution ${0} from ${1}":"You are reviewing contribution ${0} from ${1}","Unfortunately the commit can not be found in your workspace. To see it try one of the following: ":"Unfortunately the commit can not be found in your workspace. To see it try one of the following: ",
"To review the commit you can also:":"To review the commit you can also:","Contribution Review Request for ${0} on ${1}":"Contribution Review Request for ${0} on ${1}","Failing paths: ${0}":"Failing paths: ${0}"});
(function(){function b(a,b,f){(function(){if(typeof this.loadFirebugConsole=="function")this.loadFirebugConsole();else{this.console=this.console||{};for(var e="assert,count,debug,dir,dirxml,error,group,groupEnd,info,profile,profileEnd,time,timeEnd,trace,warn,log".split(","),h=0,g;g=e[h++];)console[g]||function(){var a=g+"";console[a]="log"in console?function(){var b=Array.apply({},arguments);b.unshift(a+":");console.log(b.join(" "))}:function(){};console[a]._fake=!0}()}typeof a=="undefined"&&(a={_scopeName:"dojo",
_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}});var j=a;typeof b=="undefined"&&(b={_scopeName:"dijit"});typeof f=="undefined"&&(f={_scopeName:"dojox"});if(!j._scopeArgs)j._scopeArgs=[a,b,f];j.global=this;j.config={isDebug:!1,debugAtAllCosts:!1};if(e=typeof djConfig!="undefined"?djConfig:typeof dojoConfig!="undefined"?dojoConfig:null)for(var d in e)j.config[d]=e[d];a.locale=j.config.locale;d="$Rev: 24595 $".match(/\d+/);a.version={major:1,minor:6,patch:1,flag:"",
revision:d?+d[0]:NaN,toString:function(){with(j.version)return major+"."+minor+"."+patch+flag+" ("+revision+")"}};typeof OpenAjax!="undefined"&&OpenAjax.hub.registerLibrary(a._scopeName,"http://dojotoolkit.org",j.version.toString());var l,m,n={};for(h in{toString:1}){l=[];break}a._extraNames=l=l||"hasOwnProperty,valueOf,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,constructor".split(",");m=l.length;a._mixin=function(a,b){var c,f,e;for(c in b)if(f=b[c],!(c in a)||a[c]!==f&&(!(c in n)||
n[c]!==f))a[c]=f;if(m&&b)for(e=0;e<m;++e)if(c=l[e],f=b[c],!(c in a)||a[c]!==f&&(!(c in n)||n[c]!==f))a[c]=f;return a};a.mixin=function(a,b){a||(a={});for(var c=1,f=arguments.length;c<f;c++)j._mixin(a,arguments[c]);return a};a._getProp=function(a,b,c){for(var c=c||j.global,f=0,e;c&&(e=a[f]);f++)f==0&&j._scopeMap[e]&&(e=j._scopeMap[e]),c=e in c?c[e]:b?c[e]={}:void 0;return c};a.setObject=function(a,b,c){var f=a.split("."),a=f.pop();return(c=j._getProp(f,!0,c))&&a?c[a]=b:void 0};a.getObject=function(a,
b,c){return j._getProp(a.split("."),b,c)};a.exists=function(a,b){return j.getObject(a,!1,b)!==void 0};a.eval=function(a){return j.global.eval?j.global.eval(a):eval(a)};j.deprecated=j.experimental=function(){}})();return{dojo:a,dijit:b,dojox:f}}if(this.define)define("dojo/_base/_loader/bootstrap",[],function(){var a=b();a.dojo._dijit=a.dijit;a.dojo._dojox=a.dojox;return a.dojo});else{var d=b();dojo=d.dojo;dijit=d.dijit;dojox=d.dojox}})();
define("domReady",[],function(){function b(a){for(var b=0,c;c=a[b];b++)c(h)}function d(){var a=g,c=j;e&&(a.length&&(g=[],b(a)),k.resourcesDone&&c.length&&(j=[],b(c)))}function a(){e||(e=!0,m&&clearInterval(m),d())}function c(a){e?a(h):g.push(a);return c}var f=typeof window!=="undefined"&&window.document,e=!f,h=f?document:null,g=[],j=[],k=requirejs||require||{},l=k.resourcesReady,m;if("resourcesReady"in k)k.resourcesReady=function(a){l&&l(a);a&&d()};f&&(document.addEventListener?(document.addEventListener("DOMContentLoaded",
a,!1),window.addEventListener("load",a,!1)):window.attachEvent&&(window.attachEvent("onload",a),self===self.top&&(m=setInterval(function(){try{document.body&&(document.documentElement.doScroll("left"),a())}catch(b){}},30))),document.readyState==="complete"&&a());c.withResources=function(a){e&&k.resourcesDone?a(h):j.push(a);return c};c.version="1.0.0";c.load=function(a,b,f,e){e.isBuild?f(null):c(f)};return c});
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap","domReady"],function(b,d,a){var c="_moduleHasPrefix,_loadPath,_loadUri,_loadUriAndCheck,loaded,_callLoaded,_getModuleSymbols,_loadModule,require,provide,platformRequire,requireIf,requireAfterIf,registerModulePath".split(","),f,e;for(f=0;f<c.length;)e=c[f++],d[e]=function(a){return function(){console.warn("dojo."+a+" not available when using an AMD loader.")}}(e);var h=function(a){var b=[],c;for(c=0;c<a.length;)b.push(a[c++]);return b},
g=function(a,b){return b?typeof b=="string"?function(){a[b]()}:function(){b.call(a)}:a};d.ready=d.addOnLoad=function(b,c){a(c?g(b,c):b)};d.addOnLoad(function(){d.postLoad=d.config.afterOnLoad=!0});if(c=d.config.addOnLoad)d.addOnLoad[c instanceof Array?"apply":"call"](d,c);var j=d._loaders=[],k=function(){var a=j.slice(0);for(Array.prototype.splice.apply(j,[0,j.length]);a.length;)a.shift().call()};j.unshift=function(){Array.prototype.unshift.apply(j,h(arguments));a(k)};j.splice=function(){Array.prototype.splice.apply(j,
h(arguments));a(k)};var l=d._unloaders=[];d.unloaded=function(){for(;l.length;)l.pop().call()};d._onto=function(a,b,c){a.push(c?g(b,c):b)};d._modulesLoaded=function(){};d.loadInit=function(a){a()};d.getL10nName=function(a,b,c){c=c?c.toLowerCase():d.locale;a="i18n!"+a.replace(/\./g,"/");return/root/i.test(c)?a+"/nls/"+b:a+"/nls/"+c+"/"+b};d.requireLocalization=function(a,c,f){b.vendor!="altoviso.com"&&(f=!f||f.toLowerCase()===d.locale?"root":f);return b(d.getL10nName(a,c,f))};d.i18n={getLocalization:d.requireLocalization,
normalizeLocale:function(a){a=a?a.toLowerCase():d.locale;a=="root"&&(a="ROOT");return a}};var m=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,n=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;d._Url=function(){for(var a=arguments,b=[a[0]],c=1;c<a.length;c++)if(a[c]){var f=new d._Url(a[c]+""),b=new d._Url(b[0]+"");if(f.path==""&&!f.scheme&&!f.authority&&!f.query){if(f.fragment!=null)b.fragment=f.fragment;f=b}else if(!f.scheme&&(f.scheme=b.scheme,!f.authority&&(f.authority=
b.authority,f.path.charAt(0)!="/"))){for(var b=(b.path.substring(0,b.path.lastIndexOf("/")+1)+f.path).split("/"),e=0;e<b.length;e++)b[e]=="."?e==b.length-1?b[e]="":(b.splice(e,1),e--):e>0&&!(e==1&&b[0]=="")&&b[e]==".."&&b[e-1]!=".."&&(e==b.length-1?(b.splice(e,1),b[e-1]=""):(b.splice(e-1,2),e-=2));f.path=b.join("/")}b=[];f.scheme&&b.push(f.scheme,":");f.authority&&b.push("//",f.authority);b.push(f.path);f.query&&b.push("?",f.query);f.fragment&&b.push("#",f.fragment)}this.uri=b.join("");a=this.uri.match(m);
this.scheme=a[2]||(a[1]?"":null);this.authority=a[4]||(a[3]?"":null);this.path=a[5];this.query=a[7]||(a[6]?"":null);this.fragment=a[9]||(a[8]?"":null);if(this.authority!=null)a=this.authority.match(n),this.user=a[3]||null,this.password=a[4]||null,this.host=a[6]||a[7],this.port=a[9]||null};d._Url.prototype.toString=function(){return this.uri};d.moduleUrl=function(a,c){if(!a)return null;var a=a.replace(/\./g,"/")+(c?"/"+c:""),f="",e=a.match(/(.+)(\.[^\/]*)$/);e&&(a=e[1],f=e[2]);return new d._Url(b.nameToUrl(a,
f))};return d});
define("dojo/_base/_loader/hostenv_browser",["dojo/lib/backCompat"],function(b){if(typeof window!="undefined"){b.isBrowser=!0;b._name="browser";(function(){var a=b;if(document&&document.getElementsByTagName)for(var c=document.getElementsByTagName("script"),f=/dojo(\.xd)?\.js(\W|$)/i,e=0;e<c.length;e++){var h=c[e].getAttribute("src");if(h){var g=h.match(f);if(g){if(!a.config.baseUrl)a.config.baseUrl=h.substring(0,g.index);if(c=c[e].getAttribute("djConfig")||c[e].getAttribute("data-dojo-config")){var c=eval("({ "+
c+" })"),j;for(j in c)b.config[j]=c[j]}break}}}a.baseUrl=a.config.baseUrl;j=navigator;c=j.userAgent;f=j.appVersion;e=parseFloat(f);if(c.indexOf("Opera")>=0)a.isOpera=e;if(c.indexOf("AdobeAIR")>=0)a.isAIR=1;a.isKhtml=f.indexOf("Konqueror")>=0?e:0;a.isWebKit=parseFloat(c.split("WebKit/")[1])||void 0;a.isChrome=parseFloat(c.split("Chrome/")[1])||void 0;a.isMac=f.indexOf("Macintosh")>=0;if((h=Math.max(f.indexOf("WebKit"),f.indexOf("Safari"),0))&&!b.isChrome)if(a.isSafari=parseFloat(f.split("Version/")[1]),
!a.isSafari||parseFloat(f.substr(h+7))<=419.3)a.isSafari=2;if(c.indexOf("Gecko")>=0&&!a.isKhtml&&!a.isWebKit)a.isMozilla=a.isMoz=e;if(a.isMoz)a.isFF=parseFloat(c.split("Firefox/")[1]||c.split("Minefield/")[1])||void 0;if(document.all&&!a.isOpera&&(a.isIE=parseFloat(f.split("MSIE ")[1])||void 0,(c=document.documentMode)&&c!=5&&Math.floor(a.isIE)!=c))a.isIE=c;if(b.isIE&&window.location.protocol==="file:")b.config.ieForceActiveXXhr=!0;a.isQuirks=document.compatMode=="BackCompat";a.locale=b.config.locale||
(a.isIE?j.userLanguage:j.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var c,f;if(!b.isIE||!b.config.ieForceActiveXXhr)try{c=new XMLHttpRequest}catch(e){}if(!c)for(var j=0;j<3;++j){var h=a._XMLHTTP_PROGIDS[j];try{c=new ActiveXObject(h)}catch(g){f=g}if(c){a._XMLHTTP_PROGIDS=[h];break}}if(!c)throw Error("XMLHTTP not available: "+f);return c};a._isDocumentOk=function(a){var a=a.status||0,b=location.protocol;return a>=200&&
a<300||a==304||a==1223||!a&&(b=="file:"||b=="chrome:"||b=="chrome-extension:"||b=="app:")};var d=window.location+"",l=(j=document.getElementsByTagName("base"))&&j.length>0;a._getText=function(c,f){var e=a._xhrObj();!l&&b._Url&&(c=(new b._Url(d,c)).toString());a.config.cacheBust&&(c+="",c+=(c.indexOf("?")==-1?"?":"&")+String(a.config.cacheBust).replace(/\W+/g,""));e.open("GET",c,!1);try{if(e.send(null),!a._isDocumentOk(e)){var j=Error("Unable to load "+c+" status:"+e.status);j.status=e.status;j.responseText=
e.responseText;throw j;}}catch(h){if(f)return null;throw h;}return e.responseText};var m=window,n=function(a,b){var c=m.attachEvent||m.addEventListener,a=m.attachEvent?a:a.substring(2);c(a,function(){b.apply(m,arguments)},!1)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var b=a._windowUnloaders;b.length;)b.pop()();a=null};var o=0;a.addOnWindowUnload=function(b,c){a._onto(a._windowUnloaders,b,c);o||(o=1,n("onunload",a.windowUnloaded))};var q=0;a.addOnUnload=function(c,f){a._onto(a._unloaders,
c,f);q||(q=1,n("onbeforeunload",b.unloaded))}})();b._initFired=!1;b._loadInit=function(){if(b._scrollIntervalId)clearInterval(b._scrollIntervalId),b._scrollIntervalId=0;if(!b._initFired)b._initFired=!0,!b.config.afterOnLoad&&window.detachEvent&&window.detachEvent("onload",b._loadInit),b._inFlightCount==0&&b._modulesLoaded()};if(!b.config.afterOnLoad)if(document.addEventListener)document.addEventListener("DOMContentLoaded",b._loadInit,!1),window.addEventListener("load",b._loadInit,!1);else if(window.attachEvent&&
(window.attachEvent("onload",b._loadInit),!b.config.skipIeDomLoaded&&self===self.top))b._scrollIntervalId=setInterval(function(){try{document.body&&(document.documentElement.doScroll("left"),b._loadInit())}catch(a){}},30);if(b.isIE)try{(function(){document.namespaces.add("v","urn:schemas-microsoft-com:vml");var a="*,group,roundrect,oval,shape,rect,imagedata,path,textpath,text".split(","),c=0,f=1,e=document.createStyleSheet();if(b.isIE>=8)c=1,f=a.length;for(;c<f;++c)e.addRule("v\\:"+a[c],"behavior:url(#default#VML); display:inline-block")})()}catch(d){}}(function(){var a=
b.config.modulePaths;if(a)for(var c in a)b.registerModulePath(c,a[c])})();b.config.isDebug&&b.require("dojo._firebug.firebug");b.config.debugAtAllCosts&&(b.require("dojo._base._loader.loader_debug"),b.require("dojo.i18n"));return b});define("dojo/lib/kernel",["dojo/_base/_loader/hostenv_browser"],function(b){return dojo=b});
define("dojo/_base/lang",["dojo/lib/kernel"],function(b){(function(){var d=Object.prototype.toString;b.isString=function(a){return typeof a=="string"||a instanceof String};b.isArray=function(a){return a&&(a instanceof Array||typeof a=="array")};b.isFunction=function(a){return d.call(a)==="[object Function]"};b.isObject=function(a){return a!==void 0&&(a===null||typeof a=="object"||b.isArray(a)||b.isFunction(a))};b.isArrayLike=function(a){return a&&a!==void 0&&!b.isString(a)&&!b.isFunction(a)&&!(a.tagName&&
a.tagName.toLowerCase()=="form")&&(b.isArray(a)||isFinite(a.length))};b.isAlien=function(a){return a&&!b.isFunction(a)&&/\{\s*\[native code\]\s*\}/.test(String(a))};b.extend=function(a,c){for(var f=1,e=arguments.length;f<e;f++)b._mixin(a.prototype,arguments[f]);return a};b._hitchArgs=function(a,c){var f=b._toArray(arguments,2),e=b.isString(c);return function(){var h=b._toArray(arguments),g=e?(a||b.global)[c]:c;return g&&g.apply(a||this,f.concat(h))}};b.hitch=function(a,c){if(arguments.length>2)return b._hitchArgs.apply(b,
arguments);c||(c=a,a=null);if(b.isString(c)){a=a||b.global;if(!a[c])throw['dojo.hitch: scope["',c,'"] is null (scope="',a,'")'].join("");return function(){return a[c].apply(a,arguments||[])}}return!a?c:function(){return c.apply(a,arguments||[])}};b.delegate=b._delegate=function(){function a(){}return function(c,f){a.prototype=c;var e=new a;a.prototype=null;f&&b._mixin(e,f);return e}}();var a=function(a,b,c){return(c||[]).concat(Array.prototype.slice.call(a,b||0))},c=function(a,b,c){c=c||[];for(b=
b||0;b<a.length;b++)c.push(a[b]);return c};b._toArray=b.isIE?function(b){return(b.item?c:a).apply(this,arguments)}:a;b.partial=function(a){return b.hitch.apply(b,[null].concat(b._toArray(arguments)))};var f=b._extraNames,e=f.length,h={};b.clone=function(a){if(!a||typeof a!="object"||b.isFunction(a))return a;if(a.nodeType&&"cloneNode"in a)return a.cloneNode(!0);if(a instanceof Date)return new Date(a.getTime());if(a instanceof RegExp)return RegExp(a);var c,g,d,n;if(b.isArray(a)){c=[];for(g=0,d=a.length;g<
d;++g)g in a&&c.push(b.clone(a[g]))}else c=a.constructor?new a.constructor:{};for(n in a)if(d=a[n],!(n in c)||c[n]!==d&&(!(n in h)||h[n]!==d))c[n]=b.clone(d);if(e)for(g=0;g<e;++g)if(n=f[g],d=a[n],!(n in c)||c[n]!==d&&(!(n in h)||h[n]!==d))c[n]=d;return c};b.trim=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var g=/\{([^\}]+)\}/g;b.replace=function(a,c,f){return a.replace(f||g,b.isFunction(c)?c:function(a,f){return b.getObject(f,
!1,c)})}})();return b});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var d=function(a,f,e){return[typeof a=="string"?a.split(""):a,f||b.global,typeof e=="string"?new Function("item","index","array",e):e]},a=function(a,b,e,h){for(var e=d(b,h,e),b=e[0],h=0,g=b.length;h<g;++h){var j=!!e[2].call(e[1],b[h],h,b);if(a^j)return j}return a};b.mixin(b,{indexOf:function(a,b,e,h){var g=1,j=a.length||0,d=0;h&&(d=j-1,g=j=-1);e!=void 0&&(d=e);if(h&&d>j||d<j)for(;d!=j;d+=g)if(a[d]==b)return d;
return-1},lastIndexOf:function(a,f,e){return b.indexOf(a,f,e,!0)},forEach:function(a,b,e){if(a&&a.length)for(var b=d(a,e,b),a=b[0],e=0,h=a.length;e<h;++e)b[2].call(b[1],a[e],e,a)},every:function(b,f,e){return a(!0,b,f,e)},some:function(b,f,e){return a(!1,b,f,e)},map:function(a,b,e,h){for(var b=d(a,e,b),a=b[0],h=h?new h:[],e=0,g=a.length;e<g;++e)h.push(b[2].call(b[1],a[e],e,a));return h},filter:function(a,b,e){for(var b=d(a,e,b),a=b[0],e=[],h=0,g=a.length;h<g;++h)b[2].call(b[1],a[h],h,a)&&e.push(a[h]);
return e}})})();return b});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(b){(function(){function d(a,b){throw Error("declare"+(b?" "+b:"")+": "+a);}function a(a,b,c){var f,e,h,j,g,k,l,m=this._inherited=this._inherited||{};typeof a=="string"&&(f=a,a=b,b=c);c=0;j=a.callee;(f=f||j.nom)||d("can't deduce a name to call inherited()",this.declaredClass);g=this.constructor._meta;h=g.bases;l=m.p;if(f!=w){if(m.c!==j&&(l=0,k=h[0],g=k._meta,g.hidden[f]!==j)){(e=g.chains)&&typeof e[f]=="string"&&
d("calling chained method with inherited: "+f,this.declaredClass);do if(g=k._meta,e=k.prototype,g&&(e[f]===j&&e.hasOwnProperty(f)||g.hidden[f]===j))break;while(k=h[++l]);l=k?l:-1}if(k=h[++l])if(e=k.prototype,k._meta&&e.hasOwnProperty(f))c=e[f];else{j=r[f];do if(e=k.prototype,(c=e[f])&&(k._meta?e.hasOwnProperty(f):c!==j))break;while(k=h[++l])}c=k&&c||r[f]}else{if(m.c!==j&&(l=0,(g=h[0]._meta)&&g.ctor!==j)){e=g.chains;for((!e||e.constructor!=="manual")&&d("calling chained constructor with inherited",
this.declaredClass);k=h[++l];)if((g=k._meta)&&g.ctor===j)break;l=k?l:-1}for(;k=h[++l];)if(c=(g=k._meta)?g.ctor:k)break;c=k&&c}m.c=c;m.p=l;if(c)return b===!0?c:c.apply(this,b||a)}function c(a,b){return typeof a=="string"?this.inherited(a,b,!0):this.inherited(a,!0)}function f(a){for(var b=this.constructor._meta.bases,c=0,f=b.length;c<f;++c)if(b[c]===a)return!0;return this instanceof a}function e(a,b){var c,f=0,e=q._extraNames.length;for(c in b)c!=w&&b.hasOwnProperty(c)&&(a[c]=b[c]);for(;f<e;++f)c=q._extraNames[f],
c!=w&&b.hasOwnProperty(c)&&(a[c]=b[c])}function h(a,b){var c,f,e=0,h=q._extraNames.length;for(c in b)if(f=b[c],(f!==r[c]||!(c in r))&&c!=w){if(s.call(f)=="[object Function]")f.nom=c;a[c]=f}for(;e<h;++e)if(c=q._extraNames[e],f=b[c],(f!==r[c]||!(c in r))&&c!=w){if(s.call(f)=="[object Function]")f.nom=c;a[c]=f}return a}function g(a){h(this.prototype,a);return this}function j(a,b){return function(){var t;var c=arguments,f=c,e=c[0],h,j;j=a.length;var g;if(!(this instanceof c.callee))return o(c);if(b&&
(e&&e.preamble||this.preamble)){g=Array(a.length);g[0]=c;for(h=0;;){if(e=c[0])(e=e.preamble)&&(c=e.apply(this,c)||c);e=a[h].prototype;(e=e.hasOwnProperty("preamble")&&e.preamble)&&(c=e.apply(this,c)||c);if(++h==j)break;g[h]=c}}for(h=j-1;h>=0;--h)e=a[h],(t=(j=e._meta)?j.ctor:e,e=t)&&e.apply(this,g?g[h]:c);(e=this.postscript)&&e.apply(this,f)}}function k(a,b){return function(){var c=arguments,f=c,e=c[0];if(!(this instanceof c.callee))return o(c);if(b){if(e)(e=e.preamble)&&(f=e.apply(this,f)||f);(e=
this.preamble)&&e.apply(this,f)}a&&a.apply(this,c);(e=this.postscript)&&e.apply(this,c)}}function l(a){return function(){var t;var b=arguments,c=0,f,e;if(!(this instanceof b.callee))return o(b);for(;f=a[c];++c)if(t=(e=f._meta)?e.ctor:f,f=t){f.apply(this,b);break}(f=this.postscript)&&f.apply(this,b)}}function m(a,b,c){return function(){var f,e,h=0,j=1;c&&(h=b.length-1,j=-1);for(;f=b[h];h+=j)e=f._meta,(f=(e?e.hidden:f.prototype)[a])&&f.apply(this,arguments)}}function n(a){x.prototype=a.prototype;a=
new x;x.prototype=null;return a}function o(a){var b=a.callee,c=n(b);b.apply(c,a);return c}var q=b,p=q._mixin,r=Object.prototype,s=r.toString,x=new Function,v=0,w="constructor";q.declare=function(b,o,y){typeof b!="string"&&(y=o,o=b,b="");var y=y||{},z,x,C,B,I,D,L,K=1,S=o;if(s.call(o)=="[object Array]"){K=b;C=[];B=[{cls:0,refs:[]}];D={};for(var U=1,O=o.length,M=0,G,N,F,E;M<O;++M){(G=o[M])?s.call(G)!="[object Function]"&&d("mixin #"+M+" is not a callable constructor.",K):d("mixin #"+M+" is unknown. Did you use dojo.require to pull it in?",
K);N=G._meta?G._meta.bases:[G];F=0;for(G=N.length-1;G>=0;--G){E=N[G].prototype;if(!E.hasOwnProperty("declaredClass"))E.declaredClass="uniqName_"+v++;E=E.declaredClass;D.hasOwnProperty(E)||(D[E]={count:0,refs:[],cls:N[G]},++U);E=D[E];F&&F!==E&&(E.refs.push(F),++F.count);F=E}++F.count;B[0].refs.push(F)}for(;B.length;){F=B.pop();C.push(F.cls);for(--U;x=F.refs,x.length==1;){F=x[0];if(!F||--F.count){F=0;break}C.push(F.cls);--U}if(F)for(M=0,O=x.length;M<O;++M)F=x[M],--F.count||B.push(F)}U&&d("can't build consistent linearization",
K);G=o[0];C[0]=G?G._meta&&G===C[C.length-G._meta.bases.length]?G._meta.bases.length:1:0;D=C;C=D[0];K=D.length-C;o=D[K]}else D=[0],o?s.call(o)=="[object Function]"?(C=o._meta,D=D.concat(C?C.bases:o)):d("base class is not a callable constructor.",b):o!==null&&d("unknown base class. Did you use dojo.require to pull it in?",b);if(o)for(x=K-1;;--x){z=n(o);if(!x)break;C=D[x];(C._meta?e:p)(z,C.prototype);B=new Function;B.superclass=o;B.prototype=z;o=z.constructor=B}else z={};h(z,y);C=y.constructor;if(C!==
r.constructor)C.nom=w,z.constructor=C;for(x=K-1;x;--x)(C=D[x]._meta)&&C.chains&&(L=p(L||{},C.chains));z["-chains-"]&&(L=p(L||{},z["-chains-"]));C=!L||!L.hasOwnProperty(w);D[0]=B=L&&L.constructor==="manual"?l(D):D.length==1?k(y.constructor,C):j(D,C);B._meta={bases:D,hidden:y,chains:L,parents:S,ctor:y.constructor};B.superclass=o&&o.prototype;B.extend=g;B.prototype=z;z.constructor=B;z.getInherited=c;z.inherited=a;z.isInstanceOf=f;if(b)z.declaredClass=b,q.setObject(b,B);if(L)for(I in L)if(z[I]&&typeof L[I]==
"string"&&I!=w)C=z[I]=m(I,D,L[I]==="after"),C.nom=I;return B};q.safeMixin=h})();return b.declare});
define("dojo/_base/connect",["dojo/lib/kernel","dojo/_base/lang"],function(b){b._listener={getDispatcher:function(){return function(){var b=Array.prototype,a=arguments.callee,c=a._listeners,a=(a=a.target)&&a.apply(this,arguments),f,c=[].concat(c);for(f in c)f in b||c[f].apply(this,arguments);return a}},add:function(d,a,c){var d=d||b.global,f=d[a];if(!f||!f._listeners){var e=b._listener.getDispatcher();e.target=f;e._listeners=[];f=d[a]=e}return f._listeners.push(c)},remove:function(d,a,c){(d=(d||b.global)[a])&&
d._listeners&&c--&&delete d._listeners[c]}};b.connect=function(d,a,c,f,e){var h=arguments,g=[],j=0;g.push(b.isString(h[0])?null:h[j++],h[j++]);var k=h[j+1];g.push(b.isString(k)||b.isFunction(k)?h[j++]:null,h[j++]);for(k=h.length;j<k;j++)g.push(h[j]);return b._connect.apply(this,g)};b._connect=function(d,a,c,f){var e=b._listener,c=e.add(d,a,b.hitch(c,f));return[d,a,c,e]};b.disconnect=function(d){d&&d[0]!==void 0&&(b._disconnect.apply(this,d),delete d[0])};b._disconnect=function(b,a,c,f){f.remove(b,
a,c)};b._topics={};b.subscribe=function(d,a,c){return[d,b._listener.add(b._topics,d,b.hitch(a,c))]};b.unsubscribe=function(d){d&&b._listener.remove(b._topics,d[0],d[1])};b.publish=function(d,a){var c=b._topics[d];c&&c.apply(this,a||[])};b.connectPublisher=function(d,a,c){var f=function(){b.publish(d,arguments)};return c?b.connect(a,c,f):b.connect(a,f)};return b.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var d=function(){},a=Object.freeze||function(){},c=function(){var a,b,c,g,j=!1,d=function(){};return function(l){if(j)a?(b.next={task:l,next:null},b=b.next):b=a={task:l,next:null};else{j=!0;do try{for(;l;){l();if(c)a?b.next=c:a=c,b=g;a?(c=a.next,g=b,l=a.task,a=b=null):l=null}j=!1}catch(m){l=d,console.error(m)}while(j)}}}();b.Deferred=function(f){function e(a){if(j)throw Error("This deferred has already been resolved");
g=a;j=!0;c(h)}function h(){for(var a;!a&&m;){var c=m;m=m.next;if(a=c.progress==d)j=!1;var f=k?c.error:c.resolved;if(f)try{var e=f(g);e&&typeof e.then==="function"?e.then(b.hitch(c.deferred,"resolve"),b.hitch(c.deferred,"reject"),b.hitch(c.deferred,"progress")):(f=a&&e===void 0,a&&!f&&(k=e instanceof Error),c.deferred[f&&k?"reject":"resolve"](f?g:e))}catch(h){c.deferred.reject(h)}else k?c.deferred.reject(g):c.deferred.resolve(g)}}var g,j,k,l,m,n=this.promise={};this.resolve=this.callback=function(a){this.fired=
0;this.results=[a,null];e(a)};this.reject=this.errback=function(a){k=!0;this.fired=1;e(a);this.results=[null,a];if(!a||a.log!==!1)(b.config.deferredOnError||function(a){console.error(a)})(a)};this.progress=function(a){for(var b=m;b;){var c=b.progress;c&&c(a);b=b.next}};this.addCallbacks=function(a,b){this.then(a,b,d);return this};this.then=n.then=function(a,f,e){var g=e==d?this:new b.Deferred(n.cancel),a={resolved:a,error:f,progress:e,deferred:g};m?l=l.next=a:m=l=a;j&&c(h);return g.promise};var o=
this;this.cancel=n.cancel=function(){if(!j){var a=f&&f(o);if(!j)a instanceof Error||(a=Error(a)),a.log=!1,o.reject(a)}};a(n)};b.extend(b.Deferred,{addCallback:function(a){return this.addCallbacks(b.hitch.apply(b,arguments))},addErrback:function(a){return this.addCallbacks(null,b.hitch.apply(b,arguments))},addBoth:function(a){var c=b.hitch.apply(b,arguments);return this.addCallbacks(c,c)},fired:-1})})();b.when=function(b,a,c,f){return b&&typeof b.then==="function"?b.then(a,c,f):a(b)};return b.Deferred});
define("dojo/_base/json",["dojo/lib/kernel"],function(b){b.fromJson=function(b){return eval("("+b+")")};b._escapeString=function(b){return('"'+b.replace(/(["\\])/g,"\\$1")+'"').replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r")};b.toJsonIndentStr="\t";b.toJson=function(d,a,c){if(d===void 0)return"undefined";var f=typeof d;if(f=="number"||f=="boolean")return d+"";if(d===null)return"null";if(b.isString(d))return b._escapeString(d);var e=
arguments.callee,h,c=c||"",g=a?c+b.toJsonIndentStr:"";h=d.__json__||d.json;if(b.isFunction(h)&&(h=h.call(d),d!==h))return e(h,a,g);if(d.nodeType&&d.cloneNode)throw Error("Can't serialize DOM nodes");h=a?" ":"";var j=a?"\n":"";if(b.isArray(d))return"["+b.map(d,function(b){b=e(b,a,g);typeof b!="string"&&(b="undefined");return j+g+b}).join(","+h)+j+c+"]";if(f=="function")return null;var f=[],k;for(k in d){var l,m;if(typeof k=="number")l='"'+k+'"';else if(typeof k=="string")l=b._escapeString(k);else continue;
m=e(d[k],a,g);typeof m=="string"&&f.push(j+g+l+":"+h+m)}return"{"+f.join(","+h)+j+c+"}"};return b});
define("dojo/_base/Color",["dojo/lib/kernel","dojo/_base/array","dojo/_base/lang"],function(b){(function(){b.Color=function(b){b&&this.setColor(b)};b.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:b.config.transparentColor||[255,255,255]};b.extend(b.Color,
{r:255,g:255,b:255,a:1,_set:function(b,a,c,f){this.r=b;this.g=a;this.b=c;this.a=f},setColor:function(d){b.isString(d)?b.colorFromString(d,this):b.isArray(d)?b.colorFromArray(d,this):(this._set(d.r,d.g,d.b,d.a),d instanceof b.Color||this.sanitize());return this},sanitize:function(){return this},toRgb:function(){return[this.r,this.g,this.b]},toRgba:function(){return[this.r,this.g,this.b,this.a]},toHex:function(){return"#"+b.map(["r","g","b"],function(b){b=this[b].toString(16);return b.length<2?"0"+
b:b},this).join("")},toCss:function(b){var a=this.r+", "+this.g+", "+this.b;return(b?"rgba("+a+", "+this.a:"rgb("+a)+")"},toString:function(){return this.toCss(!0)}});b.blendColors=function(d,a,c,f){var e=f||new b.Color;b.forEach(["r","g","b","a"],function(b){e[b]=d[b]+(a[b]-d[b])*c;b!="a"&&(e[b]=Math.round(e[b]))});return e.sanitize()};b.colorFromRgb=function(d,a){var c=d.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return c&&b.colorFromArray(c[1].split(/\s*,\s*/),a)};b.colorFromHex=function(d,
a){var c=a||new b.Color,f=d.length==4?4:8,e=(1<<f)-1,d=Number("0x"+d.substr(1));if(isNaN(d))return null;b.forEach(["b","g","r"],function(a){var b=d&e;d>>=f;c[a]=f==4?17*b:b});c.a=1;return c};b.colorFromArray=function(d,a){var c=a||new b.Color;c._set(Number(d[0]),Number(d[1]),Number(d[2]),Number(d[3]));if(isNaN(c.a))c.a=1;return c.sanitize()};b.colorFromString=function(d,a){var c=b.Color.named[d];return c&&b.colorFromArray(c,a)||b.colorFromRgb(d,a)||b.colorFromHex(d,a)}})();return b.Color});
define("dojo/_base/window",["dojo/lib/kernel"],function(b){b.doc=window.document||null;b.body=function(){return b.doc.body||b.doc.getElementsByTagName("body")[0]};b.setContext=function(d,a){b.global=d;b.doc=a};b.withGlobal=function(d,a,c,f){var e=b.global;try{return b.global=d,b.withDoc.call(null,d.document,a,c,f)}finally{b.global=e}};b.withDoc=function(d,a,c,f){var e=b.doc,h=b._bodyLtr,g=b.isQuirks;try{return b.doc=d,delete b._bodyLtr,b.isQuirks=b.doc.compatMode=="BackCompat",c&&typeof a=="string"&&
(a=c[a]),a.apply(c,f||[])}finally{b.doc=e;delete b._bodyLtr;if(h!==void 0)b._bodyLtr=h;b.isQuirks=g}};return b});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(b){(function(){var d=b._event_listener={add:function(a,c,f){if(a){c=d._normalizeEventName(c);f=d._fixCallback(c,f);if(!b.isIE&&(c=="mouseenter"||c=="mouseleave"))var e=f,c=c=="mouseenter"?"mouseover":"mouseout",f=function(c){if(!b.isDescendant(c.relatedTarget,a))return e.call(this,c)};a.addEventListener(c,f,!1);return f}},remove:function(a,c,f){if(a){c=d._normalizeEventName(c);if(!b.isIE&&(c=="mouseenter"||c=="mouseleave"))c=
c=="mouseenter"?"mouseover":"mouseout";a.removeEventListener(c,f,!1)}},_normalizeEventName:function(a){return a.slice(0,2)=="on"?a.slice(2):a},_fixCallback:function(a,b){return a!="keypress"?b:function(a){return b.call(this,d._fixEvent(a,this))}},_fixEvent:function(a){switch(a.type){case "keypress":d._setKeyChar(a)}return a},_setKeyChar:function(a){a.keyChar=a.charCode>=32?String.fromCharCode(a.charCode):"";a.charOrCode=a.keyChar||a.keyCode},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,
191:47,192:96,219:91,220:92,221:93,222:39}};b.fixEvent=function(a,b){return d._fixEvent(a,b)};b.stopEvent=function(a){a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation()};var a=b._listener;b._connect=function(c,f,e,h,g){g=c&&(c.nodeType||c.attachEvent||c.addEventListener)?g?2:1:0;e=[b._listener,d,a][g].add(c,f,b.hitch(e,h));return[c,f,e,g]};b._disconnect=function(c,f,e,h){[b._listener,d,a][h].remove(c,f,e)};b.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,
META:b.isSafari?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,
F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:b.isMac&&!b.isAIR?b.isSafari?91:224:17};var c=b.isMac?"metaKey":"ctrlKey";b.isCopyKey=function(a){return a[c]};b.mouseButtons=b.isIE<9||b.isIE&&b.isQuirks?{LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(a,b){return a.button&b},isLeft:function(a){return a.button&1},isMiddle:function(a){return a.button&4},isRight:function(a){return a.button&2}}:{LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(a,b){return a.button==
b},isLeft:function(a){return a.button==0},isMiddle:function(a){return a.button==1},isRight:function(a){return a.button==2}};if(b.isIE){var f=function(a,b){try{return a.keyCode=b}catch(c){return 0}},e=b._listener,h=b._ieListenersName="_"+b._scopeName+"_listeners";if(!b.config._allow_leaks)var a=e=b._ie_listener={handlers:[],add:function(a,c,f){var a=a||b.global,e=a[c];if(!e||!e[h]){var d=b._getIeDispatcher();d.target=e&&g.push(e)-1;d[h]=[];e=a[c]=d}return e[h].push(g.push(f)-1)},remove:function(a,
c,f){var j;j=(a=(a||b.global)[c])&&a[h],c=j;a&&c&&f--&&(delete g[c[f]],delete c[f])}},g=e.handlers;b.mixin(d,{add:function(a,b,c){if(a){b=d._normalizeEventName(b);if(b=="onkeypress"){var f=a.onkeydown;if(!f||!f[h]||!f._stealthKeydownHandle){var g=d.add(a,"onkeydown",d._stealthKeyDown),f=a.onkeydown;f._stealthKeydownHandle=g;f._stealthKeydownRefs=1}else f._stealthKeydownRefs++}return e.add(a,b,d._fixCallback(c))}},remove:function(a,b,c){b=d._normalizeEventName(b);e.remove(a,b,c);if(b=="onkeypress")b=
a.onkeydown,--b._stealthKeydownRefs<=0&&(e.remove(a,"onkeydown",b._stealthKeydownHandle),delete b._stealthKeydownHandle)},_normalizeEventName:function(a){return a.slice(0,2)!="on"?"on"+a:a},_nop:function(){},_fixEvent:function(a,c){if(!a)a=(c&&(c.ownerDocument||c.document||c).parentWindow||window).event;if(!a)return a;a.target=a.srcElement;a.currentTarget=c||a.srcElement;a.layerX=a.offsetX;a.layerY=a.offsetY;var f=a.srcElement,f=f&&f.ownerDocument||document,f=b.isIE<6||f.compatMode=="BackCompat"?
f.body:f.documentElement,e=b._getIeDocumentElementOffset();a.pageX=a.clientX+b._fixIeBiDiScrollLeft(f.scrollLeft||0)-e.x;a.pageY=a.clientY+(f.scrollTop||0)-e.y;if(a.type=="mouseover")a.relatedTarget=a.fromElement;if(a.type=="mouseout")a.relatedTarget=a.toElement;if(b.isIE<9||b.isQuirks)a.stopPropagation=d._stopPropagation,a.preventDefault=d._preventDefault;return d._fixKeys(a)},_fixKeys:function(a){switch(a.type){case "keypress":var b="charCode"in a?a.charCode:a.keyCode;b==10?(b=0,a.keyCode=13):b==
13||b==27?b=0:b==3&&(b=99);a.charCode=b;d._setKeyChar(a)}return a},_stealthKeyDown:function(a){var c=a.currentTarget.onkeypress;if(c&&c[h]){var e=a.keyCode,g=(e!=13||b.isIE>=9&&!b.isQuirks)&&e!=32&&e!=27&&(e<48||e>90)&&(e<96||e>111)&&(e<186||e>192)&&(e<219||e>222);if(g||a.ctrlKey){g=g?0:e;if(a.ctrlKey)if(e==3||e==13)return;else g>95&&g<106?g-=48:!a.shiftKey&&g>=65&&g<=90?g+=32:g=d._punctMap[g]||g;e=d._synthesizeEvent(a,{type:"keypress",faux:!0,charCode:g});c.call(a.currentTarget,e);if(b.isIE<9||b.isIE&&
b.isQuirks)a.cancelBubble=e.cancelBubble;a.returnValue=e.returnValue;f(a,e.keyCode)}}},_stopPropagation:function(){this.cancelBubble=!0},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&f(this,0);this.returnValue=!1}});b.stopEvent=b.isIE<9||b.isQuirks?function(a){a=a||window.event;d._stopPropagation.call(a);d._preventDefault.call(a)}:b.stopEvent}d._synthesizeEvent=function(a,c){var f=b.mixin({},a,c);d._setKeyChar(f);f.preventDefault=function(){a.preventDefault()};f.stopPropagation=
function(){a.stopPropagation()};return f};b.isOpera&&b.mixin(d,{_fixEvent:function(a){switch(a.type){case "keypress":var b=a.which;b==3&&(b=99);b=b<41&&!a.shiftKey?0:b;a.ctrlKey&&!a.shiftKey&&b>=65&&b<=90&&(b+=32);return d._synthesizeEvent(a,{charCode:b})}return a}});if(b.isWebKit)d._add=d.add,d._remove=d.remove,b.mixin(d,{add:function(a,b,c){if(a){var f=d._add(a,b,c);if(d._normalizeEventName(b)=="keypress")f._stealthKeyDownHandle=d._add(a,"keydown",function(a){var b=a.keyCode,f=b!=13&&b!=32&&(b<
48||b>90)&&(b<96||b>111)&&(b<186||b>192)&&(b<219||b>222);if(f||a.ctrlKey){f=f?0:b;if(a.ctrlKey)if(b==3||b==13)return;else f>95&&f<106?f-=48:!a.shiftKey&&f>=65&&f<=90?f+=32:f=d._punctMap[f]||f;b=d._synthesizeEvent(a,{type:"keypress",faux:!0,charCode:f});c.call(a.currentTarget,b)}});return f}},remove:function(a,b,c){a&&(c._stealthKeyDownHandle&&d._remove(a,"keydown",c._stealthKeyDownHandle),d._remove(a,b,c))},_fixEvent:function(a){switch(a.type){case "keypress":if(a.faux)break;var b=a.charCode;return d._synthesizeEvent(a,
{charCode:b>=32?b:0,faux:!0})}return a}})})();if(b.isIE)b._ieDispatcher=function(d,a){var c=Array.prototype,f=b._ie_listener.handlers,e=d.callee,h=e[b._ieListenersName],e=(e=f[e.target])&&e.apply(a,d),h=[].concat(h),g;for(g in h){var j=f[h[g]];!(g in c)&&j&&j.apply(a,d)}return e},b._getIeDispatcher=function(){return new Function(b._scopeName+"._ieDispatcher(arguments, this)")},b._event_listener._fixCallback=function(d){var a=b._event_listener._fixEvent;return function(b){return d.call(this,a(b,this))}};
return b.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(b){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(d){}b.byId=b.isIE?function(a,c){if(typeof a!="string")return a;var f=c||b.doc,e=f.getElementById(a);if(e&&(e.attributes.id.value==a||e.id==a))return e;else{f=f.all[a];if(!f||f.nodeName)f=[f];for(var h=0;e=f[h++];)if(e.attributes&&e.attributes.id&&e.attributes.id.value==a||e.id==a)return e}}:function(a,c){return(typeof a=="string"?(c||b.doc).getElementById(a):a)||
null};(function(){var a=b.byId,c=null,f;b.addOnWindowUnload(function(){c=null});b._destroyElement=b.destroy=function(b){b=a(b);try{var e=b.ownerDocument;if(!c||f!=e)c=e.createElement("div"),f=e;c.appendChild(b.parentNode?b.parentNode.removeChild(b):b);c.innerHTML=""}catch(h){}};b.isDescendant=function(b,c){try{b=a(b);for(c=a(c);b;){if(b==c)return!0;b=b.parentNode}}catch(f){}return!1};b.setSelectable=function(c,f){c=a(c);if(b.isMozilla)c.style.MozUserSelect=f?"":"none";else if(b.isKhtml||b.isWebKit)c.style.KhtmlUserSelect=
f?"auto":"none";else if(b.isIE){var e=c.unselectable=f?"":"on";b.query("*",c).forEach("item.unselectable = '"+e+"'")}};var e=function(a,b){var c=b.parentNode;c&&c.insertBefore(a,b)};b.place=function(c,f,h){f=a(f);typeof c=="string"&&(c=/^\s*</.test(c)?b._toDom(c,f.ownerDocument):a(c));if(typeof h=="number"){var g=f.childNodes;!g.length||g.length<=h?f.appendChild(c):e(c,g[h<0?0:h])}else switch(h){case "before":e(c,f);break;case "after":h=c;(g=f.parentNode)&&(g.lastChild==f?g.appendChild(h):g.insertBefore(h,
f.nextSibling));break;case "replace":f.parentNode.replaceChild(c,f);break;case "only":b.empty(f);f.appendChild(c);break;case "first":if(f.firstChild){e(c,f.firstChild);break}default:f.appendChild(c)}return c};b.boxModel="content-box";if(b.isIE)b.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var h;h=b.isWebKit?function(a){var b;if(a.nodeType==1){var c=a.ownerDocument.defaultView;b=c.getComputedStyle(a,null);if(!b&&a.style)a.style.display="",b=c.getComputedStyle(a,null)}return b||
{}}:b.isIE?function(a){return a.nodeType==1?a.currentStyle:{}}:function(a){return a.nodeType==1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}};b.getComputedStyle=h;b._toPixelValue=b.isIE?function(a,b){if(!b)return 0;if(b=="medium")return 4;if(b.slice&&b.slice(-2)=="px")return parseFloat(b);with(a){var c=style.left,f=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=b,b=style.pixelLeft}catch(e){b=0}style.left=c;runtimeStyle.left=f}return b}:function(a,b){return parseFloat(b)||
0};var g=b._toPixelValue,d=function(a,b){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(c){return b?{}:null}};b._getOpacity=b.isIE<9?function(a){try{return d(a).Opacity/100}catch(b){return 1}}:function(a){return h(a).opacity};b._setOpacity=b.isIE<9?function(a,c){var f=c*100,e=c==1;a.style.zoom=e?"":1;if(d(a))d(a,1).Opacity=f;else{if(e)return c;a.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+f+")"}d(a,1).Enabled=!e;a.nodeName.toLowerCase()=="tr"&&b.query("> td",
a).forEach(function(a){b._setOpacity(a,c)});return c}:function(a,b){return a.style.opacity=b};var k={left:!0,top:!0},l=/margin|padding|width|height|max|min|offset/,m=function(a,c,f){c=c.toLowerCase();if(b.isIE){if(f=="auto"){if(c=="height")return a.offsetHeight;if(c=="width")return a.offsetWidth}if(c=="fontweight")switch(f){case 700:return"bold";default:return"normal"}}c in k||(k[c]=l.test(c));return k[c]?g(a,f):f},n=b.isIE?"styleFloat":"cssFloat",o={cssFloat:n,styleFloat:n,"float":n};b.style=function(c,
f,e){var g=a(c),d=arguments.length,j=f=="opacity",f=o[f]||f;if(d==3)return j?b._setOpacity(g,e):g.style[f]=e;if(d==2&&j)return b._getOpacity(g);j=h(g);if(d==2&&typeof f!="string"){for(var k in f)b.style(c,k,f[k]);return j}return d==1?j:m(g,f,j[f]||g.style[f])};b._getPadExtents=function(a,b){var c=b||h(a),f=g(a,c.paddingLeft),e=g(a,c.paddingTop);return{l:f,t:e,w:f+g(a,c.paddingRight),h:e+g(a,c.paddingBottom)}};b._getBorderExtents=function(a,b){var c=b||h(a),f=c.borderLeftStyle!="none"?g(a,c.borderLeftWidth):
0,e=c.borderTopStyle!="none"?g(a,c.borderTopWidth):0;return{l:f,t:e,w:f+(c.borderRightStyle!="none"?g(a,c.borderRightWidth):0),h:e+(c.borderBottomStyle!="none"?g(a,c.borderBottomWidth):0)}};b._getPadBorderExtents=function(a,c){var f=c||h(a),e=b._getPadExtents(a,f),f=b._getBorderExtents(a,f);return{l:e.l+f.l,t:e.t+f.t,w:e.w+f.w,h:e.h+f.h}};b._getMarginExtents=function(a,c){var f=c||h(a),e=g(a,f.marginLeft),d=g(a,f.marginTop),j=g(a,f.marginRight),k=g(a,f.marginBottom);b.isWebKit&&f.position!="absolute"&&
(j=e);return{l:e,t:d,w:e+j,h:d+k}};b._getMarginBox=function(a,c){var f=c||h(a),e=b._getMarginExtents(a,f),g=a.offsetLeft-e.l,d=a.offsetTop-e.t,j=a.parentNode;if(b.isMoz){var k=parseFloat(f.left),f=parseFloat(f.top);!isNaN(k)&&!isNaN(f)?(g=k,d=f):j&&j.style&&(k=h(j),k.overflow!="visible"&&(j=b._getBorderExtents(j,k),g+=j.l,d+=j.t))}else if((b.isOpera||b.isIE>7&&!b.isQuirks)&&j)j=b._getBorderExtents(j),g-=j.l,d-=j.t;return{l:g,t:d,w:a.offsetWidth+e.w,h:a.offsetHeight+e.h}};b._getMarginSize=function(c,
f){var c=a(c),e=b._getMarginExtents(c,f||h(c)),g=c.getBoundingClientRect();return{w:g.right-g.left+e.w,h:g.bottom-g.top+e.h}};b._getContentBox=function(a,c){var f=c||h(a),e=b._getPadExtents(a,f),f=b._getBorderExtents(a,f),g=a.clientWidth,d;g?(d=a.clientHeight,f.w=f.h=0):(g=a.offsetWidth,d=a.offsetHeight);b.isOpera&&(e.l+=f.l,e.t+=f.t);return{l:e.l,t:e.t,w:g-e.w-f.w,h:d-e.h-f.h}};b._getBorderBox=function(a,c){var f=c||h(a),e=b._getPadExtents(a,f),f=b._getContentBox(a,f);return{l:f.l-e.l,t:f.t-e.t,
w:f.w+e.w,h:f.h+e.h}};b._setBox=function(a,b,c,f,e,h){h=h||"px";a=a.style;if(!isNaN(b))a.left=b+h;if(!isNaN(c))a.top=c+h;if(f>=0)a.width=f+h;if(e>=0)a.height=e+h};b._isButtonTag=function(a){return a.tagName=="BUTTON"||a.tagName=="INPUT"&&(a.getAttribute("type")||"").toUpperCase()=="BUTTON"};b._usesBorderBox=function(a){var c=a.tagName;return b.boxModel=="border-box"||c=="TABLE"||b._isButtonTag(a)};b._setContentSize=function(a,c,f,e){b._usesBorderBox(a)&&(e=b._getPadBorderExtents(a,e),c>=0&&(c+=e.w),
f>=0&&(f+=e.h));b._setBox(a,NaN,NaN,c,f)};b._setMarginBox=function(a,c,f,e,g,d){var j=d||h(a),d=b._usesBorderBox(a)?q:b._getPadBorderExtents(a,j);if(b.isWebKit&&b._isButtonTag(a)){var k=a.style;if(e>=0&&!k.width)k.width="4px";if(g>=0&&!k.height)k.height="4px"}j=b._getMarginExtents(a,j);e>=0&&(e=Math.max(e-d.w-j.w,0));g>=0&&(g=Math.max(g-d.h-j.h,0));b._setBox(a,c,f,e,g)};var q={l:0,t:0,w:0,h:0};b.marginBox=function(c,f){var e=a(c),g=h(e);return!f?b._getMarginBox(e,g):b._setMarginBox(e,f.l,f.t,f.w,
f.h,g)};b.contentBox=function(c,f){var e=a(c),g=h(e);return!f?b._getContentBox(e,g):b._setContentSize(e,f.w,f.h,g)};b._docScroll=function(){var a=b.global;return"pageXOffset"in a?{x:a.pageXOffset,y:a.pageYOffset}:(a=b.isQuirks?b.doc.body:b.doc.documentElement,{x:b._fixIeBiDiScrollLeft(a.scrollLeft||0),y:a.scrollTop||0})};b._isBodyLtr=function(){return"_bodyLtr"in b?b._bodyLtr:b._bodyLtr=(b.body().dir||b.doc.documentElement.dir||"ltr").toLowerCase()=="ltr"};b._getIeDocumentElementOffset=function(){var a=
b.doc.documentElement;if(b.isIE<8){var c=a.getBoundingClientRect(),f=c.left,c=c.top;b.isIE<7&&(f+=a.clientLeft,c+=a.clientTop);return{x:f<0?0:f,y:c<0?0:c}}else return{x:0,y:0}};b._fixIeBiDiScrollLeft=function(a){var c=b.isIE;if(c&&!b._isBodyLtr()){var f=b.isQuirks,e=f?b.doc.body:b.doc.documentElement;c==6&&!f&&b.global.frameElement&&e.scrollHeight>e.clientHeight&&(a+=e.clientLeft);return c<8||f?a+e.clientWidth-e.scrollWidth:-a}return a};b._abs=b.position=function(c,f){var c=a(c),e=b.body(),d=e.parentNode,
j=c.getBoundingClientRect(),j={x:j.left,y:j.top,w:j.right-j.left,h:j.bottom-j.top};b.isIE?(d=b._getIeDocumentElementOffset(),j.x-=d.x+(b.isQuirks?e.clientLeft+e.offsetLeft:0),j.y-=d.y+(b.isQuirks?e.clientTop+e.offsetTop:0)):b.isFF==3&&(e=h(d),j.x-=g(d,e.marginLeft)+g(d,e.borderLeftWidth),j.y-=g(d,e.marginTop)+g(d,e.borderTopWidth));f&&(e=b._docScroll(),j.x+=e.x,j.y+=e.y);return j};b.coords=function(c,f){var e=a(c),g=h(e),g=b._getMarginBox(e,g),e=b.position(e,f);g.x=e.x;g.y=e.y;return g};var p={"class":"className",
"for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},r={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},s={innerHTML:1,className:1,htmlFor:b.isIE,value:1},x=function(a,b){var c=a.getAttributeNode&&a.getAttributeNode(b);return c&&c.specified};b.hasAttr=function(b,c){var f=c.toLowerCase();return s[p[f]||c]||x(a(b),r[f]||c)};var v={},w=0,t=b._scopeName+"attrid",u={col:1,colgroup:1,table:1,
tbody:1,tfoot:1,thead:1,tr:1,title:1};b.attr=function(c,f,e){var c=a(c),g=arguments.length;if(g==2&&typeof f!="string"){for(var h in f)b.attr(c,h,f[h]);return c}var d=f.toLowerCase();h=p[d]||f;var j=s[h],d=r[d]||f;if(g==3){if(h=="style"&&typeof e!="string")b.style(c,e);else if(h=="innerHTML")b.isIE&&c.tagName.toLowerCase()in u?(b.empty(c),c.appendChild(b._toDom(e,c.ownerDocument))):c[h]=e;else if(b.isFunction(e)){g=b.attr(c,t);g||(g=w++,b.attr(c,t,g));v[g]||(v[g]={});if(j=v[g][h])b.disconnect(j);
else try{delete c[h]}catch(k){}v[g][h]=b.connect(c,h,e)}else j||typeof e=="boolean"?c[h]=e:c.setAttribute(d,e);return c}e=c[h];return j&&typeof e!="undefined"?e:h!="href"&&(typeof e=="boolean"||b.isFunction(e))?e:x(c,d)?c.getAttribute(d):null};b.removeAttr=function(b,c){a(b).removeAttribute(r[c.toLowerCase()]||c)};b.getNodeProp=function(b,c){var b=a(b),f=c.toLowerCase(),e=p[f]||c;if(e in b&&e!="href")return b[e];f=r[f]||c;return x(b,f)?b.getAttribute(f):null};b.create=function(c,f,e,g){var h=b.doc;
if(e)e=a(e),h=e.ownerDocument;typeof c=="string"&&(c=h.createElement(c));f&&b.attr(c,f);e&&b.place(c,e,g);return c};b.empty=b.isIE?function(c){for(var c=a(c),f;f=c.lastChild;)b.destroy(f)}:function(b){a(b).innerHTML=""};var y={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},z=/<\s*([\w\:]+)/,A={},C=0,B="__"+b._scopeName+
"ToDomId",I;for(I in y)if(y.hasOwnProperty(I))n=y[I],n.pre=I=="option"?'<select multiple="multiple">':"<"+n.join("><")+">",n.post="</"+n.reverse().join("></")+">";b._toDom=function(a,c){var c=c||b.doc,f=c[B];f||(c[B]=f=++C+"",A[f]=c.createElement("div"));a+="";var e=a.match(z),g=e?e[1].toLowerCase():"",f=A[f];if(e&&y[g]){e=y[g];f.innerHTML=e.pre+a+e.post;for(e=e.length;e;--e)f=f.firstChild}else f.innerHTML=a;if(f.childNodes.length==1)return f.removeChild(f.firstChild);for(g=c.createDocumentFragment();e=
f.firstChild;)g.appendChild(e);return g};b.hasClass=function(c,b){return(" "+a(c).className+" ").indexOf(" "+b+" ")>=0};var D=/\s+/,L=[""],K={},S=function(a){return typeof a=="string"||a instanceof String?a.indexOf(" ")<0?(L[0]=a,L):a.split(D):a||""};b.addClass=function(c,b){var c=a(c),b=S(b),f=c.className,e,f=f?" "+f+" ":" ";e=f.length;for(var g=0,h=b.length,d;g<h;++g)(d=b[g])&&f.indexOf(" "+d+" ")<0&&(f+=d+" ");e<f.length&&(c.className=f.substr(1,f.length-2))};b.removeClass=function(c,f){var c=
a(c),e;if(f!==void 0){f=S(f);e=" "+c.className+" ";for(var g=0,h=f.length;g<h;++g)e=e.replace(" "+f[g]+" "," ");e=b.trim(e)}else e="";c.className!=e&&(c.className=e)};b.replaceClass=function(c,f,e){c=a(c);K.className=c.className;b.removeClass(K,e);b.addClass(K,f);if(c.className!==K.className)c.className=K.className};b.toggleClass=function(a,c,f){f===void 0&&(f=!b.hasClass(a,c));b[f?"addClass":"removeClass"](a,c)}})();return b});
define("dojo/_base/NodeList",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array","dojo/_base/connect","dojo/_base/html"],function(b){(function(){var d=Array.prototype,a=d.slice,c=d.concat,f=function(c,f,e){c.sort||(c=a.call(c,0));e=e||this._NodeListCtor||b._NodeListCtor;c.constructor=e;b._mixin(c,e.prototype);c._NodeListCtor=e;return f?c._stash(f):c},e=function(c,f,e){f=[0].concat(a.call(f,0));e=e||b.global;return function(a){f[0]=a;return c.apply(e,f)}},h=function(a,c){return function(){this.forEach(e(a,
arguments,c));return this}},g=function(a,c){return function(){return this.map(e(a,arguments,c))}},j=function(a,c,f){return function(){var g=arguments,h=e(a,g,f);if(c.call(f||b.global,g))return this.map(h);this.forEach(h);return this}},k=function(a){return a.length==1&&typeof a[0]=="string"},l=function(a){var c=a.parentNode;c&&c.removeChild(a)};b.NodeList=function(){return f(Array.apply(null,arguments))};var m=b._NodeListCtor=b.NodeList,n=m.prototype;m._wrap=n._wrap=f;m._adaptAsMap=g;m._adaptAsForEach=
h;m._adaptAsFilter=function(a,c){return function(){return this.filter(e(a,arguments,c))}};m._adaptWithCondition=j;b.forEach(["slice","splice"],function(a){var c=d[a];n[a]=function(){return this._wrap(c.apply(this,arguments),a=="slice"?this:null)}});b.forEach(["indexOf","lastIndexOf","every","some"],function(c){var f=b[c];n[c]=function(){return f.apply(b,[this].concat(a.call(arguments,0)))}});b.forEach(["attr","style"],function(a){n[a]=j(b[a],k)});b.forEach("connect,addClass,removeClass,replaceClass,toggleClass,empty,removeAttr".split(","),
function(a){n[a]=h(b[a])});b.extend(b.NodeList,{_normalize:function(a,c){var f=a.parse===!0?!0:!1;if(typeof a.template=="string")var e=a.templateFunc||b.string&&b.string.substitute,a=e?e(a.template,a):a;e=typeof a;e=="string"||e=="number"?(a=b._toDom(a,c&&c.ownerDocument),a=a.nodeType==11?b._toArray(a.childNodes):[a]):b.isArrayLike(a)?b.isArray(a)||(a=b._toArray(a)):a=[a];if(f)a._runParse=!0;return a},_cloneNode:function(a){return a.cloneNode(!0)},_place:function(a,c,f,e){if(!(c.nodeType!=1&&f=="only"))for(var g,
h=a.length,d=h-1;d>=0;d--){var j=e?this._cloneNode(a[d]):a[d];if(a._runParse&&b.parser&&b.parser.parse){g||(g=c.ownerDocument.createElement("div"));g.appendChild(j);b.parser.parse(g);for(j=g.firstChild;g.firstChild;)g.removeChild(g.firstChild)}d==h-1?b.place(j,c,f):c.parentNode.insertBefore(j,c);c=j}},_stash:function(a){this._parent=a;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(f){var e=b.isArray(this)?this:a.call(this,0),g=b.map(arguments,
function(c){return c&&!b.isArray(c)&&(typeof NodeList!="undefined"&&c.constructor===NodeList||c.constructor===this._NodeListCtor)?a.call(c,0):c});return this._wrap(c.apply(e,g),this)},map:function(a,c){return this._wrap(b.map(this,a,c),this)},forEach:function(a,c){b.forEach(this,a,c);return this},coords:g(b.coords),position:g(b.position),place:function(a,c){var f=b.query(a)[0];return this.forEach(function(a){b.place(a,f,c)})},orphan:function(a){return(a?b._filterQueryResult(this,a):this).forEach(l)},
adopt:function(a,c){return b.query(a).place(this[0],c)._stash(this)},query:function(a){if(!a)return this;var f=this.map(function(c){return b.query(a,c).filter(function(a){return a!==void 0})});return this._wrap(c.apply([],f),this)},filter:function(a){var c=arguments,f=this,e=0;if(typeof a=="string"){f=b._filterQueryResult(this,c[0]);if(c.length==1)return f._stash(this);e=1}return this._wrap(b.filter(f,c[e],c[e+1]),this)},addContent:function(a,c){for(var a=this._normalize(a,this[0]),b=0,f;f=this[b];b++)this._place(a,
f,c,b>0);return this},instantiate:function(a,c){var f=b.isFunction(a)?a:b.getObject(a),c=c||{};return this.forEach(function(a){new f(c,a)})},at:function(){var a=new this._NodeListCtor;b.forEach(arguments,function(c){c<0&&(c=this.length+c);this[c]&&a.push(this[c])},this);return a._stash(this)}});m.events="blur,focus,change,click,error,keydown,keypress,keyup,load,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,submit".split(",");b.forEach(m.events,function(a){var c="on"+a;n[c]=
function(a,b){return this.connect(c,a,b)}})})();return b.NodeList});
(function(){var b=function(a){var c=a.trim,b=a.forEach,e=a._NodeListCtor=a.NodeList,h=(a.isWebKit||a.isMozilla)&&a.doc.compatMode=="BackCompat",g=a.doc.firstChild.children?"children":"childNodes",d=!1,k=function(){return!0},l=function(a){a+=">~+".indexOf(a.slice(-1))>=0?" * ":" ";for(var b=function(b,f){return c(a.slice(b,f))},f=[],e=-1,g=-1,h=-1,k=-1,l=-1,m=-1,D=-1,n="",t="",L,o=0,q=a.length,u=null,p=null,v=function(){if(m>=0)u.id=b(m,o).replace(/\\/g,""),m=-1;if(D>=0){var a=D==o?null:b(D,o);u[">~+".indexOf(a)<
0?"tag":"oper"]=a;D=-1}l>=0&&(u.classes.push(b(l+1,o).replace(/\\/g,"")),l=-1)};n=t,t=a.charAt(o),o<q;o++)if(n!="\\")if(u||(L=o,u={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return d?this.otag:this.tag}},D=o),e>=0)if(t=="]"){p.attr?p.matchFor=b(h||e+1,o):p.attr=b(e+1,o);if((e=p.matchFor)&&(e.charAt(0)=='"'||e.charAt(0)=="'"))p.matchFor=e.slice(1,-1);u.attrs.push(p);p=null;e=h=-1}else{if(t=="=")h="|~^$*".indexOf(n)>=0?n:"",p.type=h+t,p.attr=b(e+1,o-h.length),
h=o+1}else if(g>=0){if(t==")"){if(k>=0)p.value=b(g+1,o);k=g=-1}}else if(t=="#")v(),m=o+1;else if(t==".")v(),l=o;else if(t==":")v(),k=o;else if(t=="[")v(),e=o,p={};else if(t=="(")k>=0&&(p={name:b(k+1,o),value:null},u.pseudos.push(p)),g=o;else if(t==" "&&n!=t){v();k>=0&&u.pseudos.push({name:b(k+1,o)});u.loops=u.pseudos.length||u.attrs.length||u.classes.length;u.oquery=u.query=b(L,o);u.otag=u.tag=u.oper?null:u.tag||"*";if(u.tag)u.tag=u.tag.toUpperCase();if(f.length&&f[f.length-1].oper)u.infixOper=f.pop(),
u.query=u.infixOper.query+" "+u.query;f.push(u);u=null}return f},m=function(a,c){return!a?c:!c?a:function(){return a.apply(window,arguments)&&c.apply(window,arguments)}},n=function(a,c){var b=c||[];a&&b.push(a);return b},o=function(a){return 1==a.nodeType},q=function(a,c){return!a?"":c=="class"?a.className||"":c=="for"?a.htmlFor||"":c=="style"?a.style.cssText||"":(d?a.getAttribute(c):a.getAttribute(c,2))||""},p={"*=":function(a,c){return function(b){return q(b,a).indexOf(c)>=0}},"^=":function(a,c){return function(b){return q(b,
a).indexOf(c)==0}},"$=":function(a,c){return function(b){b=" "+q(b,a);return b.lastIndexOf(c)==b.length-c.length}},"~=":function(a,c){var b=" "+c+" ";return function(c){return(" "+q(c,a)+" ").indexOf(b)>=0}},"|=":function(a,c){var b=" "+c+"-";return function(f){f=" "+q(f,a);return f==c||f.indexOf(b)==0}},"=":function(a,c){return function(b){return q(b,a)==c}}},r=typeof a.doc.firstChild.nextElementSibling=="undefined",s=!r?"nextElementSibling":"nextSibling",x=!r?"previousElementSibling":"previousSibling",
v=r?o:k,w=function(a){for(;a=a[x];)if(v(a))return!1;return!0},t=function(a){for(;a=a[s];)if(v(a))return!1;return!0},u=function(a){var c=a.parentNode,b=0,f=c[g],e=a._i||-1,h=c._l||-1;if(!f)return-1;f=f.length;if(h==f&&e>=0&&h>=0)return e;c._l=f;e=-1;for(c=c.firstElementChild||c.firstChild;c;c=c[s])if(v(c))c._i=++b,a===c&&(e=b);return e},y=function(a){return!(u(a)%2)},z=function(a){return u(a)%2},A={checked:function(){return function(a){return!!("checked"in a?a.checked:a.selected)}},"first-child":function(){return w},
"last-child":function(){return t},"only-child":function(){return function(a){return!w(a)?!1:!t(a)?!1:!0}},empty:function(){return function(a){for(var c=a.childNodes,a=a.childNodes.length-1;a>=0;a--){var b=c[a].nodeType;if(b===1||b==3)return!1}return!0}},contains:function(a,c){var b=c.charAt(0);if(b=='"'||b=="'")c=c.slice(1,-1);return function(a){return a.innerHTML.indexOf(c)>=0}},not:function(a,c){var b=l(c)[0],f={el:1};if(b.tag!="*")f.tag=1;if(!b.classes.length)f.classes=1;var e=B(b,f);return function(a){return!e(a)}},
"nth-child":function(a,c){var b=parseInt;if(c=="odd")return z;else if(c=="even")return y;if(c.indexOf("n")!=-1){var f=c.split("n",2),e=f[0]?f[0]=="-"?-1:b(f[0]):1,g=f[1]?b(f[1]):0,h=0,d=-1;e>0?g<0?g=g%e&&e+g%e:g>0&&(g>=e&&(h=g-g%e),g%=e):e<0&&(e*=-1,g>0&&(d=g,g%=e));if(e>0)return function(a){a=u(a);return a>=h&&(d<0||a<=d)&&a%e==g};else c=g}var j=b(c);return function(a){return u(a)==j}}},C=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(a){var c=a.toLowerCase();c=="class"&&(a="className");return function(b){return d?
b.getAttribute(a):b[a]||b[c]}}:function(a){return function(c){return c&&c.getAttribute&&c.hasAttribute(a)}},B=function(a,c){if(!a)return k;var c=c||{},e=null;"el"in c||(e=m(e,o));"tag"in c||a.tag!="*"&&(e=m(e,function(c){return c&&c.tagName==a.getTag()}));"classes"in c||b(a.classes,function(a,c){var b=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");e=m(e,function(a){return b.test(a.className)});e.count=c});"pseudos"in c||b(a.pseudos,function(a){var c=a.name;A[c]&&(e=m(e,A[c](c,a.value)))});"attrs"in c||b(a.attrs,
function(a){var c,b=a.attr;a.type&&p[a.type]?c=p[a.type](b,a.matchFor):b.length&&(c=C(b));c&&(e=m(e,c))});"id"in c||a.id&&(e=m(e,function(c){return!!c&&c.id==a.id}));e||"default"in c||(e=k);return e},I=function(a){return function(c,b,f){for(;c=c[s];)if(!r||o(c)){(!f||J(c,f))&&a(c)&&b.push(c);break}return b}},D=function(a){return function(c,b,f){for(c=c[s];c;){if(v(c)){if(f&&!J(c,f))break;a(c)&&b.push(c)}c=c[s]}return b}},L=function(a){a=a||k;return function(c,b,f){for(var e=0,h=c[g];c=h[e++];)v(c)&&
(!f||J(c,f))&&a(c,e)&&b.push(c);return b}},K={},S=function(c){var b=K[c.query];if(b)return b;var f=c.infixOper,f=f?f.oper:"",e=B(c,{el:1}),g="*"==c.tag,d=a.doc.getElementsByClassName;if(f){d={el:1};if(g)d.tag=1;e=B(c,d);"+"==f?b=I(e):"~"==f?b=D(e):">"==f&&(b=L(e))}else if(c.id)e=!c.loops&&g?k:B(c,{el:1,id:1}),b=function(b,f){var g=a.byId(c.id,b.ownerDocument||b);if(g&&e(g))if(9==b.nodeType)return n(g,f);else{for(var h=g.parentNode;h;){if(h==b)break;h=h.parentNode}if(h)return n(g,f)}};else if(d&&/\{\s*\[native code\]\s*\}/.test(String(d))&&
c.classes.length&&!h)var e=B(c,{el:1,classes:1,id:1}),j=c.classes.join(" "),b=function(a,c,b){for(var c=n(0,c),f,g=0,h=a.getElementsByClassName(j);f=h[g++];)e(f,a)&&J(f,b)&&c.push(f);return c};else!g&&!c.loops?b=function(a,b,f){for(var b=n(0,b),e=0,g=a.getElementsByTagName(c.getTag());a=g[e++];)J(a,f)&&b.push(a);return b}:(e=B(c,{el:1,tag:1,id:1}),b=function(a,b,f){for(var b=n(0,b),g,h=0,d=a.getElementsByTagName(c.getTag());g=d[h++];)e(g,a)&&J(g,f)&&b.push(g);return b});return K[c.query]=b},U={},
O={},M=function(a){var b=l(c(a));if(b.length==1){var f=S(b[0]);return function(a){if(a=f(a,new e))a.nozip=!0;return a}}return function(a){for(var a=n(a),c,f,e=b.length,g,h,d=0;d<e;d++){h=[];c=b[d];f=a.length-1;if(f>0)g={},h.nozip=!0;f=S(c);for(var j=0;c=a[j];j++)f(c,h,g);if(!h.length)break;a=h}return h}},G=navigator.userAgent,G=a.isWebKit&&G.indexOf("WebKit/")>0&&parseFloat(G.split("WebKit/")[1])>528,N=a.isIE?"commentStrip":"nozip",F=!!a.doc.querySelectorAll&&(!a.isSafari||a.isSafari>3.1||G),E=/n\+\d|([^ ])?([>~+])([^ =])?/g,
H=function(a,c,b,f){return b?(c?c+" ":"")+b+(f?" "+f:""):a},T=function(c,b){c=c.replace(E,H);if(F){var f=O[c];if(f&&!b)return f}if(f=U[c])return f;var f=c.charAt(0),e=-1==c.indexOf(" ");c.indexOf("#")>=0&&e&&(b=!0);if(F&&!b&&">~+".indexOf(f)==-1&&(!a.isIE||c.indexOf(":")==-1)&&!(h&&c.indexOf(".")>=0)&&c.indexOf(":contains")==-1&&c.indexOf(":checked")==-1&&c.indexOf("|=")==-1){var g=">~+".indexOf(c.charAt(c.length-1))>=0?c+" *":c;return O[c]=function(a){try{if(!(9==a.nodeType||e))throw"";var b=a.querySelectorAll(g);
b[N]=!0;return b}catch(f){return T(c,!0)(a)}}}else{var d=c.split(/\s*,\s*/);return U[c]=d.length<2?M(c):function(a){for(var c=0,b=[],f;f=d[c++];)b=b.concat(M(f)(a));return b}}},P=0,Q=a.isIE?function(a){return d?a.getAttribute("_uid")||a.setAttribute("_uid",++P)||P:a.uniqueID}:function(a){return a._uid||(a._uid=++P)},J=function(a,c){if(!c)return 1;var b=Q(a);return!c[b]?c[b]=1:0},V=function(c){if(c&&c.nozip)return e._wrap?e._wrap(c):c;var b=new e;if(!c||!c.length)return b;c[0]&&b.push(c[0]);if(c.length<
2)return b;P++;if(a.isIE&&d){var f=P+"";c[0].setAttribute("_zipIdx",f);for(var g=1,h;h=c[g];g++)c[g].getAttribute("_zipIdx")!=f&&b.push(h),h.setAttribute("_zipIdx",f)}else if(a.isIE&&c.commentStrip)try{for(g=1;h=c[g];g++)o(h)&&b.push(h)}catch(k){}else{c[0]&&(c[0]._zipIdx=P);for(g=1;h=c[g];g++)c[g]._zipIdx!=P&&b.push(h),h._zipIdx=P}return b};a.query=function(c,b){e=a._NodeListCtor;if(!c)return new e;if(c.constructor==e)return c;if(typeof c!="string")return new e(c);if(typeof b=="string"&&(b=a.byId(b),
!b))return new e;var b=b||a.doc,f=b.ownerDocument||b.documentElement;d=b.contentType&&b.contentType=="application/xml"||a.isOpera&&(b.doctype||f.toString()=="[object XMLDocument]")||!!f&&(a.isIE?f.xml:b.xmlVersion||f.xmlVersion);return(f=T(c)(b))&&f.nozip&&!e._wrap?f:V(f)};a.query.pseudos=A;a._filterQueryResult=function(c,b,f){for(var e=new a._NodeListCtor,g=l(b),g=g.length==1&&!/[^\w#\.]/.test(b)?B(g[0]):function(a){return dojo.query(b,f).indexOf(a)!=-1},h=0,d;d=c[h];h++)g(d)&&e.push(d);return e}},
d=function(){acme={trim:function(a){for(var a=a.replace(/^\s+/,""),c=a.length-1;c>=0;c--)if(/\S/.test(a.charAt(c))){a=a.substring(0,c+1);break}return a},forEach:function(a,c,b){if(a&&a.length)for(var f=0,d=a.length;f<d;++f)c.call(b||window,a[f],f,a)},byId:function(a,c){return typeof a=="string"?(c||document).getElementById(a):a},doc:document,NodeList:Array};var a=navigator,c=a.userAgent,a=a.appVersion,b=parseFloat(a);acme.isOpera=c.indexOf("Opera")>=0?b:void 0;acme.isKhtml=a.indexOf("Konqueror")>=
0?b:void 0;acme.isWebKit=parseFloat(c.split("WebKit/")[1])||void 0;acme.isChrome=parseFloat(c.split("Chrome/")[1])||void 0;if((c=Math.max(a.indexOf("WebKit"),a.indexOf("Safari"),0))&&!acme.isChrome)if(acme.isSafari=parseFloat(a.split("Version/")[1]),!acme.isSafari||parseFloat(a.substr(c+7))<=419.3)acme.isSafari=2;if(document.all&&!acme.isOpera)acme.isIE=parseFloat(a.split("MSIE ")[1])||void 0;Array._wrap=function(a){return a};return acme};typeof define=="function"&&define("dojo/_base/query",["dojo/lib/kernel",
"dojo/_base/NodeList","dojo/_base/lang","dojo/_base/window"],function(a){b(this.queryPortability||this.acme||a)});typeof define!="function"&&(this.dojo?(dojo.provide("dojo._base.query"),dojo.require("dojo._base.NodeList"),dojo.require("dojo._base.lang"),b(this.queryPortability||this.acme||dojo)):b(this.queryPortability||this.acme||d()))})();
define("dojo/_base/xhr",["dojo/lib/kernel","dojo/_base/Deferred","dojo/_base/json","dojo/_base/lang","dojo/_base/query"],function(b){(function(){var d=b.config;b.fieldToObject=function(a){var c=null;if(a=b.byId(a)){var f=a.name,e=(a.type||"").toLowerCase();if(f&&e&&!a.disabled)if(e=="radio"||e=="checkbox"){if(a.checked)c=a.value}else a.multiple?(c=[],b.query("option",a).forEach(function(a){a.selected&&c.push(a.value)})):c=a.value}return c};b.formToObject=function(a){var c={};b.forEach(b.byId(a).elements,
function(a){var f=a.name,e=(a.type||"").toLowerCase();if(f&&e&&"file|submit|image|reset|button|".indexOf(e)==-1&&!a.disabled){a=b.fieldToObject(a);if(a!==null){var g=c[f];typeof g=="string"?c[f]=[g,a]:b.isArray(g)?g.push(a):c[f]=a}if(e=="image")c[f+".x"]=c[f+".y"]=c[f].x=c[f].y=0}});return c};b.objectToQuery=function(a){var c=encodeURIComponent,f=[],e={},g;for(g in a){var h=a[g];if(h!=e[g]){var d=c(g)+"=";if(b.isArray(h))for(var j=0;j<h.length;j++)f.push(d+c(h[j]));else f.push(d+c(h))}}return f.join("&")};
b.formToQuery=function(a){return b.objectToQuery(b.formToObject(a))};b.formToJson=function(a,c){return b.toJson(b.formToObject(a),c)};b.queryToObject=function(a){var c={},a=a.split("&"),f=decodeURIComponent;b.forEach(a,function(a){if(a.length){var e=a.split("="),a=f(e.shift()),e=f(e.join("="));typeof c[a]=="string"&&(c[a]=[c[a]]);b.isArray(c[a])?c[a].push(e):c[a]=e}});return c};b._blockAsync=!1;var a=b._contentHandlers=b.contentHandlers={text:function(a){return a.responseText},json:function(a){return b.fromJson(a.responseText||
null)},"json-comment-filtered":function(a){b.config.useCommentedJson||console.warn("Consider using the standard mimetype:application/json. json-commenting can introduce security issues. To decrease the chances of hijacking, use the standard the 'json' handler and prefix your json with: {}&&\nUse djConfig.useCommentedJson=true to turn off this message.");var a=a.responseText,c=a.indexOf("/*"),f=a.lastIndexOf("*/");if(c==-1||f==-1)throw Error("JSON was not comment filtered");return b.fromJson(a.substring(c+
2,f))},javascript:function(a){return b.eval(a.responseText)},xml:function(a){var c=a.responseXML;if(b.isIE&&(!c||!c.documentElement)){var f=function(a){return"MSXML"+a+".DOMDocument"},f=["Microsoft.XMLDOM",f(6),f(4),f(3),f(2)];b.some(f,function(b){try{var f=new ActiveXObject(b);f.async=!1;f.loadXML(a.responseText);c=f}catch(e){return!1}return!0})}return c},"json-comment-optional":function(c){return c.responseText&&/^[^{\[]*\/\*/.test(c.responseText)?a["json-comment-filtered"](c):a.json(c)}};b._ioSetArgs=
function(a,c,f,e){var g={args:a,url:a.url},h=null;if(a.form){var h=b.byId(a.form),j=h.getAttributeNode("action");g.url=g.url||(j?j.value:null);h=b.formToObject(h)}j=[{}];h&&j.push(h);a.content&&j.push(a.content);a.preventCache&&j.push({"dojo.preventCache":(new Date).valueOf()});g.query=b.objectToQuery(b.mixin.apply(null,j));g.handleAs=a.handleAs||"text";var k=new b.Deferred(c);k.addCallbacks(f,function(a){return e(a,k)});var l=a.load;l&&b.isFunction(l)&&k.addCallback(function(c){return l.call(a,c,
g)});var m=a.error;m&&b.isFunction(m)&&k.addErrback(function(c){return m.call(a,c,g)});var n=a.handle;n&&b.isFunction(n)&&k.addBoth(function(c){return n.call(a,c,g)});d.ioPublish&&b.publish&&g.args.ioPublish!==!1&&(k.addCallbacks(function(a){b.publish("/dojo/io/load",[k,a]);return a},function(a){b.publish("/dojo/io/error",[k,a]);return a}),k.addBoth(function(a){b.publish("/dojo/io/done",[k,a]);return a}));k.ioArgs=g;return k};var c=function(a){a.canceled=!0;var c=a.ioArgs.xhr,b=typeof c.abort;(b==
"function"||b=="object"||b=="unknown")&&c.abort();a=a.ioArgs.error;if(!a)a=Error("xhr cancelled"),a.dojoType="cancel";return a},f=function(c){c=a[c.ioArgs.handleAs](c.ioArgs.xhr);return c===void 0?null:c},e=function(a,c){c.ioArgs.args.failOk||console.error(a);return a},h=null,g=[],j=0,k=function(a){j<=0&&(j=0,d.ioPublish&&b.publish&&(!a||a&&a.ioArgs.args.ioPublish!==!1)&&b.publish("/dojo/io/stop"))},l=function(){var a=(new Date).getTime();if(!b._blockAsync)for(var c=0,f;c<g.length&&(f=g[c]);c++){var e=
f.dfd,d=function(){if(!e||e.canceled||!f.validCheck(e))g.splice(c--,1),j-=1;else if(f.ioCheck(e))g.splice(c--,1),f.resHandle(e),j-=1;else if(e.startTime&&e.startTime+(e.ioArgs.args.timeout||0)<a){g.splice(c--,1);var b=Error("timeout exceeded");b.dojoType="timeout";e.errback(b);e.cancel();j-=1}};if(b.config.debugAtAllCosts)d.call(this);else try{d.call(this)}catch(l){e.errback(l)}}k(e);g.length||(clearInterval(h),h=null)};b._ioCancelAll=function(){try{b.forEach(g,function(a){try{a.dfd.cancel()}catch(c){}})}catch(a){}};
b.isIE&&b.addOnWindowUnload(b._ioCancelAll);b._ioNotifyStart=function(a){d.ioPublish&&b.publish&&a.ioArgs.args.ioPublish!==!1&&(j||b.publish("/dojo/io/start"),j+=1,b.publish("/dojo/io/send",[a]))};b._ioWatch=function(a,c,b,f){var e=a.ioArgs.args;if(e.timeout)a.startTime=(new Date).getTime();g.push({dfd:a,validCheck:c,ioCheck:b,resHandle:f});h||(h=setInterval(l,50));e.sync&&l()};var m=function(a){return a.ioArgs.xhr.readyState},n=function(a){return 4==a.ioArgs.xhr.readyState},o=function(a){var c=a.ioArgs.xhr;
if(b._isDocumentOk(c))a.callback(a);else{var f=Error("Unable to load "+a.ioArgs.url+" status:"+c.status);f.status=c.status;f.responseText=c.responseText;a.errback(f)}};b._ioAddQueryToUrl=function(a){if(a.query.length)a.url+=(a.url.indexOf("?")==-1?"?":"&")+a.query,a.query=null};b.xhr=function(a,g,h){var d=b._ioSetArgs(g,c,f,e),j=d.ioArgs,k=j.xhr=b._xhrObj(j.args);if(!k)return d.cancel(),d;"postData"in g?j.query=g.postData:"putData"in g?j.query=g.putData:"rawBody"in g?j.query=g.rawBody:(arguments.length>
2&&!h||"POST|PUT".indexOf(a.toUpperCase())==-1)&&b._ioAddQueryToUrl(j);k.open(a,j.url,g.sync!==!0,g.user||void 0,g.password||void 0);if(g.headers)for(var l in g.headers)l.toLowerCase()==="content-type"&&!g.contentType?g.contentType=g.headers[l]:g.headers[l]&&k.setRequestHeader(l,g.headers[l]);k.setRequestHeader("Content-Type",g.contentType||"application/x-www-form-urlencoded");(!g.headers||!("X-Requested-With"in g.headers))&&k.setRequestHeader("X-Requested-With","XMLHttpRequest");b._ioNotifyStart(d);
if(b.config.debugAtAllCosts)k.send(j.query);else try{k.send(j.query)}catch(t){j.error=t,d.cancel()}b._ioWatch(d,m,n,o);return d};b.xhrGet=function(a){return b.xhr("GET",a)};b.rawXhrPost=b.xhrPost=function(a){return b.xhr("POST",a,!0)};b.rawXhrPut=b.xhrPut=function(a){return b.xhr("PUT",a,!0)};b.xhrDelete=function(a){return b.xhr("DELETE",a)}})();return b.xhr});
define("dojo/_base/fx",["dojo/lib/kernel","dojo/_base/Color","dojo/_base/connect","dojo/_base/lang","dojo/_base/html"],function(b){(function(){var d=b._mixin;b._Line=function(a,c){this.start=a;this.end=c};b._Line.prototype.getValue=function(a){return(this.end-this.start)*a+this.start};b.Animation=function(a){d(this,a);if(b.isArray(this.curve))this.curve=new b._Line(this.curve[0],this.curve[1])};b._Animation=b.Animation;b.extend(b.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,
_getStep:function(){var a=this._percent,c=this.easing;return c?c(a):a},_fire:function(a,c){var f=c||[];if(this[a])if(b.config.debugAtAllCosts)this[a].apply(this,f);else try{this[a].apply(this,f)}catch(e){console.error("exception in animation handler for:",a),console.error(e)}return this},play:function(a,c){this._delayTimer&&this._clearTimer();if(c)this._stopTimer(),this._active=this._paused=!1,this._percent=0;else if(this._active&&!this._paused)return this;this._fire("beforeBegin",[this.node]);var f=
a||this.delay,e=b.hitch(this,"_play",c);if(f>0)return this._delayTimer=setTimeout(e,f),this;e();return this},_play:function(){this._delayTimer&&this._clearTimer();this._startTime=(new Date).valueOf();this._paused&&(this._startTime-=this.duration*this._percent);this._active=!0;this._paused=!1;var a=this.curve.getValue(this._getStep());if(!this._percent){if(!this._startRepeatCount)this._startRepeatCount=this.repeat;this._fire("onBegin",[a])}this._fire("onPlay",[a]);this._cycle();return this},pause:function(){this._delayTimer&&
this._clearTimer();this._stopTimer();if(!this._active)return this;this._paused=!0;this._fire("onPause",[this.curve.getValue(this._getStep())]);return this},gotoPercent:function(a,c){this._stopTimer();this._active=this._paused=!0;this._percent=a;c&&this.play();return this},stop:function(a){this._delayTimer&&this._clearTimer();if(!this._timer)return this;this._stopTimer();if(a)this._percent=1;this._fire("onStop",[this.curve.getValue(this._getStep())]);this._active=this._paused=!1;return this},status:function(){return this._active?
this._paused?"paused":"playing":"stopped"},_cycle:function(){if(this._active){var a=((new Date).valueOf()-this._startTime)/this.duration;a>=1&&(a=1);this._percent=a;this.easing&&(a=this.easing(a));this._fire("onAnimate",[this.curve.getValue(a)]);if(this._percent<1)this._startTimer();else{this._active=!1;if(this.repeat>0)this.repeat--,this.play(null,!0);else if(this.repeat==-1)this.play(null,!0);else if(this._startRepeatCount)this.repeat=this._startRepeatCount,this._startRepeatCount=0;this._percent=
0;this._fire("onEnd",[this.node]);!this.repeat&&this._stopTimer()}}return this},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer}});var a=0,c=null,f={run:function(){}};b.extend(b.Animation,{_startTimer:function(){if(!this._timer)this._timer=b.connect(f,"run",this,"_cycle"),a++;c||(c=setInterval(b.hitch(f,"run"),this.rate))},_stopTimer:function(){if(this._timer)b.disconnect(this._timer),this._timer=null,a--;a<=0&&(clearInterval(c),c=null,a=0)}});var e=b.isIE?function(a){var c=
a.style;if(!c.width.length&&b.style(a,"width")=="auto")c.width="auto"}:function(){};b._fade=function(a){a.node=b.byId(a.node);var c=d({properties:{}},a),a=c.properties.opacity={};a.start=!("start"in c)?function(){return+b.style(c.node,"opacity")||0}:c.start;a.end=c.end;a=b.animateProperty(c);b.connect(a,"beforeBegin",b.partial(e,c.node));return a};b.fadeIn=function(a){return b._fade(d({end:1},a))};b.fadeOut=function(a){return b._fade(d({end:0},a))};b._defaultEasing=function(a){return 0.5+Math.sin((a+
1.5)*Math.PI)/2};var h=function(a){this._properties=a;for(var c in a){var f=a[c];if(f.start instanceof b.Color)f.tempColor=new b.Color}};h.prototype.getValue=function(a){var c={},f;for(f in this._properties){var e=this._properties[f],h=e.start;h instanceof b.Color?c[f]=b.blendColors(h,e.end,a,e.tempColor).toCss():b.isArray(h)||(c[f]=(e.end-h)*a+h+(f!="opacity"?e.units||"px":0))}return c};b.animateProperty=function(a){var c=a.node=b.byId(a.node);if(!a.easing)a.easing=b._defaultEasing;a=new b.Animation(a);
b.connect(a,"beforeBegin",a,function(){var a={},f;for(f in this.properties){if(f=="width"||f=="height")this.node.display="block";var e=this.properties[f];b.isFunction(e)&&(e=e(c));e=a[f]=d({},b.isObject(e)?e:{end:e});if(b.isFunction(e.start))e.start=e.start(c);if(b.isFunction(e.end))e.end=e.end(c);var g=f.toLowerCase().indexOf("color")>=0,o=function(a,c){var f={height:a.offsetHeight,width:a.offsetWidth}[c];if(f!==void 0)return f;f=b.style(a,c);return c=="opacity"?+f:g?f:parseFloat(f)};if("end"in e){if(!("start"in
e))e.start=o(c,f)}else e.end=o(c,f);g?(e.start=new b.Color(e.start),e.end=new b.Color(e.end)):e.start=f=="opacity"?+e.start:parseFloat(e.start)}this.curve=new h(a)});b.connect(a,"onAnimate",b.hitch(b,"style",a.node));return a};b.anim=function(a,c,f,e,h,d){return b.animateProperty({node:a,duration:f||b.Animation.prototype.duration,properties:c,easing:e,onEnd:h}).play(d||0)}})();return b.animateProperty});
define("dojo","dojo/lib/kernel,dojo/_base/lang,dojo/_base/array,dojo/_base/declare,dojo/_base/connect,dojo/_base/Deferred,dojo/_base/json,dojo/_base/Color,dojo/_base/window,dojo/_base/event,dojo/_base/html,dojo/_base/NodeList,dojo/_base/query,dojo/_base/xhr,dojo/_base/fx".split(","),function(b){return b});
(function(b,d){typeof define==="function"&&define.amd?define("orion/Deferred",[],d):typeof exports==="object"?module.exports=d():(b.orion=b.orion||{},b.orion.Deferred=d())})(this,function(){function b(a){if(g)c?(f.next={fn:a,next:null},f=f.next):f=c={fn:a,next:null};else{g=!0;do{for(;a;){a();if(e)c?f.next=e:c=e,f=h;c?(e=c.next,h=f,a=c.fn,c=f=null):a=null}g=!1}while(g)}}function d(a){return function(){a.apply(null,arguments)}}function a(c){function f(){for(;o;){var a=o;o=o.next;var c=a.deferred,b=
r.isResolved()?"resolve":"reject";if(a[b])try{var e=a[b](h);e&&typeof e.then==="function"?(a.cancel=e.cancel,e.then(d(c.resolve),d(c.reject),c.progress)):c.resolve(e)}catch(g){c.reject(g)}else c[b](h)}o=q=null}function e(a){if(g){if(a)throw Error("already "+g);return!0}return!1}var h,g,o,q,p=!1,r=this;this.reject=function(a,c){e(c)||(g="rejected",h=a,o&&b(f));return r.promise};this.resolve=function(a,c){e(c)||(g="resolved",h=a,o&&b(f));return r.promise};this.progress=function(a,c){if(!e(c))for(var b=
o;b;)b.progress&&b.progress(a),b=b.next;return r.promise};this.cancel=function(a,g){if(!e(g))return p=!0,c&&(a=c(a)||a),a=a||Error("canceled"),b(r.reject.bind(r,a)),a;for(var h=o;h;){if(h.canceling)return delete h.canceling,f(),h.cancel&&h.cancel(a);h=h.next}};this.then=function(c,e,h){var d={resolve:c,reject:e,progress:h,cancel:this.cancel,deferred:new a(function(a){d.canceling=!0;return d.cancel&&d.cancel(a)})};o?q.next=d:o=d;q=d;g&&b(f);return d.deferred.promise};this.isResolved=function(){return g===
"resolved"};this.isRejected=function(){return g==="rejected"};this.isFulfilled=function(){return!!g};this.isCanceled=function(){return p};this.promise={then:this.then,cancel:this.cancel,isResolved:this.isResolved,isRejected:this.isRejected,isFulfilled:this.isFulfilled,isCanceled:this.isCanceled};this.notify=this.progress;this.state=function(){return g||"pending"};this.promise.state=this.state}var c,f,e,h,g=!1;a.all=function(c,b){function f(a,c){d.isFulfilled()||(g[a]=c,--h===0&&d.resolve(g))}function e(a,
c){if(!d.isFulfilled()){if(b)try{f(a,b(c));return}catch(h){c=h}d.reject(c)}}var h=c.length,g=[],d=new a(function(a){c.forEach(function(c){c.cancel&&c.cancel(a)})});h===0?d.resolve(g):c.forEach(function(a,c){a.then(f.bind(null,c),e.bind(null,c))});return d.promise};a.when=function(c,b,f,e){var h;if(!(c&&typeof c.then==="function"))h=new a,h.resolve(c),c=h.promise;return c.then(b,f,e)};return a});
define("orion/EventTarget",[],function(){function b(){this._namedListeners={}}b.prototype={dispatchEvent:function(b){if(!b.type)throw Error("unspecified type");var a=this._namedListeners[b.type];a&&a.forEach(function(a){try{typeof a==="function"?a(b):a.handleEvent(b)}catch(f){typeof console!=="undefined"&&console.log(f)}});return!b.defaultPrevented},addEventListener:function(b,a){if(typeof a==="function"||a.handleEvent)this._namedListeners[b]=this._namedListeners[b]||[],this._namedListeners[b].push(a)},
removeEventListener:function(b,a){var c=this._namedListeners[b];if(c)for(var f=0;f<c.length;f++)if(c[f]===a){c.length===1?delete this._namedListeners[b]:c.splice(f,1);break}}};b.prototype.constructor=b;b.attach=function(d){var a=new b;d.dispatchEvent=a.dispatchEvent.bind(a);d.addEventListener=a.addEventListener.bind(a);d.removeEventListener=a.removeEventListener.bind(a)};return b});
define("orion/serviceregistry",["orion/Deferred","orion/EventTarget"],function(b,d){function a(a,c,b){this._properties=b||{};this._properties["service.id"]=a;this._properties.objectClass=c;this._properties["service.names"]=c}function c(a,c,b){this._serviceId=a;this._serviceReference=c;this._internalRegistry=b}function f(a,c){function f(e){return function(){var f;try{if(!c())throw Error("Service was unregistered");var h=a[e].apply(a,Array.prototype.slice.call(arguments));if(h&&typeof h.then==="function")return h;
else f=new b,f.resolve(h)}catch(d){f=new b,f.reject(d)}return f.promise}}for(var e in a)typeof a[e]==="function"&&(this[e]=f(e))}function e(a,c){this.type=a;this.serviceReference=c}function h(){this._entries=[];this._namedReferences={};this._serviceEventTarget=new d;var a=this;this._internalRegistry={isRegistered:function(c){return a._entries[c]?!0:!1},unregisterService:function(c){var b=a._entries[c];if(!b)throw Error("already unregistered");var f=b.reference;a._serviceEventTarget.dispatchEvent(new e("unregistering",
f));a._entries[c]=null;f.getProperty("objectClass").forEach(function(c){for(var b=a._namedReferences[c],e=0;e<b.length;e++)if(b[e]===f){b.length===1?delete a._namedReferences[c]:b.splice(e,1);break}})},modifyService:function(c){c=a._entries[c];if(!c)throw Error("already unregistered");a._serviceEventTarget.dispatchEvent(new e("modified",c.reference))}}}a.prototype={getPropertyKeys:function(){var a=[],c;for(c in this._properties)this._properties.hasOwnProperty(c)&&a.push(c);return a},getProperty:function(a){return this._properties[a]}};
a.prototype.constructor=a;c.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(a){var c=this._serviceReference._properties;this._serviceReference._properties=a||{};a["service.id"]=this._serviceId;a.objectClass=c.objectClass;a["service.names"]=c["service.names"];this._internalRegistry.modifyService(this._serviceId)}};
c.prototype.constructor=c;h.prototype={getService:function(a){var c;if(typeof a==="string")(a=this._namedReferences[a])&&a.some(function(a){c=this._entries[a.getProperty("service.id")].service;return!!c},this);else if(a=this._entries[a.getProperty("service.id")])c=a.service;return c||null},getServiceReferences:function(a){if(a)return this._namedReferences[a]?this._namedReferences[a]:[];var c=[];this._entries.forEach(function(a){a&&c.push(a.reference)});return c},registerService:function(b,h,d){if(typeof h===
"undefined"||h===null)throw Error("invalid service");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var l=this._entries.length,m=new a(l,b,d),n=this._namedReferences;b.forEach(function(a){n[a]=n[a]||[];n[a].push(m)});b=new f(h,this._internalRegistry.isRegistered.bind(null,l));this._entries.push({reference:m,service:b});b=this._internalRegistry;this._serviceEventTarget.dispatchEvent(new e("registered",m));return new c(l,m,b)},addEventListener:function(a,c){this._serviceEventTarget.addEventListener(a,
c)},removeEventListener:function(a,c){this._serviceEventTarget.removeEventListener(a,c)}};h.prototype.constructor=h;return{ServiceRegistry:h}});
define("orion/xhr",["orion/Deferred"],function(b){function d(a){return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()})}function a(a,b,e,h){var g=typeof e.response!=="undefined"?e.response:e.responseText,a={args:b,response:g,responseText:typeof g==="string"?g:null,status:e.status,url:a,xhr:e};if(typeof h!=="undefined")a.error=h;return a}return function(c,f,e){var e=e||{},h=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,g=
new b,j=e.headers||{},k=e.log||!1,l,m;typeof j["X-Requested-With"]==="undefined"&&(j["X-Requested-With"]="XMLHttpRequest");if(e.query&&typeof e.query==="object"){var n=e.query,o=Object.keys(n),q=[];for(m=0;m<o.length;m++){var p=o[m],r=n[p];q.push(d(p)+"="+d(r))}q.length&&(n=f.split("#"),n[0]+=(n[0].indexOf("?")===-1?"?":"&")+q.join("&"),f=n.join("#"))}if(typeof e.data!=="undefined"&&(c==="POST"||c==="PUT"))l=e.data;if(typeof e.responseType==="string")h.responseType=e.responseType;h.onreadystatechange=
function(){if(h.readyState===4){var c=a(f,e,h),b=h.status;200<=b&&b<400?g.resolve(c):(k&&typeof console!=="undefined"&&console.log(Error(h.statusText)),g.reject(c))}};try{h.open(c,f,!0);if(typeof e.timeout==="number")typeof h.timeout==="number"?(h.timeout=e.timeout,h.addEventListener("timeout",function(){g.reject(a(f,e,h,"Timeout exceeded"))})):setTimeout(function(){g.state()!=="resolved"&&g.state()!=="rejected"&&g.reject(a(f,e,h,"Timeout exceeded"))},e.timeout);var s=Object.keys(j);for(m=0;m<s.length;m++){var x=
s[m];h.setRequestHeader(x,j[x])}h.send(l)}catch(v){g.reject(a(f,e,h,v))}return g}});
define("orion/preferences",["require","orion/Deferred","orion/xhr"],function(b,d,a){function c(a,c){this._name=a;this._providers=c;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function f(a,c){return{get:function(b,f){if(c===0)return null;var e=localStorage.getItem(a+b);if(e===null)return null;e=JSON.parse(e);return f||c===-1||e._expires&&e._expires>(new Date).getTime()?(delete e._expires,e):null},set:function(b,f){if(c!==0){if(c!==-1)f._expires=(new Date).getTime()+1E3*c;
if(Object.keys(f).length===0)localStorage.removeItem(a+b);else{var e=JSON.stringify(f);localStorage.setItem(a+b,e);delete f._expires}}},remove:function(c){localStorage.removeItem(a+c)}}}function e(a){this._currentPromises={};this._cache=new f("/orion/preferences/user",3600);this._service=null;this.available=function(){if(!this._service){var c=a.getServiceReferences("orion.core.preference.provider");if(c.length>0)this._service=a.getService(c[0])}return!!this._service}}function h(a){this._location=
a;this._currentPromise=null;this._cache=new f("/orion/preferences/default",3600)}function g(){this._cache=new f("/orion/preferences/local",-1)}function j(a,c){this._userProvider=new e(a);this._localProvider=new g;c=c||"defaults.pref";c.indexOf("://")===-1&&(c=b.toUrl(c));this._defaultsProvider=new h(c);this._serviceRegistration=a.registerService("orion.core.preference",this)}c.prototype={_flush:function(){for(var a=[],c=0;c<this._stores.length;++c){var b=this._stores[c];this._dirty.indexOf(b)!==-1&&
a.push(this._providers[c].put(this._name,b))}this._dirty=[];return d.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 c=this._stores[a],b;for(b in c)c.hasOwnProperty(b)&&typeof this._cached[b]==="undefined"&&(this._cached[b]=
c[b])}}return this._cached},keys:function(){return Object.keys(this._getCached())},get:function(a){return this._getCached()[a]},put:function(a,c){if(this._stores.length!==0){var b=this._stores[0];if(b[a]!==c)b[a]=c,this._cached=null,this._scheduleFlush(b)}},remove:function(a){for(var c=0;c<this._stores.length;++c){var b=this._stores[c];if(b.hasOwnProperty(a))return delete b[a],this._cached=null,this._scheduleFlush(b),!0}return!1},clear:function(){for(var a=0;a<this._stores.length;++a)this._stores[a]=
{},this._scheduleFlush(this._stores[a]);this._cached=null},sync:function(a){if(this._flushPending)return this._flushPending=!1,this._flush();for(var c=this,b=[],f=0;f<this._providers.length;++f)b.push(this._providers[f].get(this._name,a).then(function(a){return function(b){c._stores[a]=b}}(f)));return d.all(b).then(function(){c._cached=null;c._getCached()})},flush:function(){this._flush()}};e.prototype={get:function(a,c){if(this._currentPromises[a])return this._currentPromises[a];var b=new d,f=null;
c?this._cache.remove(a):f=this._cache.get(a);if(f!==null)b.resolve(f);else{this._currentPromises[a]=b;var e=this;this._service.get(a).then(function(c){e._cache.set(a,c);delete e._currentPromises[a];b.resolve(c)},function(c){c.status===404?(c={},e._cache.set(a,c),delete e._currentPromises[a],b.resolve(c)):(delete e._currentPromises[a],b.resolve(e._cache.get(a,!0)||{}))})}return b},put:function(a,c){this._cache.set(a,c);return this._service.put(a,c)}};h.prototype={get:function(c,b){if(this._currentPromise)return this._currentPromise;
var f=new d,e=null;b?this._cache.remove(c):e=this._cache.get(c);if(e!==null)f.resolve(e);else{this._currentPromise=f;var h=this;a("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=JSON.parse(a.response);h._cache.set(c,a[c]||{});h._currentPromise=null;f.resolve(a[c]||{})},function(a){a.xhr.status===401||a.xhr.status===404?(h._cache.set(c,{}),h._currentPromise=null,f.resolve({})):(h._currentPromise=null,a=h._cache.get(c,!0),a!==null?f.resolve(a[c]||{}):f.resolve({}))})}return f},
put:function(){var a=new d;a.resolve();return a}};g.prototype={get:function(a){var c=new d,a=this._cache.get(a);a!==null?c.resolve(a):c.resolve({});return c},put:function(a,c){var b=new d;this._cache.set(a,c);b.resolve();return b}};j.DEFAULT_SCOPE=1;j.LOCAL_SCOPE=2;j.USER_SCOPE=4;j.prototype={listenForChangedSettings:function(a){window.addEventListener("storage",a,!1);return"/orion/preferences/local/settings"},getPreferences:function(a,b){if(!b||typeof b!=="number"||b>7||b<1)b=j.DEFAULT_SCOPE|j.LOCAL_SCOPE|
j.USER_SCOPE;var f=[];j.USER_SCOPE&b&&this._userProvider.available()&&f.push(this._userProvider);j.LOCAL_SCOPE&b&&f.push(this._localProvider);j.DEFAULT_SCOPE&b&&f.push(this._defaultsProvider);var e=new c(a,f);return e.sync().then(function(){return e})},getSetting:function(a,c,b){for(var f,e=0;e<a.length;e++)if(a[e].label===c)for(var h=0;h<a[e].data.length;h++)if(a[e].data[h].label===b){f=a[e].data[h].value;break}return f}};return{PreferencesService:j}});
define("orion/pluginregistry",["orion/Deferred","orion/EventTarget"],function(b,d){function a(a,c){var b=Object.keys(a),f=Object.keys(c);if(b.length!==f.length)return!1;b.sort();f.sort();for(var e=0,h=b.length;e<h;e++){var g=b[e];if(g!==f[e])return!1;var d=a[g],g=c[g];if(d!==g&&JSON.stringify(d)!==JSON.stringify(g))return!1}return!0}function c(a){if(a.indexOf("://")===-1){var c=document.createElement("a");c.href=a;return c.href}return a}function f(a){var c=null;return{key:function(b){return(c=c||
Object.keys(a))[b]},getItem:function(c){return a[c]},setItem:function(b,f){a[b]=f;c=null},removeItem:function(b){delete a[b];c=null},clear:function(){(c=c||Object.keys(a)).forEach(function(c){delete a[c]}.bind(this));c=null}}}function e(a,c){return{type:a,plugin:c}}function h(c,f,h){function g(a,c,f){if(!C)return(new b).reject(Error("plugin not connected"));var e=I++,d=new b(function(a){y==="active"&&h.postMessage({id:e,cancel:typeof a==="string"?a:"canceled"},C)});D[String(e)]=d;h.postMessage({id:e,
serviceId:a,method:c,params:f},C);return d.promise}function n(a){var c={};if(a.methods&&(a.methods.forEach(function(b){c[b]=function(){var c=Array.prototype.slice.call(arguments);return y==="active"?g(a.serviceId,b,c):s.start({"transient":!0}).then(function(){return g(a.serviceId,b,c)})}}),c.addEventListener&&c.removeEventListener)){var b=new d;c.dispatchEvent=b.dispatchEvent.bind(b);var f=c.addEventListener;c.addEventListener=function(a,c){b._namedListeners[a]||f(a);b.addEventListener(a,c)};var e=
c.removeEventListener;c.removeEventListener=function(a,c){b.removeEventListener(a,c);b._namedListeners[a]&&e(a)}}return c}function o(a){var b=JSON.parse(JSON.stringify(a.properties));b.__plugin__=c;a=a.names||a.type||[];Array.isArray(a)||(a=[a]);b.objectClass=a;return b}function q(a){var c=n(a),b=o(a),b=h.registerService(a.names||a.type,c,b);B[a.serviceId]={registration:b,proxy:c}}function p(){h.persist(c,{created:x,headers:v,services:w,autostart:t,lastModified:u})}function r(b){var f;try{if(b.method)if("manifest"===
b.method||"plugin"===b.method){var e=b.params[0];e.headers=e.headers||{};e.services=e.services||{};a(e.headers,v)&&a(e.services,w)?A.resolve(s):s.update({headers:e.headers,services:e.services}).then(function(){A.resolve(s)})}else if("dispatchEvent"===b.method){var g=B[b.serviceId].proxy;g.dispatchEvent.apply(g,b.params)}else if("progress"===b.method)f=D[String(b.requestId)],f.progress.apply(f,b.params);else if("timeout"===b.method)A&&A.reject(Error("Load timeout for plugin: "+c));else throw Error("Bad response method: "+
b.method);else if(f=D[String(b.id)],delete D[String(b.id)],b.error){var d=h.handleServiceError(s,b.error);f.reject(d)}else f.resolve(b.result)}catch(k){console.log("Plugin._responseHandler "+k)}}var s=this,f=f||{},x=f.created||(new Date).getTime(),v=f.headers||{},w=f.services||[],t=f.autostart,u=f.lastModified||0,y="installed",z,A,C,B={},I=0,D={};this._persist=p;this._resolve=function(){y="resolved";h.dispatchEvent(new e("resolved",s))};this._getAutostart=function(){return t};this._getCreated=function(){return x};
this.getLocation=function(){return c};this.getHeaders=function(){return JSON.parse(JSON.stringify(v))};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 u};this.getServiceReferences=function(){var a=[];Object.keys(B).forEach(function(c){a.push(B[c].registration.getReference())});return a};this.getState=function(){return y};this.start=function(a){if(y===
"uninstalled")return(new b).reject(Error("Plugin is uninstalled"));if(z)return z.promise.then(this.start.bind(this,a));if(y==="active")return(new b).resolve();if(!a||!a["transient"]){var f=a&&a.lazy?"lazy":"started";f!==t&&(t=f,p())}f=h.getState();if(f!=="starting"&&f!=="active")return a["transient"]?(new b).reject(Error("start transient error")):(new b).resolve();if(y==="installed")try{this._resolve()}catch(g){return(new b).reject(g)}y==="resolved"&&w.forEach(function(a){q(a)});if(a&&a.lazy)return y!==
"starting"&&(y="starting",h.dispatchEvent(new e("lazy activation",s))),(new b).resolve();var d=new b;z=d;y="starting";h.dispatchEvent(new e("starting",s));A=new b;C=h.connect(c,r);A.then(function(){A=null;y="active";h.dispatchEvent(new e("started",s));z=null;d.resolve()},function(){A=null;y="stopping";h.dispatchEvent(new e("stopping",s));Object.keys(B).forEach(function(a){B[a].registration.unregister();delete B[a]});h.disconnect(C);C=null;y="resolved";z=null;h.dispatchEvent(new e("stopped",s));d.reject(Error("plugin activation error"))});
return d.promise};this.stop=function(a){if(y==="uninstalled")return(new b).reject(Error("Plugin is uninstalled"));if(z)return z.promise.then(this.stop.bind(this,a));if((!a||!a["transient"])&&"stopped"!==t)t="stopped",p();if(y!=="active"&&y!=="starting")return(new b).resolve();z=a=new b;y="stopping";h.dispatchEvent(new e("stopping",s));Object.keys(B).forEach(function(a){B[a].registration.unregister();delete B[a]});C&&(h.disconnect(C),C=null);y="resolved";z=null;h.dispatchEvent(new e("stopped",s));
a.resolve();return a.promise};this.update=function(f){if(y==="uninstalled")return(new b).reject(Error("Plugin is uninstalled"));if(!f)return u===0&&(u=(new Date).getTime(),p()),h.loadManifest(c).then(this.update.bind(this));v=f.headers||{};w=f.services||{};t=f.autostart||t;f.lastModified?u=f.lastModified:(u=(new Date).getTime(),p());if(y==="active"||y==="starting"){var g=[];Object.keys(w).forEach(function(c){var b=w[c];g.push(c);var f=B[c];if(f){if(a(b.methods,Object.keys(f.proxy))){var c=o(b),e=
f.registration.getReference(),h={};e.getPropertyKeys().forEach(function(a){h[a]=e.getProperty(a)});a(c,h)||f.registration.setProperties(c);return}f.registration.unregister();delete B[c]}q(b)});Object.keys(B).forEach(function(a){g.indexOf(a)===-1&&(B[a].registration.unregister(),delete B[a])})}y==="active"&&(h.disconnect(C),A=new b,C=h.connect(c,r),A.then(function(){A=null},function(){A=null;y="stopping";h.dispatchEvent(new e("stopping"),s);Object.keys(B).forEach(function(a){B[a].registration.unregister();
delete B[a]});h.disconnect(C);C=null;y="resolved";h.dispatchEvent(new e("stopped",s))}));h.dispatchEvent(new e("updated",s));return(new b).resolve()};this.uninstall=function(){if(y==="uninstalled")return(new b).reject(Error("Plugin is uninstalled"));if(y==="active"||y==="starting"||y==="stopping")return this.stop().then(this.uninstall.bind(this),this.uninstall.bind(this));h.removePlugin(this);y="uninstalled";h.dispatchEvent(new e("uninstalled",s));return(new b).resolve()}}var g=/^http[s]?/i;return{Plugin:h,
PluginRegistry:function(a,k){function l(a){var c=a.source;q.some(function(b){if(c===b.target){if(typeof b.useStructuredClone==="undefined")b.useStructuredClone=typeof a.data!=="string";b.handler(b.useStructuredClone?a.data:JSON.parse(a.data));return!0}})}var k=k||{},m=k.storage||localStorage;m.getItem||(m=f(m));var n="installed",o=[],q=[],p=new d,r={},s={registerService:a.registerService.bind(a),connect:function(a,c,b){function f(){c({method:"timeout"})}var e={handler:c,url:a},h=setTimeout(f,b||15E3);
if(a.match(/\.js$/)&&typeof Worker!=="undefined"){var g=new Worker(a);g.onmessage=function(a){if(typeof e.useStructuredClone==="undefined")e.useStructuredClone=typeof a.data!=="string";e.handler(e.useStructuredClone?a.data:JSON.parse(a.data))};e.target=g;e.close=function(){g.terminate()}}else{var d=document.createElement("iframe");d.name=a+"_"+(new Date).getTime();if(!k.visible)d.style.display="none",d.style.visibility="hidden";d.src=a;d.onload=function(){clearTimeout(h);setTimeout(f,5E3)};d.sandbox=
"allow-scripts allow-same-origin";document.body.appendChild(d);e.target=d.contentWindow;e.close=function(){d&&(document.body.removeChild(d),d=null)}}q.push(e);return e},disconnect:function(a){for(var c=0;c<q.length;c++)if(a===q[c]){q.splice(c,1);try{a.close()}catch(b){}break}},removePlugin:function(a){for(var c=0;c<o.length;c++)if(a===o[c]){o.splice(c,1);break}m.removeItem("plugin."+a.getLocation())},persist:function(a,c){m.setItem("plugin."+a,JSON.stringify(c))},postMessage:function(a,c){c.target.postMessage(c.useStructuredClone?
a:JSON.stringify(a),c.url)},dispatchEvent:function(a){try{p.dispatchEvent(a)}catch(c){console&&console.log("PluginRegistry.dispatchEvent "+c)}},loadManifest:function(a){var c=new b,f=s.connect(a,function(b){f&&b.method&&("manifest"===b.method||"plugin"===b.method?(b=b.params[0],s.disconnect(f),f=null,c.resolve(b)):"timeout"===b.method&&(s.disconnect(f),f=null,c.reject(Error("Load timeout for plugin: "+a))))});return c.promise},getState:function(){return n},handleServiceError:function(a,c){if(c&&c.status===
401){var b=a.getHeaders(),f=a.getName()||a.getLocation(),e=document.createElement("span");e.appendChild(document.createTextNode("Authentication required for: "+f+"."));if(b.login)e.appendChild(document.createTextNode(" ")),f=document.createElement("a"),f.target="_blank",f.textContent="Login",f.href=b.login,g.test(f.href)?(e.appendChild(f),e.appendChild(document.createTextNode(" and re-try the request."))):console.log("Illegal Login URL: "+b.login);return{Severity:"Error",HTML:!0,Message:(new XMLSerializer).serializeToString(e)}}return c}};
this.getLocation=function(){return"System"};this.getHeaders=function(){return{}};this.getName=function(){return"System"};this.getVersion=function(){return"0.0.0"};this.getLastModified=function(){return 0};this.getState=s.getState;this.init=function(){if(!(n==="starting"||n==="active"||n==="stopping")){addEventListener("message",l,!1);for(var a=[],b=0,f=m.length;b<f;b++)a.push(m.key(b));a.forEach(function(a){if(a.indexOf("plugin.")===0){var c=a.substring(7),a=JSON.parse(m.getItem(a));a.created&&o.push(new h(c,
a,s))}});o.sort(function(a,c){return a._getCreated()<c._getCreated()?-1:1});k.plugins&&Object.keys(k.plugins).forEach(function(a){a=c(a);if(g.test(a)){if(!this.getPlugin(a)){var b=k.plugins[a],b=typeof b==="object"||{};b.autostart=b.autostart||k.defaultAutostart||"lazy";o.push(new h(a,b,s))}}else console.log("Illegal Plugin URL: "+a)}.bind(this));n="starting"}};this.start=function(){n!=="starting"&&this.init();if(n!=="starting")return(new b).reject("Cannot start framework. Framework is already "+
n+".");var a=[];o.forEach(function(c){var b=c._getAutostart();c.getLastModified()===0?a.push(c.update().then(function(){if("started"===b)return c.start({"transient":!0});if("lazy"===b)return c.start({lazy:!0,"transient":!0});c._resolve()})):"started"===b?a.push(c.start({"transient":!0})):"lazy"===b?a.push(c.start({lazy:!0,"transient":!0})):c._resolve()});return b.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){n="active"})};this.stop=function(){if(n!=="starting"&&n!=="active")return(new b).reject("Cannot stop registry. Registry is already "+
n+".");n="stopping";var a=[];o.forEach(function(c){a.push(c.stop({"transient":!0}))});return b.all(a,function(a){console.log("PluginRegistry.stop "+a)}).then(function(){removeEventListener("message",l);n="resolved"})};this.update=function(){this.stop().then(this.start.bind(this))};this.uninstall=function(){return(new b).reject("Cannot uninstall registry")};this.installPlugin=function(a,f){a=c(a);if(!g.test(a))return(new b).reject("Illegal Plugin URL: "+a);var d=this.getPlugin(a);if(d)return(new b).resolve(d);
if(r[a])return r[a];if(f)return d=new h(a,f,s),o.push(d),d._persist(),s.dispatchEvent(new e("installed",d)),(new b).resolve(d);var j=s.loadManifest(a).then(function(c){d=new h(a,c,s);o.push(d);d._persist();delete r[a];s.dispatchEvent(new e("installed",d));return d},function(c){delete r[a];throw c;});return r[a]=j};this.getPlugins=function(){return o.slice()};this.getPlugin=function(a){var b=null,a=c(a);o.some(function(c){if(a===c.getLocation())return b=c,!0});return b};this.addEventListener=p.addEventListener.bind(p);
this.removeEventListener=p.removeEventListener.bind(p);this.resolvePlugins=function(){var a=!0;o.forEach(function(c){a=a&&c._resolve()});return a}}}});
define("orion/textview/eventTarget",[],function(){function b(){}b.addMixin=function(d){var a=b.prototype,c;for(c in a)a.hasOwnProperty(c)&&(d[c]=a[c])};b.prototype={addEventListener:function(b,a,c){if(!this._eventTypes)this._eventTypes={};var f=this._eventTypes[b];f||(f=this._eventTypes[b]={level:0,listeners:[]});f.listeners.push({listener:a,useCapture:c})},dispatchEvent:function(b){var a=b.type;this._dispatchEvent("pre"+a,b);this._dispatchEvent(a,b);this._dispatchEvent("post"+a,b)},_dispatchEvent:function(b,
a){var c=this._eventTypes?this._eventTypes[b]:null;if(c){var f=c.listeners;try{if(c.level++,f)for(var e=0,h=f.length;e<h;e++)if(f[e]){var g=f[e].listener;typeof g==="function"?g.call(this,a):g.handleEvent&&typeof g.handleEvent==="function"&&g.handleEvent(a)}}finally{if(c.level--,c.compact&&c.level===0){for(e=f.length-1;e>=0;e--)f[e]||f.splice(e,1);f.length===0&&delete this._eventTypes[b];c.compact=!1}}}},isListening:function(b){return!this._eventTypes?!1:this._eventTypes[b]!==void 0},removeEventListener:function(b,
a,c){if(this._eventTypes){var f=this._eventTypes[b];if(f){for(var e=f.listeners,h=0,g=e.length;h<g;h++){var j=e[h];if(j&&j.listener===a&&j.useCapture===c){f.level!==0?(e[h]=null,f.compact=!0):e.splice(h,1);break}}e.length===0&&delete this._eventTypes[b]}}}};return{EventTarget:b}});
define("orion/serviceTracker",[],function(){function b(c,b){function e(a){var c=a.getProperty("service.id"),b=this.addingService(a);b&&(g[c]=a,j[c]=b)}function h(a){var c=a.getProperty("service.id"),b=j[c];delete g[c];delete j[c];this.removedService(a,b)}this.serviceRegistry=c;var g={},j={},k=d,l,m;this.close=function(){if(k!==a)throw"Already closed";k=d;c.removeEventListener("registered",l);c.removeEventListener("unregistering",m);m=l=null;var b=this;this.getServiceReferences().forEach(function(a){h.call(b,
a)});if(typeof this.onClose==="function")this.onClose()};this.getServiceReferences=function(){var a=a;return a.length?Object.keys(a).map(function(c){return a[c]}):null};this.open=function(){if(k!==d)throw"Already open";k=a;var g=this;l=function(a){if(a.serviceReference.getProperty("objectClass").indexOf(b)!==-1&&(e.call(g,a.serviceReference),typeof g.onServiceAdded==="function"))return g.onServiceAdded(a.serviceReference,g.serviceRegistry.getService(a.serviceReference))};m=function(a){a.serviceReference.getProperty("objectClass").indexOf(b)!==
-1&&h.call(g,a.serviceReference)};c.addEventListener("registered",l);c.addEventListener("unregistering",m);c.getServiceReferences(b).forEach(function(a){e.call(g,a)});if(typeof this.onOpen==="function")this.onOpen()}}var d=0,a=1;b.prototype={addingService:function(a){return this.serviceRegistry.getService(a)},onOpen:null,onClose:null,onServiceAdded:null,removedService:function(){}};return b});
define("orion/config",["orion/textview/eventTarget","orion/Deferred","orion/serviceTracker"],function(b,d,a){var c,f,e,h,g="pid";c=function(c,b,f){function e(a,c,f){c.forEach(function(e,h){try{var g=a[h].getProperty("__plugin__"),d=g&&b.getPlugin(g);(!g||d&&d.getState()==="active")&&c[h].updated(f)}catch(j){typeof console!=="undefined"&&console.log(j)}})}a.call(this,c,"orion.cm.managedservice");var h={},j={},p=function(a){var b=[];a.plugin.getServiceReferences().forEach(function(a){if(a.getProperty("objectClass").indexOf("orion.cm.managedservice")!==
-1){var e=a.getProperty(g),a=c.getService(a);e&&a&&(e=(e=f._find(e))&&e.getProperties(),b.push(a.updated(e)))}});return d.all(b)};this.addingService=function(a){var b=a.getProperty(g),f=c.getService(a);if(!b||!f)return null;h[b]||(h[b]=[]);j[b]||(j[b]=[]);h[b].push(a);j[b].push(f);return f};this.onServiceAdded=function(a,c){var b=a.getProperty(g),b=f._find(b);e([a],[c],b&&b.getProperties())};this.onOpen=function(){b.addEventListener("started",p)};this.onClose=function(){b.removeEventListener("started",
p)};this.notifyUpdated=function(a){var c=a.getPid();e(h[c]||[],j[c]||[],a.getProperties())};this.notifyDeleted=function(a){a=a.getPid();e(h[a]||[],j[a]||[],null)};this.removedService=function(a,c){var b=a.getProperty(g),f=h[b],e=j[b];f.length>1?f.splice(f.indexOf(a),1):delete h[b];e.length>1?e.splice(e.indexOf(c),1):delete j[b]}};b=function(){function a(b,h,g){this.store=new f(this,g);this.configAdmin=new e(this,this.store);this.tracker=new c(b,h,this.store)}a.prototype={getConfigurationAdmin:function(){var a=
this;return this.configAdmin._init().then(function(c){a.tracker.open();return c})},notifyDeleted:function(a){this.tracker.notifyDeleted(a)},notifyUpdated:function(a){this.tracker.notifyUpdated(a)}};return a}();e=function(){function a(c,b){this.factory=c;this.store=b}a.prototype={_init:function(){var a=this;return this.store._init().then(function(){return a})},getConfiguration:function(a){return this.store.get(a)},listConfigurations:function(){return this.store.list()}};return a}();var j="/cm/configurations";
f=function(){function a(c,b){this.factory=c;this.prefsService=b;this.configs=Object.create(null);this.pref=null;var f=this;this.initPromise=this.prefsService.getPreferences(j).then(function(a){f.pref=a;a.keys().forEach(function(c){if(!f.configs[c]){var b=a.get(c);typeof b==="object"&&b!==null&&Object.keys(b).length>0&&(b[g]=c,f.configs[c]=new h(f.factory,f,b))}})})}a.prototype={_init:function(){return this.initPromise},_find:function(a){return this.configs[a]||null},get:function(a){var c=this._find(a);
c||(c=new h(this.factory,this,a),this.configs[a]=c);return c},list:function(){var a=this,c=[];this.pref.keys().forEach(function(b){(b=a._find(b))&&b.getProperties()!==null&&c.push(b)});return c},remove:function(a){this.pref.remove(a);delete this.configs[a]},save:function(a,c){this.pref.put(a,c.getProperties(!0)||{})}};return a}();h=function(){function a(c){for(var b={},f=Object.keys(c),e=0;e<f.length;e++){var h=f[e],g=c[h];b[h]=g instanceof Array?g.slice():g}return b}function c(b,f,e){this.factory=
b;this.store=f;if(e!==null&&typeof e==="object")this.pid=e[g],b=a(e),delete b[g],this.properties=b;else if(typeof e==="string")this.pid=e,this.properties=null;else throw Error("Invalid pid/properties "+e);}c.prototype={_checkRemoved:function(){if(this._removed)throw Error("Configuration was removed");},getPid:function(){this._checkRemoved();return this.pid},getProperties:function(c){this._checkRemoved();var b=null;if(this.properties&&(b=a(this.properties),!c))b[g]=this.pid;return b},remove:function(){this._checkRemoved();
this.factory.notifyDeleted(this);this.store.remove(this.pid);this._removed=!0},update:function(c){this._checkRemoved();c=a(c);delete c[g];this.properties=c;this.store.save(this.pid,this);this.factory.notifyUpdated(this)},toString:function(){return"[ConfigImpl pid: "+this.pid+", properties: "+JSON.stringify(this.properties)+"]"}};return c}();return{ConfigurationAdminFactory:b}});
define("orion/bootstrap","require,orion/Deferred,orion/serviceregistry,orion/preferences,orion/pluginregistry,orion/config".split(","),function(b,d,a,c,f,e){var h;return{startup:function(){if(h)return h;h=new d;var g=window.serviceRegistry=new a.ServiceRegistry,j=new c.PreferencesService(g);return j.getPreferences("/plugins").then(function(a){var c={plugins:{}};a.keys().forEach(function(f){var e=b.toUrl(f);c.plugins[e]=a[f]});var m=window.pluginRegistry=new f.PluginRegistry(g,c);return m.start().then(function(){if(g.getServiceReferences("orion.core.preference.provider").length>
0)return j.getPreferences("/plugins",j.USER_SCOPE).then(function(a){var c=[];a.keys().forEach(function(a){a=b.toUrl(a);m.getPlugin(a)||c.push(m.installPlugin(a,{autostart:"lazy"}).then(function(a){return a.update().then(function(){return a.start({lazy:!0})})}))});return d.all(c,function(a){console.log(a)})})}).then(function(){return(new e.ConfigurationAdminFactory(g,m,j)).getConfigurationAdmin().then(g.registerService.bind(g,"orion.cm.configadmin"))}).then(function(){var a=g.getService("orion.core.auth");
if(a){var c=a.getUser().then(function(c){if(c)localStorage.setItem("lastLogin",(new Date).getTime());else return a.getAuthForm(window.location.href).then(function(a){window.location=a})}),b=localStorage.getItem("lastLogin");if(!b||b<(new Date).getTime()-9E5)return c}}).then(function(){var a={serviceRegistry:g,preferences:j,pluginRegistry:m};h.resolve(a);return a})})}}});
define("orion/nls/messages",["orion/i18n!orion/nls/messages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
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 I20121019-1304. 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",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"});define("dijit",["dojo"],function(b){return dijit=b._dijit||{}});
define("orion/operations/nls/messages",["orion/i18n!orion/operations/nls/messages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
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("dijit/_base/manager",["dojo","dijit"],function(b,d){b.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0},add:function(a){if(this._hash[a.id])throw Error("Tried to register widget with id=="+a.id+" but that id is already registered");this._hash[a.id]=a;this.length++},remove:function(a){this._hash[a]&&(delete this._hash[a],this.length--)},forEach:function(a,c){var c=c||b.global,f=0,e;for(e in this._hash)a.call(c,this._hash[e],f++,this._hash);return this},filter:function(a,
c){var c=c||b.global,f=new d.WidgetSet,e=0,h;for(h in this._hash){var g=this._hash[h];a.call(c,g,e++,this._hash)&&f.add(g)}return f},byId:function(a){return this._hash[a]},byClass:function(a){var c=new d.WidgetSet,b,e;for(b in this._hash)e=this._hash[b],e.declaredClass==a&&c.add(e);return c},toArray:function(){var a=[],c;for(c in this._hash)a.push(this._hash[c]);return a},map:function(a,c){return b.map(this.toArray(),a,c)},every:function(a,c){var c=c||b.global,f=0,e;for(e in this._hash)if(!a.call(c,
this._hash[e],f++,this._hash))return!1;return!0},some:function(a,c){var c=c||b.global,f=0,e;for(e in this._hash)if(a.call(c,this._hash[e],f++,this._hash))return!0;return!1}});(function(){d.registry=new d.WidgetSet;var a=d.registry._hash,c=b.attr,f=b.hasAttr,e=b.style;d.byId=function(c){return typeof c=="string"?a[c]:c};var h={};d.getUniqueId=function(c){var b;do b=c+"_"+(c in h?++h[c]:h[c]=0);while(a[b]);return d._scopeName=="dijit"?b:d._scopeName+"_"+b};d.findWidgets=function(c){function b(c){for(c=
c.firstChild;c;c=c.nextSibling)if(c.nodeType==1){var e=c.getAttribute("widgetId");e?(e=a[e])&&f.push(e):b(c)}}var f=[];b(c);return f};d._destroyAll=function(){d._curFocus=null;d._prevFocus=null;d._activeStack=[];b.forEach(d.findWidgets(b.body()),function(a){a._destroyed||(a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy())})};b.isIE&&b.addOnWindowUnload(function(){d._destroyAll()});d.byNode=function(c){return a[c.getAttribute("widgetId")]};d.getEnclosingWidget=function(c){for(;c;){var b=
c.getAttribute&&c.getAttribute("widgetId");if(b)return a[b];c=c.parentNode}return null};var g=d._isElementShown=function(a){var b=e(a);return b.visibility!="hidden"&&b.visibility!="collapsed"&&b.display!="none"&&c(a,"type")!="hidden"};d.hasDefaultTabStop=function(a){switch(a.nodeName.toLowerCase()){case "a":return f(a,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return!0;case "iframe":var c;try{var b=a.contentDocument;if("designMode"in b&&b.designMode==
"on")return!0;c=b.body}catch(e){try{c=a.contentWindow.document.body}catch(h){return!1}}return c.contentEditable=="true"||c.firstChild&&c.firstChild.contentEditable=="true";default:return a.contentEditable=="true"}};var j=d.isTabNavigable=function(a){return c(a,"disabled")?!1:f(a,"tabIndex")?c(a,"tabIndex")>=0:d.hasDefaultTabStop(a)};d._getTabNavigable=function(a){function e(a){return a&&a.tagName.toLowerCase()=="input"&&a.type&&a.type.toLowerCase()=="radio"&&a.name&&a.name.toLowerCase()}var h,d,o,
q,p,r,s={},x=function(a){b.query("> *",a).forEach(function(a){if(!(b.isIE&&a.scopeName!=="HTML")&&g(a)){if(j(a)){var k=c(a,"tabIndex");if(!f(a,"tabIndex")||k==0)h||(h=a),d=a;else if(k>0){if(!o||k<q)q=k,o=a;if(!p||k>=r)r=k,p=a}k=e(a);b.attr(a,"checked")&&k&&(s[k]=a)}a.nodeName.toUpperCase()!="SELECT"&&x(a)}})};g(a)&&x(a);return{first:s[e(h)]||h,last:s[e(d)]||d,lowest:s[e(o)]||o,highest:s[e(p)]||p}};d.getFirstInTabbingOrder=function(a){a=d._getTabNavigable(b.byId(a));return a.lowest?a.lowest:a.first};
d.getLastInTabbingOrder=function(a){a=d._getTabNavigable(b.byId(a));return a.last?a.last:a.highest};d.defaultDuration=b.config.defaultDuration||200})();return d});
define("dojo/Stateful",["dojo"],function(b){b.declare("dojo.Stateful",null,{postscript:function(d){d&&b.mixin(this,d)},get:function(b){return this[b]},set:function(b,a){if(typeof b==="object"){for(var c in b)this.set(c,b[c]);return this}c=this[b];this[b]=a;this._watchCallbacks&&this._watchCallbacks(b,c,a);return this},watch:function(d,a){var c=this._watchCallbacks;if(!c)var f=this,c=this._watchCallbacks=function(a,b,e,d){var l=function(c){if(c)for(var c=c.slice(),d=0,k=c.length;d<k;d++)try{c[d].call(f,
a,b,e)}catch(l){console.error(l)}};l(c["_"+a]);d||l(c["*"])};!a&&typeof d==="function"?(a=d,d="*"):d="_"+d;var e=c[d];typeof e!=="object"&&(e=c[d]=[]);e.push(a);return{unwatch:function(){e.splice(b.indexOf(e,a),1)}}}});return b.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(b,d){(function(){b.declare("dijit._WidgetBase",b.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(a,c){this.create(a,c)},create:function(a,c){this.srcNodeRef=
b.byId(c);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&typeof this.srcNodeRef.id=="string")this.id=this.srcNodeRef.id;if(a)this.params=a,b._mixin(this,a);this.postMixInProperties();if(!this.id)this.id=d.getUniqueId(this.declaredClass.replace(/\./g,"_"));d.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var f=this.srcNodeRef;f&&f.parentNode&&this.domNode!==f&&f.parentNode.replaceChild(this.domNode,f)}this.domNode&&this.domNode.setAttribute("widgetId",
this.id);this.postCreate();this.srcNodeRef&&!this.srcNodeRef.parentNode&&delete this.srcNodeRef;this._created=!0},_applyAttributes:function(){var a=function(a,c){(c.params&&a in c.params||c[a])&&c.set(a,c[a])},c;for(c in this.attributeMap)a(c,this);b.forEach(this._getSetterAttributes(),function(c){c in this.attributeMap||a(c,this)},this)},_getSetterAttributes:function(){var a=this.constructor;if(!a._setterAttrs){var c=a._setterAttrs=[],f,e=a.prototype,h;for(h in e)b.isFunction(e[h])&&(f=h.match(/^_set([a-zA-Z]*)Attr$/))&&
f[1]&&c.push(f[1].charAt(0).toLowerCase()+f[1].substr(1))}return a._setterAttrs},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode)this.domNode=this.srcNodeRef||b.create("div");if(this.baseClass){var a=this.baseClass.split(" ");this.isLeftToRight()||(a=a.concat(b.map(a,function(a){return a+"Rtl"})));b.addClass(this.domNode,a)}},postCreate:function(){},startup:function(){this._started=!0},destroyRecursive:function(a){this._beingDestroyed=!0;this.destroyDescendants(a);this.destroy(a)},
destroy:function(a){this._beingDestroyed=!0;this.uninitialize();var c=b.forEach,f=b.unsubscribe;c(this._connects,function(a){c(a,b.disconnect)});c(this._subscribes,function(a){f(a)});c(this._supportingWidgets||[],function(a){a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy()});this.destroyRendering(a);d.registry.remove(this.id);this._destroyed=!0},destroyRendering:function(a){this.bgIframe&&(this.bgIframe.destroy(a),delete this.bgIframe);this.domNode&&(a?b.removeAttr(this.domNode,"widgetId"):
b.destroy(this.domNode),delete this.domNode);this.srcNodeRef&&(a||b.destroy(this.srcNodeRef),delete this.srcNodeRef)},destroyDescendants:function(a){b.forEach(this.getChildren(),function(c){c.destroyRecursive&&c.destroyRecursive(a)})},uninitialize:function(){return!1},_setClassAttr:function(a){b.replaceClass(this[this.attributeMap["class"]||"domNode"],a,this["class"]);this._set("class",a)},_setStyleAttr:function(a){var c=this[this.attributeMap.style||"domNode"];b.isObject(a)?b.style(c,a):c.style.cssText?
c.style.cssText+="; "+a:c.style.cssText=a;this._set("style",a)},_attrToDom:function(a,c){var f=this.attributeMap[a];b.forEach(b.isArray(f)?f:[f],function(f){var h=this[f.node||f||"domNode"];switch(f.type||"attribute"){case "attribute":b.isFunction(c)&&(c=b.hitch(this,c));f=f.attribute?f.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;b.attr(h,f,c);break;case "innerText":h.innerHTML="";h.appendChild(b.doc.createTextNode(c));break;case "innerHTML":h.innerHTML=c;break;case "class":b.replaceClass(h,
c,this[a])}},this)},get:function(a){var c=this._getAttrNames(a);return this[c.g]?this[c.g]():this[a]},set:function(a,c){if(typeof a==="object"){for(var b in a)this.set(b,a[b]);return this}b=this._getAttrNames(a);if(this[b.s])var e=this[b.s].apply(this,Array.prototype.slice.call(arguments,1));else a in this.attributeMap&&this._attrToDom(a,c),this._set(a,c);return e||this},_attrPairNames:{},_getAttrNames:function(a){var c=this._attrPairNames;if(c[a])return c[a];var b=a.charAt(0).toUpperCase()+a.substr(1);
return c[a]={n:a+"Node",s:"_set"+b+"Attr",g:"_get"+b+"Attr"}},_set:function(a,c){var b=this[a];this[a]=c;this._watchCallbacks&&this._created&&c!==b&&this._watchCallbacks(a,b,c)},toString:function(){return"[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]"},getDescendants:function(){return this.containerNode?b.query("[widgetId]",this.containerNode).map(d.byNode):[]},getChildren:function(){return this.containerNode?d.findWidgets(this.containerNode):[]},connect:function(a,c,f){a=[b._connect(a,
c,this,f)];this._connects.push(a);return a},disconnect:function(a){for(var c=0;c<this._connects.length;c++)if(this._connects[c]==a){b.forEach(a,b.disconnect);this._connects.splice(c,1);break}},subscribe:function(a,c){var f=b.subscribe(a,this,c);this._subscribes.push(f);return f},unsubscribe:function(a){for(var c=0;c<this._subscribes.length;c++)if(this._subscribes[c]==a){b.unsubscribe(a);this._subscribes.splice(c,1);break}},isLeftToRight:function(){return this.dir?this.dir=="ltr":b._isBodyLtr()},placeAt:function(a,
c){a.declaredClass&&a.addChild?a.addChild(this,c):b.place(this.domNode,a,c);return this}})})();return d._WidgetBase});
define("dojo/window",["dojo"],function(b){b.getObject("window",!0,b);b.window.getBox=function(){var d=b.doc.compatMode=="BackCompat"?b.body():b.doc.documentElement,a=b._docScroll();return{w:d.clientWidth,h:d.clientHeight,l:a.x,t:a.y}};b.window.get=function(d){if(b.isIE&&window!==document.parentWindow){d.parentWindow.execScript("document._parentWindow = window;","Javascript");var a=d._parentWindow;d._parentWindow=null;return a}return d.parentWindow||d.defaultView};b.window.scrollIntoView=function(d,
a){try{var d=b.byId(d),c=d.ownerDocument||b.doc,f=c.body||b.body(),e=c.documentElement||f.parentNode,h=b.isIE,g=b.isWebKit;if((!b.isMoz&&!h&&!g&&!b.isOpera||d==f||d==e)&&typeof d.scrollIntoView!="undefined")d.scrollIntoView(!1);else{var j=c.compatMode=="BackCompat",k=h>=9&&d.ownerDocument.parentWindow.frameElement?e.clientHeight>0&&e.clientWidth>0&&(f.clientHeight==0||f.clientWidth==0||f.clientHeight>e.clientHeight||f.clientWidth>e.clientWidth)?e:f:j?f:e,c=g?f:k,l=k.clientWidth,m=k.clientHeight,n=
!b._isBodyLtr(),o=a||b.position(d),q=d.parentNode,k=function(a){return h<=6||h&&j?!1:b.style(a,"position").toLowerCase()=="fixed"};if(!k(d))for(;q;){q==f&&(q=c);var p=b.position(q),r=k(q);if(q==c){p.w=l;p.h=m;c==e&&h&&n&&(p.x+=c.offsetWidth-p.w);if(p.x<0||!h)p.x=0;if(p.y<0||!h)p.y=0}else{var s=b._getPadBorderExtents(q);p.w-=s.w;p.h-=s.h;p.x+=s.l;p.y+=s.t;var x=q.clientWidth,v=p.w-x;if(x>0&&v>0)p.w=x,p.x+=n&&(h||q.clientLeft>s.l)?v:0;x=q.clientHeight;v=p.h-x;if(x>0&&v>0)p.h=x}if(r){if(p.y<0)p.h+=p.y,
p.y=0;if(p.x<0)p.w+=p.x,p.x=0;if(p.y+p.h>m)p.h=m-p.y;if(p.x+p.w>l)p.w=l-p.x}var w=o.x-p.x,t=o.y-Math.max(p.y,0),u=w+o.w-p.w,y=t+o.h-p.h;if(u*w>0){var z=Math[w<0?"max":"min"](w,u);if(n&&(h==8&&!j||h>=9))z=-z;o.x+=q.scrollLeft;q.scrollLeft+=z;o.x-=q.scrollLeft}y*t>0&&(o.y+=q.scrollTop,q.scrollTop+=Math[t<0?"max":"min"](t,y),o.y-=q.scrollTop);q=q!=c&&!r&&q.parentNode}}}catch(A){console.error("scrollIntoView: "+A),d.scrollIntoView(!1)}};return b.window});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(b,d){b.mixin(d,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return d.getBookmark().isCollapsed},getBookmark:function(){var a,c,f=b.doc.selection,e=d._curFocus;if(b.global.getSelection){if(f=b.global.getSelection())if(f.isCollapsed){if(a=e?e.tagName:"")if(a=a.toLowerCase(),a=="textarea"||a=="input"&&(!e.type||e.type.toLowerCase()=="text"))return f={start:e.selectionStart,end:e.selectionEnd,node:e,pRange:!0},
{isCollapsed:f.end<=f.start,mark:f};a={isCollapsed:!0};if(f.rangeCount)a.mark=f.getRangeAt(0).cloneRange()}else c=f.getRangeAt(0),a={isCollapsed:!1,mark:c.cloneRange()}}else if(f){a=e?e.tagName:"";a=a.toLowerCase();if(e&&a&&(a=="button"||a=="textarea"||a=="input"))return f.type&&f.type.toLowerCase()=="none"?{isCollapsed:!0,mark:null}:(c=f.createRange(),{isCollapsed:c.text&&c.text.length?!1:!0,mark:{range:c,pRange:!0}});a={};try{c=f.createRange(),a.isCollapsed=!(f.type=="Text"?c.htmlText.length:c.length)}catch(h){return a.isCollapsed=
!0,a}if(f.type.toUpperCase()=="CONTROL")if(c.length){a.mark=[];f=0;for(e=c.length;f<e;)a.mark.push(c.item(f++))}else a.isCollapsed=!0,a.mark=null;else a.mark=c.getBookmark()}else console.warn("No idea how to store the current selection for this browser!");return a},moveToBookmark:function(a){var c=b.doc;if(a=a.mark)if(b.global.getSelection)(c=b.global.getSelection())&&c.removeAllRanges?a.pRange?(c=a.node,c.selectionStart=a.start,c.selectionEnd=a.end):(c.removeAllRanges(),c.addRange(a)):console.warn("No idea how to restore selection for this browser!");
else if(c.selection&&a){var f;a.pRange?f=a.range:b.isArray(a)?(f=c.body.createControlRange(),b.forEach(a,function(a){f.addElement(a)})):(f=c.body.createTextRange(),f.moveToBookmark(a));f.select()}},getFocus:function(a,c){var f=!d._curFocus||a&&b.isDescendant(d._curFocus,a.domNode)?d._prevFocus:d._curFocus;return{node:f,bookmark:f==d._curFocus&&b.withGlobal(c||b.global,d.getBookmark),openedForWindow:c}},focus:function(a){if(a){var c="node"in a?a.node:a,f=a.bookmark,a=a.openedForWindow,e=f?f.isCollapsed:
!1;if(c){var h=c.tagName.toLowerCase()=="iframe"?c.contentWindow:c;if(h&&h.focus)try{h.focus()}catch(g){}d._onFocusNode(c)}if(f&&b.withGlobal(a||b.global,d.isCollapsed)&&!e){a&&a.focus();try{b.withGlobal(a||b.global,d.moveToBookmark,null,[f])}catch(j){}}}},_activeStack:[],registerIframe:function(a){return d.registerWin(a.contentWindow,a)},unregisterIframe:function(a){d.unregisterWin(a)},registerWin:function(a,c){var f=function(a){d._justMouseDowned=!0;setTimeout(function(){d._justMouseDowned=!1},
0);if(!b.isIE||!a||!(a.srcElement&&a.srcElement.parentNode==null))d._onTouchNode(c||a.target||a.srcElement,"mouse")},e=b.isIE?a.document.documentElement:a.document;if(e)if(b.isIE){a.document.body.attachEvent("onmousedown",f);var h=function(a){a.srcElement.tagName.toLowerCase()!="#document"&&d.isTabNavigable(a.srcElement)?d._onFocusNode(c||a.srcElement):d._onTouchNode(c||a.srcElement)};e.attachEvent("onactivate",h);var g=function(a){d._onBlurNode(c||a.srcElement)};e.attachEvent("ondeactivate",g);return function(){a.document.detachEvent("onmousedown",
f);e.detachEvent("onactivate",h);e.detachEvent("ondeactivate",g);e=null}}else{e.body.addEventListener("mousedown",f,!0);var j=function(a){d._onFocusNode(c||a.target)};e.addEventListener("focus",j,!0);var k=function(a){d._onBlurNode(c||a.target)};e.addEventListener("blur",k,!0);return function(){e.body.removeEventListener("mousedown",f,!0);e.removeEventListener("focus",j,!0);e.removeEventListener("blur",k,!0);e=null}}},unregisterWin:function(a){a&&a()},_onBlurNode:function(){d._prevFocus=d._curFocus;
d._curFocus=null;if(!d._justMouseDowned)d._clearActiveWidgetsTimer&&clearTimeout(d._clearActiveWidgetsTimer),d._clearActiveWidgetsTimer=setTimeout(function(){delete d._clearActiveWidgetsTimer;d._setStack([]);d._prevFocus=null},100)},_onTouchNode:function(a,c){d._clearActiveWidgetsTimer&&(clearTimeout(d._clearActiveWidgetsTimer),delete d._clearActiveWidgetsTimer);var f=[];try{for(;a;){var e=b.attr(a,"dijitPopupParent");if(e)a=d.byId(e).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===
b.body())break;a=b.window.get(a.ownerDocument).frameElement}else{var h=a.getAttribute&&a.getAttribute("widgetId"),g=h&&d.byId(h);g&&!(c=="mouse"&&g.get("disabled"))&&f.unshift(h);a=a.parentNode}}}catch(j){}d._setStack(f,c)},_onFocusNode:function(a){if(a&&a.nodeType!=9&&(d._onTouchNode(a),a!=d._curFocus)){if(d._curFocus)d._prevFocus=d._curFocus;d._curFocus=a;b.publish("focusNode",[a])}},_setStack:function(a,c){var f=d._activeStack;d._activeStack=a;for(var e=0;e<Math.min(f.length,a.length);e++)if(f[e]!=
a[e])break;for(var h,g=f.length-1;g>=e;g--)if(h=d.byId(f[g]))h._focused=!1,h.set("focused",!1),h._hasBeenBlurred=!0,h._onBlur&&h._onBlur(c),b.publish("widgetBlur",[h,c]);for(g=e;g<a.length;g++)if(h=d.byId(a[g]))h._focused=!0,h.set("focused",!0),h._onFocus&&h._onFocus(c),b.publish("widgetFocus",[h,c])}});b.addOnLoad(function(){var a=d.registerWin(window);b.isIE&&b.addOnWindowUnload(function(){d.unregisterWin(a);a=null})});return d});
define("dojo/AdapterRegistry",["dojo"],function(b){b.AdapterRegistry=function(b){this.pairs=[];this.returnWrappers=b||!1};b.extend(b.AdapterRegistry,{register:function(b,a,c,f,e){this.pairs[e?"unshift":"push"]([b,a,c,f])},match:function(){for(var b=0;b<this.pairs.length;b++){var a=this.pairs[b];if(a[1].apply(this,arguments))return a[3]||this.returnWrappers?a[2]:a[2].apply(this,arguments)}throw Error("No match found");},unregister:function(b){for(var a=0;a<this.pairs.length;a++)if(this.pairs[a][0]==
b)return this.pairs.splice(a,1),!0;return!1}});return b.AdapterRegistry});
define("dijit/_base/place",["dojo","dijit","dojo/window","dojo/AdapterRegistry"],function(b,d){d.getViewport=function(){return b.window.getBox()};d.placeOnScreen=function(a,c,f,e){f=b.map(f,function(a){var b={corner:a,pos:{x:c.x,y:c.y}};e&&(b.pos.x+=a.charAt(1)=="L"?e.x:-e.x,b.pos.y+=a.charAt(0)=="T"?e.y:-e.y);return b});return d._place(a,f)};d._place=function(a,c,f,e){var h=b.window.getBox();(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")&&b.body().appendChild(a);var g=null;b.some(c,
function(c){var d=c.corner,j=c.pos,n=0,o={w:d.charAt(1)=="L"?h.l+h.w-j.x:j.x-h.l,h:d.charAt(1)=="T"?h.t+h.h-j.y:j.y-h.t};f&&(n=f(a,c.aroundCorner,d,o,e),n=typeof n=="undefined"?0:n);var q=a.style,p=q.display,r=q.visibility;q.visibility="hidden";q.display="";var s=b.marginBox(a);q.display=p;q.visibility=r;q=Math.max(h.l,d.charAt(1)=="L"?j.x:j.x-s.w);p=Math.max(h.t,d.charAt(0)=="T"?j.y:j.y-s.h);r=Math.min(h.l+h.w,d.charAt(1)=="L"?q+s.w:j.x);j=Math.min(h.t+h.h,d.charAt(0)=="T"?p+s.h:j.y);r-=q;j-=p;n+=
s.w-r+(s.h-j);if(g==null||n<g.overflow)g={corner:d,aroundCorner:c.aroundCorner,x:q,y:p,w:r,h:j,overflow:n,spaceAvailable:o};return!n});g.overflow&&f&&f(a,g.aroundCorner,g.corner,g.spaceAvailable,e);var c=b._isBodyLtr(),d=a.style;d.top=g.y+"px";d[c?"left":"right"]=(c?g.x:h.w-g.x-g.w)+"px";return g};d.placeOnScreenAroundNode=function(a,c,f,e){c=b.byId(c);c=b.position(c,!0);return d._placeOnScreenAroundRect(a,c.x,c.y,c.w,c.h,f,e)};d.placeOnScreenAroundRectangle=function(a,c,b,e){return d._placeOnScreenAroundRect(a,
c.x,c.y,c.width,c.height,b,e)};d._placeOnScreenAroundRect=function(a,c,b,e,h,g,j){var k=[],l;for(l in g)k.push({aroundCorner:l,corner:g[l],pos:{x:c+(l.charAt(1)=="L"?0:e),y:b+(l.charAt(0)=="T"?0:h)}});return d._place(a,k,j,{w:e,h:h})};d.placementRegistry=new b.AdapterRegistry;d.placementRegistry.register("node",function(a,c){return typeof c=="object"&&typeof c.offsetWidth!="undefined"&&typeof c.offsetHeight!="undefined"},d.placeOnScreenAroundNode);d.placementRegistry.register("rect",function(a,c){return typeof c==
"object"&&"x"in c&&"y"in c&&"width"in c&&"height"in c},d.placeOnScreenAroundRectangle);d.placeOnScreenAroundElement=function(a,c,b,e){return d.placementRegistry.match.apply(d.placementRegistry,arguments)};d.getPopupAroundAlignment=function(a,c){var f={};b.forEach(a,function(a){switch(a){case "after":f[c?"BR":"BL"]=c?"BL":"BR";break;case "before":f[c?"BL":"BR"]=c?"BR":"BL";break;case "below-alt":c=!c;case "below":f[c?"BL":"BR"]=c?"TL":"TR";f[c?"BR":"BL"]=c?"TR":"TL";break;case "above-alt":c=!c;default:f[c?
"TL":"TR"]=c?"BL":"BR",f[c?"TR":"TL"]=c?"BR":"BL"}});return f};return d});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(b,d){d.scrollIntoView=function(a,c){b.window.scrollIntoView(a,c)};return d.scrollIntoView});
define("dojo/uacss",["dojo"],function(b){(function(){var d=b.doc.documentElement,a=b.isIE,c=b.isOpera,f=Math.floor,e=b.isFF,h=b.boxModel.replace(/-/,""),a={dj_ie:a,dj_ie6:f(a)==6,dj_ie7:f(a)==7,dj_ie8:f(a)==8,dj_ie9:f(a)==9,dj_quirks:b.isQuirks,dj_iequirks:a&&b.isQuirks,dj_opera:c,dj_khtml:b.isKhtml,dj_webkit:b.isWebKit,dj_safari:b.isSafari,dj_chrome:b.isChrome,dj_gecko:b.isMozilla,dj_ff3:f(e)==3};a["dj_"+h]=!0;var g="",j;for(j in a)a[j]&&(g+=j+" ");d.className=b.trim(d.className+" "+g);b._loaders.unshift(function(){if(!b._isBodyLtr()){var a=
"dj_rtl dijitRtl "+g.replace(/ /g,"-rtl ");d.className=b.trim(d.className+" "+a)}})})();return b});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(b,d){return d});
define("dijit/_base/typematic",["dojo","dijit"],function(b,d){d.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay),this._minDelay);this._timer=setTimeout(b.hitch(this,"_fireEventAndReload"),this._currentTimeout)},trigger:function(a,c,f,e,h,g,d,k){if(h!=this._obj)this.stop(),
this._initialDelay=d||500,this._subsequentDelay=g||0.9,this._minDelay=k||10,this._obj=h,this._evt=a,this._node=f,this._count=this._currentTimeout=-1,this._callback=b.hitch(c,e),this._fireEventAndReload(),this._evt=b.mixin({faux:!0},a)},stop:function(){if(this._timer)clearTimeout(this._timer),this._timer=null;if(this._obj)this._callback(-1,this._node,this._evt),this._obj=null},addKeyListener:function(a,c,f,e,h,g,j){if(c.keyCode)c.charOrCode=c.keyCode,b.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.",
"","2.0");else if(c.charCode)c.charOrCode=String.fromCharCode(c.charCode),b.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");return[b.connect(a,"onkeypress",this,function(k){k.charOrCode==c.charOrCode&&(c.ctrlKey===void 0||c.ctrlKey==k.ctrlKey)&&(c.altKey===void 0||c.altKey==k.altKey)&&(c.metaKey===void 0||c.metaKey==(k.metaKey||!1))&&(c.shiftKey===void 0||c.shiftKey==k.shiftKey)?(b.stopEvent(k),d.typematic.trigger(k,f,a,
e,c,h,g,j)):d.typematic._obj==c&&d.typematic.stop()}),b.connect(a,"onkeyup",this,function(){d.typematic._obj==c&&d.typematic.stop()})]},addMouseListener:function(a,c,f,e,h,g){var j=b.connect;return[j(a,"mousedown",this,function(j){b.stopEvent(j);d.typematic.trigger(j,c,a,f,a,e,h,g)}),j(a,"mouseup",this,function(a){b.stopEvent(a);d.typematic.stop()}),j(a,"mouseout",this,function(a){b.stopEvent(a);d.typematic.stop()}),j(a,"mousemove",this,function(a){a.preventDefault()}),j(a,"dblclick",this,function(j){b.stopEvent(j);
b.isIE&&(d.typematic.trigger(j,c,a,f,a,e,h,g),setTimeout(b.hitch(this,d.typematic.stop),50))})]},addListener:function(a,c,b,e,h,g,d,k){return this.addKeyListener(c,b,e,h,g,d,k).concat(this.addMouseListener(a,e,h,g,d,k))}};return d.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(b,d){d.wai={onload:function(){var a=b.create("div",{id:"a11yTestNode",style:{cssText:'border: 1px solid;border-color:red green;position: absolute;height: 5px;top: -999px;background-image: url("'+(b.config.blankGif||b.moduleUrl("dojo","resources/blank.gif"))+'");'}},b.body()),c=b.getComputedStyle(a);if(c){var f=c.backgroundImage;b[c.borderTopColor==c.borderRightColor||f!=null&&(f=="none"||f=="url(invalid-url:)")?"addClass":"removeClass"](b.body(),
"dijit_a11y");b.isIE?a.outerHTML="":b.body().removeChild(a)}}};(b.isIE||b.isMoz)&&b._loaders.unshift(d.wai.onload);b.mixin(d,{hasWaiRole:function(a,c){var b=this.getWaiRole(a);return c?b.indexOf(c)>-1:b.length>0},getWaiRole:function(a){return b.trim((b.attr(a,"role")||"").replace("wairole:",""))},setWaiRole:function(a,c){b.attr(a,"role",c)},removeWaiRole:function(a,c){var f=b.attr(a,"role");f&&(c?(f=b.trim((" "+f+" ").replace(" "+c+" "," ")),b.attr(a,"role",f)):a.removeAttribute("role"))},hasWaiState:function(a,
c){return a.hasAttribute?a.hasAttribute("aria-"+c):!!a.getAttribute("aria-"+c)},getWaiState:function(a,c){return a.getAttribute("aria-"+c)||""},setWaiState:function(a,c,b){a.setAttribute("aria-"+c,b)},removeWaiState:function(a,c){a.removeAttribute("aria-"+c)}});return d});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(b,d){d.getDocumentWindow=function(a){return b.window.get(a)};return d});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(b,d){d.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var c=a.declaredClass?a._popupWrapper:a.parentNode&&b.hasClass(a.parentNode,"dijitPopup"),f=a.domNode||a;if(!c&&(c=b.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},b.body()),c.appendChild(f),f=f.style,f.display="",f.visibility="",f.position="",f.top="0px",a.declaredClass))a._popupWrapper=
c,b.connect(a,"destroy",function(){b.destroy(c);delete a._popupWrapper});return c},moveOffScreen:function(a){a=this._createWrapper(a);b.style(a,{visibility:"hidden",top:"-9999px",display:""})},hide:function(a){a=this._createWrapper(a);b.style(a,"display","none")},getTopPopup:function(){for(var a=this._stack,c=a.length-1;c>0&&a[c].parent===a[c-1].widget;c--);return a[c]},open:function(a){for(var c=this._stack,f=a.popup,e=a.orient||((a.parent?a.parent.isLeftToRight():b._isBodyLtr())?{BL:"TL",BR:"TR",
TL:"BL",TR:"BR"}:{BR:"TR",BL:"TL",TR:"BR",TL:"BL"}),h=a.around,g=a.around&&a.around.id?a.around.id+"_dropdown":"popup_"+this._idGen++;c.length&&(!a.parent||!b.isDescendant(a.parent.domNode,c[c.length-1].widget.domNode));)d.popup.close(c[c.length-1].widget);var j=this._createWrapper(f);b.attr(j,{id:g,style:{zIndex:this._beginZIndex+c.length},"class":"dijitPopup "+(f.baseClass||f["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if((b.isIE||b.isMoz)&&!f.bgIframe)f.bgIframe=
new d.BackgroundIframe(j);e=h?d.placeOnScreenAroundElement(j,h,e,f.orient?b.hitch(f,"orient"):null):d.placeOnScreen(j,a,e=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding);j.style.display="";j.style.visibility="visible";f.domNode.style.visibility="visible";h=[];h.push(b.connect(j,"onkeypress",this,function(c){if(c.charOrCode==b.keys.ESCAPE&&a.onCancel)b.stopEvent(c),a.onCancel();else if(c.charOrCode===b.keys.TAB&&(b.stopEvent(c),(c=this.getTopPopup())&&c.onCancel))c.onCancel()}));f.onCancel&&
h.push(b.connect(f,"onCancel",a.onCancel));h.push(b.connect(f,f.onExecute?"onExecute":"onChange",this,function(){var a=this.getTopPopup();if(a&&a.onExecute)a.onExecute()}));c.push({widget:f,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:h});if(f.onOpen)f.onOpen(e);return e},close:function(a){for(var c=this._stack;a&&b.some(c,function(c){return c.widget==a})||!a&&c.length;){var f=c.pop(),e=f.widget,h=f.onClose;if(e.onClose)e.onClose();b.forEach(f.handlers,b.disconnect);
e&&e.domNode&&this.hide(e);h&&h()}}};d._frames=new function(){var a=[];this.pop=function(){var c;a.length?(c=a.pop(),c.style.display=""):(b.isIE<9?(c="<iframe src='"+(b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html")+""||'javascript:""')+"' style='position: absolute; left: 0px; top: 0px;z-index: -1; filter:Alpha(Opacity=\"0\");'>",c=b.doc.createElement(c)):(c=b.create("iframe"),c.src='javascript:""',c.className="dijitBackgroundIframe",b.style(c,"opacity",0.1)),c.tabIndex=-1,d.setWaiRole(c,
"presentation"));return c};this.push=function(c){c.style.display="none";a.push(c)}};d.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(b.isIE||b.isMoz){var c=this.iframe=d._frames.pop();a.appendChild(c);b.isIE<7||b.isQuirks?(this.resize(a),this._conn=b.connect(a,"onresize",this,function(){this.resize(a)})):b.style(c,{width:"100%",height:"100%"})}};b.extend(d.BackgroundIframe,{resize:function(a){this.iframe&&b.style(this.iframe,{width:a.offsetWidth+"px",height:a.offsetHeight+"px"})},destroy:function(){if(this._conn)b.disconnect(this._conn),
this._conn=null;this.iframe&&(d._frames.push(this.iframe),delete this.iframe)}});return d.popup});define("dijit/_base","dojo,dijit,dijit/_base/focus,dijit/_base/manager,dijit/_base/place,dijit/_base/popup,dijit/_base/scroll,dijit/_base/sniff,dijit/_base/typematic,dijit/_base/wai,dijit/_base/window".split(","),function(b,d){return d._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(b,d){b.connect(b,"_connect",function(a,c){a&&b.isFunction(a._onConnect)&&a._onConnect(c)});d._connectOnUseEventHandler=function(){};d._lastKeyDownNode=null;b.isIE?function(){var a=function(a){d._lastKeyDownNode=a.srcElement};b.doc.attachEvent("onkeydown",a);b.addOnWindowUnload(function(){b.doc.detachEvent("onkeydown",a)})}():b.doc.addEventListener("keydown",function(a){d._lastKeyDownNode=a.target},!0);(function(){b.declare("dijit._Widget",
d._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:d._connectOnUseEventHandler,onDblClick:d._connectOnUseEventHandler,onKeyDown:d._connectOnUseEventHandler,onKeyPress:d._connectOnUseEventHandler,onKeyUp:d._connectOnUseEventHandler,onMouseDown:d._connectOnUseEventHandler,onMouseMove:d._connectOnUseEventHandler,onMouseOut:d._connectOnUseEventHandler,
onMouseOver:d._connectOnUseEventHandler,onMouseLeave:d._connectOnUseEventHandler,onMouseEnter:d._connectOnUseEventHandler,onMouseUp:d._connectOnUseEventHandler,create:function(a,c){this._deferredConnects=b.clone(this._deferredConnects);for(var f in this.attributeMap)delete this._deferredConnects[f];for(f in this._deferredConnects)this[f]!==d._connectOnUseEventHandler&&delete this._deferredConnects[f];this.inherited(arguments);if(this.domNode)for(f in this.params)this._onConnect(f)},_onConnect:function(a){a in
this._deferredConnects&&(this.connect(this[this._deferredConnects[a]||"domNode"],a.toLowerCase(),a),delete this._deferredConnects[a])},focused:!1,isFocusable:function(){return this.focus&&b.style(this.domNode,"display")!="none"},onFocus:function(){},onBlur:function(){},_onFocus:function(){this.onFocus()},_onBlur:function(){this.onBlur()},setAttribute:function(a,c){b.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(a,c)},attr:function(a,
c){if(b.config.isDebug){var f=arguments.callee._ach||(arguments.callee._ach={}),e=(arguments.callee.caller||"unknown caller").toString();f[e]||(b.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+e,"","2.0"),f[e]=!0)}return arguments.length>=2||typeof a==="object"?this.set.apply(this,arguments):this.get(a)},nodesWithKeyClick:["input","button"],connect:function(a,c,f){var e=b._connect,h=this.inherited(arguments,[a,c=="ondijitclick"?"onclick":c,f]);if(c==
"ondijitclick"&&b.indexOf(this.nodesWithKeyClick,a.nodeName.toLowerCase())==-1){var g=b.hitch(this,f);h.push(e(a,"onkeydown",this,function(c){if((c.keyCode==b.keys.ENTER||c.keyCode==b.keys.SPACE)&&!c.ctrlKey&&!c.shiftKey&&!c.altKey&&!c.metaKey)d._lastKeyDownNode=c.target,"openDropDown"in this&&a==this._buttonNode||c.preventDefault()}),e(a,"onkeyup",this,function(a){if((a.keyCode==b.keys.ENTER||a.keyCode==b.keys.SPACE)&&a.target==d._lastKeyDownNode&&!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey)return d._lastKeyDownNode=
null,g(a)}))}return h},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}})})();return d._Widget});
define("dijit/_Contained",["dojo","dijit"],function(b,d){b.declare("dijit._Contained",null,{getParent:function(){var a=d.getEnclosingWidget(this.domNode.parentNode);return a&&a.isContainer?a:null},_getSibling:function(a){var c=this.domNode;do c=c[a+"Sibling"];while(c&&c.nodeType!=1);return c&&d.byNode(c)},getPreviousSibling:function(){return this._getSibling("previous")},getNextSibling:function(){return this._getSibling("next")},getIndexInParent:function(){var a=this.getParent();return!a||!a.getIndexOfChild?
-1:a.getIndexOfChild(this)}});return d._Contained});
define("dijit/_Container",["dojo","dijit"],function(b,d){b.declare("dijit._Container",null,{isContainer:!0,buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode},addChild:function(a,c){var f=this.containerNode;if(c&&typeof c=="number"){var e=this.getChildren();if(e&&e.length>=c)f=e[c-1].domNode,c="after"}b.place(a.domNode,f,c);this._started&&!a._started&&a.startup()},removeChild:function(a){typeof a=="number"&&(a=this.getChildren()[a]);if(a)(a=
a.domNode)&&a.parentNode&&a.parentNode.removeChild(a)},hasChildren:function(){return this.getChildren().length>0},destroyDescendants:function(a){b.forEach(this.getChildren(),function(c){c.destroyRecursive(a)})},_getSiblingOfChild:function(a,c){var b=a.domNode,e=c>0?"nextSibling":"previousSibling";do b=b[e];while(b&&(b.nodeType!=1||!d.byNode(b)));return b&&d.byNode(b)},getIndexOfChild:function(a){return b.indexOf(this.getChildren(),a)},startup:function(){this._started||(b.forEach(this.getChildren(),
function(a){a.startup()}),this.inherited(arguments))}});return d._Container});
define("dijit/layout/_LayoutWidget",["dojo","dijit","dijit/_Widget","dijit/_Container","dijit/_Contained"],function(b,d){b.declare("dijit.layout._LayoutWidget",[d._Widget,d._Container,d._Contained],{baseClass:"dijitLayoutContainer",isLayoutContainer:!0,buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitContainer")},startup:function(){if(!this._started){this.inherited(arguments);var a=this.getParent&&this.getParent();if(!a||!a.isLayoutContainer)this.resize(),this.connect(b.isIE?
this.domNode:b.global,"onresize",function(){this.resize()})}},resize:function(a,c){var f=this.domNode;if(a){b.marginBox(f,a);if(a.t)f.style.top=a.t+"px";if(a.l)f.style.left=a.l+"px"}var e=c||{};b.mixin(e,a||{});if(!("h"in e)||!("w"in e))e=b.mixin(b.marginBox(f),e);var h=b.getComputedStyle(f),g=b._getMarginExtents(f,h),d=b._getBorderExtents(f,h),e=this._borderBox={w:e.w-(g.w+d.w),h:e.h-(g.h+d.h)},g=b._getPadExtents(f,h);this._contentBox={l:b._toPixelValue(f,h.paddingLeft),t:b._toPixelValue(f,h.paddingTop),
w:e.w-g.w,h:e.h-g.h};this.layout()},layout:function(){},_setupChild:function(a){b.addClass(a.domNode,this.baseClass+"-child "+(a.baseClass?this.baseClass+"-"+a.baseClass:""))},addChild:function(a,c){this.inherited(arguments);this._started&&this._setupChild(a)},removeChild:function(a){b.removeClass(a.domNode,this.baseClass+"-child"+(a.baseClass?" "+this.baseClass+"-"+a.baseClass:""));this.inherited(arguments)}});d.layout.marginBox2contentBox=function(a,c){var f=b.getComputedStyle(a),e=b._getMarginExtents(a,
f),h=b._getPadBorderExtents(a,f);return{l:b._toPixelValue(a,f.paddingLeft),t:b._toPixelValue(a,f.paddingTop),w:c.w-(e.w+h.w),h:c.h-(e.h+h.h)}};(function(){var a=function(a,f){var e=a.resize?a.resize(f):b.marginBox(a.domNode,f);e?b.mixin(a,e):(b.mixin(a,b.marginBox(a.domNode)),b.mixin(a,f))};d.layout.layoutChildren=function(c,f,e,h,g){f=b.mixin({},f);b.addClass(c,"dijitLayoutContainer");e=b.filter(e,function(a){return a.region!="center"&&a.layoutAlign!="client"}).concat(b.filter(e,function(a){return a.region==
"center"||a.layoutAlign=="client"}));b.forEach(e,function(c){var e=c.domNode,d=c.region||c.layoutAlign,m=e.style;m.left=f.l+"px";m.top=f.t+"px";m.position="absolute";b.addClass(e,"dijitAlign"+(d.substring(0,1).toUpperCase()+d.substring(1)));e={};h&&h==c.id&&(e[c.region=="top"||c.region=="bottom"?"h":"w"]=g);d=="top"||d=="bottom"?(e.w=f.w,a(c,e),f.h-=c.h,d=="top"?f.t+=c.h:m.top=f.t+f.h+"px"):d=="left"||d=="right"?(e.h=f.h,a(c,e),f.w-=c.w,d=="left"?f.l+=c.w:m.left=f.l+f.w+"px"):(d=="client"||d=="center")&&
a(c,f)})}})();return d.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(b,d){b.declare("dijit.layout._ContentPaneResizeMixin",null,{doLayout:!0,isContainer:!0,isLayoutContainer:!0,_startChildren:function(){b.forEach(this.getChildren(),function(a){a.startup();a._started=!0})},startup:function(){if(!this._started){var a=d._Contained.prototype.getParent.call(this);this._childOfLayoutWidget=a&&a.isLayoutContainer;this._needLayout=!this._childOfLayoutWidget;
this.inherited(arguments);this._startChildren();this._isShown()&&this._onShow();this._childOfLayoutWidget||this.connect(b.isIE?this.domNode:b.global,"onresize",function(){this._needLayout=!this._childOfLayoutWidget;this.resize()})}},_checkIfSingleChild:function(){var a=b.query("> *",this.containerNode).filter(function(a){return a.tagName!=="SCRIPT"}),c=a.filter(function(a){return b.hasAttr(a,"data-dojo-type")||b.hasAttr(a,"dojoType")||b.hasAttr(a,"widgetId")}),f=b.filter(c.map(d.byNode),function(a){return a&&
a.domNode&&a.resize});a.length==c.length&&f.length==1?this._singleChild=f[0]:delete this._singleChild;b.toggleClass(this.containerNode,this.baseClass+"SingleChild",!!this._singleChild)},resize:function(a,c){!this._wasShown&&this.open!==!1&&this._onShow();this._resizeCalled=!0;this._scheduleLayout(a,c)},_scheduleLayout:function(a,c){this._isShown()?this._layout(a,c):(this._needLayout=!0,this._changeSize=a,this._resultSize=c)},_layout:function(a,c){a&&b.marginBox(this.domNode,a);var f=this.containerNode;
if(f===this.domNode){var e=c||{};b.mixin(e,a||{});if(!("h"in e)||!("w"in e))e=b.mixin(b.marginBox(f),e);this._contentBox=d.layout.marginBox2contentBox(f,e)}else this._contentBox=b.contentBox(f);this._layoutChildren();delete this._needLayout},_layoutChildren:function(){this.doLayout&&this._checkIfSingleChild();if(this._singleChild&&this._singleChild.resize){var a=this._contentBox||b.contentBox(this.containerNode);this._singleChild.resize({w:a.w,h:a.h})}else b.forEach(this.getChildren(),function(a){a.resize&&
a.resize()})},_isShown:function(){if(this._childOfLayoutWidget)return this._resizeCalled&&"open"in this?this.open:this._resizeCalled;else if("open"in this)return this.open;else{var a=this.domNode,c=this.domNode.parentNode;return a.style.display!="none"&&a.style.visibility!="hidden"&&!b.hasClass(a,"dijitHidden")&&c&&c.style&&c.style.display!="none"}},_onShow:function(){this._needLayout&&this._layout(this._changeSize,this._resultSize);this.inherited(arguments);this._wasShown=!0}});return d.layout._ContentPaneResizeMixin});
define("dojo/string",["dojo"],function(b){b.getObject("string",!0,b);b.string.rep=function(b,a){if(a<=0||!b)return"";for(var c=[];;){a&1&&c.push(b);if(!(a>>=1))break;b+=b}return c.join("")};b.string.pad=function(d,a,c,f){c||(c="0");d=String(d);a=b.string.rep(c,Math.ceil((a-d.length)/c.length));return f?d+a:a+d};b.string.substitute=function(d,a,c,f){f=f||b.global;c=c?b.hitch(f,c):function(a){return a};return d.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(e,h,g){e=b.getObject(h,!1,a);g&&
(e=b.getObject(g,!1,f).call(f,e,h));return c(e,h).toString()})};b.string.trim=String.prototype.trim?b.trim:function(b){for(var b=b.replace(/^\s+/,""),a=b.length-1;a>=0;a--)if(/\S/.test(b.charAt(a))){b=b.substring(0,a+1);break}return b};return b.string});
define("dojo/date/stamp",["dojo"],function(b){b.getObject("date.stamp",!0,b);b.date.stamp.fromISOString=function(d,a){if(!b.date.stamp._isoRegExp)b.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;var c=b.date.stamp._isoRegExp.exec(d),f=null;if(c){c.shift();c[1]&&c[1]--;c[6]&&(c[6]*=1E3);a&&(a=new Date(a),b.forEach(b.map("FullYear,Month,Date,Hours,Minutes,Seconds,Milliseconds".split(","),function(c){return a["get"+
c]()}),function(a,b){c[b]=c[b]||a}));f=new Date(c[0]||1970,c[1]||0,c[2]||1,c[3]||0,c[4]||0,c[5]||0,c[6]||0);c[0]<100&&f.setFullYear(c[0]||1970);var e=0,h=c[7]&&c[7].charAt(0);h!="Z"&&(e=(c[8]||0)*60+(Number(c[9])||0),h!="-"&&(e*=-1));h&&(e-=f.getTimezoneOffset());e&&f.setTime(f.getTime()+e*6E4)}return f};b.date.stamp.toISOString=function(b,a){var c=function(a){return a<10?"0"+a:a},a=a||{},f=[],e=a.zulu?"getUTC":"get",h="";a.selector!="time"&&(h=b[e+"FullYear"](),h=["0000".substr((h+"").length)+h,
c(b[e+"Month"]()+1),c(b[e+"Date"]())].join("-"));f.push(h);if(a.selector!="date"){h=[c(b[e+"Hours"]()),c(b[e+"Minutes"]()),c(b[e+"Seconds"]())].join(":");e=b[e+"Milliseconds"]();a.milliseconds&&(h+="."+(e<100?"0":"")+c(e));if(a.zulu)h+="Z";else if(a.selector!="time"){var e=b.getTimezoneOffset(),g=Math.abs(e);h+=(e>0?"-":"+")+c(Math.floor(g/60))+":"+c(g%60)}f.push(h)}return f.join("T")};return b.date.stamp});
define("dojo/parser",["dojo","dojo/date/stamp"],function(b){b.parser=new function(){function d(a,c){switch(c){case "string":return a;case "number":return a.length?Number(a):NaN;case "boolean":return typeof a=="boolean"?a:a.toLowerCase()!="false";case "function":f.isFunction(a)&&(a=a.toString(),a=f.trim(a.substring(a.indexOf("{")+1,a.length-1)));try{return a===""||a.search(/[^\w\.]+/i)!=-1?new Function(a):f.getObject(a,!1)||new Function(a)}catch(b){return new Function}case "array":return a?a.split(/\s*,\s*/):
[];case "date":switch(a){case "":return new Date("");case "now":return new Date;default:return f.date.stamp.fromISOString(a)}case "url":return f.baseUrl+a;default:return f.fromJson(a)}}function a(a,c){for(var b in a)if(b.charAt(0)!="_"&&!(b in e)){var h=c,d=b,n;n=a[b];n=f.isString(n)?"string":typeof n=="number"?"number":typeof n=="boolean"?"boolean":f.isFunction(n)?"function":f.isArray(n)?"array":n instanceof Date?"date":n instanceof f._Url?"url":"object";h[d]=n}return c}function c(c,b){var e=h[c];
if(e){if(!b&&!e.params)e.params=a(e.cls.prototype,{})}else{var e=f.getObject(c),d=null;if(!e)return null;b||(d=a(e.prototype,{}));e={cls:e,params:d}}return e}var f=b,e={},h={};f.connect(f,"extend",function(){h={}});this._functionFromScript=function(a,c){var b="",e="",h=a.getAttribute(c+"args")||a.getAttribute("args");h&&f.forEach(h.split(/\s*,\s*/),function(a,c){b+="var "+a+" = arguments["+c+"]; "});(h=a.getAttribute("with"))&&h.length&&f.forEach(h.split(/\s*,\s*/),function(a){b+="with("+a+"){";e+=
"}"});return new Function(b+a.innerHTML+e)};this.instantiate=function(a,e,h){var l=[],e=e||{},h=h||{},m=(h.scope||f._scopeName)+"Type",n="data-"+(h.scope||f._scopeName)+"-";f.forEach(a,function(a){if(a){var g,p,r,s,x,v;a.node?(g=a.node,p=a.type,v=a.fastpath,s=(r=a.clsInfo||p&&c(p,v))&&r.cls,x=a.scripts):(g=a,x=(s=(r=(p=m in e?e[m]:g.getAttribute(m))&&c(p))&&r.cls)&&(s._noScript||s.prototype._noScript)?[]:f.query("> script[type^='dojo/']",g));if(!r)throw Error("Could not load class '"+p);var w={};
h.defaults&&f._mixin(w,h.defaults);a.inherited&&f._mixin(w,a.inherited);if(v){if((r=g.getAttribute(n+"props"))&&r.length)try{r=f.fromJson.call(h.propsThis,"{"+r+"}"),f._mixin(w,r)}catch(t){throw Error(t.toString()+" in data-dojo-props='"+r+"'");}if(r=g.getAttribute(n+"attach-point"))w.dojoAttachPoint=r;if(r=g.getAttribute(n+"attach-event"))w.dojoAttachEvent=r;b.mixin(w,e)}else{var a=g.attributes,u;for(u in r.params)if((p=u in e?{value:e[u],specified:!0}:a.getNamedItem(u))&&(p.specified||b.isIE&&u.toLowerCase()==
"value")){p=p.value;switch(u){case "class":p="className"in e?e.className:g.className;break;case "style":p="style"in e?e.style:g.style&&g.style.cssText}v=r.params[u];w[u]=typeof p=="string"?d(p,v):p}}var y=[],z=[];f.forEach(x,function(a){g.removeChild(a);var c=a.getAttribute(n+"event")||a.getAttribute("event"),b=a.getAttribute("type"),a=f.parser._functionFromScript(a,n);c?b=="dojo/connect"?y.push({event:c,func:a}):w[c]=a:z.push(a)});var A=(x=s.markupFactory||s.prototype&&s.prototype.markupFactory)?
x(w,g,s):new s(w,g);l.push(A);(s=g.getAttribute(n+"id")||g.getAttribute("jsId"))&&f.setObject(s,A);f.forEach(y,function(a){f.connect(A,a.event,null,a.func)});f.forEach(z,function(a){a.call(A)})}});e._started||f.forEach(l,function(a){!h.noStart&&a&&b.isFunction(a.startup)&&!a._started&&(!a.getParent||!a.getParent())&&a.startup()});return l};this.parse=function(a,e){function h(a,f){var g=b.clone(a.inherited);b.forEach(["dir","lang"],function(c){var b=a.node.getAttribute(c);b&&(g[c]=b)});for(var d=a.clsInfo&&
!a.clsInfo.cls.prototype._noScript?a.scripts:null,l=!a.clsInfo||!a.clsInfo.cls.prototype.stopParser||e&&e.template,o=a.node.firstChild;o;o=o.nextSibling)if(o.nodeType==1){var t,u=l&&o.getAttribute(n+"type");t=u?u:l&&o.getAttribute(m);u=u==t;t?(t={type:t,fastpath:u,clsInfo:c(t,u),node:o,scripts:[],inherited:g},f.push(t),h(t,f)):d&&o.nodeName.toLowerCase()=="script"?(t=o.getAttribute("type"))&&/^dojo\/\w/i.test(t)&&d.push(o):l&&h({node:o,inherited:g},f)}}var d;!e&&a&&a.rootNode?(e=a,d=e.rootNode):d=
a;d=d?b.byId(d):b.body();var e=e||{},m=(e.scope||f._scopeName)+"Type",n="data-"+(e.scope||f._scopeName)+"-",o={};if(e&&e.inherited)for(var q in e.inherited)e.inherited[q]&&(o[q]=e.inherited[q]);q=[];h({node:d,inherited:o},q);return this.instantiate(q,e&&e.template?{template:!0}:null,e)}};(function(){var d=function(){b.config.parseOnLoad&&b.parser.parse()};b.getObject("dijit.wai.onload")===b._loaders[0]?b._loaders.splice(1,0,d):b._loaders.unshift(d)})();return b.parser});
define("dojo/html",["dojo","dojo/parser"],function(b){b.getObject("html",!0,b);(function(){var d=0;b.html._secureForInnerHtml=function(a){return a.replace(/(?:\s*<!DOCTYPE\s[^>]+>|<title[^>]*>[\s\S]*?<\/title>)/ig,"")};b.html._emptyNode=b.empty;b.html._setNodeContent=function(a,c){b.empty(a);if(c)if(typeof c=="string"&&(c=b._toDom(c,a.ownerDocument)),!c.nodeType&&b.isArrayLike(c))for(var f=c.length,e=0;e<c.length;e=f==c.length?e+1:0)b.place(c[e],a,"last");else b.place(c,a,"last");return a};b.declare("dojo.html._ContentSetter",
null,{node:"",content:"",id:"",cleanContent:!1,extractContent:!1,parseContent:!1,parserScope:b._scopeName,startup:!0,constructor:function(a,c){b.mixin(this,a||{});c=this.node=b.byId(this.node||c);if(!this.id)this.id=["Setter",c?c.id||c.tagName:"",d++].join("_")},set:function(a,c){if(void 0!==a)this.content=a;c&&this._mixin(c);this.onBegin();this.setContent();this.onEnd();return this.node},setContent:function(){var a=this.node;if(!a)throw Error(this.declaredClass+": setContent given no node");try{a=
b.html._setNodeContent(a,this.content)}catch(c){var f=this.onContentError(c);try{a.innerHTML=f}catch(e){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+e.message,e)}}this.node=a},empty:function(){this.parseResults&&this.parseResults.length&&(b.forEach(this.parseResults,function(a){a.destroy&&a.destroy()}),delete this.parseResults);b.html._emptyNode(this.node)},onBegin:function(){var a=this.content;if(b.isString(a)&&(this.cleanContent&&(a=b.html._secureForInnerHtml(a)),
this.extractContent)){var c=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);c&&(a=c[1])}this.empty();this.content=a;return this.node},onEnd:function(){this.parseContent&&this._parse();return this.node},tearDown:function(){delete this.parseResults;delete this.node;delete this.content},onContentError:function(a){return"Error occured setting content: "+a},_mixin:function(a){var c={},b;for(b in a)b in c||(this[b]=a[b])},_parse:function(){var a=this.node;try{var c={};b.forEach(["dir","lang","textDir"],
function(a){this[a]&&(c[a]=this[a])},this);this.parseResults=b.parser.parse({rootNode:a,noStart:!this.startup,inherited:c,scope:this.parserScope})}catch(f){this._onError("Content",f,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,c,f){a=this["on"+a+"Error"].call(this,c);f?console.error(f,c):a&&b.html._setNodeContent(this.node,a,!0)}});b.html.set=function(a,c,f){void 0==c&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),c="");return f?(new b.html._ContentSetter(b.mixin(f,
{content:c,node:a}))).set():b.html._setNodeContent(a,c,!0)}})();return b.html});define("dijit/nls/loading",{root:{loadingState:"Loading...",errorState:"Sorry, an error occurred"},zh:!0,"zh-tw":!0,tr:!0,th:!0,sv:!0,sl:!0,sk:!0,ru:!0,ro:!0,pt:!0,"pt-pt":!0,pl:!0,nl:!0,nb:!0,ko:!0,kk:!0,ja:!0,it:!0,hu:!0,he:!0,fr:!0,fi:!0,es:!0,el:!0,de:!0,da:!0,cs:!0,ca:!0,ar:!0});
define("dijit/layout/ContentPane","dojo,dijit,dijit/_Widget,dijit/layout/_ContentPaneResizeMixin,dojo/string,dojo/html,i18n!dijit/nls/loading".split(","),function(b,d){b.declare("dijit.layout.ContentPane",[d._Widget,d.layout._ContentPaneResizeMixin],{href:"",extractContent:!1,parseOnLoad:!0,parserScope:b._scopeName,preventCache:!1,preload:!1,refreshOnShow:!1,loadingMessage:"<span class='dijitContentPaneLoading'>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'>${errorState}</span>",
isLoaded:!1,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,attributeMap:b.delegate(d._Widget.prototype.attributeMap,{title:[]}),stopParser:!0,template:!1,create:function(a,c){if((!a||!a.template)&&c&&!("href"in a)&&!("content"in a)){for(var f=b.doc.createDocumentFragment(),c=b.byId(c);c.firstChild;)f.appendChild(c.firstChild);a=b.delegate(a,{content:f})}this.inherited(arguments,[a,c])},postMixInProperties:function(){this.inherited(arguments);var a=b.i18n.getLocalization("dijit","loading",
this.lang);this.loadingMessage=b.string.substitute(this.loadingMessage,a);this.errorMessage=b.string.substitute(this.errorMessage,a)},buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode;this.domNode.title="";b.attr(this.domNode,"role")||d.setWaiRole(this.domNode,"group")},_startChildren:function(){this.inherited(arguments);this._contentSetter&&b.forEach(this._contentSetter.parseResults,function(a){if(!a._started&&!a._destroyed&&b.isFunction(a.startup))a.startup(),
a._started=!0},this)},setHref:function(a){b.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",a)},_setHrefAttr:function(a){this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._set("href",a);this.preload||this._created&&this._isShown()?this._load():this._hrefChanged=!0;return this.onLoadDeferred},setContent:function(a){b.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.",
"","2.0");this.set("content",a)},_setContentAttr:function(a){this._set("href","");this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this._created&&this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._setContent(a||"");this._isDownloaded=!1;return this.onLoadDeferred},_getContentAttr:function(){return this.containerNode.innerHTML},cancel:function(){this._xhrDfd&&this._xhrDfd.fired==-1&&this._xhrDfd.cancel();delete this._xhrDfd;this.onLoadDeferred=null},uninitialize:function(){this._beingDestroyed&&
this.cancel();this.inherited(arguments)},destroyRecursive:function(a){this._beingDestroyed||this.inherited(arguments)},_onShow:function(){this.inherited(arguments);if(this.href&&!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow))return this.refresh()},refresh:function(){this.cancel();this.onLoadDeferred=new b.Deferred(b.hitch(this,"cancel"));this.onLoadDeferred.addCallback(b.hitch(this,"onLoad"));this._load();return this.onLoadDeferred},_load:function(){this._setContent(this.onDownloadStart(),
!0);var a=this,c={preventCache:this.preventCache||this.refreshOnShow,url:this.href,handleAs:"text"};b.isObject(this.ioArgs)&&b.mixin(c,this.ioArgs);var f=this._xhrDfd=(this.ioMethod||b.xhrGet)(c);f.addCallback(function(c){try{a._isDownloaded=!0,a._setContent(c,!1),a.onDownloadEnd()}catch(b){a._onError("Content",b)}delete a._xhrDfd;return c});f.addErrback(function(c){f.canceled||a._onError("Download",c);delete a._xhrDfd;return c});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",
!0);try{this.onLoadDeferred.callback(a)}catch(c){console.error("Error "+this.widgetId+" running custom onLoad code: "+c.message)}},_onUnloadHandler:function(){this._set("isLoaded",!1);try{this.onUnload()}catch(a){console.error("Error "+this.widgetId+" running custom onUnload code: "+a.message)}},destroyDescendants:function(){this.isLoaded&&this._onUnloadHandler();var a=this._contentSetter;b.forEach(this.getChildren(),function(a){a.destroyRecursive&&a.destroyRecursive()});a&&(b.forEach(a.parseResults,
function(a){a.destroyRecursive&&a.domNode&&a.domNode.parentNode==b.body()&&a.destroyRecursive()}),delete a.parseResults);b.html._emptyNode(this.containerNode);delete this._singleChild},_setContent:function(a,c){this.destroyDescendants();var f=this._contentSetter;if(!(f&&f instanceof b.html._ContentSetter))f=this._contentSetter=new b.html._ContentSetter({node:this.containerNode,_onError:b.hitch(this,this._onError),onContentError:b.hitch(this,function(a){a=this.onContentError(a);try{this.containerNode.innerHTML=
a}catch(c){console.error("Fatal "+this.id+" could not change content due to "+c.message,c)}})});var e=b.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang},this._contentSetterParams||{});f.set(b.isObject(a)&&a.domNode?a.domNode:a,e);delete this._contentSetterParams;this.doLayout&&this._checkIfSingleChild();c||(this._started&&(this._startChildren(),this._scheduleLayout()),this._onLoadHandler(a))},
_onError:function(a,c,b){this.onLoadDeferred.errback(c);a=this["on"+a+"Error"].call(this,c);b?console.error(b,c):a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}});return d.layout.ContentPane});
define("dojo/cache",["dojo"],function(b){var d={};b.cache=function(a,c,f){if(typeof a=="string")var e=b.moduleUrl(a,c);else e=a,f=c;var e=e.toString(),h=f;f!=void 0&&!b.isString(f)&&(h="value"in f?f.value:void 0);f=f&&f.sanitize?!0:!1;if(typeof h=="string")h=d[e]=f?b.cache._sanitize(h):h;else if(h===null)delete d[e];else{if(!(e in d)){h=void 0;if(b.isFunction(require)&&b.isString(a))try{var g=(a?a.replace(/\./g,"/")+"/":"")+c,h=require("text!"+g)}catch(j){}typeof h==="undefined"&&(h=b._getText(e));
d[e]=f?b.cache._sanitize(h):h}h=d[e]}return h};b.cache._sanitize=function(a){if(a){var a=a.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,""),c=a.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);c&&(a=c[1])}else a="";return a};return b.cache});
define("dijit/_Templated","dojo,dijit,dijit/_Widget,dojo/string,dojo/parser,dojo/cache".split(","),function(b,d){b.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:!1,_skipNodeCache:!1,_earlyTemplatedStartup:!1,constructor:function(){this._attachPoints=[];this._attachEvents=[]},_stringRepl:function(a){var c=this.declaredClass,f=this;return b.string.substitute(a,this,function(a,h){h.charAt(0)=="!"&&(a=b.getObject(h.substr(1),!1,f));if(typeof a=="undefined")throw Error(c+
" template:"+h);return a==null?"":h.charAt(0)=="!"?a:a.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var a=d._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache),c;if(b.isString(a)){if(c=b._toDom(this._stringRepl(a)),c.nodeType!=1)throw Error("Invalid template: "+a);}else c=a.cloneNode(!0);this.domNode=c;this.inherited(arguments);this._attachTemplateNodes(c);if(this.widgetsInTemplate)a=this._startupWidgets=b.parser.parse(c,{noStart:!this._earlyTemplatedStartup,
template:!0,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"}),this._supportingWidgets=d.findWidgets(c),this._attachTemplateNodes(a,function(a,c){return a[c]});this._fillContent(this.srcNodeRef)},_fillContent:function(a){var c=this.containerNode;if(a&&c)for(;a.hasChildNodes();)c.appendChild(a.firstChild)},_attachTemplateNodes:function(a,c){for(var c=c||function(a,c){return a.getAttribute(c)},f=b.isArray(a)?a:a.all||a.getElementsByTagName("*"),e=b.isArray(a)?0:-1;e<f.length;e++){var h=
e==-1?a:f[e];if(!this.widgetsInTemplate||!c(h,"dojoType")&&!c(h,"data-dojo-type")){var g=c(h,"dojoAttachPoint")||c(h,"data-dojo-attach-point");if(g)for(var j=g.split(/\s*,\s*/);g=j.shift();)b.isArray(this[g])?this[g].push(h):this[g]=h,this._attachPoints.push(g);if(g=c(h,"dojoAttachEvent")||c(h,"data-dojo-attach-event"))for(var j=g.split(/\s*,\s*/),k=b.trim;g=j.shift();)if(g){var l=null;g.indexOf(":")!=-1?(l=g.split(":"),g=k(l[0]),l=k(l[1])):g=k(g);l||(l=g);this._attachEvents.push(this.connect(h,g,
l))}(g=c(h,"waiRole"))&&d.setWaiRole(h,g);(g=c(h,"waiState"))&&b.forEach(g.split(/\s*,\s*/),function(a){a.indexOf("-")!=-1&&(a=a.split("-"),d.setWaiState(h,a[0],a[1]))})}}},startup:function(){b.forEach(this._startupWidgets,function(a){a&&!a._started&&a.startup&&a.startup()});this.inherited(arguments)},destroyRendering:function(){b.forEach(this._attachPoints,function(a){delete this[a]},this);this._attachPoints=[];b.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments)}});
d._Templated._templateCache={};d._Templated.getCachedTemplate=function(a,c,f){var e=d._Templated._templateCache,h=c||a,g=e[h];if(g){try{if(!g.ownerDocument||g.ownerDocument==b.doc)return g}catch(j){}b.destroy(g)}c||(c=b.cache(a,{sanitize:!0}));c=b.string.trim(c);if(f||c.match(/\$\{([^\}]+)\}/g))return e[h]=c;else{a=b._toDom(c);if(a.nodeType!=1)throw Error("Invalid template: "+c);return e[h]=a}};b.isIE&&b.addOnWindowUnload(function(){var a=d._Templated._templateCache,c;for(c in a){var f=a[c];typeof f==
"object"&&b.destroy(f);delete a[c]}});b.extend(d._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return d._Templated});
define("dijit/form/_FormMixin",["dojo","dijit","dojo/window"],function(b,d){b.declare("dijit.form._FormMixin",null,{state:"",reset:function(){b.forEach(this.getDescendants(),function(a){a.reset&&a.reset()})},validate:function(){var a=!1;return b.every(b.map(this.getDescendants(),function(c){c._hasBeenBlurred=!0;var f=c.disabled||!c.validate||c.validate();!f&&!a&&(b.window.scrollIntoView(c.containerNode||c.domNode),c.focus(),a=!0);return f}),function(a){return a})},setValues:function(a){b.deprecated(this.declaredClass+
"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",a)},_setValueAttr:function(a){var c={};b.forEach(this.getDescendants(),function(a){a.name&&(c[a.name]||(c[a.name]=[])).push(a)});for(var f in c)if(c.hasOwnProperty(f)){var e=c[f],h=b.getObject(f,!1,a);h!==void 0&&(b.isArray(h)||(h=[h]),typeof e[0].checked=="boolean"?b.forEach(e,function(a){a.set("value",b.indexOf(h,a.value)!=-1)}):e[0].multiple?e[0].set("value",h):b.forEach(e,function(a,c){a.set("value",
h[c])}))}},getValues:function(){b.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_getValueAttr:function(){var a={};b.forEach(this.getDescendants(),function(c){var f=c.name;if(f&&!c.disabled){var e=c.get("value");typeof c.checked=="boolean"?/Radio/.test(c.declaredClass)?e!==!1?b.setObject(f,e,a):(e=b.getObject(f,!1,a),e===void 0&&b.setObject(f,null,a)):(c=b.getObject(f,!1,a),c||(c=[],b.setObject(f,c,a)),e!==!1&&c.push(e)):
(c=b.getObject(f,!1,a),typeof c!="undefined"?b.isArray(c)?c.push(e):b.setObject(f,[c,e],a):b.setObject(f,e,a))}});return a},isValid:function(){return this.state==""},onValidStateChange:function(){},_getState:function(){var a=b.map(this._descendants,function(a){return a.get("state")||""});return b.indexOf(a,"Error")>=0?"Error":b.indexOf(a,"Incomplete")>=0?"Incomplete":""},disconnectChildren:function(){b.forEach(this._childConnections||[],b.hitch(this,"disconnect"));b.forEach(this._childWatches||[],
function(a){a.unwatch()})},connectChildren:function(a){var c=this;this.disconnectChildren();this._descendants=this.getDescendants();a=a?function(a,b){c[a]=b}:b.hitch(this,"_set");a("value",this.get("value"));a("state",this._getState());var f=this._childConnections=[],e=this._childWatches=[];b.forEach(b.filter(this._descendants,function(a){return a.validate}),function(a){b.forEach(["state","disabled"],function(b){e.push(a.watch(b,function(){c.set("state",c._getState())}))})});var h=function(){c._onChangeDelayTimer&&
clearTimeout(c._onChangeDelayTimer);c._onChangeDelayTimer=setTimeout(function(){delete c._onChangeDelayTimer;c._set("value",c.get("value"))},10)};b.forEach(b.filter(this._descendants,function(a){return a.onChange}),function(a){f.push(c.connect(a,"onChange",h));e.push(a.watch("disabled",h))})},startup:function(){this.inherited(arguments);this.connectChildren(!0);this.watch("state",function(a,c,b){this.onValidStateChange(b=="")})},destroy:function(){this.disconnectChildren();this.inherited(arguments)}});
return d.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(b,d){b.declare("dijit._DialogMixin",null,{attributeMap:d._Widget.prototype.attributeMap,execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=d._getTabNavigable(this.containerNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}});
return d._DialogMixin});
(function(){var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],d=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c=typeof location!=="undefined"&&location.href,f=c&&location.protocol&&location.protocol.replace(/\:/,""),e=c&&location.hostname,h=c&&(location.port||void 0),g=[];define("text",[],function(){var j,k,l;typeof window!=="undefined"&&window.navigator&&window.document?k=function(a,c){var b=j.createXhr();b.open("GET",a,!0);b.onreadystatechange=
function(){b.readyState===4&&c(b.responseText)};b.send(null)}:typeof process!=="undefined"&&process.versions&&process.versions.node?(l=require.nodeRequire("fs"),k=function(a,c){var b=l.readFileSync(a,"utf8");b.indexOf("\ufeff")===0&&(b=b.substring(1));c(b)}):typeof Packages!=="undefined"&&(k=function(a,c){var b=new java.io.File(a),f=java.lang.System.getProperty("line.separator"),b=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(b),"utf-8")),e,h,d="";try{e=new java.lang.StringBuffer;
(h=b.readLine())&&h.length()&&h.charAt(0)===65279&&(h=h.substring(1));for(e.append(h);(h=b.readLine())!==null;)e.append(f),e.append(h);d=String(e.toString())}finally{b.close()}c(d)});return j={version:"1.0.7",strip:function(c){if(c){var c=c.replace(d,""),b=c.match(a);b&&(c=b[1])}else c="";return c},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,c,
f;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(c=0;c<3;c++){f=b[c];try{a=new ActiveXObject(f)}catch(e){}if(a){b=[f];break}}if(!a)throw Error("createXhr(): XMLHttpRequest not available");return a},get:k,parseName:function(a){var c=!1,b=a.indexOf("."),f=a.substring(0,b),a=a.substring(b+1,a.length),b=a.indexOf("!");b!==-1&&(c=a.substring(b+1,a.length),c=c==="strip",a=a.substring(0,b));return{moduleName:f,ext:a,strip:c}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,
c,b,f){var e=j.xdRegExp.exec(a),h;if(!e)return!0;a=e[2];e=e[3];e=e.split(":");h=e[1];e=e[0];return(!a||a===c)&&(!e||e===b)&&(!h&&!e||h===f)},finishLoad:function(a,c,b,f,e){b=c?j.strip(b):b;e.isBuild&&(g[a]=b);f(b)},load:function(a,b,d,g){if(g.isBuild&&!g.inlineText)d();else{var k=j.parseName(a),l=k.moduleName+"."+k.ext,s=b.toUrl(l),x=g&&g.text&&g.text.useXhr||j.useXhr;!c||x(s,f,e,h)?j.get(s,function(c){j.finishLoad(a,k.strip,c,d,g)}):b([l],function(a){j.finishLoad(k.moduleName+"."+k.ext,k.strip,a,
d,g)})}},write:function(a,c,b){if(c in g){var f=j.jsEscape(g[c]);b.asModule(a+"!"+c,"define(function () { return '"+f+"';});\n")}},writeFile:function(a,c,b,f,e){var c=j.parseName(c),h=c.moduleName+"."+c.ext,g=b.toUrl(c.moduleName+"."+c.ext)+".js";j.load(h,b,function(){var c=function(a){return f(g,a)};c.asModule=function(a,c){return f.asModule(a,g,c)};j.write(a,h,c,e)},e)}}})})();define("text!orion/widgets/templates/OperationsDialog.html",[],function(){return'\n<div>\n\t<div class="dijitTooltipContainer" role="presentation" style="padding: 0.5em; min-width: 300px;">\n\t\t<div class="dijitTooltipContents dijitTooltipFocusNode" role="status" aria-live="assertive"\n\t\t\tdojoattachpoint="containerNode" style="padding: 0">\n\t\t\t<table style="width: 100%;">\n\t\t\t\t<tr>\n\t\t\t\t\t<td><h2>Recent operations</h2></td>\n\t\t\t\t\t<td style="text-align: right;"><a dojoAttachPoint="allOperationsLink">All Operations</a></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<span dojoAttachPoint="operationsExist">\n\t\t\t\t<span class="secondaryColumn" dojoAttachPoint="myOperationsListEmpty">No operations running on this page.</span>\n\t\t\t\t<table dojoAttachPoint="myOperationsList" style="display: none;">\n\t\t\t\t</table>\n\t\t\t\t<span class="secondaryColumn" dojoAttachPoint="otherOperations"><br>Operations from other pages:</span>\n\t\t\t\t<table dojoAttachPoint="operationsList" style="display: none;">\n\t\t\t\t</table>\n\t\t\t</span>\n\t\t\t<span class="secondaryColumn" dojoAttachPoint="operationsDontExist">No operations running.</span>\n\t\t</div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n\n</div>'});
define("text!dijit/templates/TooltipDialog.html",[],function(){return'<div role="presentation" tabIndex="-1">\n\t<div class="dijitTooltipContainer" role="presentation">\n\t\t<div class ="dijitTooltipContents dijitTooltipFocusNode" dojoAttachPoint="containerNode" role="dialog"></div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n</div>'});
define("dijit/TooltipDialog","dojo,dijit,text!dijit/templates/TooltipDialog.html,dijit/layout/ContentPane,dijit/_Templated,dijit/form/_FormMixin,dijit/_DialogMixin".split(","),function(b,d){b.declare("dijit.TooltipDialog",[d.layout.ContentPane,d._Templated,d.form._FormMixin,d._DialogMixin],{title:"",doLayout:!1,autofocus:!0,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:b.cache("dijit","templates/TooltipDialog.html"),_setTitleAttr:function(a){this.containerNode.title=
a;this._set("title",a)},postCreate:function(){this.inherited(arguments);this.connect(this.containerNode,"onkeypress","_onKey")},orient:function(a,c,f){a="dijitTooltipAB"+(f.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(f.charAt(0)=="T"?"Below":"Above");b.replaceClass(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems(this.containerNode);d.focus(this._firstFocusItem)},onOpen:function(a){this.orient(this.domNode,a.aroundCorner,a.corner);this._onShow()},
onClose:function(){this.onHide()},_onKey:function(a){var c=a.target,f=b.keys;a.charOrCode===f.TAB&&this._getFocusItems(this.containerNode);var e=this._firstFocusItem==this._lastFocusItem;a.charOrCode==f.ESCAPE?(setTimeout(b.hitch(this,"onCancel"),0),b.stopEvent(a)):c==this._firstFocusItem&&a.shiftKey&&a.charOrCode===f.TAB?(e||d.focus(this._lastFocusItem),b.stopEvent(a)):c==this._lastFocusItem&&a.charOrCode===f.TAB&&!a.shiftKey?(e||d.focus(this._firstFocusItem),b.stopEvent(a)):a.charOrCode===f.TAB&&
a.stopPropagation()}});return d.TooltipDialog});
define("orion/widgets/OperationsDialog","i18n!orion/operations/nls/messages,require,dojo,dijit,dijit/TooltipDialog,text!orion/widgets/templates/OperationsDialog.html".split(","),function(b,d,a,c){a.declare("orion.widgets.OperationsDialog",[c.TooltipDialog],{widgetsInTemplate:!0,closable:!0,templateString:a.cache("orion","widgets/templates/OperationsDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this._operations=[];this._myOperations=[]},postCreate:function(){this.inherited(arguments);
this.allOperationsLink.href=d.toUrl("operations/list.html");this._setOperationsVisibility()},setOperations:function(a,c){this._operations=[];c=c||{};this._myOperations=[];if(a.Children)for(var b=0;b<a.Children.length;b++)c[a.Children[b].Id]?this._myOperations.push(a.Children[b]):this._operations.push(a.Children[b]);this._operations.sort(function(a,c){return parseInt(c.Modified)-parseInt(a.Modified)});this._myOperations.sort(function(a,c){return parseInt(c.Modified)-parseInt(a.Modified)});this._renderOperations()},
parseProgressResult:function(a){if(!a)return{};a=a.responseText||a;try{a=JSON.parse(a)}catch(c){}var b={Message:a.Message||a,Severity:a.Severity};if(a.DetailedMessage&&a.DetailedMessage!==b.Message)b.DetailedMessage=a.DetailedMessage;return b},_renderOperations:function(){this._renderOperationsTable(this.myOperationsList,this._myOperations);this._renderOperationsTable(this.operationsList,this._operations)},_renderOperationsTable:function(c,e){a.empty(c);for(var h=0;h<e.length;h++){var d=e[h],j=a.create("tr"),
k=a.create("td",{style:"padding-left: 5px; padding-right: 5px"},j);k.textContent=d.Name;var k=a.create("div",null,k,"only"),l=a.create("span",{className:"primaryColumn"},k,"last");l.textContent=d.Name;a.place(document.createTextNode(d.Name),l,"only");var m=a.create("span",null,k,"first");a.addClass(m,"imageSprite");l=this.parseProgressResult(d.Result);switch(l.Severity){case "Warning":a.addClass(m,"core-sprite-warning");a.attr(m,"aria-label",b["Operation resulted in a warning."]);break;case "Error":a.addClass(m,
"core-sprite-error");a.attr(m,"aria-label",b["Operation resulted in an error."]);break;default:d.Running===!0?(a.addClass(m,"core-sprite-start"),a.attr(m,"aria-label",b["Operation is running."])):d.Canceled===!0?(a.addClass(m,"core-sprite-stop"),a.attr(m,"aria-label",b["Operation is canceled."])):d.Failed===!0?(a.addClass(m,"core-sprite-error"),a.attr(m,"aria-label",b["Operation failed."])):(a.addClass(m,"core-sprite-ok"),a.attr(m,"aria-label","Operation ok."))}if(l.Message||d.Message)d=l.Message||
d.Message,l.DetailedMessage&&l.DetailedMessage!==""&&(d+=": "+l.DetailedMessage),a.create("br",null,k,"last"),a.create("span",{className:"secondaryColumn",style:"margin-left: 18px;"},k,"last").textContent=d;a.place(j,c,"last")}this._setOperationsVisibility()},_setOperationsVisibility:function(){this.operationsList.style.display=this._operations.length>0?"":"none";this.otherOperations.style.display=this._operations.length>0?"":"none";this.myOperationsList.style.display=this._myOperations.length>0?
"":"none";this.myOperationsListEmpty.style.display=this._myOperations.length>0?"none":"";this.operationsDontExist.style.display=this._operations.length+this._myOperations.length>0?"none":"";this.operationsExist.style.display=this._operations.length+this._myOperations.length>0?"":"none"},_onBlur:function(){this.inherited(arguments);c.popup.hide&&c.popup.hide(this);c.popup.close(this)}})});define("text!dijit/form/templates/ValidationTextBox.html",[],function(){return'<div class="dijit dijitReset dijitInlineTable dijitLeft"\n\tid="widget_${id}" role="presentation"\n\t><div class=\'dijitReset dijitValidationContainer\'\n\t\t><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t/></div\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dojo/i18n",["require","dojo"],function(b,d){d.getObject("i18n",!0,d);d.i18n.getLocalization=d.i18n.getLocalization||function(a,c,f){var f=d.i18n.normalizeLocale(f),e=f.split("-"),h=[a,"nls",c].join(".");if(typeof d.global.require!=="undefined"){var g=b("i18n!"+[a.replace(/\./g,"/"),"nls",c].join("/"));(d._loadedModules[h]=d._loadedModules[h]||{})[e.join("_")]=g.root||g}if(h=d._loadedModules[h]){for(var j,g=e.length;g>0;g--){var k=e.slice(0,g).join("_");if(h[k]){j=h[k];break}}if(!j)j=h.ROOT;
if(j)return a=function(){},a.prototype=j,new a}throw Error("Bundle not found: "+c+" in "+a+" , locale="+f);};d.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():d.locale;a=="root"&&(a="ROOT");return a};d.i18n._requireLocalization=function(a,c,b,e){var b=d.i18n.normalizeLocale(b),h=[a,"nls",c].join("."),g="";if(e){for(var j=e.split(","),k=0;k<j.length;k++)b.indexOf(j[k])==0&&j[k].length>g.length&&(g=j[k]);g||(g="ROOT")}var j=e?g:b,l=d._loadedModules[h],k=null;if(l){if(d.config.localizationComplete&&
l._built)return;k=j.replace(/-/g,"_");k=d._loadedModules[h+"."+k]}if(!k){var l=d.provide(h),m=d._getModuleSymbols(a).concat("nls").join("/"),n;d.i18n._searchLocalePath(j,e,function(a){var b=a.replace(/-/g,"_"),f=h+"."+b,g=!1;d._loadedModules[f]?g=!0:(d.provide(f),f=[m],a!="ROOT"&&f.push(a),f.push(c),a=f.join("/")+".js",g=d._loadPath(a,null,function(a){var a=a.root||a,c=function(){};c.prototype=n;l[b]=new c;for(var f in a)l[b][f]=a[f]}));g&&l[b]?n=l[b]:l[b]=n;if(e)return!0})}e&&b!=g&&(l[b.replace(/-/g,
"_")]=l[g.replace(/-/g,"_")])};(function(){var a=d.config.extraLocale;if(a){!a instanceof Array&&(a=[a]);var c=d.i18n._requireLocalization;d.i18n._requireLocalization=function(b,e,h,d){c(b,e,h,d);if(!h)for(h=0;h<a.length;h++)c(b,e,a[h],d)}}})();d.i18n._searchLocalePath=function(a,c,b){for(var a=d.i18n.normalizeLocale(a),e=a.split("-"),a=[],h=e.length;h>0;h--)a.push(e.slice(0,h).join("-"));a.push(!1);c&&a.reverse();for(c=a.length-1;c>=0;c--)if(b(a[c]||"ROOT"))break};d.i18n._preloadLocalizations=function(a,
c){function b(f){f=d.i18n.normalizeLocale(f);d.i18n._searchLocalePath(f,!0,function(b){for(var f=0;f<c.length;f++)if(c[f]==b)return d.require(a+"_"+b),!0;return!1})}b();for(var e=d.config.extraLocale||[],h=0;h<e.length;h++)b(e[h])};return d.i18n});define("text!dijit/form/templates/TextBox.html",[],function(){return'<div class="dijit dijitReset dijitInline dijitLeft" id="widget_${id}" role="presentation"\n\t><div class="dijitReset dijitInputField dijitInputContainer"\n\t\t><input class="dijitReset dijitInputInner" dojoAttachPoint=\'textbox,focusNode\' autocomplete="off"\n\t\t\t${!nameAttrSetting} type=\'${type}\'\n\t/></div\n></div>'});
define("dijit/_CssStateMixin",["dojo","dijit"],function(b,d){b.declare("dijit._CssStateMixin",[],{cssStateNodes:{},hovering:!1,active:!1,_applyAttributes:function(){this.inherited(arguments);b.forEach(["onmouseenter","onmouseleave","onmousedown"],function(a){this.connect(this.domNode,a,"_cssMouseEvent")},this);b.forEach("disabled,readOnly,checked,selected,focused,state,hovering,active".split(","),function(a){this.watch(a,b.hitch(this,"_setStateClass"))},this);for(var a in this.cssStateNodes)this._trackMouseState(this[a],
this.cssStateNodes[a]);this._setStateClass()},_cssMouseEvent:function(a){if(!this.disabled)switch(a.type){case "mouseenter":case "mouseover":this._set("hovering",!0);this._set("active",this._mouseDown);break;case "mouseleave":case "mouseout":this._set("hovering",!1);this._set("active",!1);break;case "mousedown":this._set("active",!0);this._mouseDown=!0;var c=this.connect(b.body(),"onmouseup",function(){this._mouseDown=!1;this._set("active",!1);this.disconnect(c)})}},_setStateClass:function(){function a(a){c=
c.concat(b.map(c,function(c){return c+a}),"dijit"+a)}var c=this.baseClass.split(" ");this.isLeftToRight()||a("Rtl");this.checked&&a("Checked");this.state&&a(this.state);this.selected&&a("Selected");this.disabled?a("Disabled"):this.readOnly?a("ReadOnly"):this.active?a("Active"):this.hovering&&a("Hover");this._focused&&a("Focused");var f=this.stateNode||this.domNode,e={};b.forEach(f.className.split(" "),function(a){e[a]=!0});"_stateClasses"in this&&b.forEach(this._stateClasses,function(a){delete e[a]});
b.forEach(c,function(a){e[a]=!0});var h=[],d;for(d in e)h.push(d);f.className=h.join(" ");this._stateClasses=c},_trackMouseState:function(a,c){function f(){var f="disabled"in j&&j.disabled||"readonly"in j&&j.readonly;b.toggleClass(a,c+"Hover",e&&!h&&!f);b.toggleClass(a,c+"Active",h&&!f);b.toggleClass(a,c+"Focused",d&&!f)}var e=!1,h=!1,d=!1,j=this,k=b.hitch(this,"connect",a);k("onmouseenter",function(){e=!0;f()});k("onmouseleave",function(){h=e=!1;f()});k("onmousedown",function(){h=!0;f()});k("onmouseup",
function(){h=!1;f()});k("onfocus",function(){d=!0;f()});k("onblur",function(){d=!1;f()});this.watch("disabled",f);this.watch("readOnly",f)}});return d._CssStateMixin});
define("dijit/form/_FormWidget","dojo,dijit,dojo/window,dijit/_Widget,dijit/_Templated,dijit/_CssStateMixin".split(","),function(b,d){b.declare("dijit.form._FormWidget",[d._Widget,d._Templated,d._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,attributeMap:b.delegate(d._Widget.prototype.attributeMap,{value:"focusNode",id:"focusNode",tabIndex:"focusNode",alt:"focusNode",title:"focusNode"}),postMixInProperties:function(){this.nameAttrSetting=
this.name?'name="'+this.name.replace(/'/g,"&quot;")+'"':"";this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.connect(this.domNode,"onmousedown","_onMouseDown")},_setDisabledAttr:function(a){this._set("disabled",a);b.attr(this.focusNode,"disabled",a);this.valueNode&&b.attr(this.valueNode,"disabled",a);d.setWaiState(this.focusNode,"disabled",a);a?(this._set("hovering",!1),this._set("active",!1),a="tabIndex"in this.attributeMap?this.attributeMap.tabIndex:"focusNode",b.forEach(b.isArray(a)?
a:[a],function(a){a=this[a];b.isWebKit||d.hasDefaultTabStop(a)?a.setAttribute("tabIndex","-1"):a.removeAttribute("tabIndex")},this)):this.tabIndex!=""&&this.focusNode.setAttribute("tabIndex",this.tabIndex)},setDisabled:function(a){b.deprecated("setDisabled("+a+") is deprecated. Use set('disabled',"+a+") instead.","","2.0");this.set("disabled",a)},_onFocus:function(a){this.scrollOnFocus&&b.window.scrollIntoView(this.domNode);this.inherited(arguments)},isFocusable:function(){return!this.disabled&&this.focusNode&&
b.style(this.domNode,"display")!="none"},focus:function(){this.disabled||d.focus(this.focusNode)},compare:function(a,c){return typeof a=="number"&&typeof c=="number"?isNaN(a)&&isNaN(c)?0:a-c:a>c?1:a<c?-1:0},onChange:function(){},_onChangeActive:!1,_handleOnChange:function(a,c){if(this._lastValueReported==void 0&&(c===null||!this._onChangeActive))this._resetValue=this._lastValueReported=a;this._pendingOnChange=this._pendingOnChange||typeof a!=typeof this._lastValueReported||this.compare(a,this._lastValueReported)!=
0;if((this.intermediateChanges||c||c===void 0)&&this._pendingOnChange)if(this._lastValueReported=a,this._pendingOnChange=!1,this._onChangeActive)this._onChangeHandle&&clearTimeout(this._onChangeHandle),this._onChangeHandle=setTimeout(b.hitch(this,function(){this._onChangeHandle=null;this.onChange(a)}),0)},create:function(){this.inherited(arguments);this._onChangeActive=!0},destroy:function(){this._onChangeHandle&&(clearTimeout(this._onChangeHandle),this.onChange(this._lastValueReported));this.inherited(arguments)},
setValue:function(a){b.deprecated("dijit.form._FormWidget:setValue("+a+") is deprecated.  Use set('value',"+a+") instead.","","2.0");this.set("value",a)},getValue:function(){b.deprecated(this.declaredClass+"::getValue() is deprecated. Use get('value') instead.","","2.0");return this.get("value")},_onMouseDown:function(a){if(!a.ctrlKey&&b.mouseButtons.isLeft(a)&&this.isFocusable())var c=this.connect(b.body(),"onmouseup",function(){this.isFocusable()&&this.focus();this.disconnect(c)})}});b.declare("dijit.form._FormValueWidget",
d.form._FormWidget,{readOnly:!1,attributeMap:b.delegate(d.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){b.attr(this.focusNode,"readOnly",a);d.setWaiState(this.focusNode,"readonly",a);this._set("readOnly",a)},postCreate:function(){this.inherited(arguments);if(b.isIE<9||b.isIE&&b.isQuirks)this.connect(this.focusNode||this.domNode,"onkeydown",this._onKeyDown);if(this._resetValue===void 0)this._lastValueReported=this._resetValue=this.value},_setValueAttr:function(a,
c){this._handleOnChange(a,c)},_handleOnChange:function(a,c){this._set("value",a);this.inherited(arguments)},undo:function(){this._setValueAttr(this._lastValueReported,!1)},reset:function(){this._hasBeenBlurred=!1;this._setValueAttr(this._resetValue,!0)},_onKeyDown:function(a){if(a.keyCode==b.keys.ESCAPE&&!a.ctrlKey&&!a.altKey&&!a.metaKey){var c;if(b.isIE)a.preventDefault(),c=document.createEventObject(),c.keyCode=b.keys.ESCAPE,c.shiftKey=a.shiftKey,a.srcElement.fireEvent("onkeypress",c)}},_layoutHackIE7:function(){if(b.isIE==
7)for(var a=this.domNode,c=a.parentNode,f=a.firstChild||a,e=f.style.filter,h=this;c&&c.clientHeight==0;)(function(){var a=h.connect(c,"onscroll",function(){h.disconnect(a);f.style.filter=(new Date).getMilliseconds();setTimeout(function(){f.style.filter=e},0)})})(),c=c.parentNode}});return d.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(b,d){b.declare("dijit.form.TextBox",d.form._FormValueWidget,{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",templateString:b.cache("dijit.form","templates/TextBox.html"),_singleNodeTemplate:'<input class="dijit dijitReset dijitLeft dijitInputField" dojoAttachPoint="textbox,focusNode" autocomplete="off" type="${type}" ${!nameAttrSetting} />',
_buttonInputDisabled:b.isIE?"disabled":"",baseClass:"dijitTextBox",attributeMap:b.delegate(d.form._FormValueWidget.prototype.attributeMap,{maxLength:"focusNode"}),postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&this.templateString.toLowerCase()=="input"||(a=="hidden"||a=="file")&&this.templateString==d.form.TextBox.prototype.templateString)this.templateString=this._singleNodeTemplate;this.inherited(arguments)},_setPlaceHolderAttr:function(a){this._set("placeHolder",
a);if(!this._phspan)this._attachPoints.push("_phspan"),this._phspan=b.create("span",{className:"dijitPlaceHolder dijitInputField"},this.textbox,"after");this._phspan.innerHTML="";this._phspan.appendChild(document.createTextNode(a));this._updatePlaceHolder()},_updatePlaceHolder:function(){if(this._phspan)this._phspan.style.display=this.placeHolder&&!this._focused&&!this.textbox.value?"":"none"},_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,
c,b){var e;a!==void 0&&(e=this.filter(a),typeof b!="string"&&(b=e!==null&&(typeof e!="number"||!isNaN(e))?this.filter(this.format(e,this.constraints)):""));if(b!=null&&b!=void 0&&(typeof b!="number"||!isNaN(b))&&this.textbox.value!=b)this.textbox.value=b,this._set("displayedValue",this.get("displayedValue"));this._updatePlaceHolder();this.inherited(arguments,[e,c])},displayedValue:"",getDisplayedValue:function(){b.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use set('displayedValue') instead.",
"","2.0");return this.get("displayedValue")},_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},setDisplayedValue:function(a){b.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_setDisplayedValueAttr:function(a){a===null||a===void 0?a="":typeof a!="string"&&(a=String(a));this.textbox.value=a;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},
format:function(a){return a==null||a==void 0?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},_onInput:function(a){if(a&&a.type&&/key/i.test(a.type)&&a.keyCode)switch(a.keyCode){case b.keys.SHIFT:case b.keys.ALT:case b.keys.CTRL:case b.keys.TAB:return}if(this.intermediateChanges){var c=this;setTimeout(function(){c._handleOnChange(c.get("value"),!1)},0)}this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){b.isIE&&setTimeout(b.hitch(this,
function(){var a=b.getComputedStyle(this.domNode);if(a&&(a=a.fontFamily)){var c=this.domNode.getElementsByTagName("INPUT");if(c)for(var f=0;f<c.length;f++)c[f].style.fontFamily=a}}),0);this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);b.isMoz||b.isOpera?this.connect(this.textbox,"oninput","_onInput"):(this.connect(this.textbox,"onkeydown","_onInput"),this.connect(this.textbox,"onkeyup","_onInput"),this.connect(this.textbox,"onpaste","_onInput"),this.connect(this.textbox,
"oncut","_onInput"))},_blankValue:"",filter:function(a){if(a===null)return this._blankValue;if(typeof a!="string")return a;this.trim&&(a=b.trim(a));this.uppercase&&(a=a.toUpperCase());this.lowercase&&(a=a.toLowerCase());this.propercase&&(a=a.replace(/[^\s]+/g,function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return a},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){if(!this.disabled){this._setBlurValue();this.inherited(arguments);this._selectOnClickHandle&&
this.disconnect(this._selectOnClickHandle);if(this.selectOnClick&&b.isMoz)this.textbox.selectionStart=this.textbox.selectionEnd=void 0;this._updatePlaceHolder()}},_onFocus:function(a){if(!this.disabled&&!this.readOnly){if(this.selectOnClick&&a=="mouse")this._selectOnClickHandle=this.connect(this.domNode,"onmouseup",function(){this.disconnect(this._selectOnClickHandle);var a;b.isIE?(a=b.doc.selection.createRange(),a=a.parentElement()==this.textbox&&a.text.length==0):a=this.textbox.selectionStart==
this.textbox.selectionEnd;a&&d.selectInputText(this.textbox)});this._updatePlaceHolder();this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)}});d.selectInputText=function(a,c,f){var e=b.global,h=b.doc,a=b.byId(a);isNaN(c)&&(c=0);isNaN(f)&&(f=a.value?a.value.length:0);d.focus(a);h.selection&&b.body().createTextRange?a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",c),a.moveEnd("character",
f-c),a.select()):e.getSelection&&a.setSelectionRange&&a.setSelectionRange(c,f)};return d.form.TextBox});define("dijit/form/nls/validate",{root:{invalidMessage:"The value entered is not valid.",missingMessage:"This value is required.",rangeMessage:"This value is out of range."},zh:!0,"zh-tw":!0,tr:!0,th:!0,sv:!0,sl:!0,sk:!0,ru:!0,ro:!0,pt:!0,"pt-pt":!0,pl:!0,nl:!0,nb:!0,ko:!0,kk:!0,ja:!0,it:!0,hu:!0,he:!0,fr:!0,fi:!0,es:!0,el:!0,de:!0,da:!0,cs:!0,ca:!0,ar:!0});
define("orion/PageUtil",[],function(){var b=/^http[s]?/i;return{matchResourceParameters:function(b){var b=b||window.location.toString(),a={resource:""},c=b.indexOf("#");if(c!==-1&&(b=b.substring(c+1),b.length!==0)){b=b.split(",");a.resource=decodeURIComponent(b[0]);for(c=1;c<b.length;c++){var f=b[c].split("="),e=decodeURIComponent(f[0]),f=f.length===2?decodeURIComponent(f[1]):null;f!==null&&e!=="resource"&&(a[e]=f)}}return a},validateURLScheme:function(d,a){var c=d;if(d.indexOf("://")===-1){var f=
document.createElement("a");f.href=d;c=f.href}f=!1;return(f=a?a.some(function(a){return RegExp("^"+a+":","i").test(c)}):b.test(c))?d:(console.log("Illegal URL Scheme: '"+d+"'"),"")}}});
define("orion/explorers/navigationUtils",["dojo"],function(b){function d(c,f,e,h){!a&&c&&(e?(c.push({domNode:f,widget:e,onClick:h}),b.attr(e,"tabIndex",-1)):(c.push({domNode:f}),b.attr(f,"tabIndex",-1),b.style(f,"outline","none")))}var a=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(a,b,e,h,g){a&&(a=a.getGridNavHolder(b,!0))&&d(a,e,h,g)},generateNavGrid:d,removeNavGrid:function(a,b){if(a)for(var e=0;e<a.length;e++)if(a[e].domNode===b){a.splice(e,1);break}}}});
define("text!dijit/templates/Menu.html",[],function(){return'<table class="dijit dijitMenu dijitMenuPassive dijitReset dijitMenuTable" role="menu" tabIndex="${tabIndex}" dojoAttachEvent="onkeypress:_onKeyPress" cellspacing="0">\n\t<tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody>\n</table>'});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(b,d){b.declare("dijit._KeyNavContainer",d._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,c){var f=this._keyNavCodes={},e=b.hitch(this,this.focusPrev),h=b.hitch(this,this.focusNext);b.forEach(a,function(a){f[a]=e});b.forEach(c,function(a){f[a]=h});f[b.keys.HOME]=b.hitch(this,"focusFirstChild");f[b.keys.END]=b.hitch(this,"focusLastChild");this.connect(this.domNode,"onkeypress","_onContainerKeypress");
this.connect(this.domNode,"onfocus","_onContainerFocus")},startupKeyNavChildren:function(){b.forEach(this.getChildren(),b.hitch(this,"_startupChild"))},addChild:function(a,c){d._KeyNavContainer.superclass.addChild.apply(this,arguments);this._startupChild(a)},focus:function(){this.focusFirstChild()},focusFirstChild:function(){var a=this._getFirstFocusableChild();a&&this.focusChild(a)},focusLastChild:function(){var a=this._getLastFocusableChild();a&&this.focusChild(a)},focusNext:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,
1))},focusPrev:function(){this.focusChild(this._getNextFocusableChild(this.focusedChild,-1),!0)},focusChild:function(a,c){this.focusedChild&&a!==this.focusedChild&&this._onChildBlur(this.focusedChild);a.set("tabIndex",this.tabIndex);a.focus(c?"end":"start");this._set("focusedChild",a)},_startupChild:function(a){a.set("tabIndex","-1");this.connect(a,"_onFocus",function(){a.set("tabIndex",this.tabIndex)});this.connect(a,"_onBlur",function(){a.set("tabIndex","-1")})},_onContainerFocus:function(a){a.target===
this.domNode&&(this.focusFirstChild(),b.attr(this.domNode,"tabIndex","-1"))},_onBlur:function(a){this.tabIndex&&b.attr(this.domNode,"tabIndex",this.tabIndex);this.inherited(arguments)},_onContainerKeypress:function(a){if(!a.ctrlKey&&!a.altKey){var c=this._keyNavCodes[a.charOrCode];c&&(c(),b.stopEvent(a))}},_onChildBlur:function(){},_getFirstFocusableChild:function(){return this._getNextFocusableChild(null,1)},_getLastFocusableChild:function(){return this._getNextFocusableChild(null,-1)},_getNextFocusableChild:function(a,
c){a&&(a=this._getSiblingOfChild(a,c));for(var b=this.getChildren(),e=0;e<b.length;e++){a||(a=b[c>0?0:b.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,c)}return null}});return d._KeyNavContainer});define("text!dijit/templates/CheckedMenuItem.html",[],function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitemcheckbox" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitMenuItemIcon dijitCheckedMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t\t<span class="dijitCheckedMenuItemIconChar">&#10003;</span>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode,labelNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">&nbsp;</td>\n</tr>'});
define("text!dijit/form/templates/Button.html",[],function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class="dijitReset dijitInline dijitButtonNode"\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode,focusNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode"></span\n\t\t\t><span class="dijitReset dijitToggleButtonIconChar">&#x25CF;</span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tid="${id}_label"\n\t\t\t\tdojoAttachPoint="containerNode"\n\t\t\t></span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/DropDownButton.html",[],function(){return'<span class="dijit dijitReset dijitInline"\n\t><span class=\'dijitReset dijitInline dijitButtonNode\'\n\t\tdojoAttachEvent="ondijitclick:_onButtonClick" dojoAttachPoint="_buttonNode"\n\t\t><span class="dijitReset dijitStretch dijitButtonContents"\n\t\t\tdojoAttachPoint="focusNode,titleNode,_arrowWrapperNode"\n\t\t\trole="button" aria-haspopup="true" aria-labelledby="${id}_label"\n\t\t\t><span class="dijitReset dijitInline dijitIcon"\n\t\t\t\tdojoAttachPoint="iconNode"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitButtonText"\n\t\t\t\tdojoAttachPoint="containerNode,_popupStateNode"\n\t\t\t\tid="${id}_label"\n\t\t\t></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonInner"></span\n\t\t\t><span class="dijitReset dijitInline dijitArrowButtonChar">&#9660;</span\n\t\t></span\n\t></span\n\t><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" tabIndex="-1"\n\t\tdojoAttachPoint="valueNode"\n/></span>'});
define("text!dijit/form/templates/ComboButton.html",[],function(){return'<table class="dijit dijitReset dijitInline dijitLeft"\n\tcellspacing=\'0\' cellpadding=\'0\' role="presentation"\n\t><tbody role="presentation"><tr role="presentation"\n\t\t><td class="dijitReset dijitStretch dijitButtonNode" dojoAttachPoint="buttonNode" dojoAttachEvent="ondijitclick:_onButtonClick,onkeypress:_onButtonKeyPress"\n\t\t><div id="${id}_button" class="dijitReset dijitButtonContents"\n\t\t\tdojoAttachPoint="titleNode"\n\t\t\trole="button" aria-labelledby="${id}_label"\n\t\t\t><div class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode" role="presentation"></div\n\t\t\t><div class="dijitReset dijitInline dijitButtonText" id="${id}_label" dojoAttachPoint="containerNode" role="presentation"></div\n\t\t></div\n\t\t></td\n\t\t><td id="${id}_arrow" class=\'dijitReset dijitRight dijitButtonNode dijitArrowButton\'\n\t\t\tdojoAttachPoint="_popupStateNode,focusNode,_buttonNode"\n\t\t\tdojoAttachEvent="onkeypress:_onArrowKeyPress"\n\t\t\ttitle="${optionsTitle}"\n\t\t\trole="button" aria-haspopup="true"\n\t\t\t><div class="dijitReset dijitArrowButtonInner" role="presentation"></div\n\t\t\t><div class="dijitReset dijitArrowButtonChar" role="presentation">&#9660;</div\n\t\t></td\n\t\t><td style="display:none !important;"\n\t\t\t><input ${!nameAttrSetting} type="${type}" value="${value}" dojoAttachPoint="valueNode"\n\t\t/></td></tr></tbody\n></table>'});
define("dijit/_HasDropDown",["dojo","dijit","dijit/_Widget"],function(b,d){b.declare("dijit._HasDropDown",null,{_buttonNode:null,_arrowWrapperNode:null,_popupStateNode:null,_aroundNode:null,dropDown:null,autoWidth:!0,forceWidth:!1,maxHeight:0,dropDownPosition:["below","above"],_stopClickEvents:!0,_onDropDownMouseDown:function(a){if(!this.disabled&&!this.readOnly)b.stopEvent(a),this._docHandler=this.connect(b.doc,"onmouseup","_onDropDownMouseUp"),this.toggleDropDown()},_onDropDownMouseUp:function(a){a&&
this._docHandler&&this.disconnect(this._docHandler);var c=this.dropDown,f=!1;if(a&&this._opened){var e=b.position(this._buttonNode,!0);if(!(a.pageX>=e.x&&a.pageX<=e.x+e.w)||!(a.pageY>=e.y&&a.pageY<=e.y+e.h)){for(e=a.target;e&&!f;)b.hasClass(e,"dijitPopup")?f=!0:e=e.parentNode;if(f){e=a.target;if(c.onItemClick){for(var h;e&&!(h=d.byNode(e));)e=e.parentNode;if(h&&h.onClick&&h.getParent)h.getParent().onItemClick(h,a)}return}}}this._opened&&c.focus&&c.autoFocus!==!1&&window.setTimeout(b.hitch(c,"focus"),
1)},_onDropDownClick:function(a){this._stopClickEvents&&b.stopEvent(a)},buildRendering:function(){this.inherited(arguments);this._buttonNode=this._buttonNode||this.focusNode||this.domNode;this._popupStateNode=this._popupStateNode||this.focusNode||this._buttonNode;var a={after:this.isLeftToRight()?"Right":"Left",before:this.isLeftToRight()?"Left":"Right",above:"Up",below:"Down",left:"Left",right:"Right"}[this.dropDownPosition[0]]||this.dropDownPosition[0]||"Down";b.addClass(this._arrowWrapperNode||
this._buttonNode,"dijit"+a+"ArrowButton")},postCreate:function(){this.inherited(arguments);this.connect(this._buttonNode,"onmousedown","_onDropDownMouseDown");this.connect(this._buttonNode,"onclick","_onDropDownClick");this.connect(this.focusNode,"onkeypress","_onKey");this.connect(this.focusNode,"onkeyup","_onKeyUp")},destroy:function(){this.dropDown&&(this.dropDown._destroyed||this.dropDown.destroyRecursive(),delete this.dropDown);this.inherited(arguments)},_onKey:function(a){if(!this.disabled&&
!this.readOnly){var c=this.dropDown,f=a.target;if(c&&this._opened&&c.handleKey&&c.handleKey(a)===!1)b.stopEvent(a);else if(c&&this._opened&&a.charOrCode==b.keys.ESCAPE)this.closeDropDown(),b.stopEvent(a);else if(!this._opened&&(a.charOrCode==b.keys.DOWN_ARROW||(a.charOrCode==b.keys.ENTER||a.charOrCode==" ")&&((f.tagName||"").toLowerCase()!=="input"||f.type&&f.type.toLowerCase()!=="text")))this._toggleOnKeyUp=!0,b.stopEvent(a)}},_onKeyUp:function(){if(this._toggleOnKeyUp){delete this._toggleOnKeyUp;
this.toggleDropDown();var a=this.dropDown;a&&a.focus&&setTimeout(b.hitch(a,"focus"),1)}},_onBlur:function(){this.closeDropDown(d._curFocus&&this.dropDown&&b.isDescendant(d._curFocus,this.dropDown.domNode));this.inherited(arguments)},isLoaded:function(){return!0},loadDropDown:function(a){a()},toggleDropDown:function(){!this.disabled&&!this.readOnly&&(this._opened?this.closeDropDown():this.isLoaded()?this.openDropDown():this.loadDropDown(b.hitch(this,"openDropDown")))},openDropDown:function(){var a=
this.dropDown,c=a.domNode,f=this._aroundNode||this.domNode,e=this;if(!this._preparedNode){this._preparedNode=!0;if(c.style.width)this._explicitDDWidth=!0;if(c.style.height)this._explicitDDHeight=!0}if(this.maxHeight||this.forceWidth||this.autoWidth){var h={display:"",visibility:"hidden"};if(!this._explicitDDWidth)h.width="";if(!this._explicitDDHeight)h.height="";b.style(c,h);h=this.maxHeight;if(h==-1)var h=b.window.getBox(),g=b.position(f,!1),h=Math.floor(Math.max(g.y,h.h-(g.y+g.h)));a.startup&&!a._started&&
a.startup();d.popup.moveOffScreen(a);var g=b._getMarginSize(c),j=h&&g.h>h;b.style(c,{overflowX:"hidden",overflowY:j?"auto":"hidden"});j?(g.h=h,"w"in g&&(g.w+=16)):delete g.h;this.forceWidth?g.w=f.offsetWidth:this.autoWidth?g.w=Math.max(g.w,f.offsetWidth):delete g.w;b.isFunction(a.resize)?a.resize(g):b.marginBox(c,g)}a=d.popup.open({parent:this,popup:a,around:f,orient:d.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:["below"],this.isLeftToRight()),
onExecute:function(){e.closeDropDown(!0)},onCancel:function(){e.closeDropDown(!0)},onClose:function(){b.attr(e._popupStateNode,"popupActive",!1);b.removeClass(e._popupStateNode,"dijitHasDropDownOpen");e._opened=!1}});b.attr(this._popupStateNode,"popupActive","true");b.addClass(e._popupStateNode,"dijitHasDropDownOpen");this._opened=!0;return a},closeDropDown:function(a){if(this._opened)a&&this.focus(),d.popup.close(this.dropDown),this._opened=!1}});return d._HasDropDown});
define("dijit/form/Button","dojo,dijit,text!dijit/form/templates/Button.html,text!dijit/form/templates/DropDownButton.html,text!dijit/form/templates/ComboButton.html,dijit/form/_FormWidget,dijit/_Container,dijit/_HasDropDown".split(","),function(b,d){b.declare("dijit.form.Button",d.form._FormWidget,{label:"",showLabel:!0,iconClass:"",type:"button",baseClass:"dijitButton",templateString:b.cache("dijit.form","templates/Button.html"),attributeMap:b.delegate(d.form._FormWidget.prototype.attributeMap,
{value:"valueNode"}),_onClick:function(a){if(this.disabled)return!1;this._clicked();return this.onClick(a)},_onButtonClick:function(a){if(this._onClick(a)===!1)a.preventDefault();else if(this.type=="submit"&&!(this.valueNode||this.focusNode).form)for(var c=this.domNode;c.parentNode;c=c.parentNode){var b=d.byNode(c);if(b&&typeof b._onSubmit=="function"){b._onSubmit(a);break}}else this.valueNode&&(this.valueNode.click(),a.preventDefault())},buildRendering:function(){this.inherited(arguments);b.setSelectable(this.focusNode,
!1)},_fillContent:function(a){a&&(!this.params||!("label"in this.params))&&this.set("label",a.innerHTML)},_setShowLabelAttr:function(a){this.containerNode&&b.toggleClass(this.containerNode,"dijitDisplayNone",!a);this._set("showLabel",a)},onClick:function(){return!0},_clicked:function(){},setLabel:function(a){b.deprecated("dijit.form.Button.setLabel() is deprecated.  Use set('label', ...) instead.","","2.0");this.set("label",a)},_setLabelAttr:function(a){this._set("label",a);this.containerNode.innerHTML=
a;if(this.showLabel==!1&&!this.params.title)this.titleNode.title=b.trim(this.containerNode.innerText||this.containerNode.textContent||"")},_setIconClassAttr:function(a){b.replaceClass(this.iconNode,a||"dijitNoIcon",this.iconClass||"dijitNoIcon");this._set("iconClass",a)}});b.declare("dijit.form.DropDownButton",[d.form.Button,d._Container,d._HasDropDown],{baseClass:"dijitDropDownButton",templateString:b.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
b.query("*",this.srcNodeRef);d.form.DropDownButton.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){if(!this.dropDown&&this.dropDownContainer){var a=b.query("[widgetId]",this.dropDownContainer)[0];this.dropDown=d.byNode(a);delete this.dropDownContainer}this.dropDown&&d.popup.hide(this.dropDown);this.inherited(arguments)}},isLoaded:function(){var a=this.dropDown;return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(){var a=this.dropDown;
if(a)if(this.isLoaded())this.openDropDown();else{var c=b.connect(a,"onLoad",this,function(){b.disconnect(c);this.openDropDown()});a.refresh()}},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}});b.declare("dijit.form.ComboButton",d.form.DropDownButton,{templateString:b.cache("dijit.form","templates/ComboButton.html"),attributeMap:b.mixin(b.clone(d.form.Button.prototype.attributeMap),{id:"",tabIndex:["focusNode","titleNode"],title:"titleNode"}),optionsTitle:"",baseClass:"dijitComboButton",
cssStateNodes:{buttonNode:"dijitButtonNode",titleNode:"dijitButtonContents",_popupStateNode:"dijitDownArrowButton"},_focusedNode:null,_onButtonKeyPress:function(a){if(a.charOrCode==b.keys[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"])d.focus(this._popupStateNode),b.stopEvent(a)},_onArrowKeyPress:function(a){if(a.charOrCode==b.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"])d.focus(this.titleNode),b.stopEvent(a)},focus:function(a){this.disabled||d.focus(a=="start"?this.titleNode:this._popupStateNode)}});
b.declare("dijit.form.ToggleButton",d.form.Button,{baseClass:"dijitToggleButton",checked:!1,attributeMap:b.mixin(b.clone(d.form.Button.prototype.attributeMap),{checked:"focusNode"}),_clicked:function(){this.set("checked",!this.checked)},_setCheckedAttr:function(a,c){this._set("checked",a);b.attr(this.focusNode||this.domNode,"checked",a);d.setWaiState(this.focusNode||this.domNode,"pressed",a);this._handleOnChange(a,c)},setChecked:function(a){b.deprecated("setChecked("+a+") is deprecated. Use set('checked',"+
a+") instead.","","2.0");this.set("checked",a)},reset:function(){this._hasBeenBlurred=!1;this.set("checked",this.params.checked||!1)}});return d.form.Button});define("dijit/form/DropDownButton",["dojo","dijit","dijit/form/Button"],function(b,d){return d.form.DropDownButton});define("text!dijit/templates/MenuItem.html",[],function(){return'<tr class="dijitReset dijitMenuItem" dojoAttachPoint="focusNode" role="menuitem" tabIndex="-1"\n\t\tdojoAttachEvent="onmouseenter:_onHover,onmouseleave:_onUnhover,ondijitclick:_onClick">\n\t<td class="dijitReset dijitMenuItemIconCell" role="presentation">\n\t\t<img src="${_blankGif}" alt="" class="dijitIcon dijitMenuItemIcon" dojoAttachPoint="iconNode"/>\n\t</td>\n\t<td class="dijitReset dijitMenuItemLabel" colspan="2" dojoAttachPoint="containerNode"></td>\n\t<td class="dijitReset dijitMenuItemAccelKey" style="display: none" dojoAttachPoint="accelKeyNode"></td>\n\t<td class="dijitReset dijitMenuArrowCell" role="presentation">\n\t\t<div dojoAttachPoint="arrowWrapper" style="visibility: hidden">\n\t\t\t<img src="${_blankGif}" alt="" class="dijitMenuExpand"/>\n\t\t\t<span class="dijitMenuExpandA11y">+</span>\n\t\t</div>\n\t</td>\n</tr>'});
define("dijit/MenuItem","dojo,dijit,text!dijit/templates/MenuItem.html,dijit/_Widget,dijit/_Templated,dijit/_Contained,dijit/_CssStateMixin".split(","),function(b,d){b.declare("dijit.MenuItem",[d._Widget,d._Templated,d._Contained,d._CssStateMixin],{templateString:b.cache("dijit","templates/MenuItem.html"),attributeMap:b.delegate(d._Widget.prototype.attributeMap,{label:{node:"containerNode",type:"innerHTML"},iconClass:{node:"iconNode",type:"class"}}),baseClass:"dijitMenuItem",label:"",iconClass:"",
accelKey:"",disabled:!1,_fillContent:function(a){a&&!("label"in this.params)&&this.set("label",a.innerHTML)},buildRendering:function(){this.inherited(arguments);var a=this.id+"_text";b.attr(this.containerNode,"id",a);this.accelKeyNode&&(b.attr(this.accelKeyNode,"id",this.id+"_accel"),a+=" "+this.id+"_accel");d.setWaiState(this.domNode,"labelledby",a);b.setSelectable(this.domNode,!1)},_onHover:function(){this.getParent().onItemHover(this)},_onUnhover:function(){this.getParent().onItemUnhover(this);
this._set("hovering",!1)},_onClick:function(a){this.getParent().onItemClick(this,a);b.stopEvent(a)},onClick:function(){},focus:function(){try{b.isIE==8&&this.containerNode.focus(),d.focus(this.focusNode)}catch(a){}},_onFocus:function(){this._setSelected(!0);this.getParent()._onItemFocus(this);this.inherited(arguments)},_setSelected:function(a){b.toggleClass(this.domNode,"dijitMenuItemSelected",a)},setLabel:function(a){b.deprecated("dijit.MenuItem.setLabel() is deprecated.  Use set('label', ...) instead.",
"","2.0");this.set("label",a)},setDisabled:function(a){b.deprecated("dijit.Menu.setDisabled() is deprecated.  Use set('disabled', bool) instead.","","2.0");this.set("disabled",a)},_setDisabledAttr:function(a){d.setWaiState(this.focusNode,"disabled",a?"true":"false");this._set("disabled",a)},_setAccelKeyAttr:function(a){this.accelKeyNode.style.display=a?"":"none";this.accelKeyNode.innerHTML=a;b.attr(this.containerNode,"colSpan",a?"1":"2");this._set("accelKey",a)}});return d.MenuItem});
define("dijit/CheckedMenuItem",["dojo","dijit","text!dijit/templates/CheckedMenuItem.html","dijit/MenuItem"],function(b,d){b.declare("dijit.CheckedMenuItem",d.MenuItem,{templateString:b.cache("dijit","templates/CheckedMenuItem.html"),checked:!1,_setCheckedAttr:function(a){b.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",a);d.setWaiState(this.domNode,"checked",a);this._set("checked",a)},onChange:function(){},_onClick:function(a){this.disabled||(this.set("checked",!this.checked),this.onChange(this.checked));
this.inherited(arguments)}});return d.CheckedMenuItem});
define("dijit/PopupMenuItem",["dojo","dijit","dijit/MenuItem"],function(b,d){b.declare("dijit.PopupMenuItem",d.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=b.query("*",this.srcNodeRef);d.PopupMenuItem.superclass._fillContent.call(this,a[0]);this.dropDownContainer=this.srcNodeRef}},startup:function(){if(!this._started){this.inherited(arguments);if(!this.popup){var a=b.query("[widgetId]",this.dropDownContainer)[0];this.popup=d.byNode(a)}b.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&b.style(this.arrowWrapper,"visibility","");d.setWaiState(this.focusNode,"haspopup","true")}},destroyDescendants:function(){this.popup&&(this.popup._destroyed||this.popup.destroyRecursive(),delete this.popup);this.inherited(arguments)}});return d.PopupMenuItem});define("text!dijit/templates/MenuSeparator.html",[],function(){return'<tr class="dijitMenuSeparator">\n\t<td class="dijitMenuSeparatorIconCell">\n\t\t<div class="dijitMenuSeparatorTop"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n\t<td colspan="3" class="dijitMenuSeparatorLabelCell">\n\t\t<div class="dijitMenuSeparatorTop dijitMenuSeparatorLabel"></div>\n\t\t<div class="dijitMenuSeparatorBottom"></div>\n\t</td>\n</tr>'});
define("dijit/MenuSeparator","dojo,dijit,text!dijit/templates/MenuSeparator.html,dijit/_Widget,dijit/_Templated,dijit/_Contained".split(","),function(b,d){b.declare("dijit.MenuSeparator",[d._Widget,d._Templated,d._Contained],{templateString:b.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);b.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}});return d.MenuSeparator});
define("dijit/Menu","dojo,dijit,text!dijit/templates/Menu.html,dojo/window,dijit/_Widget,dijit/_KeyNavContainer,dijit/_Templated,dijit/MenuItem,dijit/PopupMenuItem,dijit/CheckedMenuItem,dijit/MenuSeparator".split(","),function(b,d){b.declare("dijit._MenuBase",[d._Widget,d._Templated,d._KeyNavContainer],{parentMenu:null,popupDelay:500,startup:function(){this._started||(b.forEach(this.getChildren(),function(a){a.startup()}),this.startupKeyNavChildren(),this.inherited(arguments))},onExecute:function(){},
onCancel:function(){},_moveToPopup:function(a){this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled?this.focusedChild._onClick(a):(a=this._getTopMenu())&&a._isMenuBar&&a.focusNext()},_onPopupHover:function(){if(this.currentPopup&&this.currentPopup._pendingClose_timer){var a=this.currentPopup.parentMenu;a.focusedChild&&a.focusedChild._setSelected(!1);a.focusedChild=this.currentPopup.from_item;a.focusedChild._setSelected(!0);this._stopPendingCloseTimer(this.currentPopup)}},onItemHover:function(a){if(this.isActive&&
(this.focusChild(a),this.focusedChild.popup&&!this.focusedChild.disabled&&!this.hover_timer))this.hover_timer=setTimeout(b.hitch(this,"_openPopup"),this.popupDelay);this.focusedChild&&this.focusChild(a);this._hoveredChild=a},_onChildBlur:function(a){this._stopPopupTimer();a._setSelected(!1);var c=a.popup;if(c)this._stopPendingCloseTimer(c),c._pendingClose_timer=setTimeout(function(){c._pendingClose_timer=null;if(c.parentMenu)c.parentMenu.currentPopup=null;d.popup.close(c)},this.popupDelay)},onItemUnhover:function(a){this.isActive&&
this._stopPopupTimer();if(this._hoveredChild==a)this._hoveredChild=null},_stopPopupTimer:function(){if(this.hover_timer)clearTimeout(this.hover_timer),this.hover_timer=null},_stopPendingCloseTimer:function(a){if(a._pendingClose_timer)clearTimeout(a._pendingClose_timer),a._pendingClose_timer=null},_stopFocusTimer:function(){if(this._focus_timer)clearTimeout(this._focus_timer),this._focus_timer=null},_getTopMenu:function(){for(var a=this;a.parentMenu;a=a.parentMenu);return a},onItemClick:function(a,
c){typeof this.isShowingNow=="undefined"&&this._markActive();this.focusChild(a);if(a.disabled)return!1;a.popup?this._openPopup():(this.onExecute(),a.onClick(c))},_openPopup:function(){this._stopPopupTimer();var a=this.focusedChild;if(a){var c=a.popup;if(!c.isShowingNow){this.currentPopup&&(this._stopPendingCloseTimer(this.currentPopup),d.popup.close(this.currentPopup));c.parentMenu=this;c.from_item=a;var f=this;d.popup.open({parent:this,popup:c,around:a.domNode,orient:this._orient||(this.isLeftToRight()?
{TR:"TL",TL:"TR",BR:"BL",BL:"BR"}:{TL:"TR",TR:"TL",BL:"BR",BR:"BL"}),onCancel:function(){f.focusChild(a);f._cleanUp();a._setSelected(!0);f.focusedChild=a},onExecute:b.hitch(this,"_cleanUp")});this.currentPopup=c;c.connect(c.domNode,"onmouseenter",b.hitch(f,"_onPopupHover"));if(c.focus)c._focus_timer=setTimeout(b.hitch(c,function(){this._focus_timer=null;this.focus()}),0)}}},_markActive:function(){this.isActive=!0;b.replaceClass(this.domNode,"dijitMenuActive","dijitMenuPassive")},onOpen:function(){this.isShowingNow=
!0;this._markActive()},_markInactive:function(){this.isActive=!1;b.replaceClass(this.domNode,"dijitMenuPassive","dijitMenuActive")},onClose:function(){this._stopFocusTimer();this._markInactive();this.isShowingNow=!1;this.parentMenu=null},_closeChild:function(){this._stopPopupTimer();if(this.currentPopup)d._curFocus&&b.isDescendant(d._curFocus,this.currentPopup.domNode)&&this.focusedChild.focusNode.focus(),d.popup.close(this.currentPopup),this.currentPopup=null;if(this.focusedChild)this.focusedChild._setSelected(!1),
this.focusedChild._onUnhover(),this.focusedChild=null},_onItemFocus:function(a){this._hoveredChild&&this._hoveredChild!=a&&this._hoveredChild._onUnhover()},_onBlur:function(){this._cleanUp();this.inherited(arguments)},_cleanUp:function(){this._closeChild();typeof this.isShowingNow=="undefined"&&this._markInactive()}});b.declare("dijit.Menu",d._MenuBase,{constructor:function(){this._bindings=[]},templateString:b.cache("dijit","templates/Menu.html"),baseClass:"dijitMenu",targetNodeIds:[],contextMenuForWindow:!1,
leftClickToOpen:!1,refocus:!0,postCreate:function(){this.contextMenuForWindow?this.bindDomNode(b.body()):b.forEach(this.targetNodeIds,this.bindDomNode,this);var a=b.keys,c=this.isLeftToRight();this._openSubMenuKey=c?a.RIGHT_ARROW:a.LEFT_ARROW;this._closeSubMenuKey=c?a.LEFT_ARROW:a.RIGHT_ARROW;this.connectKeyNavHandlers([a.UP_ARROW],[a.DOWN_ARROW])},_onKeyPress:function(a){if(!a.ctrlKey&&!a.altKey)switch(a.charOrCode){case this._openSubMenuKey:this._moveToPopup(a);b.stopEvent(a);break;case this._closeSubMenuKey:if(this.parentMenu)if(this.parentMenu._isMenuBar)this.parentMenu.focusPrev();
else this.onCancel(!1);else b.stopEvent(a)}},_iframeContentWindow:function(a){return b.window.get(this._iframeContentDocument(a))||this._iframeContentDocument(a).__parent__||a.name&&b.doc.frames[a.name]||null},_iframeContentDocument:function(a){return a.contentDocument||a.contentWindow&&a.contentWindow.document||a.name&&b.doc.frames[a.name]&&b.doc.frames[a.name].document||null},bindDomNode:function(a){var a=b.byId(a),c;if(a.tagName.toLowerCase()=="iframe"){var f=a,e=this._iframeContentWindow(f);c=
b.withGlobal(e,b.body)}else c=a==b.body()?b.doc.documentElement:a;var h={node:a,iframe:f};b.attr(a,"_dijitMenu"+this.id,this._bindings.push(h));var d=b.hitch(this,function(a){return[b.connect(a,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(a){b.stopEvent(a);this._scheduleOpen(a.target,f,{x:a.pageX,y:a.pageY})}),b.connect(a,"onkeydown",this,function(a){a.shiftKey&&a.keyCode==b.keys.F10&&(b.stopEvent(a),this._scheduleOpen(a.target,f))})]});h.connects=c?d(c):[];if(f)h.onloadHandler=b.hitch(this,
function(){var a=this._iframeContentWindow(f);c=b.withGlobal(a,b.body);h.connects=d(c)}),f.addEventListener?f.addEventListener("load",h.onloadHandler,!1):f.attachEvent("onload",h.onloadHandler)},unBindDomNode:function(a){var c;try{c=b.byId(a)}catch(f){return}a="_dijitMenu"+this.id;if(c&&b.hasAttr(c,a)){var e=b.attr(c,a)-1,h=this._bindings[e];b.forEach(h.connects,b.disconnect);var d=h.iframe;d&&(d.removeEventListener?d.removeEventListener("load",h.onloadHandler,!1):d.detachEvent("onload",h.onloadHandler));
b.removeAttr(c,a);delete this._bindings[e]}},_scheduleOpen:function(a,c,f){if(!this._openTimer)this._openTimer=setTimeout(b.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:c,coords:f})}),1)},_openMyself:function(a){function c(){l.refocus&&d.focus(m);d.popup.close(l)}var f=a.target,e=a.iframe;if(a=a.coords){if(e){var f=b.position(e,!0),h=this._iframeContentWindow(e),h=b.withGlobal(h,"_docScroll",b),g=b.getComputedStyle(e),j=b._toPixelValue,k=(b.isIE&&b.isQuirks?0:j(e,
g.paddingLeft))+(b.isIE&&b.isQuirks?j(e,g.borderLeftWidth):0),e=(b.isIE&&b.isQuirks?0:j(e,g.paddingTop))+(b.isIE&&b.isQuirks?j(e,g.borderTopWidth):0);a.x+=f.x+k-h.x;a.y+=f.y+e-h.y}}else a=b.position(f,!0),a.x+=10,a.y+=10;var l=this,m=d.getFocus(this);d.popup.open({popup:this,x:a.x,y:a.y,onExecute:c,onCancel:c,orient:this.isLeftToRight()?"L":"R"});this.focus();this._onBlur=function(){this.inherited("_onBlur",arguments);d.popup.close(this)}},uninitialize:function(){b.forEach(this._bindings,function(a){a&&
this.unBindDomNode(a.node)},this);this.inherited(arguments)}});return d.Menu});define("text!dijit/templates/Tooltip.html",[],function(){return'<div class="dijitTooltip dijitTooltipLeft" id="dojoTooltip"\n\t><div class="dijitTooltipContainer dijitTooltipContents" dojoAttachPoint="containerNode" role=\'alert\'></div\n\t><div class="dijitTooltipConnector" dojoAttachPoint="connectorNode"></div\n></div>'});
define("dijit/Tooltip",["dojo","dijit","dijit/_Widget","dijit/_Templated","text!dijit/templates/Tooltip.html"],function(b,d){b.declare("dijit._MasterTooltip",[d._Widget,d._Templated],{duration:d.defaultDuration,templateString:b.cache("dijit","templates/Tooltip.html"),postCreate:function(){b.body().appendChild(this.domNode);this.bgIframe=new d.BackgroundIframe(this.domNode);this.fadeIn=b.fadeIn({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,"_onShow")});this.fadeOut=b.fadeOut({node:this.domNode,
duration:this.duration,onEnd:b.hitch(this,"_onHide")})},show:function(a,c,f,e){if(!(this.aroundNode&&this.aroundNode===c))this.domNode.width="auto",this.fadeOut.status()=="playing"?this._onDeck=arguments:(this.containerNode.innerHTML=a,d.placeOnScreenAroundElement(this.domNode,c,d.getPopupAroundAlignment(f&&f.length?f:d.Tooltip.defaultPosition,!e),b.hitch(this,"orient")),b.style(this.domNode,"opacity",0),this.fadeIn.play(),this.isShowingNow=!0,this.aroundNode=c)},orient:function(a,c,f,e,h){this.connectorNode.style.top=
"";var d=e.w-this.connectorNode.offsetWidth;a.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[c+"-"+f];this.domNode.style.width="auto";var j=b.contentBox(this.domNode),k=Math.min(Math.max(d,1),j.w),l=k<j.w;this.domNode.style.width=k+"px";if(l&&(this.containerNode.style.overflow=
"auto",l=this.containerNode.scrollWidth,this.containerNode.style.overflow="visible",l>k))l=l+b.style(this.domNode,"paddingLeft")+b.style(this.domNode,"paddingRight"),this.domNode.style.width=l+"px";f.charAt(0)=="B"&&c.charAt(0)=="B"?(a=b.marginBox(a),c=this.connectorNode.offsetHeight,a.h>e.h?(this.connectorNode.style.top=e.h-h.h/2-c/2+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(h.h/2-c/2,0),a.h-c)+"px",this.connectorNode.style.top="")):(this.connectorNode.style.top=
"",this.connectorNode.style.bottom="");return Math.max(0,j.w-d)},_onShow:function(){if(b.isIE)this.domNode.style.filter=""},hide:function(a){if(this._onDeck&&this._onDeck[1]==a)this._onDeck=null;else if(this.aroundNode===a)this.fadeIn.stop(),this.isShowingNow=!1,this.aroundNode=null,this.fadeOut.play()},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck)this.show.apply(this,this._onDeck),this._onDeck=null}});d.showTooltip=function(a,c,b,e){if(!d._masterTT)d._masterTT=
new d._MasterTooltip;return d._masterTT.show(a,c,b,e)};d.hideTooltip=function(a){if(!d._masterTT)d._masterTT=new d._MasterTooltip;return d._masterTT.hide(a)};b.declare("dijit.Tooltip",d._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(a){b.forEach(this._connections||[],function(a){b.forEach(a,b.hitch(this,"disconnect"))},this);var c=b.isArrayLike(a)?a:a?[a]:[];this._connections=b.map(c,function(a){return(a=b.byId(a))?[this.connect(a,"onmouseenter","_onTargetMouseEnter"),
this.connect(a,"onmouseleave","_onTargetMouseLeave"),this.connect(a,"onfocus","_onTargetFocus"),this.connect(a,"onblur","_onTargetBlur")]:[]},this);this._set("connectId",a);this._connectIds=c},addTarget:function(a){a=a.id||a;b.indexOf(this._connectIds,a)==-1&&this.set("connectId",this._connectIds.concat(a))},removeTarget:function(a){a=b.indexOf(this._connectIds,a.id||a);a>=0&&(this._connectIds.splice(a,1),this.set("connectId",this._connectIds))},buildRendering:function(){this.inherited(arguments);
b.addClass(this.domNode,"dijitTooltipData")},startup:function(){this.inherited(arguments);var a=this.connectId;b.forEach(b.isArrayLike(a)?a:[a],this.addTarget,this)},_onTargetMouseEnter:function(a){this._onHover(a)},_onTargetMouseLeave:function(a){this._onUnHover(a)},_onTargetFocus:function(a){this._focus=!0;this._onHover(a)},_onTargetBlur:function(a){this._focus=!1;this._onUnHover(a)},_onHover:function(a){if(!this._showTimer){var c=a.target;this._showTimer=setTimeout(b.hitch(this,function(){this.open(c)}),
this.showDelay)}},_onUnHover:function(){this._focus||(this._showTimer&&(clearTimeout(this._showTimer),delete this._showTimer),this.close())},open:function(a){this._showTimer&&(clearTimeout(this._showTimer),delete this._showTimer);d.showTooltip(this.label||this.domNode.innerHTML,a,this.position,!this.isLeftToRight());this._connectNode=a;this.onShow(a,this.position)},close:function(){this._connectNode&&(d.hideTooltip(this._connectNode),delete this._connectNode,this.onHide());this._showTimer&&(clearTimeout(this._showTimer),
delete this._showTimer)},onShow:function(){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments)}});d.Tooltip.defaultPosition=["after","before"];return d.Tooltip});
define("dijit/form/ValidationTextBox","dojo,dijit,text!dijit/form/templates/ValidationTextBox.html,dojo/i18n,dijit/form/TextBox,dijit/Tooltip,i18n!dijit/form/nls/validate".split(","),function(b,d){b.declare("dijit.form.ValidationTextBox",d.form.TextBox,{templateString:b.cache("dijit.form","templates/ValidationTextBox.html"),baseClass:"dijitTextBox dijitValidationTextBox",required:!1,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},regExp:".*",regExpGen:function(){return this.regExp},
state:"",tooltipPosition:[],_setValueAttr:function(){this.inherited(arguments);this.validate(this._focused)},validator:function(a,c){return RegExp("^(?:"+this.regExpGen(c)+")"+(this.required?"":"?")+"$").test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||this.parse(a,c)!==void 0)},_isValidSubset:function(){return this.textbox.value.search(this._partialre)==0},isValid:function(){return this.validator(this.textbox.value,this.constraints)},_isEmpty:function(a){return(this.trim?/^\s*$/:
/^$/).test(a)},getErrorMessage:function(){return this.required&&this._isEmpty(this.textbox.value)?this.missingMessage:this.invalidMessage},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(a){var c="",b=this.disabled||this.isValid(a);if(b)this._maskValidSubsetError=!0;var e=this._isEmpty(this.textbox.value),h=!b&&a&&this._isValidSubset();this._set("state",b?"":((!this._hasBeenBlurred||a)&&e||h)&&this._maskValidSubsetError?"Incomplete":"Error");d.setWaiState(this.focusNode,
"invalid",b?"false":"true");this.state=="Error"?(this._maskValidSubsetError=a&&h,c=this.getErrorMessage(a)):this.state=="Incomplete"?(c=this.getPromptMessage(a),this._maskValidSubsetError=!this._hasBeenBlurred||a):e&&(c=this.getPromptMessage(a));this.set("message",c);return b},displayMessage:function(a){d.hideTooltip(this.domNode);a&&this._focused&&d.showTooltip(a,this.domNode,this.tooltipPosition,!this.isLeftToRight())},_refreshState:function(){this.validate(this._focused);this.inherited(arguments)},
constructor:function(){this.constraints={}},_setConstraintsAttr:function(a){if(!a.locale&&this.lang)a.locale=this.lang;this._set("constraints",a);this._computePartialRE()},_computePartialRE:function(){var a=this.regExpGen(this.constraints);this.regExp=a;var c="";a!=".*"&&this.regExp.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(a){switch(a.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":c+=a;break;case ")":c+="|$)";break;default:c+="(?:"+a+"|$)"}});
try{"".search(c)}catch(b){c=this.regExp,console.warn("RegExp error in "+this.declaredClass+": "+this.regExp)}this._partialre="^(?:"+c+")$"},postMixInProperties:function(){this.inherited(arguments);this.messages=b.i18n.getLocalization("dijit.form","validate",this.lang);if(this.invalidMessage=="$_unset_$")this.invalidMessage=this.messages.invalidMessage;if(!this.invalidMessage)this.invalidMessage=this.promptMessage;if(this.missingMessage=="$_unset_$")this.missingMessage=this.messages.missingMessage;
if(!this.missingMessage)this.missingMessage=this.invalidMessage;this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(a){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);d.setWaiState(this.focusNode,"required",a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)}});
b.declare("dijit.form.MappedTextBox",d.form.ValidationTextBox,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},serialize:function(a){return a.toString?a.toString():""},toString:function(){var a=this.filter(this.get("value"));return a!=null?typeof a=="string"?a:this.serialize(a,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);this.valueNode=b.place("<input type='hidden'"+
(this.name?" name='"+this.name.replace(/'/g,"&quot;")+"'":"")+"/>",this.textbox,"after")},reset:function(){this.valueNode.value="";this.inherited(arguments)}});b.declare("dijit.form.RangeBoundTextBox",d.form.MappedTextBox,{rangeMessage:"",rangeCheck:function(a,c){return("min"in c?this.compare(a,c.min)>=0:!0)&&("max"in c?this.compare(a,c.max)<=0:!0)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var a=this.get("value"),c=!1,b=!1;
if("min"in this.constraints)c=this.constraints.min,c=this.compare(a,typeof c=="number"&&c>=0&&a!=0?0:c),c=typeof c=="number"&&c<0;if("max"in this.constraints)b=this.constraints.max,b=this.compare(a,typeof b!="number"||b>0?b:0),b=typeof b=="number"&&b>0;return c||b},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(a){return this.inherited(arguments)&&(this._isEmpty(this.textbox.value)&&!this.required||this.isInRange(a))},getErrorMessage:function(a){var c=
this.get("value");return c!==null&&c!==""&&c!==void 0&&(typeof c!="number"||!isNaN(c))&&!this.isInRange(a)?this.rangeMessage:this.inherited(arguments)},postMixInProperties:function(){this.inherited(arguments);if(!this.rangeMessage)this.messages=b.i18n.getLocalization("dijit.form","validate",this.lang),this.rangeMessage=this.messages.rangeMessage},_setConstraintsAttr:function(a){this.inherited(arguments);this.focusNode&&(this.constraints.min!==void 0?d.setWaiState(this.focusNode,"valuemin",this.constraints.min):
d.removeWaiState(this.focusNode,"valuemin"),this.constraints.max!==void 0?d.setWaiState(this.focusNode,"valuemax",this.constraints.max):d.removeWaiState(this.focusNode,"valuemax"))},_setValueAttr:function(a,c){d.setWaiState(this.focusNode,"valuenow",a);this.inherited(arguments)}});return d.form.ValidationTextBox});
define("orion/dialogs",[],function(){function b(b){this._serviceRegistry=b;this._serviceRegistration=b.registerService("orion.page.dialog",this)}b.prototype={confirm:function(b,a){a(window.confirm(b))},openFiles:function(){}};b.prototype.constructor=b;return{DialogService:b}});
define("orion/selection",["dojo","orion/EventTarget"],function(b,d){function a(a,b){b||(b="orion.page.selection");this._serviceRegistry=a;d.attach(this);this._serviceRegistration=a.registerService(b,this);this._selections=[]}a.prototype={getSelection:function(a){a(this._getSingleSelection())},getSelections:function(a){a(this._selections)},_getSingleSelection:function(){return this._selections&&this._selections.length>0?this._selections[0]:null},setSelections:function(a){this._selections=b.isArray(a)?
a:a?[a]:null;this.dispatchEvent({type:"selectionChanged",selection:this._getSingleSelection(),selections:this._selections})}};a.prototype.constructor=a;return{Selection:a}});
define("orion/i18nUtil",["require","orion/Deferred"],function(b,d){function a(a){if(a=localStorage.getItem("orion/messageBundle/"+a))if(a=JSON.parse(a),a._expires&&a._expires>(new Date).getTime())return delete a._expires,a;return null}var c={};return{getMessageBundle:function(f){function e(){b(["i18n!"+f],function(a){if(a){var c=f;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+c,JSON.stringify(a));delete a._expires}h.resolve(a)})}if(c[f])return c[f];var h=new d;c[f]=
h;var g=a(f);if(g)return h.resolve(g),h;try{b([f],e)}catch(j){b(["orion/i18n!"+f],e)}return h},formatMessage:function(a){var c=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,b){return c[(b<<0)+1]})}}});define("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
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 More menu.":"You can create favorites by selecting any file or folder in the navigator and choosing ${0} from the More 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:"});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/i18nUtil"],function(b,d,a){function c(a,c,f){if(!a[c])throw c+b[" is not supported in this file system"];return a[c].apply(a,f)}function f(a,e,j,k){if(!a.readBlob)throw b["source file service does not support binary read"];if(!j.writeBlob)throw b["target file service does not support binary write"];if(e[e.length-1]!=="/")return c(a,"readBlob",[e]).then(function(a){return c(j,"writeBlob",[k,a])});var l=k.substring(0,
k.length-1),m=decodeURIComponent(l.substring(l.lastIndexOf("/")+1)),l=l.substring(0,l.lastIndexOf("/")+1);return c(j,"createFolder",[l,m]).then(function(){},function(){}).then(function(){e.indexOf("/")===0&&(e+="?depth=1");return c(a,"fetchChildren",[e]).then(function(c){for(var b=[],e=0;e<c.length;++e){var g=c[e].Location,m=g;c[e].Directory&&(m=g.substring(0,g.length-1));m=decodeURIComponent(m.substring(m.lastIndexOf("/")+1));m=k+encodeURIComponent(m);c[e].Directory&&(m+="/");b[e]=f(a,g,j,m)}return d.all(b)})})}
function e(c,f){function e(a){var c=new d;c.reject(b["No Matching FileService for location:"]+a);return c}var k=c.getServiceReferences("orion.core.file"),l=k;if(f)for(var l=[],m=0;m<k.length;++m)f(k[m])&&l.push(k[m]);for(var n=[],o=[],q=[],p=[],r={fetchChildren:function(){var a=new d;a.resolve(p);return a},createWorkspace:function(){var a=new d;a.reject(b["no file service"]);return a},loadWorkspaces:function(){var a=new d;a.reject(b["no file service"]);return a},loadWorkspace:function(){var a=new d;
window.setTimeout(function(){a.resolve({Directory:!0,Length:0,LocalTimeStamp:0,Name:b["File Servers"],Location:"/",Children:p,ChildrenLocation:"/"})},100);return a},search:e,createProject:e,createFolder:e,createFile:e,deleteFile:e,moveFile:e,copyFile:e,read:e,write:e},k=0;k<l.length;++k)p[k]={Directory:!0,Length:0,LocalTimeStamp:0,Location:l[k].getProperty("top"),ChildrenLocation:l[k].getProperty("top"),Name:l[k].getProperty("Name")},m=l[k].getProperty("pattern")||".*",m[0]!=="^"&&(m="^"+m),n[k]=
RegExp(m),o[k]=c.getService(l[k]),q[k]=l[k].getProperty("Name"),l[k].getProperty("NameKey")&&l[k].getProperty("nls")&&a.getMessageBundle(l[k].getProperty("nls")).then(function(a,c){p[a].Name=c[l[a].getProperty("NameKey")];q[a]=c[l[a].getProperty("NameKey")]}.bind(this,k));this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return o[0]?0:-1;for(var c=0;c<n.length;++c)if(n[c].test(a))return c;throw b["No Matching FileService for location:"]+a;};this._getService=
function(a){a=this._getServiceIndex(a);return a===-1?r:o[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return a===-1?r.Name:q[a]};this._getServiceRootURL=function(a){a=this._getServiceIndex(a);return a===-1?r.Location:p[a].Location}}e.prototype={getService:function(a){return this._getService(a)},fileServiceName:function(a){return this._getServiceName(a)},fileServiceRootURL:function(a){return this._getServiceRootURL(a)},fetchChildren:function(a){return c(this._getService(a),"fetchChildren",
arguments)},createWorkspace:function(a){return c(this._getService(),"createWorkspace",arguments)},loadWorkspaces:function(){return c(this._getService(),"loadWorkspaces",arguments)},loadWorkspace:function(a){return c(this._getService(a),"loadWorkspace",arguments)},createProject:function(a,b,f,e){return c(this._getService(a),"createProject",arguments)},createFolder:function(a,b){return c(this._getService(a),"createFolder",arguments)},createFile:function(a,b){return c(this._getService(a),"createFile",
arguments)},deleteFile:function(a){return c(this._getService(a),"deleteFile",arguments)},moveFile:function(a,b,e){var d=this._getService(a),l=this._getService(b);if(d===l)return c(d,"moveFile",arguments);var m=a[a.length-1]==="/",n=b;n[n.length-1]!=="/"&&(n+="/");if(e)n+=encodeURIComponent(e);else{var o=a;m&&(o=o.substring(0,o.length-1));n+=o.substring(o.lastIndexOf("/")+1)}m&&n[n.length-1]!=="/"&&(n+="/");return f(d,a,l,n).then(function(){return c(d,"deleteFile",[a])})},copyFile:function(a,b,e){var d=
this._getService(a),l=this._getService(b);if(d===l)return c(d,"copyFile",arguments);var m=a[a.length-1]==="/",n=b;n[n.length-1]!=="/"&&(n+="/");if(e)n+=encodeURIComponent(e);else{var o=a;m&&(o=o.substring(0,o.length-1));n+=o.substring(o.lastIndexOf("/")+1)}m&&n[n.length-1]!=="/"&&(n+="/");return f(d,a,l,n)},read:function(a,b){return c(this._getService(a),"read",arguments)},write:function(a,b,f){return c(this._getService(a),"write",arguments)},remoteImport:function(a,b){return c(this._getService(a),
"remoteImport",arguments)},remoteExport:function(a,b){return c(this._getService(a),"remoteExport",arguments)},search:function(a,b){return c(this._getService(a),"search",arguments)}};e.prototype.constructor=e;return{FileClient:e}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/Deferred"],function(b,d){function a(a,c,b){var f=new d;a[c].apply(a,b).then(function(a){f.resolve(a)},function(a){f.reject(a)});return f}function c(a){this._location=a}function f(){var a=new d;a.reject(b["No Matching OperationService for location:"]+this._location);return a}function e(a){this._services=[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];for(var b=a.getServiceReferences("orion.core.operation"),
f=0;f<b.length;f++){var e=a.getService(b[f]);this._services[f]=e;e=b[f].getProperty("pattern")||".*";e[0]!=="^"&&(e="^"+e);this._patterns[f]=RegExp(e)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];return new c(a)}}function h(a){for(var c={Children:[]},b=0;b<a.length;b++)c.Children=c.Children.concat(a[b].Children);return c}function g(c,b,f){var e=this,h={Longpolling:!0};if(f)h.LongpollingId=
f;a(c,"getOperations",[h]).then(function(a){f&&e._currentLongpollingIds.indexOf(f)<0||(b(a,f),a.LongpollingId?(e._currentLongpollingIds.push(a.LongpollingId),g.bind(e)(c,b,a.LongpollingId)):g.bind(e)(c,b,f))},function(a){f&&e._currentLongpollingIds.indexOf(f)<0||("timeout"===a.dojoType?g.bind(e)(c,b,f):setTimeout(function(){g.bind(e)(c,b,f)},2E3))})}function j(a){for(var c=0;c<this._operationListeners.length;c++)this._operationListeners[c](a)}c.prototype={getOperation:f,getOperations:f,removeCompletedOperations:f,
removeOperation:f,cancelOperation:f};c.prototype.constructor=c;e.prototype={getOperations:function(){for(var c=[],b=0;b<this._services.length;b++)c[b]=a(this._services[b],"getOperations",[void 0]);return d.all(c).then(function(a){return h(a)})},getRunningOperations:function(){for(var c=[],b=0;b<this._services.length;b++)c[b]=a(this._services[b],"getOperations",[{RunningOnly:!0}]);return d.all(c).then(function(a){return h(a)})},getOperation:function(c){return a(this._getService(c),"getOperation",arguments)},
removeCompletedOperations:function(){for(var c=[],b=0;b<this._services.length;b++)c[b]=a(this._services[b],"removeCompletedOperations");return d.all(c)},removeOperation:function(c){return a(this._getService(c),"removeOperation",arguments)},cancelOperation:function(c){return a(this._getService(c),"cancelOperation",arguments)},addOperationChangeListener:function(a){this._operationListeners.push(a);if(this._operationListeners.length===1){if(this._services.length<1)throw b["No operations services registered."];
for(a=0;a<this._services.length;a++)g.bind(this)(this._services[a],j.bind(this))}},removeOperationChangeListener:function(a){for(var c=0;c<this._operationListeners.length;c++)if(this._operationListeners[c]===a){this._operationListeners.splice(c,1);break}if(this._operationListeners.length===0)this._currentLongpollingIds=[]},resetChangeListeners:function(){this._currentLongpollingIds=[];if(this._services.length<1)throw b["No operations services registered."];for(var a=0;a<this._services.length;a++)g.bind(this)(this._services[a],
j.bind(this))}};e.prototype.constructor=e;return{OperationsClient:e}});define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
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/editor/regex",[],function(){return{escape:function(b){return b.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&")},parse:function(b){return(b=/^\s*\/(.+)\/([gim]{0,3})\s*$/.exec(b))?{pattern:b[1],flags:b[2]}:null}}});
define("orion/crawler/nls/messages",["orion/i18n!orion/crawler/nls/messages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
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("dojo/regexp",["dojo"],function(b){b.getObject("regexp",!0,b);b.regexp.escapeString=function(b,a){return b.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(c){return a&&a.indexOf(c)!=-1?c:"\\"+c})};b.regexp.buildGroupRE=function(d,a,c){if(!(d instanceof Array))return a(d);for(var f=[],e=0;e<d.length;e++)f.push(a(d[e]));return b.regexp.group(f.join("|"),c)};b.regexp.group=function(b,a){return"("+(a?"?:":"")+b+")"};return b.regexp});
define("dojo/cookie",["dojo","dojo/regexp"],function(b){b.cookie=function(d,a,c){var f=document.cookie;if(arguments.length==1){var e=f.match(RegExp("(?:^|; )"+b.regexp.escapeString(d)+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}else{c=c||{};f=c.expires;if(typeof f=="number"){var h=new Date;h.setTime(h.getTime()+f*864E5);f=c.expires=h}if(f&&f.toUTCString)c.expires=f.toUTCString();a=encodeURIComponent(a);f=d+"="+a;for(e in c)f+="; "+e,h=c[e],h!==!0&&(f+="="+h);document.cookie=f}};b.cookie.isSupported=
function(){if(!("cookieEnabled"in navigator))this("__djCookieTest__","CookiesAllowed"),navigator.cookieEnabled=this("__djCookieTest__")=="CookiesAllowed",navigator.cookieEnabled&&this("__djCookieTest__","",{expires:-1});return navigator.cookieEnabled};return b.cookie});
define("dijit/layout/BorderContainer",["dojo","dijit","dijit/layout/_LayoutWidget","dojo/cookie","dijit/_Templated"],function(b,d){b.declare("dijit.layout.BorderContainer",d.layout._LayoutWidget,{design:"headline",gutters:!0,liveSplitters:!0,persist:!1,baseClass:"dijitBorderContainer",_splitterClass:"dijit.layout._Splitter",postMixInProperties:function(){this.gutters||(this.baseClass+="NoGutter");this.inherited(arguments)},startup:function(){this._started||(b.forEach(this.getChildren(),this._setupChild,
this),this.inherited(arguments))},_setupChild:function(a){var c=a.region;if(c){this.inherited(arguments);b.addClass(a.domNode,this.baseClass+"Pane");var f=this.isLeftToRight();c=="leading"&&(c=f?"left":"right");c=="trailing"&&(c=f?"right":"left");if(c!="center"&&(a.splitter||this.gutters)&&!a._splitterWidget)f=new (b.getObject(a.splitter?this._splitterClass:"dijit.layout._Gutter"))({id:a.id+"_splitter",container:this,child:a,region:c,live:this.liveSplitters}),f.isSplitter=!0,a._splitterWidget=f,b.place(f.domNode,
a.domNode,"after"),f.startup();a.region=c}},layout:function(){this._layoutChildren()},addChild:function(a,c){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var c=a.region,f=a._splitterWidget;f&&(f.destroy(),delete a._splitterWidget);this.inherited(arguments);this._started&&this._layoutChildren();b.removeClass(a.domNode,this.baseClass+"Pane");b.style(a.domNode,{top:"auto",bottom:"auto",left:"auto",right:"auto",position:"static"});b.style(a.domNode,c=="top"||c=="bottom"?
"width":"height","auto")},getChildren:function(){return b.filter(this.inherited(arguments),function(a){return!a.isSplitter})},getSplitter:function(a){return b.filter(this.getChildren(),function(c){return c.region==a})[0]._splitterWidget},resize:function(a,c){if(!this.cs||!this.pe){var f=this.domNode;this.cs=b.getComputedStyle(f);this.pe=b._getPadExtents(f,this.cs);this.pe.r=b._toPixelValue(f,this.cs.paddingRight);this.pe.b=b._toPixelValue(f,this.cs.paddingBottom);b.style(f,"padding","0px")}this.inherited(arguments)},
_layoutChildren:function(a,c){if(this._borderBox&&this._borderBox.h){var f=b.map(this.getChildren(),function(a,c){return{pane:a,weight:[a.region=="center"?Infinity:0,a.layoutPriority,(this.design=="sidebar"?1:-1)*(/top|bottom/.test(a.region)?1:-1),c]}},this);f.sort(function(a,c){for(var b=a.weight,f=c.weight,e=0;e<b.length;e++)if(b[e]!=f[e])return b[e]-f[e];return 0});var e=[];b.forEach(f,function(a){a=a.pane;e.push(a);a._splitterWidget&&e.push(a._splitterWidget)});d.layout.layoutChildren(this.domNode,
{l:this.pe.l,t:this.pe.t,w:this._borderBox.w-this.pe.w,h:this._borderBox.h-this.pe.h},e,a,c)}},destroyRecursive:function(){b.forEach(this.getChildren(),function(a){var c=a._splitterWidget;c&&c.destroy();delete a._splitterWidget});this.inherited(arguments)}});b.extend(d._Widget,{region:"",layoutPriority:0,splitter:!1,minSize:0,maxSize:Infinity});b.declare("dijit.layout._Splitter",[d._Widget,d._Templated],{live:!0,templateString:'<div class="dijitSplitter" dojoAttachEvent="onkeypress:_onKeyPress,onmousedown:_startDrag,onmouseenter:_onMouse,onmouseleave:_onMouse" tabIndex="0" role="separator"><div class="dijitSplitterThumb"></div></div>',
postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region);this._factor=/top|left/.test(this.region)?1:-1;this._cookieName=this.container.id+"_"+this.region},buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V"));if(this.container.persist){var a=b.cookie(this._cookieName);a&&(this.child.domNode.style[this.horizontal?"height":"width"]=a)}},_computeMaxSize:function(){var a=this.horizontal?"h":
"w",c=b.marginBox(this.child.domNode)[a],f=b.filter(this.container.getChildren(),function(a){return a.region=="center"})[0],a=b.marginBox(f.domNode)[a];return Math.min(this.child.maxSize,c+a)},_startDrag:function(a){if(!this.cover)this.cover=b.doc.createElement("div"),b.addClass(this.cover,"dijitSplitterCover"),b.place(this.cover,this.child.domNode,"after");b.addClass(this.cover,"dijitSplitterCoverActive");this.fake&&b.destroy(this.fake);if(!(this._resize=this.live))(this.fake=this.domNode.cloneNode(!0)).removeAttribute("id"),
b.addClass(this.domNode,"dijitSplitterShadow"),b.place(this.fake,this.domNode,"after");b.addClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active");this.fake&&b.removeClass(this.fake,"dijitSplitterHover dijitSplitter"+(this.horizontal?"H":"V")+"Hover");var c=this._factor,f=this.horizontal,e=f?"pageY":"pageX",h=a[e],d=this.domNode.style,j=b.marginBox(this.child.domNode)[f?"h":"w"],k=this._computeMaxSize(),l=this.child.minSize||20,f=this.region,m=f=="top"||f=="bottom"?
"top":"left",n=parseInt(d[m],10),o=this._resize,q=b.hitch(this.container,"_layoutChildren",this.child.id),f=b.doc;this._handlers=(this._handlers||[]).concat([b.connect(f,"onmousemove",this._drag=function(a,b){var f=a[e]-h,x=c*f+j,v=Math.max(Math.min(x,k),l);(o||b)&&q(v);d[m]=f+n+c*(v-x)+"px"}),b.connect(f,"ondragstart",b.stopEvent),b.connect(b.body(),"onselectstart",b.stopEvent),b.connect(f,"onmouseup",this,"_stopDrag")]);b.stopEvent(a)},_onMouse:function(a){a=a.type=="mouseover"||a.type=="mouseenter";
b.toggleClass(this.domNode,"dijitSplitterHover",a);b.toggleClass(this.domNode,"dijitSplitter"+(this.horizontal?"H":"V")+"Hover",a)},_stopDrag:function(a){try{this.cover&&b.removeClass(this.cover,"dijitSplitterCoverActive"),this.fake&&b.destroy(this.fake),b.removeClass(this.domNode,"dijitSplitterActive dijitSplitter"+(this.horizontal?"H":"V")+"Active dijitSplitterShadow"),this._drag(a),this._drag(a,!0)}finally{this._cleanupHandlers(),delete this._drag}this.container.persist&&b.cookie(this._cookieName,
this.child.domNode.style[this.horizontal?"height":"width"],{expires:365})},_cleanupHandlers:function(){b.forEach(this._handlers,b.disconnect);delete this._handlers},_onKeyPress:function(a){this._resize=!0;var c=this.horizontal,f=1,e=b.keys;switch(a.charOrCode){case c?e.UP_ARROW:e.LEFT_ARROW:f*=-1;case c?e.DOWN_ARROW:e.RIGHT_ARROW:break;default:return}c=b._getMarginSize(this.child.domNode)[c?"h":"w"]+this._factor*f;this.container._layoutChildren(this.child.id,Math.max(Math.min(c,this._computeMaxSize()),
this.child.minSize));b.stopEvent(a)},destroy:function(){this._cleanupHandlers();delete this.child;delete this.container;delete this.cover;delete this.fake;this.inherited(arguments)}});b.declare("dijit.layout._Gutter",[d._Widget,d._Templated],{templateString:'<div class="dijitGutter" role="presentation"></div>',postMixInProperties:function(){this.inherited(arguments);this.horizontal=/top|bottom/.test(this.region)},buildRendering:function(){this.inherited(arguments);b.addClass(this.domNode,"dijitGutter"+
(this.horizontal?"H":"V"))}});return d.layout.BorderContainer});
define("orion/commonHTMLFragments",["i18n!orion/nls/messages","require"],function(b,d){function a(a){if(!a)return"";var c=document.createElement("span");c.textContent=a;return c.innerHTML}function c(a){return'<div id="'+a+'slideContainer" class="layoutBlock slideParameters slideContainer"><span id="'+a+'pageCommandParameters" class="layoutLeft parameters"></span><span id="'+a+'pageCommandDismiss" class="layoutRight parametersDismiss"></span></div>'}var f='<header id="banner" role="banner" class="headerLayout"><div id="staticBanner" class="layoutBlock topRowBanner"><a id="home" class="layoutLeft logo" href="'+
d.toUrl("navigate/table.html")+'" aria-label="Orion Home"></a><nav id="primaryNav" class="layoutLeft primaryNav" role="navigation"></nav><div class="layoutRight"><div id="globalActions" class="spacingLeft layoutLeft"></div><div id="relatedLinks" class="spacingLeft layoutLeft" style="padding-top:1px;"></div><input type="text" id="search" autocomplete="off" placeholder="Search" title="Type a keyword or wild card to search in root" class="layoutLeft spacingLeft searchbox" role="search"><div id="searchOptions" class="layoutLeft" style="padding-top:1px;"></div><div id="userMenu" class="spacingLeft layoutLeft"></div></div></div><div id="titleArea" class="layoutBlock titleArea"><div class="clear" style="padding-bottom:5px;display:inline;"><span id="location" class="currentLocation"></span><span id="dirty" class="currentLocation"></span></div><div class="layoutRight pageNav"><span id="pageFavorite" tabindex="0" role="button" aria-label="Add this page to the favorites list" class="spacingLeft layoutLeft imageSprite core-sprite-favorite_sml"></span></div></div></header>',
e='<footer id="footerContent" class="layoutBlock footerLayout" role="contentinfo"><div class="footerBlock">'+a(b["Orion is in Beta. Please try it out but BEWARE your data may be lost."])+'</div><div class="footerRightBlock"><a href="http://wiki.eclipse.org/Orion/FAQ" target="_blank">'+a(b.FAQ)+'</a> | <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=1.0" target="_blank">'+a(b["Report a Bug"])+'</a> | <a href="http://www.eclipse.org/legal/privacy.php" target="_blank">'+a(b["Privacy Policy"])+
'</a> | <a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">'+a(b["Terms of Use"])+'</a> | <a href="http://www.eclipse.org/legal/copyright.php" target="_blank">'+a(b["Copyright Agent"])+"</a></div></footer>",h='<ul class="layoutLeft commandList pageActions" id="pageActions"></ul><ul class="layoutLeft commandList pageActions" id="selectionTools"></ul><img class="layoutRight progressPane" src="'+d.toUrl("images/none.png")+'" id="progressPane" tabindex="0" role="progressbar" aria-label="Operations - Press spacebar to show current operations"></img><div class="layoutRight status" id="statusPane" role="status" aria-live="off"></div><ul class="layoutRight commandList pageActions" id="pageNavigationActions"></ul><div id="notificationArea" class="layoutLeft layoutBlock slideContainer"><div class="layoutLeft" id="notifications" aria-live="assertive" aria-atomic="true"></div><div class="layoutRight"><span tabindex="0" role="button" aria-label="Close notification" class="layoutRight core-sprite-close imageSprite" id="closeNotifications"></span></div></div>'+
c("mainToolbar");return{topHTMLFragment:f,bottomHTMLFragment:e,toolbarHTMLFragment:h,slideoutHTMLFragment:c}});
define("orion/parameterCollectors","i18n!orion/nls/messages,require,dojo,dijit,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton".split(","),function(b,d,a){function c(a,c){this._activeContainer=null;this._getElementsFunction=a;this._toolbarLayoutFunction=c}c.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&a.empty(this._activeElements.parameterArea);this._activeElements.slideContainer&&a.removeClass(this._activeElements.slideContainer,"slideContainerActive");
this._activeElements.dismissArea&&a.empty(this._activeElements.dismissArea);this._activeElements.commandNode&&a.removeClass(this._activeElements.commandNode,"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,h){typeof c==="string"&&(c=a.byId(c));if(this._activeElements&&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=h;var d=e(this._activeElements.parameterArea,this._activeElements.dismissArea);if(!d)return!1;this._activeElements.focusNode=d;c=a.query("#closebox",this._activeElements.dismissArea||this._activeElements.parameterArea);if(c.length===
0)c=a.create("span",{id:"closebox",role:"button",tabindex:"0"},this._activeElements.dismissArea||this._activeElements.parameterArea,"last"),a.addClass(c,"imageSprite"),a.addClass(c,"core-sprite-close"),a.addClass(c,"dismiss"),c.title=b.Close,a.connect(c,"onclick",a.hitch(this,function(){this.close()})),a.connect(c,"onkeypress",a.hitch(this,function(c){(c.keyCode===a.keys.ENTER||c.charCode===a.keys.SPACE)&&this.close()}));a.addClass(this._activeElements.slideContainer,"slideContainerActive");this._toolbarLayoutFunction(this._activeElements);
if(d)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){d.focus();d.select()},0);this._activeElements.commandNode&&a.addClass(this._activeElements.commandNode,"activeCommand");return!0}return!1},_collectAndCall:function(c,b){a.query("input",b).forEach(function(a){a.type==="checkbox"?c.parameters.setValue(a.parameterName,a.checked):a.type!=="button"&&c.parameters.setValue(a.parameterName,a.value.trim())});a.query("textArea",b).forEach(function(a){c.parameters.setValue(a.parameterName,
a.value.trim())});c.command.callback&&c.command.callback.call(c.handler,c)},collectParameters:function(c){return c.parameters?(c.domNode&&a.addClass(c.domNode,"commandMarker"),this.open(c.domNode||c.domParent,this.getFillFunction(c))):!1},getFillFunction:function(c,e){return a.hitch(this,function(h,d){var j=null,k=a.hitch(this,function(){e&&e();this.close()}),l=a.hitch(this,function(b){b.keyCode===a.keys.ENTER&&this._collectAndCall(c,h);if(b.keyCode===a.keys.ESCAPE||b.keyCode===a.keys.ENTER)k(),a.stopEvent(b)});
c.parameters.forEach(function(c){if(c.label)a.create("label",{"class":"parameterInput","for":c.name+"parameterCollector"},h,"last").textContent=c.label;var b={type:c.type,id:c.name+"parameterCollector"},f;if(c.type==="text"&&typeof c.lines==="number"&&c.lines>1)b.rows=c.lines,b.type="textarea",f=a.create("textarea",b,h,"last"),l=a.hitch(this,function(c){c.keyCode===a.keys.ESCAPE&&(k(),a.stopEvent(c))});else if(c.type==="boolean"){if(b.type="checkbox",c.value)b.checked=!0}else if(c.value)b.value=c.value;
f||(f=a.create("input",b,h,"last"));a.addClass(f,"parameterInput parameterInput"+b.type);f.setAttribute("speech","speech");f.setAttribute("x-webkit-speech","x-webkit-speech");f.parameterName=c.name;j||(j=f);a.connect(f,"onkeypress",l)});var m=d||h,n=function(a){a._collectAndCall(c,h);k()};if(c.parameters.hasOptionalParameters()){c.parameters.optionsRequested=!1;var o=a.create("span",{role:"button",tabindex:"0"},m,"last");a.place(window.document.createTextNode(b.More),o,"last");a.addClass(o,"dismiss");
a.connect(o,"onclick",a.hitch(this,function(){c.parameters.optionsRequested=!0;n(this)}));a.connect(o,"onkeypress",a.hitch(this,function(b){if(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)c.parameters.optionsRequested=!0,n(this)}))}o=a.create("span",{role:"button",tabindex:"0"},m,"last");a.place(window.document.createTextNode(b.Submit),o,"last");a.addClass(o,"dismiss");a.connect(o,"onclick",a.hitch(this,function(){n(this)}));a.connect(o,"onkeypress",a.hitch(this,function(c){(c.keyCode===a.keys.ENTER||
c.charCode===a.keys.SPACE)&&n(this)}));m=a.create("span",{id:"closebox",role:"button",tabindex:"0"},m,"last");a.addClass(m,"imageSprite");a.addClass(m,"core-sprite-close");a.addClass(m,"dismiss");m.title=b.Close;a.connect(m,"onclick",a.hitch(this,function(){k()}));a.connect(m,"onkeypress",a.hitch(this,function(c){(c.keyCode===a.keys.ENTER||c.charCode===a.keys.SPACE)&&k()}));return j})}};c.prototype.constructor=c;return{CommandParameterCollector:c}});
define("orion/textview/keyBinding",[],function(){function b(a,c,b,e,h){this.keyCode=typeof a==="string"?a.toUpperCase().charCodeAt(0):a;this.mod1=c!==void 0&&c!==null?c:!1;this.mod2=b!==void 0&&b!==null?b:!1;this.mod3=e!==void 0&&e!==null?e:!1;this.mod4=h!==void 0&&h!==null?h:!1}var d=window.navigator.platform.indexOf("Mac")!==-1;b.prototype={match:function(a){return this.keyCode===a.keyCode?this.mod1!==(d?a.metaKey:a.ctrlKey)?!1:this.mod2!==a.shiftKey?!1:this.mod3!==a.altKey?!1:d&&this.mod4!==a.ctrlKey?
!1:!0:!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:!0}};return{KeyBinding:b}});
define("orion/breadcrumbs",["require","dojo"],function(b,d){function a(a){this._init(a)}a.prototype={_init:function(a){var b=a.container;typeof b==="string"&&(b=d.byId(b));if(!b)throw"no parent container";this._container=b;d.removeClass(b,"currentLocation");this._id=a.id||"eclipse.breadcrumbs";this._resource=a.resource||null;this._rootSegmentName=a.rootSegmentName;this._workspaceRootSegmentName=a.workspaceRootSegmentName;this._makeHref=a.makeHref;this.path="";this.render()},getNavigatorWorkspaceRootSegment:function(){if(this._workspaceRootSegmentName){var a;
this._resource&&this._resource.Parents?(a=document.createElement("a"),this._makeHref?this._makeHref(a,""):a.href=b.toUrl("navigate/table.html")+"#"):a=document.createElement("span");d.place(document.createTextNode(this._workspaceRootSegmentName),a,"only");return a}return null},render:function(){var a=this._container,f=d.byId(this._id);f?d.empty(f):(f=document.createElement("span"),f.id=this._id,a.appendChild(f));var e;if(e=this.getNavigatorWorkspaceRootSegment())if(d.addClass(e,"breadcrumb"),f.appendChild(e),
this._resource&&this._resource.Parents)e=document.createElement("span"),d.place(document.createTextNode(" / "),e,"only"),this.path+="/",d.addClass(e,"breadcrumbSeparator"),f.appendChild(e);else{e.href="";d.removeClass(e,"breadcrumb");d.addClass(e,"currentLocation");return}a=this._rootSegmentName;if(this._resource){if(this._resource.Parents)for(var h=this._resource.Parents,g=h.length;--g>=0;)e=document.createElement("a"),d.addClass(e,"breadcrumb"),a?(d.place(document.createTextNode(a),e,"only"),a=
null):d.place(document.createTextNode(h[g].Name),e,"only"),this.path+=h[g].Name,this._makeHref?this._makeHref(e,h[g].Location):e.href=b.toUrl("navigate/table.html")+"#"+h[g].ChildrenLocation,f.appendChild(e),e=document.createElement("span"),d.place(document.createTextNode(" / "),e,"only"),this.path+="/",d.addClass(e,"breadcrumbSeparator"),f.appendChild(e);e=document.createElement("span");a?(d.place(document.createTextNode(a),e,"only"),a=null):d.place(document.createTextNode(this._resource.Name),e,
"only");d.addClass(e,"currentLocation");this.path+=this._resource.Name;f.appendChild(e)}f.childNodes.length===0&&(e=document.createElement("span"),d.place(document.createTextNode(a||document.title),e,"only"),d.addClass(e,"breadcrumb"),d.addClass(e,"currentLocation"),f.appendChild(e))}};a.prototype.constructor=a;return{BreadCrumbs:a}});
define("orion/splitter",["require","dojo"],function(b,d){function a(a){this._init(a)}a.prototype={_init:function(a){function b(a){var c=a;typeof a==="string"&&(c=d.byId(a));return c}this._tracking=null;this._resizeListeners=[];this._animationDelay=501;this._prefix="/orion/splitter/"+document.body.id;this._node=b(a.node);if(!this._node)throw"no dom node for splitter found";this._sideNode=b(a.sidePanel);if(!this._sideNode)throw"no dom node for side panel found";this._mainNode=b(a.mainPanel);if(!this._mainNode)throw"no dom node for main panel found";
d.place("<div id='splitThumb' class='splitThumb splitThumbLayout'></div>",this._node,"only");this._initializeFromStoredSettings();this._thumb=d.query("#splitThumb",this._node)[0];this._closed?(this._closed=!1,this._thumbDown()):this._adjustToSplitPosition();d.style(this._node,{visibility:"visible"});d.style(this._mainNode,{display:"block"});d.style(this._sideNode,{display:"block"});d.connect(this._node,"onmousedown",this,this._mouseDown);d.connect(window,"onmouseup",this,this._mouseUp);d.connect(window,
"onresize",this,this._resize)},toggleSidePanel:function(){this._thumbDown()},openSidePanel:function(){this._closed||this._thumbDown()},addResizeListener:function(a){this._resizeListeners.push(a)},_initializeFromStoredSettings:function(){this._closed=localStorage.getItem(this._prefix+"/toggleState")==="closed";var a=localStorage.getItem(this._prefix+"/xPosition");if(a)this._splitLeft=parseInt(a,10)},_adjustToSplitPosition:function(a){var b=d.position(this._node);this._splitWidth=b.w;if(a||!this._splitLeft)this._splitLeft=
b.x,localStorage.setItem(this._prefix+"/xPosition",this._splitLeft);d.style(this._sideNode,{width:this._splitLeft+"px",right:this._splitLeft-1+"px",display:"block"});d.style(this._node,{left:this._splitLeft+"px"});this._resize()},_resize:function(a){var a=a||0,b=d.position(this._node.parentNode);this._totalWidth=b.w;b=d.position(this._node);d.style(this._mainNode,{width:this._totalWidth-b.x-b.w+"px"});window.setTimeout(d.hitch(this,function(){this._notifyResizeListeners(this._mainNode)}),a);window.setTimeout(d.hitch(this,
function(){this._notifyResizeListeners(this._sideNode)}),a)},_notifyResizeListeners:function(a){for(var b=0;b<this._resizeListeners.length;b++)this._resizeListeners[b](a)},_thumbDown:function(){this._closed?(this._closed=!1,this._addAnimation(),d.style(this._sideNode,{width:this._splitLeft+"px"}),d.style(this._node,{left:this._splitLeft+"px"})):(this._closed=!0,this._addAnimation(),d.style(this._sideNode,{width:0}),d.style(this._node,{left:"1px"}));this._resize(this._animationDelay);this._removeAnimation();
localStorage.setItem(this._prefix+"/toggleState",this._closed?"closed":null)},_removeAnimation:function(){window.setTimeout(d.hitch(this,function(){d.removeClass(this._sideNode,"sidePanelLayoutAnimation");d.removeClass(this._mainNode,"mainPanelLayoutAnimation");d.removeClass(this._node,"splitLayoutAnimation");d.removeClass(this._thumb,"splitLayoutAnimation")}),this._animationDelay)},_addAnimation:function(){d.addClass(this._sideNode,"sidePanelLayoutAnimation");d.addClass(this._mainNode,"mainPanelLayoutAnimation");
d.addClass(this._node,"splitLayoutAnimation");d.addClass(this._thumb,"splitLayoutAnimation")},_mouseDown:function(a){if(a.target===this._thumb)return this._thumbDown(a);if(!this._tracking)d.addClass(this._node,"splitTracking"),d.addClass(this._mainNode,"panelTracking"),d.addClass(this._sideNode,"panelTracking"),this._tracking=d.connect(window,"onmousemove",this,this._mouseMove)},_mouseMove:function(a){if(this._tracking)this._splitLeft=a.clientX,d.style(this._node,{left:a.clientX+"px"}),this._adjustToSplitPosition(!0),
window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())},_mouseUp:function(){if(this._tracking)d.disconnect(this._tracking),this._tracking=null,d.removeClass(this._node,"splitTracking"),d.removeClass(this._mainNode,"panelTracking"),d.removeClass(this._sideNode,"panelTracking")}};a.prototype.constructor=a;return{Splitter:a}});
define("orion/URITemplate",[],function(){function b(a){this._text=a}function d(a,c){if(c==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(c==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]");if(c==="U+R-,")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/,/g,"%2C");throw Error("Unknown allowed character set: "+c);}function a(a,c,b){for(var f=[],e=0;e<a.length;e++)typeof a[e]!=="undefined"&&
f.push(d(a[e],c));return f.join(b)}function c(a,c,b,f){for(var e=Object.keys(a),h=[],g=0;g<e.length;g++)typeof a[e[g]]!=="undefined"&&h.push(d(e[g],c)+b+d(a[e[g]],c));return h.join(f)}function f(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=h[a[0]])?a=a.substring(1):this._operator=h.NUL;for(var c=[],b=a.split(","),f=0;f<b.length;f++){var e=b[f].match(g);if(e===null)throw Error("Bad VarSpec: "+a);c.push({name:e[1],explode:!!e[2],prefix:e[3]?parseInt(e[3],
10):-1})}this._varSpecList=c}function e(a){for(var c=[],e=0,h=a.indexOf("{",e);h!==-1;){c.push(new b(a.substring(e,h)));e=a.indexOf("}",h+1);if(e===-1)throw Error("Invalid template: "+a);c.push(new f(a.substring(h+1,e)));e+=1;h=a.indexOf("{",e)}c.push(new b(a.substring(e)));this._templateComponents=c}var h={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-,"}},g=/^((?:(?:[a-zA-Z0-9_])|(?:%[0-9A-F][0-9A-F]))(?:(?:[a-zA-Z0-9_.])|(?:%[0-9A-F][0-9A-F]))*)(?:(\*)|:([0-9]+))?$/;b.prototype={expand:function(){return encodeURI(this._text)}};f.prototype={expand:function(b){for(var f=[],e=
0;e<this._varSpecList.length;e++){var h=this._varSpecList[e],g=h.name,o=b[g],q=typeof o;if(q!=="undefined"&&o!==null){var p=f.length===0?this._operator.first:this._operator.sep;if(q==="string")this._operator.named&&(p+=d(g,"U+R"),p+=o.length===0?this._operator.ifemp:"="),h.prefix!==-1&&h.prefix<o.length&&(o=o.substring(0,h.prefix)),p+=d(o,this._operator.allow);else if(Array.isArray(o))h.explode?p+=a(o,this._operator.allow,this._operator.sep):(this._operator.named&&(p+=d(g,"U+R"),p+=o.length===0?this._operator.ifemp:
"="),p+=a(o,this._operator.allow,","));else if(q==="object")h.explode?p+=c(o,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(p+=d(g,"U+R"),p+=Object.keys(o).length===0?this._operator.ifemp:"="),p+=c(o,this._operator.allow,",",","));else throw Error("bad param type: "+g+" : "+q);f.push(p)}}return f.join("")}};e.prototype={expand:function(a){for(var c=[],b=0;b<this._templateComponents.length;b++)c.push(this._templateComponents[b].expand(a));return c.join("")}};return e});
define("orion/settings/nls/messages",["orion/i18n!orion/settings/nls/messages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
define("orion/settings/nls/root/messages",{"Plugin Description":"Plugin Description",Create:"Create","Loading...":"Loading...","Label:":"Label:",Title:"Title",Plugins:"Plugins","User Profile":"User Profile","JavaScript Editor":"JavaScript Editor",General:"General",Navigation:"Navigation","Open in same tab":"Open in same tab","Open in new tab":"Open in new tab",Links:"Links",Font:"Font",Family:"Family","Sans Serif":"Sans Serif",Serif:"Serif",Size:"Size","8pt":"8pt","9pt":"9pt","10pt":"10pt","12pt":"12pt",
Color:"Color",Background:"Background",Strings:"Strings","String Types":"String Types",blue:"blue",Weight:"Weight",Normal:"Normal",Bold:"Bold",Comments:"Comments","Comment Types":"Comment Types",green:"green",Keywords:"Keywords","Keyword Types":"Keyword Types",darkred:"darkred",Categories:"Categories",Username:"Username","Full Name":"Full Name","Email Address":"Email Address",Account:"Account","Current Password":"Current Password","New Password":"New Password","Verify Password":"Verify Password",Password:"Password",
OpenId:"OpenId",AOL:"AOL",Yahoo:"Yahoo",Google:"Google",Unlink:"Unlink",Link:"Link",Unlinked:"Unlinked",Linked:"Linked","Linked Accounts":"Linked Accounts","Git Email Address":"Git Email Address","Git Username":"Git Username","Git Credentials Storage":"Git Credentials Storage",Update:"Update","Update Profile Settings":"Update Profile Settings","Update Git Credentials":"Update Git Credentials","User profile data successfully updated.":"User profile data successfully updated.","Git Credentials successfully updated.":"Git Credentials successfully updated.",
"Edit Plugin JavaScript":"Edit Plugin JavaScript","Install Plugin":"Install Plugin","Plugin Name:":"Plugin Name:","Author Name:":"Author Name:","Licence:":"Licence:","Description:":"Description:","A plugin for Eclipse Orion":"A plugin for Eclipse Orion","Plugin Link":"Plugin Link",Install:"Install","Install a plugin by specifying its URL":"Install a plugin by specifying its URL","Plugin URL:":"Plugin URL:","Reload all":"Reload all","Reload all installed plugins":"Reload all installed plugins","Create a new Orion Plugin":"Create a new Orion Plugin",
Reload:"Reload","Reload the plugin":"Reload the plugin",Delete:"Delete","Delete this plugin from the configuration":"Delete this plugin from the configuration","Type a plugin url here ...":"Type a plugin url here ...","Installed ":"Installed ","Installing ":"Installing ","Already installed":"Already installed"," plugin":" plugin","Reloaded ":"Reloaded ","Uninstalled ":"Uninstalled ","Are you sure you want to uninstall '":"Are you sure you want to uninstall '",Services:"Services",Value:"Value","JavaScript Object":"JavaScript Object",
"click here, then check javascript console to drill down":"click here, then check javascript console to drill down",Item:"Item","Git Config":"Git Config","Clear Git Credentials":"Clear Git Credentials","Enable Storage":"Enable Storage","Please be aware that your credentials will be stored persistently in the browser.":"Please be aware that your credentials will be stored persistently in the browser.","Do you wish to enable the Key Storage?":"Do you wish to enable the Key Storage?",general:"General",
validation:"Validation","Deleted git credentials for ${0}":"Deleted git credentials for ${0}"});
define("orion/widgets/themes/ThemeClass",["i18n!orion/settings/nls/messages","require"],function(){function b(b){this.attributes=[];this.element=document.createElement("div");this.style=this.element.style;this.className=b;this.classString="."+b+"{ "}b.prototype.className=null;b.prototype.classString=void 0;b.prototype.style=void 0;b.prototype.closeString=" }\n";b.prototype.toString=function(){return this.classString=this.classString+this.style.cssText+this.closeString};return{ThemeClass:b}});
define("orion/widgets/themes/container/ThemeSheetWriter",["i18n!orion/settings/nls/messages","require","dojo","dijit","orion/widgets/themes/ThemeClass"],function(b,d,a,c,f){function e(){}e.prototype.navbar="#333";e.prototype.button="#777777";e.prototype.location="#EFEFEF";e.prototype.selection="FEC";e.prototype.sidepanel="#FBFBFB";e.prototype.mainpanel="white";e.prototype.navtext="#bfbfbf";e.prototype.content="#3087B3";e.prototype.search="#444";e.prototype.toolpanel="white";e.prototype.writeNavigationStyle=
function(){var a="",c=[],b=new f.ThemeClass("orionPage");b.style.backgroundColor="#fdfdfd";b.style.width="100%";b.style.height="100%";c.push(b);b=new f.ThemeClass("topRowBanner");b.style.margin="0";b.style.border="0";b.style.backgroundColor=this.navbar;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.navbar+"), color-stop(100%,"+this.navbar+"))";b.style.background="-moz-linear-gradient(top,"+this.navbar+"0%,"+this.navbar+"100%)";b.style.height="28px";c.push(b);
b=new f.ThemeClass("a");b.style.textDecoration="none";b.style.color=this.content;c.push(b);b=new f.ThemeClass("navlink");b.style.display="inline-block";b.style.padding="2px";b.style.color=this.content;c.push(b);b=new f.ThemeClass("primaryNav");b.style.color=this.navtext;b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.paddingTop="6px";b.style.verticalAlign="baseline";c.push(b);b=new f.ThemeClass("primaryNav a");b.style.fontSize="8pt";b.style.color=this.navtext;b.style.marginRight="6px";
b.style.marginLeft="6px";b.style.verticalAlign="baseline";b.style.textDecoration="none";c.push(b);b=new f.ThemeClass("primaryNav a:hover");b.style.color="#bfbfbf";b.style.cursor="hand";b.style.color="white";b.style.fontWeight="normal";c.push(b);for(var e in c)a+=c[e].toString();return a};e.prototype.writeLocationStyle=function(){var a="",c=[],b=new f.ThemeClass("titleArea");b.style.margin="0";b.style.paddingTop="5px";b.style.border="0";b.style.background=this.location;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+
this.location+"), color-stop(100%,"+this.location+"))";b.style.borderBottom="1px solid "+this.location;b.style.minHeight="20px";c.push(b);b=new f.ThemeClass("breadcrumb");b.style.fontSize="8pt";b.style.textDecoration="none";b.style.color=this.content;b.style.paddingTop="2px";c.push(b);b=new f.ThemeClass("a.breadcrumb:hover");b.style.textDecoration="none";b.style.borderBottom="1px dotted";b.style.color="#F58B0F";b.style.cursor="pointer";c.push(b);b=new f.ThemeClass("breadcrumbSeparator");b.style.fontSize=
"8pt";b.style.textDecoration="none";b.style.color=this.navbar;b.style.fontWeight="bold";c.push(b);b=new f.ThemeClass("currentLocation");b.style.fontWeight="bold";b.style.fontSize="8pt";b.style.color=this.navbar;b.style.textDecoration="none";b.style.textWrap="normal";b.style.lineHeight="10pt";c.push(b);b=new f.ThemeClass("a.currentLocation:hover");b.style.fontWeight="bold";b.style.fontSize="10pt";b.style.color="#666666";b.style.textDecoration="none";b.style.borderBottom="0";c.push(b);b=new f.ThemeClass("navlinkonpage");
b.style.color=this.content;c.push(b);for(var e in c)a+=c[e].toString();return a};e.prototype.writeButtonStyle=function(){var a="",c=[],b=new f.ThemeClass("commandButton");b.style.color="#222";b.style.border="1px solid #dedede";b.style.backgroundColor=this.button;b.style.textAlign="center";b.style.verticalAlign="baseline";b.style.cursor="pointer";b.style.display="inline-block";b.style.padding="6px";b.style.paddingTop="4px";b.style.borderRadius="1px";b.style.lineHeight="12px";b.style.fontSize="8pt";
b.style.userSelect="none";c.push(b);b=new f.ThemeClass("commandButton:over");b.style.backgroundColor="#e6e6e6";b.style.border="1px solid #808080";c.push(b);b=new f.ThemeClass("commandMenu");b.style.color="#222";b.style.display="inline-block";b.style.verticalAlign="baseline";b.style.margin="0";b.style.fontSize="8pt";b.style.fontWeight="normal";b.style.border="1px solid #dedede";b.style.backgroundColor="#efefef";b.style.cursor="pointer";b.style.borderRadius="1px";c.push(b);b=new f.ThemeClass("commandMenuItem");
b.style.border="0";b.style.padding="0";b.style.margin="0";c.push(b);for(var e in c)a+=c[e].toString();return a};e.prototype.writeMainStyle=function(){var a="",c=[],b=new f.ThemeClass("searchbox");b.style.backgroundImage="url(../images/core_sprites.png)";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="4px -297px";b.style.width="12px";b.style.height="12px";b.style.backgroundColor=this.search;b.style.border="1px solid "+this.search;b.style.fontSize="11px";b.style.width="15em";b.style.height=
"16px";b.style.borderRadius="10px";b.style.color="#999";b.style.padding="0";b.style.paddingLeft="20px";b.style.marginLeft="5px";b.style.marginTop="6px !important";b.style.font="7pt Lucida Sans Unicode,Lucida Grande,Verdana,Arial,Helvetica,Myriad,Tahoma,clean,sans-serif !important";c.push(b);b=new f.ThemeClass("searchbox:focus");b.style.color="white";b.style.outline="none";c.push(b);b=new f.ThemeClass("checkedRow");b.style.cssText="background-color:"+this.selection+" !important;";c.push(b);b=new f.ThemeClass("navbar-item-selected");
b.style.background=this.selection;b.style.color=this.content;c.push(b);b=new f.ThemeClass("auxpane");b.style.border="0";b.style.background=this.sidepanel;b.style.background="-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+this.sidepanel+"), color-stop(100%,"+this.sidepanel+"))";b.style.background="-moz-linear-gradient(top, "+this.sidepanel+" 0%, "+this.sidepanel+" 100%)";b.style.overflowX="auto";b.style.minWidth="200px";b.style.paddingTop="16px";c.push(b);b=new f.ThemeClass("mainpane");
b.style.background=this.mainpanel;b.style.border=0;c.push(b);b=new f.ThemeClass("mainToolbar");b.style.background=this.toolpanel;b.style.height="31px";b.style.borderBottom="1px solid #ebebeb";c.push(b);for(var e in c)a+=c[e].toString();return a};e.prototype.render=function(){console.log(this.writeNavigationStyle());console.log(this.writeLocationStyle());console.log(this.writeMainStyle());console.log(this.writeButtonStyle())};e.prototype.getSheet=function(a){a.navbar.value?(this.navbar=a.navbar.value,
this.button=a.button.value,this.location=a.location.value,this.selection=a.selection.value,this.sidepanel=a.sidepanel.value,this.mainpanel=a.mainpanel.value,this.navtext=a.navtext.value,this.search=a.search.value,this.content=a.content.value,this.toolpanel=a.toolpanel.value):(this.navbar=a.navbar,this.button=a.button,this.location=a.location,this.selection=a.selection,this.sidepanel=a.sidepanel,this.mainpanel=a.mainpanel,this.navtext=a.navtext,this.search=a.search,this.content=a.content,this.toolpanel=
a.toolpanel);return this.writeNavigationStyle()+this.writeLocationStyle()+this.writeMainStyle()+this.writeButtonStyle()};return{ThemeSheetWriter:e}});
define("orion/inputCompletion/inputCompletion",[],function(){function b(b,a,c){this._inputField=b;if(typeof this._inputField==="string")this._inputField=document.getElementById(this._inputField);this._binderFunc=a;(b=c?c.group:null)||(b=this._inputField.id?this._inputField.id:"default__input__group");this._completionIdPrefix=b+"__completion__";this._proposeFromStart=c?c.proposeFromStart:!1;this._extendedProvider=c?c.extendedProvider:null;this._proposalIndex=-1;this._dismissed=!0;this._mouseDown=!1;
this._initUI();var f=this;this._completionUIContainer.addEventListener("mousedown",function(){f._mouseDown=!0});this._completionUIContainer.addEventListener("mouseup",function(){f._mouseDown=!1});this._inputField.addEventListener("blur",function(){f._mouseDown?window.setTimeout(function(){f._inputField.focus()},200):f._dismiss()});this._inputField.addEventListener("keydown",function(a){f.onKeyDown(a)});this._inputField.addEventListener("input",function(){f._proposeOn(f._inputField.value)});this._inputField.addEventListener("focus",
function(){if(f._dismissed&&f._binderFunc)f._dismissing?f._dismissing=!1:f._binderFunc&&f._binderFunc(function(a){f._bind(a);f._proposeOn(f._inputField.value)})})}b.prototype.onKeyDown=function(b){if(this._dismissed)return!0;var a=b.charCode||b.keyCode;if(a===13){if(this._proposalList&&this._proposalList.length>0&&this._proposalIndex>=0&&this._proposalIndex<this._proposalList.length)return b.preventDefault(),this._dismiss(this._proposalList[this._proposalIndex].item.value),b.stopPropagation(),!1}else if((a===
40||a===38)&&this._proposalList&&this._proposalList.length>0)return b.preventDefault(),this._walk(a===40),b.stopPropagation(),!1;else if(a===27)return b.preventDefault(),this._dismiss(),!1;return!0};b.prototype._bind=function(b){this._dataList=b};b.prototype._getUIContainerID=function(){return this._completionIdPrefix+"UIContainer"};b.prototype._getUIProposalListId=function(){return this._completionIdPrefix+"UIProposalList"};b.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)};b.prototype._proposeOnCategory=function(b,a){if(a.length!==0){var c=this;if(b){var f=document.createElement("li");f.className="inputCompletionLICategory";var e=document.createTextNode(b);
f.appendChild(e);this._completionUL.appendChild(f)}for(var h=0;h<a.length;h++)f=document.createElement("li"),f.onmouseover=function(a){c._selectProposal(a.currentTarget)},f.onclick=function(a){c._dismiss(a.currentTarget.completionItem.value)},f.className="inputCompletionLINormal",f.completionItem=a[h],e=document.createTextNode(a[h].value),f.appendChild(e),this._completionUL.appendChild(f),this._proposalList.push({item:a[h],domNode:f})}};b.prototype._domNode2Index=function(b){for(var a=0;a<this._proposalList.length;a++)if(this._proposalList[a].domNode===
b)return a;return-1};b.prototype._highlight=function(b,a){var c=b,f=!1;isNaN(c)||(f=!0,c=this._proposalList&&b>=0&&b<this._proposalList.length?this._proposalList[b].domNode:null);if(c)c.className=a?"inputCompletionLISelected":"inputCompletionLINormal",a&&f&&(c.offsetTop<this._completionUIContainer.scrollTop?c.scrollIntoView(!0):c.offsetTop+c.offsetHeight>this._completionUIContainer.scrollTop+this._completionUIContainer.clientHeight&&c.scrollIntoView(!1))};b.prototype._selectProposal=function(b){var a=
b;isNaN(a)&&(a=this._domNode2Index(b));if(a!==this._proposalIndex)this._highlight(this._proposalIndex,!1),this._proposalIndex=a,this._highlight(this._proposalIndex,!0)};b.prototype._dismiss=function(b){if(!this._mouseDown){this._dismissed=!0;this._proposalList=null;this._proposalIndex=-1;if(b)this._inputField.value=b,this._dismissing=!0,this._inputField.focus();var a=this;window.setTimeout(function(){a._completionUIContainer.style.display="none"},200)}};b.prototype._show=function(){if(this._proposalList&&
this._proposalList.length>0){for(var b=0,a=0,c=this._inputField;c;)b+=c.offsetLeft,a+=c.offsetTop,c=c.offsetParent;this._completionUIContainer.style.display="block";this._completionUIContainer.style.top=a+this._inputField.offsetHeight+2+"px";this._completionUIContainer.style.left=b+"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"};b.prototype._walk=function(b){b=this._proposalIndex+(b?1:-1);b<-1?b=this._proposalList.length-1:b>=this._proposalList.length&&(b=-1);this._selectProposal(b)};b.prototype._proposeOnList=function(b,a,c){for(var f="",e=[],h=0;h<b.length;h++)if(b[h].type==="category")this._proposeOnCategory(f,e),f=b[h].label,e=[];else{var g=!0;if(a&&c){var j=b[h].value.toLowerCase().indexOf(a);j<0?g=!1:this._proposeFromStart&&(g=j===0)}g&&e.push(b[h])}this._proposeOnCategory(f,e)};b.prototype._proposeOn=function(b){this._completionUL.textContent=
"";var a=b?b.toLowerCase():null;this._proposalList=[];this._proposeOnList(this._dataList,a,!0);if(this._extendedProvider&&a){var c=this;this._extendedProvider(b,function(f){if(f)for(var e=0;e<f.length;e++)c._proposeOnList(f[e].proposals,f[e].filterForMe?a:b,f[e].filterForMe);c._show()},[])}else this._show()};b.prototype.constructor=b;return{InputCompletion:b}});
define("dojo/DeferredList",["dojo"],function(b){b.DeferredList=function(d,a,c,f){var e=[];b.Deferred.call(this);var h=this;d.length===0&&!a&&this.resolve([0,[]]);var g=0;b.forEach(d,function(b,k){function l(a,b){e[k]=[a,b];g++;g===d.length&&h.resolve(e)}b.then(function(b){a?h.resolve([k,b]):l(!0,b)},function(a){c?h.reject(a):l(!1,a);if(f)return null;throw a;})})};b.DeferredList.prototype=new b.Deferred;b.DeferredList.prototype.gatherResults=function(d){d=new b.DeferredList(d,!1,!0,!1);d.addCallback(function(a){var c=
[];b.forEach(a,function(a){c.push(a[1])});return c});return d};return b.DeferredList});define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
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:","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 if you prefer","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&#x2026;":"Populating favorites&#x2026;",Favorite:"Favorite","Searching&#x2026;":"Searching&#x2026;",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("text!dijit/templates/Dialog.html",[],function(){return'<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabIndex="-1">\n\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t</span>\n\t</div>\n\t\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>\n</div>'});
define("dojo/dnd/common",["dojo"],function(b){b.getObject("dnd",!0,b);b.dnd.getCopyKeyState=b.isCopyKey;b.dnd._uniqueId=0;b.dnd.getUniqueId=function(){var d;do d=b._scopeName+"Unique"+ ++b.dnd._uniqueId;while(b.byId(d));return d};b.dnd._empty={};b.dnd.isFormElement=function(b){b=b.target;if(b.nodeType==3)b=b.parentNode;return" button textarea input select option ".indexOf(" "+b.tagName.toLowerCase()+" ")>=0};return b.dnd});
define("dojo/dnd/autoscroll",["dojo","dojo/window"],function(b){b.getObject("dnd",!0,b);b.dnd.getViewport=b.window.getBox;b.dnd.V_TRIGGER_AUTOSCROLL=32;b.dnd.H_TRIGGER_AUTOSCROLL=32;b.dnd.V_AUTOSCROLL_VALUE=16;b.dnd.H_AUTOSCROLL_VALUE=16;b.dnd.autoScroll=function(d){var a=b.window.getBox(),c=0,f=0;if(d.clientX<b.dnd.H_TRIGGER_AUTOSCROLL)c=-b.dnd.H_AUTOSCROLL_VALUE;else if(d.clientX>a.w-b.dnd.H_TRIGGER_AUTOSCROLL)c=b.dnd.H_AUTOSCROLL_VALUE;if(d.clientY<b.dnd.V_TRIGGER_AUTOSCROLL)f=-b.dnd.V_AUTOSCROLL_VALUE;
else if(d.clientY>a.h-b.dnd.V_TRIGGER_AUTOSCROLL)f=b.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(c,f)};b.dnd._validNodes={div:1,p:1,td:1};b.dnd._validOverflow={auto:1,scroll:1};b.dnd.autoScrollNodes=function(d){for(var a=d.target;a;){if(a.nodeType==1&&a.tagName.toLowerCase()in b.dnd._validNodes){var c=b.getComputedStyle(a);if(c.overflow.toLowerCase()in b.dnd._validOverflow){var f=b._getContentBox(a,c),c=b.position(a,!0),e=Math.min(b.dnd.H_TRIGGER_AUTOSCROLL,f.w/2),h=Math.min(b.dnd.V_TRIGGER_AUTOSCROLL,
f.h/2),g=d.pageX-c.x,j=d.pageY-c.y,k=c=0;if(b.isWebKit||b.isOpera)g+=b.body().scrollLeft,j+=b.body().scrollTop;g>0&&g<f.w&&(g<e?c=-e:g>f.w-e&&(c=e));j>0&&j<f.h&&(j<h?k=-h:j>f.h-h&&(k=h));f=a.scrollLeft;e=a.scrollTop;a.scrollLeft+=c;a.scrollTop+=k;if(f!=a.scrollLeft||e!=a.scrollTop)return}}try{a=a.parentNode}catch(l){a=null}}b.dnd.autoScroll(d)};return b.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(b){b.declare("dojo.dnd.Mover",null,{constructor:function(d,a,c){this.node=b.byId(d);var f=a.touches?a.touches[0]:a;this.marginBox={l:f.pageX,t:f.pageY};this.mouseButton=a.button;a=this.host=c;d=d.ownerDocument;this.events=[b.connect(d,"onmousemove",this,"onFirstMove"),b.connect(d,"ontouchmove",this,"onFirstMove"),b.connect(d,"onmousemove",this,"onMouseMove"),b.connect(d,"ontouchmove",this,"onMouseMove"),b.connect(d,
"onmouseup",this,"onMouseUp"),b.connect(d,"ontouchend",this,"onMouseUp"),b.connect(d,"ondragstart",b.stopEvent),b.connect(d.body,"onselectstart",b.stopEvent)];if(a&&a.onMoveStart)a.onMoveStart(this)},onMouseMove:function(d){b.dnd.autoScroll(d);var a=this.marginBox,c=d.touches?d.touches[0]:d;this.host.onMove(this,{l:a.l+c.pageX,t:a.t+c.pageY},d);b.stopEvent(d)},onMouseUp:function(d){(b.isWebKit&&b.isMac&&this.mouseButton==2?d.button==0:this.mouseButton==d.button)&&this.destroy();b.stopEvent(d)},onFirstMove:function(d){var a=
this.node.style,c,f=this.host;switch(a.position){case "relative":case "absolute":c=Math.round(parseFloat(a.left))||0;a=Math.round(parseFloat(a.top))||0;break;default:a.position="absolute";a=b.marginBox(this.node);c=b.doc.body;var e=b.getComputedStyle(c),h=b._getMarginBox(c,e),e=b._getContentBox(c,e);c=a.l-(e.l-h.l);a=a.t-(e.t-h.t)}this.marginBox.l=c-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;if(f&&f.onFirstMove)f.onFirstMove(this,d);b.disconnect(this.events.shift());b.disconnect(this.events.shift())},
destroy:function(){b.forEach(this.events,b.disconnect);var d=this.host;if(d&&d.onMoveStop)d.onMoveStop(this);this.events=this.node=this.host=null}});return b.dnd.Mover});
define("dojo/dnd/Moveable",["dojo","dojo/dnd/Mover"],function(b){b.declare("dojo.dnd.Moveable",null,{handle:"",delay:0,skip:!1,constructor:function(d,a){this.node=b.byId(d);a||(a={});this.handle=a.handle?b.byId(a.handle):null;if(!this.handle)this.handle=this.node;this.delay=a.delay>0?a.delay:0;this.skip=a.skip;this.mover=a.mover?a.mover:b.dnd.Mover;this.events=[b.connect(this.handle,"onmousedown",this,"onMouseDown"),b.connect(this.handle,"ontouchstart",this,"onMouseDown"),b.connect(this.handle,"ondragstart",
this,"onSelectStart"),b.connect(this.handle,"onselectstart",this,"onSelectStart")]},markupFactory:function(d,a){return new b.dnd.Moveable(a,d)},destroy:function(){b.forEach(this.events,b.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(d){if(!this.skip||!b.dnd.isFormElement(d)){if(this.delay){this.events.push(b.connect(this.handle,"onmousemove",this,"onMouseMove"),b.connect(this.handle,"ontouchmove",this,"onMouseMove"),b.connect(this.handle,"onmouseup",this,"onMouseUp"),b.connect(this.handle,
"ontouchend",this,"onMouseUp"));var a=d.touches?d.touches[0]:d;this._lastX=a.pageX;this._lastY=a.pageY}else this.onDragDetected(d);b.stopEvent(d)}},onMouseMove:function(d){var a=d.touches?d.touches[0]:d;if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(d),this.onDragDetected(d);b.stopEvent(d)},onMouseUp:function(d){for(var a=0;a<2;++a)b.disconnect(this.events.pop());b.stopEvent(d)},onSelectStart:function(d){(!this.skip||!b.dnd.isFormElement(d))&&
b.stopEvent(d)},onDragDetected:function(b){new this.mover(this.node,b,this)},onMoveStart:function(d){b.publish("/dnd/move/start",[d]);b.addClass(b.body(),"dojoMove");b.addClass(this.node,"dojoMoveItem")},onMoveStop:function(d){b.publish("/dnd/move/stop",[d]);b.removeClass(b.body(),"dojoMove");b.removeClass(this.node,"dojoMoveItem")},onFirstMove:function(){},onMove:function(b,a){this.onMoving(b,a);var c=b.node.style;c.left=a.l+"px";c.top=a.t+"px";this.onMoved(b,a)},onMoving:function(){},onMoved:function(){}});
return b.dnd.Moveable});
define("dojo/dnd/move",["dojo","dojo/dnd/Mover","dojo/dnd/Moveable"],function(b){b.declare("dojo.dnd.move.constrainedMoveable",b.dnd.Moveable,{constraints:function(){},within:!1,markupFactory:function(d,a){return new b.dnd.move.constrainedMoveable(a,d)},constructor:function(b,a){a||(a={});this.constraints=a.constraints;this.within=a.within},onFirstMove:function(d){var a=this.constraintBox=this.constraints.call(this,d);a.r=a.l+a.w;a.b=a.t+a.h;this.within&&(d=b._getMarginSize(d.node),a.r-=d.w,a.b-=
d.h)},onMove:function(b,a){var c=this.constraintBox,f=b.node.style;this.onMoving(b,a);a.l=a.l<c.l?c.l:c.r<a.l?c.r:a.l;a.t=a.t<c.t?c.t:c.b<a.t?c.b:a.t;f.left=a.l+"px";f.top=a.t+"px";this.onMoved(b,a)}});b.declare("dojo.dnd.move.boxConstrainedMoveable",b.dnd.move.constrainedMoveable,{box:{},markupFactory:function(d,a){return new b.dnd.move.boxConstrainedMoveable(a,d)},constructor:function(b,a){var c=a&&a.box;this.constraints=function(){return c}}});b.declare("dojo.dnd.move.parentConstrainedMoveable",
b.dnd.move.constrainedMoveable,{area:"content",markupFactory:function(d,a){return new b.dnd.move.parentConstrainedMoveable(a,d)},constructor:function(d,a){var c=a&&a.area;this.constraints=function(){var a=this.node.parentNode,e=b.getComputedStyle(a),h=b._getMarginBox(a,e);if(c=="margin")return h;var d=b._getMarginExtents(a,e);h.l+=d.l;h.t+=d.t;h.w-=d.w;h.h-=d.h;if(c=="border")return h;d=b._getBorderExtents(a,e);h.l+=d.l;h.t+=d.t;h.w-=d.w;h.h-=d.h;if(c=="padding")return h;d=b._getPadExtents(a,e);h.l+=
d.l;h.t+=d.t;h.w-=d.w;h.h-=d.h;return h}}});b.dnd.constrainedMover=b.dnd.move.constrainedMover;b.dnd.boxConstrainedMover=b.dnd.move.boxConstrainedMover;b.dnd.parentConstrainedMover=b.dnd.move.parentConstrainedMover;return b.dnd.move});
define("dojo/dnd/TimedMoveable",["dojo","dojo/dnd/Moveable"],function(b){(function(){var d=b.dnd.Moveable.prototype.onMove;b.declare("dojo.dnd.TimedMoveable",b.dnd.Moveable,{timeout:40,constructor:function(a,b){b||(b={});if(b.timeout&&typeof b.timeout=="number"&&b.timeout>=0)this.timeout=b.timeout},markupFactory:function(a,c){return new b.dnd.TimedMoveable(c,a)},onMoveStop:function(a){a._timer&&(clearTimeout(a._timer),d.call(this,a,a._leftTop));b.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},
onMove:function(a,b){a._leftTop=b;if(!a._timer){var f=this;a._timer=setTimeout(function(){a._timer=null;d.call(f,a,a._leftTop)},this.timeout)}}})})();return b.dnd.TimedMoveable});
define("dojo/fx/Toggler",["dojo"],function(b){b.declare("dojo.fx.Toggler",null,{node:null,showFunc:b.fadeIn,hideFunc:b.fadeOut,showDuration:200,hideDuration:200,constructor:function(d){b.mixin(this,d);this.node=d.node;this._showArgs=b.mixin({},d);this._showArgs.node=this.node;this._showArgs.duration=this.showDuration;this.showAnim=this.showFunc(this._showArgs);this._hideArgs=b.mixin({},d);this._hideArgs.node=this.node;this._hideArgs.duration=this.hideDuration;this.hideAnim=this.hideFunc(this._hideArgs);
b.connect(this.showAnim,"beforeBegin",b.hitch(this.hideAnim,"stop",!0));b.connect(this.hideAnim,"beforeBegin",b.hitch(this.showAnim,"stop",!0))},show:function(b){return this.showAnim.play(b||0)},hide:function(b){return this.hideAnim.play(b||0)}});return b.fx.Toggler});
define("dojo/fx",["dojo","dojo/fx/Toggler"],function(b){(function(){var d={_fire:function(a,b){this[a]&&this[a].apply(this,b||[]);return this}},a=function(a){this._index=-1;this._animations=a||[];this._current=this._onAnimateCtx=this._onEndCtx=null;this.duration=0;b.forEach(this._animations,function(a){this.duration+=a.duration;a.delay&&(this.duration+=a.delay)},this)};b.extend(a,{_onAnimate:function(){this._fire("onAnimate",arguments)},_onEnd:function(){b.disconnect(this._onAnimateCtx);b.disconnect(this._onEndCtx);
this._onAnimateCtx=this._onEndCtx=null;this._index+1==this._animations.length?this._fire("onEnd"):(this._current=this._animations[++this._index],this._onAnimateCtx=b.connect(this._current,"onAnimate",this,"_onAnimate"),this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd"),this._current.play(0,!0))},play:function(a,c){if(!this._current)this._current=this._animations[this._index=0];if(!c&&this._current.status()=="playing")return this;var h=b.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin")}),
d=b.connect(this._current,"onBegin",this,function(a){this._fire("onBegin",arguments)}),j=b.connect(this._current,"onPlay",this,function(a){this._fire("onPlay",arguments);b.disconnect(h);b.disconnect(d);b.disconnect(j)});this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onAnimateCtx=b.connect(this._current,"onAnimate",this,"_onAnimate");this._onEndCtx&&b.disconnect(this._onEndCtx);this._onEndCtx=b.connect(this._current,"onEnd",this,"_onEnd");this._current.play.apply(this._current,arguments);
return this},pause:function(){if(this._current){var a=b.connect(this._current,"onPause",this,function(c){this._fire("onPause",arguments);b.disconnect(a)});this._current.pause()}return this},gotoPercent:function(a,c){this.pause();var h=this.duration*a;this._current=null;b.some(this._animations,function(a){if(a.duration<=h)return this._current=a,!0;h-=a.duration;return!1});this._current&&this._current.gotoPercent(h/this._current.duration,c);return this},stop:function(a){if(this._current){if(a){for(;this._index+
1<this._animations.length;++this._index)this._animations[this._index].stop(!0);this._current=this._animations[this._index]}var c=b.connect(this._current,"onStop",this,function(a){this._fire("onStop",arguments);b.disconnect(c)});this._current.stop()}return this},status:function(){return this._current?this._current.status():"stopped"},destroy:function(){this._onAnimateCtx&&b.disconnect(this._onAnimateCtx);this._onEndCtx&&b.disconnect(this._onEndCtx)}});b.extend(a,d);b.fx.chain=function(b){return new a(b)};
var c=function(a){this._animations=a||[];this._connects=[];this.duration=this._finished=0;b.forEach(a,function(a){var c=a.duration;a.delay&&(c+=a.delay);if(this.duration<c)this.duration=c;this._connects.push(b.connect(a,"onEnd",this,"_onEnd"))},this);this._pseudoAnimation=new b.Animation({curve:[0,1],duration:this.duration});var c=this;b.forEach("beforeBegin,onBegin,onPlay,onAnimate,onPause,onStop,onEnd".split(","),function(a){c._connects.push(b.connect(c._pseudoAnimation,a,function(){c._fire(a,arguments)}))})};
b.extend(c,{_doAction:function(a,c){b.forEach(this._animations,function(b){b[a].apply(b,c)});return this},_onEnd:function(){++this._finished>this._animations.length&&this._fire("onEnd")},_call:function(a,b){var c=this._pseudoAnimation;c[a].apply(c,b)},play:function(a,b){this._finished=0;this._doAction("play",arguments);this._call("play",arguments);return this},pause:function(){this._doAction("pause",arguments);this._call("pause",arguments);return this},gotoPercent:function(a,c){var h=this.duration*
a;b.forEach(this._animations,function(a){a.gotoPercent(a.duration<h?1:h/a.duration,c)});this._call("gotoPercent",arguments);return this},stop:function(a){this._doAction("stop",arguments);this._call("stop",arguments);return this},status:function(){return this._pseudoAnimation.status()},destroy:function(){b.forEach(this._connects,b.disconnect)}});b.extend(c,d);b.fx.combine=function(a){return new c(a)};b.fx.wipeIn=function(a){var c=a.node=b.byId(a.node),h=c.style,d,a=b.animateProperty(b.mixin({properties:{height:{start:function(){d=
h.overflow;h.overflow="hidden";if(h.visibility=="hidden"||h.display=="none")return h.height="1px",h.display="",h.visibility="",1;else{var a=b.style(c,"height");return Math.max(a,1)}},end:function(){return c.scrollHeight}}}},a));b.connect(a,"onEnd",function(){h.height="auto";h.overflow=d});return a};b.fx.wipeOut=function(a){var c=(a.node=b.byId(a.node)).style,h,a=b.animateProperty(b.mixin({properties:{height:{end:1}}},a));b.connect(a,"beforeBegin",function(){h=c.overflow;c.overflow="hidden";c.display=
""});b.connect(a,"onEnd",function(){c.overflow=h;c.height="auto";c.display="none"});return a};b.fx.slideTo=function(a){var c=null,h=null,d=function(a){return function(){var f=b.getComputedStyle(a),d=f.position;c=d=="absolute"?a.offsetTop:parseInt(f.top)||0;h=d=="absolute"?a.offsetLeft:parseInt(f.left)||0;if(d!="absolute"&&d!="relative")f=b.position(a,!0),c=f.y,h=f.x,a.style.position="absolute",a.style.top=c+"px",a.style.left=h+"px"}}(a.node=b.byId(a.node));d();a=b.animateProperty(b.mixin({properties:{top:a.top||
0,left:a.left||0}},a));b.connect(a,"beforeBegin",a,d);return a}})();return b.fx});
define("dijit/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(b,d){b.declare("dijit.DialogUnderlay",[d._Widget,d._Templated],{templateString:"<div class='dijitDialogUnderlayWrapper'><div class='dijitDialogUnderlay' dojoAttachPoint='node'></div></div>",dialogId:"","class":"",attributeMap:{id:"domNode"},_setDialogIdAttr:function(a){b.attr(this.node,"id",a+"_underlay");this._set("dialogId",a)},_setClassAttr:function(a){this.node.className="dijitDialogUnderlay "+
a;this._set("class",a)},postCreate:function(){b.body().appendChild(this.domNode)},layout:function(){var a=this.node.style,c=this.domNode.style;c.display="none";var f=b.window.getBox();c.top=f.t+"px";c.left=f.l+"px";a.width=f.w+"px";a.height=f.h+"px";c.display="block"},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new d.BackgroundIframe(this.domNode)},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none"}});return d.DialogUnderlay});
define("dijit/nls/common",{root:{buttonOk:"OK",buttonCancel:"Cancel",buttonSave:"Save",itemClose:"Close"},zh:!0,"zh-tw":!0,tr:!0,th:!0,sv:!0,sl:!0,sk:!0,ru:!0,ro:!0,pt:!0,"pt-pt":!0,pl:!0,nl:!0,nb:!0,ko:!0,kk:!0,ja:!0,it:!0,hu:!0,he:!0,fr:!0,fi:!0,es:!0,el:!0,de:!0,da:!0,cs:!0,ca:!0,ar:!0});
define("dijit/Dialog","dojo,dijit,text!dijit/templates/Dialog.html,dojo/dnd/move,dojo/dnd/TimedMoveable,dojo/fx,dojo/window,dijit/_Widget,dijit/_Templated,dijit/_CssStateMixin,dijit/form/_FormMixin,dijit/_DialogMixin,dijit/DialogUnderlay,dijit/layout/ContentPane,i18n!dijit/nls/common,dijit/TooltipDialog".split(","),function(b,d){b.declare("dijit._DialogBase",[d._Templated,d.form._FormMixin,d._DialogMixin,d._CssStateMixin],{templateString:b.cache("dijit","templates/Dialog.html"),baseClass:"dijitDialog",
cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:b.delegate(d._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:!1,duration:d.defaultDuration,refocus:!0,autofocus:!0,_firstFocusItem:null,_lastFocusItem:null,doLayout:!1,draggable:!0,"aria-describedby":"",postMixInProperties:function(){var a=b.i18n.getLocalization("dijit","common");b.mixin(this,a);this.inherited(arguments)},postCreate:function(){b.style(this.domNode,
{display:"none",position:"absolute"});b.body().appendChild(this.domNode);this.inherited(arguments);this.connect(this,"onExecute","hide");this.connect(this,"onCancel","hide");this._modalconnects=[]},onLoad:function(){this._position();this.autofocus&&d._DialogLevelManager.isTop(this)&&(this._getFocusItems(this.domNode),d.focus(this._firstFocusItem));this.inherited(arguments)},_endDrag:function(a){if(a&&a.node&&a.node===this.domNode)this._relativePosition=b.position(a.node)},_setup:function(){var a=
this.domNode;this.titleBar&&this.draggable?(this._moveable=b.isIE==6?new b.dnd.TimedMoveable(a,{handle:this.titleBar}):new b.dnd.Moveable(a,{handle:this.titleBar,timeout:0}),this._dndListener=b.subscribe("/dnd/move/stop",this,"_endDrag")):b.addClass(a,"dijitDialogFixed");this.underlayAttrs={dialogId:this.id,"class":b.map(this["class"].split(/\s/),function(a){return a+"_underlay"}).join(" ")}},_size:function(){this._checkIfSingleChild();if(this._singleChild){if(this._singleChildOriginalStyle)this._singleChild.domNode.style.cssText=
this._singleChildOriginalStyle;delete this._singleChildOriginalStyle}else b.style(this.containerNode,{width:"auto",height:"auto"});var a=b._getMarginSize(this.domNode),c=b.window.getBox();if(a.w>=c.w||a.h>=c.h){var f=Math.min(a.w,Math.floor(c.w*0.75)),a=Math.min(a.h,Math.floor(c.h*0.75));this._singleChild&&this._singleChild.resize?(this._singleChildOriginalStyle=this._singleChild.domNode.style.cssText,this._singleChild.resize({w:f,h:a})):b.style(this.containerNode,{width:f+"px",height:a+"px",overflow:"auto",
position:"relative"})}else this._singleChild&&this._singleChild.resize&&this._singleChild.resize()},_position:function(){if(!b.hasClass(b.body(),"dojoMove")){var a=this.domNode,c=b.window.getBox(),f=this._relativePosition,e=f?null:b._getBorderBox(a);b.style(a,{left:Math.floor(c.l+(f?f.x:(c.w-e.w)/2))+"px",top:Math.floor(c.t+(f?f.y:(c.h-e.h)/2))+"px"})}},_onKey:function(a){if(a.charOrCode){var c=b.keys,f=a.target;a.charOrCode===c.TAB&&this._getFocusItems(this.domNode);var e=this._firstFocusItem==this._lastFocusItem;
if(f==this._firstFocusItem&&a.shiftKey&&a.charOrCode===c.TAB)e||d.focus(this._lastFocusItem),b.stopEvent(a);else if(f==this._lastFocusItem&&a.charOrCode===c.TAB&&!a.shiftKey)e||d.focus(this._firstFocusItem),b.stopEvent(a);else{for(;f;){if(f==this.domNode||b.hasClass(f,"dijitPopup"))if(a.charOrCode==c.ESCAPE)this.onCancel();else return;f=f.parentNode}if(a.charOrCode!==c.TAB)b.stopEvent(a);else if(!b.isOpera)try{this._firstFocusItem.focus()}catch(h){}}}},show:function(){if(!this.open){this._started||
this.startup();if(!this._alreadyInitialized)this._setup(),this._alreadyInitialized=!0;this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._modalconnects.push(b.connect(window,"onscroll",this,"layout"));this._modalconnects.push(b.connect(window,"onresize",this,function(){var a=b.window.getBox();if(!this._oldViewport||a.h!=this._oldViewport.h||a.w!=this._oldViewport.w)this.layout(),this._oldViewport=a}));this._modalconnects.push(b.connect(this.domNode,"onkeypress",this,"_onKey"));b.style(this.domNode,
{opacity:0,display:""});this._set("open",!0);this._onShow();this._size();this._position();var a;this._fadeInDeferred=new b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeInDeferred}));a=b.fadeIn({node:this.domNode,duration:this.duration,beforeBegin:b.hitch(this,function(){d._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:b.hitch(this,function(){this.autofocus&&d._DialogLevelManager.isTop(this)&&(this._getFocusItems(this.domNode),d.focus(this._firstFocusItem));this._fadeInDeferred.callback(!0);
delete this._fadeInDeferred})}).play();return this._fadeInDeferred}},hide:function(){if(this._alreadyInitialized){this._fadeInDeferred&&this._fadeInDeferred.cancel();var a;this._fadeOutDeferred=new b.Deferred(b.hitch(this,function(){a.stop();delete this._fadeOutDeferred}));a=b.fadeOut({node:this.domNode,duration:this.duration,onEnd:b.hitch(this,function(){this.domNode.style.display="none";d._DialogLevelManager.hide(this);this.onHide();this._fadeOutDeferred.callback(!0);delete this._fadeOutDeferred})}).play();
if(this._scrollConnected)this._scrollConnected=!1;b.forEach(this._modalconnects,b.disconnect);this._modalconnects=[];this._relativePosition&&delete this._relativePosition;this._set("open",!1);return this._fadeOutDeferred}},layout:function(){this.domNode.style.display!="none"&&(d._underlay&&d._underlay.layout(),this._position())},destroy:function(){this._fadeInDeferred&&this._fadeInDeferred.cancel();this._fadeOutDeferred&&this._fadeOutDeferred.cancel();this._moveable&&this._moveable.destroy();this._dndListener&&
b.unsubscribe(this._dndListener);b.forEach(this._modalconnects,b.disconnect);d._DialogLevelManager.hide(this);this.inherited(arguments)}});b.declare("dijit.Dialog",[d.layout.ContentPane,d._DialogBase],{});d._DialogLevelManager={show:function(a,c){var f=d._dialogStack;f[f.length-1].focus=d.getFocus(a);var e=d._underlay;!e||e._destroyed?e=d._underlay=new d.DialogUnderlay(c):e.set(a.underlayAttrs);var h=f[f.length-1].dialog?f[f.length-1].zIndex+2:950;f.length==1&&e.show();b.style(d._underlay.domNode,
"zIndex",h-1);b.style(a.domNode,"zIndex",h);f.push({dialog:a,underlayAttrs:c,zIndex:h})},hide:function(a){var c=d._dialogStack;if(c[c.length-1].dialog==a){c.pop();var f=c[c.length-1];c.length==1?d._underlay._destroyed||d._underlay.hide():(b.style(d._underlay.domNode,"zIndex",f.zIndex-1),d._underlay.set(f.underlayAttrs));if(a.refocus){c=f.focus;if(!c||f.dialog&&!b.isDescendant(c.node,f.dialog.domNode))f.dialog._getFocusItems(f.dialog.domNode),c=f.dialog._firstFocusItem;try{d.focus(c)}catch(e){}}}else f=
b.indexOf(b.map(c,function(a){return a.dialog}),a),f!=-1&&c.splice(f,1)},isTop:function(a){var b=d._dialogStack;return b[b.length-1].dialog==a}};d._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return d.Dialog});
define("orion/widgets/_OrionDialogMixin",["i18n!orion/widgets/nls/messages","dojo","dijit"],function(b,d,a){return d.declare("orion.widgets._OrionDialogMixin",null,{postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||b["Information Needed"];this.buttonCancel=b.Cancel},postCreate:function(){this.inherited(arguments);d.connect(this,"onKeyPress",d.hitch(this,function(a){a.keyCode===d.keys.ENTER&&this._onSubmit()}))},onHide:function(){this.inherited(arguments);setTimeout(d.hitch(this,
function(){if(d.isDescendant(a._curFocus,this.domNode))a._curFocus=null;if(d.isDescendant(a._prevFocus,this.domNode))a._prevFocus=null;this.destroyRecursive()}),this.duration)}})});define("text!orion/widgets/templates/OpenResourceDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" title="${title}" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<div style="display:table" role="search">\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<label for="findfileSearchBox" style="padding-right:10">${selectFile}</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<input id="findfileSearchBox" type="text" dojoType="dijit.form.TextBox" dojoAttachPoint="resourceName" \n\t\t\t\t\t\tplaceHolder="${searchPlaceHolder}"\n\t\t\t\t\t\tintermediateChanges="true"  style="width:32em;">\n\t\t\t\t</div>\n\t\t\t\t<div style="display:table-cell; padding:0" id="crawlingProgress">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="favresults" style="max-height:400px; height:auto; overflow-y:auto;"></div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="results" style="max-height:400px; height:auto; overflow-y:auto;" aria-live="off"></div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="statusbar" style="display:table-cell;"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/widgets/UserMenuDropDown",["require","dojo","dijit","dijit/form/DropDownButton"],function(b,d,a){d.declare("orion.widgets.UserMenuDropDown",[a.form.DropDownButton],{templateString:'<span class="dijit dijitReset dijitInline" style="padding-top: 3px;"><span class="primaryNav" dojoAttachEvent="ondijitclick:_onButtonClick" dojoAttachPoint="_buttonNode"><span class="dijitReset dijitStretch dijitButtonContents" dojoAttachPoint="focusNode,titleNode,_arrowWrapperNode"  role="button" aria-haspopup="true" aria-labelledby="${id}_label"><span class="dijitReset dijitInline dijitIcon" dojoAttachPoint="iconNode"></span><span class="dijitReset dijitInline dijitButtonText" dojoAttachPoint="containerNode,_popupStateNode" id="${id}_label" style="padding-right:3px"></span><span class="dijitReset dijitInline dijitArrowButtonInner"></span><span class="dijitReset dijitInline dijitArrowButtonChar">&#9660;</span></span></span><input ${!nameAttrSetting} type="${type}" value="${value}" class="dijitOffScreen" dojoAttachPoint="valueNode"/></span>'})});
define("orion/treetable",["i18n!orion/nls/messages","dojo"],function(b,d){function a(a){this._init(a)}a.prototype={_init:function(a){var f=a.parent,e=this;typeof f==="string"&&(f=d.byId(f));if(!f)throw b["no parent"];if(!a.model)throw b["no tree model"];if(!a.renderer)throw b["no renderer"];this._parent=f;this._treeModel=a.model;this._renderer=a.renderer;this._showRoot=a.showRoot===void 0?!1:a.showRoot;this._indent=a.indent===void 0?16:a.indent;this._onCollapse=a.onCollapse;this._labelColumnIndex=
a.labelColumnIndex===void 0?0:a.labelColumnIndex;this._id=a.id===void 0?"treetable":a.id;this._tableStyle=a.tableStyle;this._tableElement=a.tableElement||"table";this._tableBodyElement=a.tableBodyElement||"tbody";this._tableRowElement=a.tableRowElement||"tr";this._root=this._treeModel.getRoot(function(a){e._showRoot?(a._depth=0,e._generate([a],0)):e._treeModel.getChildren(a,function(a){e._generate(a,0)})})},_generate:function(a,b){d.empty(this._parent);var e=document.createElement(this._tableElement);
e.id=this._id;this._tableStyle&&d.addClass(e,this._tableStyle);this._renderer.initTable(e,this);var h=document.createElement(this._tableBodyElement);h.id=this._id+"tbody";this._generateChildren(a,b,h,"last");e.appendChild(h);this._parent.appendChild(e);this._rowsChanged()},_generateChildren:function(a,b,e,h){for(var g=0;g<a.length;g++){var j=document.createElement(this._tableRowElement);j.id=this._treeModel.getId(a[g]);j._depth=b;j._item=a[g];this._renderer.render(a[g],j);d.style(j.childNodes[this._labelColumnIndex],
"paddingLeft",this._indent*b+"px");d.place(j,e,h);h==="after"&&(e=j)}},_rowsChanged:function(){this._renderer.rowsChanged&&this._renderer.rowsChanged()},getSelected:function(){return this._renderer.getSelected()},refresh:function(a,f,e){var h=this._treeModel.getId(a),g;if(h===this._id)this._removeChildRows(h),this._generateChildren(f,0,d.byId(h+"tbody"),"last"),this._rowsChanged();else{var j=d.byId(h);j?(j._item=a,j&&(e||j._expanded)?(j._expanded=!0,this._removeChildRows(h),this._renderer.updateExpandVisuals(j,
!0),f?(this._generateChildren(f,j._depth+1,j,"after"),this._rowsChanged()):(g=this,f=this._treeModel.getChildren(j._item,function(a){g._generateChildren(a,j._depth+1,j,"after");g._rowsChanged()}))):this._renderer.updateExpandVisuals(j,!1)):console.log(b["could not find table row "]+h)}},getItem:function(a){if(typeof a==="string"){var b=d.byId(a);if(b)return b._item}return a._item?a._item:a},toggle:function(a){var b=d.byId(a);b&&(b._expanded?(this.collapse(a),this._renderer.updateExpandVisuals(b,!1)):
(this.expand(a),this._renderer.updateExpandVisuals(b,!0)))},isExpanded:function(a){return(a=d.byId(a))?a._expanded:!1},expand:function(a,b,e){var a=typeof a==="string"?a:this._treeModel.getId(a),h=d.byId(a);if(h&&!h._expanded){h._expanded=!0;var g=this;this._renderer.updateExpandVisuals(h,!0);this._treeModel.getChildren(h._item,function(a){g._generateChildren(a,h._depth+1,h,"after");g._rowsChanged();b&&b.apply(g,e)})}},_removeChildRows:function(a){var b=a===this._id,e=!1,h=-1,g=[];d.query(".treeTableRow",
this._parent).forEach(function(d){if(!e)if(b)d._depth>h?g.push(d):e=!0;else if(d.id===a)b=!0,h=d._depth});for(var j=0;j<g.length;j++){var k=g[j];k.parentNode.removeChild(k)}},collapse:function(a){var a=typeof a==="string"?a:this._treeModel.getId(a),b=d.byId(a);if(b){if(!b._expanded)return;b._expanded=!1;this._renderer.updateExpandVisuals(b,!1);this._removeChildRows(a);this._rowsChanged()}this._onCollapse&&this._onCollapse(b._item)}};a.prototype.constructor=a;return{TableTree:a}});
define("orion/treeModelIterator",[],function(){var b={};b.TreeModelIterator=function(){function b(a,c){this.firstLevelChildren=a;this.reset();this._init(c)}b.prototype={_init:function(a){if(a)this.isExpanded=a.isExpanded,this.isExpandable=a.isExpandable,this.forceExpandFunc=a.forceExpandFunc},topLevel:function(a){return a.parent?a.parent===this.root:!0},_expanded:function(a){if(!a)return!0;var b=a.children&&a.children.length>0;this.isExpanded&&b&&(b=this.isExpanded(a));return b},_expandable:function(a){return!a?
!0:this.isExpandable?this.isExpandable(a):!1},_diveIn:function(a){return this._expanded(a)?(this.setCursor(a.children[0]),this.cursor()):null},_drillToLast:function(a){return this._expanded(a)?this._drillToLast(a.children[a.children.length-1]):a},_forward:function(a){var b=this._diveIn(this._cursor);if(!b){if(a&&this._expandable(this._cursor)&&this.forceExpandFunc){var f=this;return this.forceExpandFunc(this._cursor,"first",function(a){mdoel&&f.setCursor(a)})}(b=this._findSibling(this._cursor,!0))&&
this.setCursor(b)}return b},_backward:function(a){var b=this._findSibling(this._cursor,!1);b&&b!==this._cursor.parent&&(b=this._drillToLast(b));if(a&&b&&this._expandable(b)&&this.forceExpandFunc&&b!==this._cursor.parent)return this.forceExpandFunc(b,"last",function(a){mdoel&&that.setCursor(a)});b&&this.setCursor(b);return b},_findSibling:function(a,b){for(var f=this.topLevel(a),e=f?this.firstLevelChildren:a.parent.children,h=0;h<e.length;h++)if(e[h]===a)return h===0&&!b?f?null:a.parent:h===e.length-
1&&b?f?null:this._findSibling(a.parent,b):b?e[h+1]:e[h-1];return null},_inParentChain:function(a,b){for(var f=a.parent;f;){if(f===b)return!0;f=f.parent}return!1},_getTopLevelParent:function(a){if(this.topLevel(a))return a;for(a=a.parent;a;){if(this.topLevel(a))return a;a=a.parent}return null},_onCollapse:function(a){return this._expanded(a.parent)?a:this._onCollapse(a.parent)},_scan:function(a,b,f){this.setCursor(b);var e=[];for(e.push(b);;){if(this.iterate(a))e.push(this.cursor());else break;if(f===
this.cursor())return e}return null},setCursor:function(a){this._prevCursor=this._cursor;this._cursor=a},setTree:function(a){this.firstLevelChildren=a;if(this.firstLevelChildren.length>0)this.root=this.firstLevelChildren[0].parent},scan:function(a,b){var f=this.cursor(),e=this._scan(!0,a,b);e||(e=this._scan(!1,a,b));this.setCursor(f);return e},iterate:function(a,b){return a?this._forward(b):this._backward(b)},iterateOnTop:function(a,b){var f=this._findSibling(this._getTopLevelParent(this.cursor()),
a);f?this.setCursor(f):b&&this.firstLevelChildren.length>0&&this.setCursor(a?this.firstLevelChildren[0]:this.firstLevelChildren[this.firstLevelChildren.length-1])},collapse:function(a){return this._inParentChain(this._cursor,a)?(this.setCursor(a),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 b}();return b});
define("orion/explorers/explorerNavHandler",["i18n!orion/nls/messages","dojo","orion/treeModelIterator"],function(b,d,a){var b={},c=navigator.userAgent.indexOf("iPad")!==-1,f=window.navigator.platform.indexOf("Mac")!==-1;b.ExplorerNavHandler=function(){function b(c,f,e){this.explorer=c;this.model=this.explorer.model;this._navDict=f;this._listeners=[];this._selections=[];this._currentColumn=0;var k=this._getEventListeningDiv();d.attr(k,"tabIndex",0);d.addClass(k,"selectionModelContainer");this._modelIterator=
new a.TreeModelIterator([],{isExpanded:d.hitch(this,function(a){return this.isExpanded(a)}),isExpandable:this.explorer.renderer.isExpandable?d.hitch(this,function(a){return this.explorer.renderer.isExpandable(a)}):d.hitch(this,function(a){return this.isExpandable(a)}),forceExpandFunc:this.explorer.forceExpandFunc?d.hitch(this,function(a,b,c){return this.explorer.forceExpandFunc(a,b,c)}):void 0});this._init(e);(!e||e.setFocus!==!1)&&k.focus();this._listeners.push(d.connect(k,"onkeydown",d.hitch(this,
function(a){if(a.target){if(a.target!==k)return!0}else if(a.srcElement&&a.srcElement!==k)return!0;if(this.explorer.preventDefaultFunc&&this.explorer.preventDefaultFunc(a,this._modelIterator.cursor()))return!0;if(a.keyCode===d.keys.DOWN_ARROW)return this.onDownArrow(a);else if(a.keyCode===d.keys.UP_ARROW)return this.onUpArrow(a);else if(a.keyCode===d.keys.RIGHT_ARROW)return this.onRightArrow(a);else if(a.keyCode===d.keys.LEFT_ARROW)return this.onLeftArrow(a);else if(a.keyCode===d.keys.SPACE)return this.onSpace(a);
else if(a.keyCode===d.keys.ENTER)return this.onEnter(a)})));c=d.connect(k,"onblur",d.hitch(this,function(){if(this.explorer.onFocus)this.explorer.onFocus(!1);else this.toggleCursor(null,!1)}));f=d.connect(k,"onfocus",d.hitch(this,function(){if(this.explorer.onFocus)this.explorer.onFocus(!0);else this.toggleCursor(null,!0)}));this._listeners.push(c);this._listeners.push(f)}b.prototype={_init:function(a){this._linearGridMove=!1;if(a)this._selectionPolicy=a.selectionPolicy,this.preventDefaultFunc=a.preventDefaultFunc,
this.postDefaultFunc=a.postDefaultFunc},_ctrlKeyOn:function(a){return f?a.metaKey:a.ctrlKey},removeListeners:function(){if(this._listeners)for(var a=0;a<this._listeners.length;a++)d.disconnect(this._listeners[a])},focus:function(){var a=this._getEventListeningDiv();a&&a.focus()},_getEventListeningDiv:function(a){return this.explorer.keyEventListeningDiv&&typeof this.explorer.keyEventListeningDiv==="function"?this.explorer.keyEventListeningDiv(a):d.byId(this.explorer._parentId)},isExpandable:function(a){return!a?
!1:d.byId(this.explorer.renderer.expandCollapseImageId(this.model.getId(a)))?!0:!1},isExpanded:function(a){return!a?!1:this.explorer.myTree.isExpanded(this.model.getId(a))},refreshSelection:function(a){var b=this;this.explorer.selection&&this.explorer.selection.getSelections(function(c){b._clearSelection();for(var f=0;f<c.length;f++)b._selections.push(c[f]);b._selections.length>0&&b.cursorOn(b._selections[0],!0,!1,a)})},refreshModel:function(a,b,c,f){this._currentColumn=0;this.topIterationNodes=[];
this.model=b;this._navDict=a;if(this.model.getTopIterationNodes)this.topIterationNodes=this.model.getTopIterationNodes();else if(c)this.topIterationNodes=c;this._modelIterator.setTree(this.topIterationNodes);!f&&this.explorer.selection&&this._modelIterator.reset();this.refreshSelection(!0)},getTopLevelNodes:function(){return this._modelIterator.firstLevelChildren},_inSelection:function(a){for(var b=0;b<this._selections.length;b++)if(a===this._selections[b])return b;return-1},_clearSelection:function(a){if(a)for(a=
0;a<this._selections.length;a++)this._checkRow(this._selections[a],!0);this._selections=[]},setSelection:function(a,b){if(this._selectionPolicy==="cursorOnly")b&&this.explorer.renderer._useCheckboxSelection&&this._checkRow(a,!0);else if(this._isRowSelectable(a)){if(!b||this._selectionPolicy==="singleSelection")this._clearSelection(!0),this._checkRow(a,!1),this._selections.push(a),this._lastSelection=a;else{var c=this._inSelection(a);c>=0?(this._checkRow(a,!0),this._selections.splice(c,1)):(this._checkRow(a,
!1),this._selections.push(a),this._lastSelection=a)}this.explorer.selection&&(this.explorer.renderer.storeSelections(),this.explorer.selection.setSelections(this._selections))}},moveColumn:function(a,b){a||(a=this.currentModel());var c=this._getGridChildren(a);if(c&&c.length>1||b===0&&c){b!==0&&this.toggleCursor(a,!1);var f=this._currentColumn,e=!0;f+=b;f<0?(this._linearGridMove&&b!==0&&(this._modelIterator.iterate(!1)?a=this.currentModel():e=!1),f=e?c.length-1:this._currentColumn):f>=c.length&&(this._linearGridMove&&
b!==0&&(this._modelIterator.iterate(!0)?a=this.currentModel():e=!1),f=e?0:this._currentColumn);this._currentColumn=f;b!==0&&this.toggleCursor(a,!0);return!0}return!1},_getGridChildren:function(a){return this._navDict?this._navDict.getGridNavHolder(a):null},getCurrentGrid:function(a){a||(a=this.currentModel());return(a=this._getGridChildren(a))&&a.length>0?a[this._currentColumn]:null},toggleCursor:function(a,b){var c=this.getRowDiv(a),f=this.getCurrentGrid(a);f?(c&&d.toggleClass(c,"treeIterationCursorRow",
b),f.domNode&&d.toggleClass(f.domNode,"treeIterationCursor",b)):c&&d.toggleClass(c,"treeIterationCursorRow_Dotted",b)},currentModel:function(){return this._modelIterator.cursor()},cursorOn:function(a,b,c,f){var c=c===void 0?!1:c,e,d;if(a||b){if(d===this._modelIterator.cursor())return;e=this._modelIterator.cursor();d=a;this._modelIterator.setCursor(d)}else e=this._modelIterator.prevCursor(),d=this._modelIterator.cursor();if(e!==d||b)if(this.toggleCursor(e,!1),!b||d)if(this.moveColumn(null,0),this.toggleCursor(d,
!0),(a=this.getRowDiv())&&!f&&!this._visible(a)&&a.scrollIntoView(!c),this.explorer.onCursorChanged)this.explorer.onCursorChanged(e,d)},getSelection:function(){return this._selections},getSelectionIds:function(){for(var a=[],b=0;b<this._selections.length;b++)a.push(this.model.getId(this._selections[b]));return a},getRowDiv:function(a){a=a?a:this._modelIterator.cursor();if(!a)return null;var a=this.model.getId(a),b=this._navDict.getValue(a);return b&&b.rowDomNode?b.rowDomNode:d.byId(a)},iterate:function(a,
b,c){this.topIterationNodes.length!==0&&this._modelIterator.iterate(a,b)&&(this.cursorOn(null,!1,a),c&&this.setSelection(this.currentModel(),!0))},_checkRow:function(a,b){if(this.explorer.renderer._useCheckboxSelection){var c=this.getRowDiv(a);if(c){var f=d.byId(this.explorer.renderer.getCheckBoxId(c.id)),e=b?!f.checked:!0;if(e!==f.checked)this.explorer.renderer.onCheck(c,f,e,!0)}}else this._select(a,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(a){return d.byId(a)&&(mBox=d.marginBox(a))?mBox.h:0},_visible:function(a){if(a.offsetWidth===0||a.offsetHeight===0)return!1;var b=0;b+=this._getToolBarHeight("staticBanner");b+=this._getToolBarHeight("titleArea");b+=this._getToolBarHeight("pageToolbar");var c=this._getEventListeningDiv(!0).getClientRects()[0],f=this._vpHeight();this._vpWidth();for(var b=c.top>
b?c.top:b,c=c.bottom<f?c.bottom:f,a=a.getClientRects(),f=0,e=a.length;f<e;f++){var d=a[f];if(d.top>=b&&d.top<=c&&d.bottom>=b&&d.bottom<=c)return!0}return!1},_select:function(a){a||(a=this._modelIterator.cursor());var b=this.getRowDiv(a);b&&d.toggleClass(b,"checkedRow",this._inSelection(a)<0)},_onModelGrid:function(a,b){var c=this._getGridChildren(a);if(c)for(var f=0;f<c.length;f++)if(b.target===c[f].domNode)return!0;return!1},onClick:function(a,b){var f=d.byId(this.explorer.renderer.expandCollapseImageId(this.model.getId(a)));
if(b.target!==f&&!this._onModelGrid(a,b))if(this.cursorOn(a,!0,!1,!0),c)this.setSelection(a,!0);else if(this._ctrlKeyOn(b))this.setSelection(a,!0);else if(b.shiftKey&&this._lastSelection){if(f=this._modelIterator.scan(this._lastSelection,a)){this._clearSelection(!0);for(var e=0;e<f.length;e++)this.setSelection(f[e],!0)}}else this.setSelection(a,!1)},onCollapse:function(a){this._modelIterator.collapse(a)&&this.cursorOn()},onUpArrow:function(a){this.iterate(!1,!1,a.shiftKey);!this._ctrlKeyOn(a)&&!a.shiftKey&&
this.setSelection(this.currentModel(),!1);a.preventDefault();return!1},onDownArrow:function(a){this.iterate(!0,!1,a.shiftKey);!this._ctrlKeyOn(a)&&!a.shiftKey&&this.setSelection(this.currentModel(),!1);a.preventDefault();return!1},_shouldMoveColumn:function(a){var b=this.currentModel(),c=this._getGridChildren(b);return c&&c.length>1?this.isExpandable(b)?this._ctrlKeyOn(a):!0:!1},onLeftArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,-1),a.preventDefault(),!0;var b=this._modelIterator.cursor();
if(!b)return!1;if(this.isExpandable(b)&&this.isExpanded(b))return this.explorer.myTree.collapse(b),a.preventDefault(),!0;this._modelIterator.topLevel(b)?this.explorer.scopeUp&&typeof this.explorer.scopeUp==="function"&&this.explorer.scopeUp():(this.cursorOn(b.parent),this.setSelection(b.parent,!1))},onRightArrow:function(a){if(this._shouldMoveColumn(a))return this.moveColumn(null,1),a.preventDefault(),!0;var b=this._modelIterator.cursor();if(!b)return!1;if(this.isExpandable(b)&&!this.isExpanded(b))return this.explorer.myTree.expand(b),
a.preventDefault(),!1},_isRowSelectable:function(a){return this.explorer.isRowSelectable?this.explorer.isRowSelectable(a):!0},onSpace:function(a){this.setSelection(this.currentModel(),!0);a.preventDefault()},onEnter:function(a){var b=this.getCurrentGrid(this._modelIterator.cursor());if(b)if(b.widget)if(typeof b.onClick==="function")b.onClick();else typeof b.widget.focus==="function"&&b.widget.focus();else{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,0,0,this._ctrlKeyOn(a),
!1,!1,!1,0,null);b.domNode.dispatchEvent(c)}else if(this.explorer.renderer.getRowActionElement&&(b=this._modelIterator.cursor()))if(b=this.explorer.renderer.getRowActionElement(this.model.getId(b)),b.href)this._ctrlKeyOn(a)?window.open(b.href):window.location.href=b.href}};return b}();b.ExplorerNavDict=function(){function a(b){this._dict={};this._model=b}a.prototype={addRow:function(a,b){this._dict[this._model.getId(a)]={model:a,rowDomNode:b}},getValue:function(a){return this._dict[a]},getGridNavHolder:function(a,
b){if(!a)return null;var c=this._model.getId(a);if(this._dict[c]){if(!this._dict[c].gridChildren&&b)this._dict[c].gridChildren=[];return this._dict[c].gridChildren}return null},initGridNavHolder:function(a){if(!a)return null;a=this._model.getId(a);if(this._dict[a])this._dict[a].gridChildren=null}};return a}();return b});
define("orion/compare/nls/messages",["orion/i18n!orion/compare/nls/messages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
define("orion/compare/nls/root/messages",{"Copy current change from right to left":"Copy current change from right to left","Switch to unified diff":"Switch to unified diff",Unified:"Unified","Switch to side by side diff":"Switch to side by side diff","Side by side":"Side by side","Generate link of the current diff":"Generate link of the current diff","Generate Link":"Generate Link","Next diff block":"Next diff block","Previous diff block":"Previous diff block","Next diff change":"Next diff change",
"Previous diff change":"Previous diff change","Copy the link URL:":"Copy the link URL:",Compare:"Compare","Open the compare page":"Open the compare page","fetching...":"fetching...","There are unsaved changes.":"There are unsaved changes.","ERROR: ":"ERROR: ","Compare...":"Compare...","files changed":" files changed",Location:"Location",Options:"Options","Sort by folders":"Sort by folders","Line 0 : Col 0":"Line 0 : Col 0","No Matching DiffService for location:":"No Matching DiffService for location:"});
define("orion/compare/diff-provider",["i18n!orion/compare/nls/messages","dojo"],function(b,d){function a(a,b,c){var g=new d.Deferred;a[b].apply(a,c).then(function(a){g.callback(a)},function(a){g.errback(a)});return g}function c(a,c){var d=a.getServiceReferences("orion.core.diff"),g=d;if(c)for(var g=[],j=0;j<d.length;++j)c(d[j])&&g.push(d[j]);for(var k=[],l=[],j=0;j<g.length;++j)k[j]=RegExp(g[j].getProperty("pattern")||".*"),l[j]=a.getService(g[j]);this._getService=function(a){if(a.indexOf("://")===
-1){var c=document.createElement("a");c.href=a;a=c.href}for(c=0;c<k.length;++c)if(k[c].test(a))return l[c];throw b["No Matching DiffService for location:"]+a;}}c.prototype={getDiffContent:function(b){return a(this._getService(b),"getDiffContent",arguments)},getDiffFileURI:function(b){return a(this._getService(b),"getDiffFileURI",arguments)}};return{DiffProvider:c}});
define("orion/compare/diff-parser",[],function(){var b=b||{};b.DiffParser=function(){function b(c,f){this._lineDelimiter=c?c:a?"\r\n":"\n";this._diffLineDelimiter=f?f:this._lineDelimiter;this._DEBUG=!1}var a=navigator.platform.indexOf("Win")!==-1;b.prototype={_init:function(){this._oFileContents=[];this._diffContents=[];this._oBlocks=[];this._nBlocks=[];this._hunkRanges=[];this._lastToken=" ";this._deltaMap=[];this._nFileContents=[];this._nNewLineAtEnd=this._oNewLineAtEnd=!0;this._diffContentIndex=
1},setLineDelim:function(a){this._diffLineDelimiter=this._lineDelimiter=a},getDiffArray:function(){return{array:this._diffContents,index:this._diffContentIndex}},parse:function(a,b,e,d){this._init();if(b==="")return{outPutFile:a,mapper:[]};this._oFileContents=a===""?[]:a.split(this._lineDelimiter);this._diffContents=b.split(this._diffLineDelimiter);b=this._diffContents.length;this._hunkRanges=[];for(var g=0;g<b;g++){var j=this._parseHunkRange(g);j&&this._hunkRanges.push(j)}if(0===this._hunkRanges.length)return{outPutFile:a,
mapper:[]};if(this._DEBUG){console.log("***Diff contents: \n");for(a=0;a<this._diffContents.length;a++)console.log(this._diffContents[a]);console.log("***Hunk ranges: \n");console.log(JSON.stringify(this._hunkRanges))}for(a=0;a<this._hunkRanges.length;a++)this._parseHunkBlock(a);this._DEBUG&&(console.log("***Original Hunk range blocks: \n"),console.log(JSON.stringify(this._oBlocks)),console.log("***New Hunk range blocks: \n"),console.log(JSON.stringify(this._nBlocks)));this._buildMap(e);this._DEBUG&&
(console.log("***New Line at end of file(original): \n"),console.log(JSON.stringify(this._oNewLineAtEnd)),console.log("***New Line at end of file(new): \n"),console.log(JSON.stringify(this._nNewLineAtEnd)),console.log("***Mapper: \n"),this._logMap(),console.log("***Total line number in original file: "+this._oFileContents.length));(d===void 0||!d)&&this._buildNewFile();return{outPutFile:this._nFileContents.join(this._diffLineDelimiter),mapper:this._deltaMap}},_logMap:function(){for(var a=0;a<this._deltaMap.length;a++)if(console.log(JSON.stringify(this._deltaMap[a])),
this._deltaMap[a][2]>0){console.log("    **Diff content on change/add: \n");for(var b=0;b<this._deltaMap[a][0];b++)console.log("    "+this._diffContents[this._deltaMap[a][2]+b-1])}},_logNewFile:function(){for(var a=0;a<this._nFileContents.length;a++)console.log(this._nFileContents[a])},_createBlock:function(a,b,e,d){d===e&&a===" "||(e=[e,d-e,"s"],a==="-"?e[2]="r":a==="+"?e[2]="a":a==="c"&&(e[2]="c"),b.push(e))},_createMinusBlock:function(a,b,e){var d=this._oBlocks.length;d===0||a!==this._oBlocks[d-
1][0]?(this._oBlocks.push([a===0?1:a,e]),this._nBlocks.push([b,0,-2])):this._oBlocks[d-1][1]+=e},_createPlusBlock:function(a,b,e,d){var g=this._nBlocks.length;g===0||b!==this._nBlocks[g-1][0]?(this._oBlocks.push([a===0?1:a,0]),this._nBlocks.push([b,e,d])):(this._nBlocks[g-1][1]+=e,this._nBlocks[g-1][2]=d)},_parseHunkBlock:function(a){for(var b=" ",e=this._hunkRanges[a][0]+1,d=a===this._hunkRanges.length-1?this._diffContents.length:this._hunkRanges[a+1][0],g=0,j=0,k=this._hunkRanges[a][1],l=this._hunkRanges[a][3],
m=e,n=e;n<d;n++)if(0!==this._diffContents[n].length){var o=this._diffContents[n][0];if(o==="\\"&&("\\ No newline at end of file"===this._diffContents[n].substring(0,this._diffContents[n].length-1)||"\\ No newline at end of file"===this._diffContents[n]))b==="-"?this._oNewLineAtEnd=!1:b===" "?this._oNewLineAtEnd=this._nNewLineAtEnd=!1:this._nNewLineAtEnd=!1,n>e&&this._diffContents[n-1][this._diffContents[n-1].length-1]==="\r"&&(this._diffContents[n-1]=this._diffContents[n-1].substring(0,this._diffContents[n-
1].length-1));else{switch(o){case "-":case "+":case " ":break;default:continue}if(b!==o){o==="+"&&(m=n);switch(b){case " ":k=this._hunkRanges[a][1]+g;l=this._hunkRanges[a][3]+j;break;case "-":this._createMinusBlock(k,l,this._hunkRanges[a][1]+g-k);break;case "+":this._createPlusBlock(k,l,this._hunkRanges[a][3]+j-l,m)}b=o}switch(o){case "-":g++;break;case "+":j++;break;case " ":g++,j++}}}switch(b){case "-":this._createMinusBlock(k,l,this._hunkRanges[a][1]+g-k);break;case "+":this._createPlusBlock(k,
l,this._hunkRanges[a][3]+j-l,m)}},_detectConflictes:function(a,b){if(a<0)return!1;for(var e=a+b,d=a;d<e;d++){var g=this._diffContents[d];if(g.indexOf("<<<<<")>-1||g.indexOf(">>>>>")>-1)return!0}return!1},_buildMap:function(a){for(var b=this._oBlocks.length,e=this._oFileContents.length,d=0,g=1,j=0;j<b;j++)g=this._oBlocks[j][0]-g,g>0&&(this._deltaMap.push([g,g,0]),d+=g),a&&this._detectConflictes(this._nBlocks[j][2],this._nBlocks[j][1])?this._deltaMap.push([this._nBlocks[j][1],this._oBlocks[j][1],this._nBlocks[j][2]+
1,1]):this._deltaMap.push([this._nBlocks[j][1],this._oBlocks[j][1],this._nBlocks[j][2]+1]),d+=this._oBlocks[j][1],g=this._oBlocks[j][0]+this._oBlocks[j][1];0<e-g&&(this._deltaMap.push([e-g+1,e-g+1,0]),d+=e-g+1);d<e&&(g=e-d,a=this._deltaMap[this._deltaMap.length-1],a[2]===0?(a[0]+=g,a[1]+=g):a[2]===-1?this._deltaMap.push([g,g,0]):this._nNewLineAtEnd===this._oNewLineAtEnd?this._deltaMap.push([g,g,0]):(this._nNewLineAtEnd&&(a[0]+=g),this._oNewLineAtEnd&&(a[1]+=g)))},_buildNewFile:function(){for(var a=
1,b=!1,e=this._deltaMap.length,d=0;d<e;d++){b=!1;if(this._deltaMap[d][2]===0){for(var g=0;g<this._deltaMap[d][0];g++)this._nFileContents.push(this._oFileContents[a+g-1]);b=!0}else if(this._deltaMap[d][2]>0)for(g=0;g<this._deltaMap[d][0];g++)this._nFileContents.push(this._diffContents[this._deltaMap[d][2]+g-1].substring(1));a+=this._deltaMap[d][1]}this._nNewLineAtEnd&&!b&&this._nFileContents.push("")},_parseHRangeBody:function(a,b){if(0<a.indexOf(",")){var e=a.split(","),d=parseInt(e[0]),e=parseInt(e[1]);
b.push(d>=0?d:1);b.push(e>=0?e:1)}else d=parseInt(a),b.push(d>=0?d:1),b.push(1)},_parseHunkRange:function(a){var b=this._diffContents[a];if(!(8>b.length)&&"@@"===b.substring(0,2)){var b=b.substring(2),e=b.indexOf("@@");if(!(e<0)){var b=b.substring(0,e),e=b.indexOf("-"),d=b.indexOf("+");if(!(e<0||d<0))return a=[a],e<d?(b=b.substring(e+1).split("+"),this._parseHRangeBody(b[0],a),this._parseHRangeBody(b[1],a)):(b=b.substring(d+1).split("-"),this._parseHRangeBody(b[1],a),this._parseHRangeBody(b[0],a)),
a}}}};return b}();return b});
(function(b,d){typeof define==="function"&&define.amd?define("orion/editor/Deferred",[],d):typeof exports==="object"?module.exports=d():(b.orion=b.orion||{},b.orion.Deferred=d())})(this,function(){function b(a){if(g)c?(f.next={fn:a,next:null},f=f.next):f=c={fn:a,next:null};else{g=!0;do{for(;a;){a();if(e)c?f.next=e:c=e,f=h;c?(e=c.next,h=f,a=c.fn,c=f=null):a=null}g=!1}while(g)}}function d(a){return function(){a.apply(null,arguments)}}function a(c){function f(){for(;o;){var a=o;o=o.next;var b=a.deferred,
c=r.isResolved()?"resolve":"reject";if(a[c])try{var e=a[c](h);e&&typeof e.then==="function"?(a.cancel=e.cancel,e.then(d(b.resolve),d(b.reject),b.progress)):b.resolve(e)}catch(g){b.reject(g)}else b[c](h)}o=q=null}function e(a){if(g){if(a)throw Error("already "+g);return!0}return!1}var h,g,o,q,p=!1,r=this;this.reject=function(a,c){e(c)||(g="rejected",h=a,o&&b(f));return r.promise};this.resolve=function(a,c){e(c)||(g="resolved",h=a,o&&b(f));return r.promise};this.progress=function(a,b){if(!e(b))for(var c=
o;c;)c.progress&&c.progress(a),c=c.next;return r.promise};this.cancel=function(a,d){if(!e(d))return p=!0,c&&(a=c(a)||a),a=a||Error("canceled"),b(r.reject.bind(r,a)),a;for(var h=o;h;){if(h.canceling)return delete h.canceling,f(),h.cancel&&h.cancel(a);h=h.next}};this.then=function(c,e,d){var h={resolve:c,reject:e,progress:d,cancel:this.cancel,deferred:new a(function(a){h.canceling=!0;return h.cancel&&h.cancel(a)})};o?q.next=h:o=h;q=h;g&&b(f);return h.deferred.promise};this.isResolved=function(){return g===
"resolved"};this.isRejected=function(){return g==="rejected"};this.isFulfilled=function(){return!!g};this.isCanceled=function(){return p};this.promise={then:this.then,cancel:this.cancel,isResolved:this.isResolved,isRejected:this.isRejected,isFulfilled:this.isFulfilled,isCanceled:this.isCanceled};this.notify=this.progress;this.state=function(){return g||"pending"};this.promise.state=this.state}var c,f,e,h,g=!1;a.all=function(b,c){function e(a,b){g.isFulfilled()||(h[a]=b,--d===0&&g.resolve(h))}function f(a,
b){if(!g.isFulfilled()){if(c)try{e(a,c(b));return}catch(d){b=d}g.reject(b)}}var d=b.length,h=[],g=new a(function(a){b.forEach(function(b){b.cancel&&b.cancel(a)})});d===0?g.resolve(h):b.forEach(function(a,b){a.then(e.bind(null,b),f.bind(null,b))});return g.promise};a.when=function(b,c,e,f){var d;if(!(b&&typeof b.then==="function"))d=new a,d.resolve(b),b=d.promise;return b.then(c,e,f)};return a});
define("orion/textview/i18n",{load:function(b,d,a){d.specified&&d.specified("orion/bootstrap")?d(["orion/i18n!"+b],function(b){a(b)}):a({})}});
define("orion/editor/nls/messages",["orion/textview/i18n!orion/editor/nls/messages"],function(b){var d={root:{Comment:"Comment","Flat outline":"Flat outline",incrementalFind:"Incremental find: ${0}",incrementalFindNotFound:"Incremental find: ${0} (not found)",find:"Find...",undo:"Undo",redo:"Redo",cancelMode:"Cancel Current Mode",findNext:"Find Next Occurrence",findPrevious:"Find Previous Occurrence",incrementalFindKey:"Incremental Find",indentLines:"Indent Lines",unindentLines:"Unindent Lines",moveLinesUp:"Move Lines Up",
moveLinesDown:"Move Lines Down",copyLinesUp:"Copy Lines Up",copyLinesDown:"Copy Lines Down",deleteLines:"Delete Lines",gotoLine:"Goto Line...",gotoLinePrompty:"Goto Line:",nextAnnotation:"Next Annotation",prevAnnotation:"Previous Annotation",expand:"Expand",collapse:"Collapse",expandAll:"Expand All",collapseAll:"Collapse All",lastEdit:"Last Edit Location",toggleLineComment:"Toggle Line Comment",addBlockComment:"Add Block Comment",removeBlockComment:"Remove Block Comment",linkedModeEntered:"Linked Mode entered",
linkedModeExited:"Linked Mode exited",syntaxError:"Syntax Error",contentAssist:"Content Assist",lineColumn:"Line ${0} : Col ${1}"}};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
define("orion/editor/nls/root/messages",{Comment:"Comment","Flat outline":"Flat outline",incrementalFind:"Incremental find: ${0}",incrementalFindNotFound:"Incremental find: ${0} (not found)",find:"Find...",undo:"Undo",redo:"Redo",cancelMode:"Cancel Current Mode",findNext:"Find Next Occurrence",findPrevious:"Find Previous Occurrence",incrementalFindKey:"Incremental Find",indentLines:"Indent Lines",unindentLines:"Unindent Lines",moveLinesUp:"Move Lines Up",moveLinesDown:"Move Lines Down",copyLinesUp:"Copy Lines Up",
copyLinesDown:"Copy Lines Down",deleteLines:"Delete Lines",gotoLine:"Goto Line...",gotoLinePrompty:"Goto Line:",nextAnnotation:"Next Annotation",prevAnnotation:"Previous Annotation",expand:"Expand",collapse:"Collapse",expandAll:"Expand All",collapseAll:"Collapse All",lastEdit:"Last Edit Location",toggleLineComment:"Toggle Line Comment",addBlockComment:"Add Block Comment",removeBlockComment:"Remove Block Comment",linkedModeEntered:"Linked Mode entered",linkedModeExited:"Linked Mode exited",syntaxError:"Syntax Error",
contentAssist:"Content Assist",lineColumn:"Line ${0} : Col ${1}"});
define("orion/editor/contentAssist",["i18n!orion/editor/nls/messages","orion/textview/keyBinding","orion/textview/eventTarget","orion/editor/Deferred"],function(b,d,a,c){var f,e,h;function g(a){this.textView=a;this.state=f;this.providers=[];var c=this;this.contentAssistListener={onModelChanging:function(a){c.isDeactivatingChange(a)?c.setState(f):c.state===e&&c.setState(h)},onScroll:function(){c.setState(f)},onSelection:function(){var a=c.state;if(a===e||a===h)c.computeProposals(),c.setState(h)}};
var g=navigator.platform.indexOf("Mac")!==-1;a.setKeyBinding(g?new d.KeyBinding(" ",!1,!1,!1,!0):new d.KeyBinding(" ",!0),"contentAssist");a.setAction("contentAssist",function(){c.activate();return!0},{name:b.contentAssist})}function j(a,b){this.contentAssist=a;this.widget=b;this.proposals=[];var c=this;this.contentAssist.addEventListener("ProposalsComputed",function(a){c.proposals=a.data.proposals;c.selectedIndex=c.proposals.length?0:-1})}function k(a,b){this.contentAssist=a;this.parentNode=typeof b===
"string"?document.getElementById(b):b;this.textView=this.contentAssist.getTextView();this.isShowing=this.textViewListenerAdded=!1;var c=this;if(!this.parentNode){this.parentNode=document.createElement("div");this.parentNode.className="contentassist";var e=document.getElementsByTagName("body")[0];if(e)e.appendChild(this.parentNode);else throw Error("parentNode is required");}this.textViewListener={onMouseDown:function(a){a.event.target.parentElement!==c.parentNode&&c.contentAssist.deactivate()}};this.contentAssist.addEventListener("ProposalsComputed",
function(a){c.setProposals(a.data.proposals);c.show();if(!c.textViewListenerAdded)c.textView.addEventListener("MouseDown",c.textViewListener.onMouseDown),c.textViewListenerAdded=!0});this.contentAssist.addEventListener("Deactivating",function(){c.setProposals([]);c.hide();if(c.textViewListenerAdded)c.textView.removeEventListener("MouseDown",c.textViewListener.onMouseDown),c.textViewListenerAdded=!1;c.textViewListenerAdded=!1});this.scrollListener=function(){c.isShowing&&c.position()};document.addEventListener("scroll",
this.scrollListener)}f=1;e=2;h=3;var l={selected:" selected",hr:"proposal-hr",emphasis:"proposal-emphasis",noemphasis:"proposal-noemphasis",dfault:"proposal-default"};g.prototype={apply:function(a){if(!a)return!1;var b=this.textView.getCaretOffset(),c={proposal:a,start:b,end:b};this.setState(f);this.textView.setText(a.proposal||a,b,b);this.dispatchEvent({type:"ProposalApplied",data:c});return!0},activate:function(){this.state===f&&this.setState(e)},deactivate:function(){this.setState(f)},getTextView:function(){return this.textView},
isActive:function(){return this.state===e||this.state===h},isDeactivatingChange:function(a){var b=a.removedCharCount>0&&a.addedCharCount===0,c=this.textView,c=a.start+1<=c.getModel().getCharCount()&&/^\s*$/.test(c.getText(a.start,a.start+1));return a.removedLineCount>0||a.addedLineCount>0||b&&c},setState:function(a){var b;a===e?b="Activating":a===f&&(b="Deactivating");b&&this.dispatchEvent({type:b});this.state=a;this.onStateChange(a)},onStateChange:function(a){if(a===f){if(this.listenerAdded)this.textView.removeEventListener("ModelChanging",
this.contentAssistListener.onModelChanging),this.textView.removeEventListener("Scroll",this.contentAssistListener.onScroll),this.textView.removeEventListener("Selection",this.contentAssistListener.onSelection),this.listenerAdded=!1}else if(a===e){if(!this.listenerAdded)this.textView.addEventListener("ModelChanging",this.contentAssistListener.onModelChanging),this.textView.addEventListener("Scroll",this.contentAssistListener.onScroll),this.textView.addEventListener("Selection",this.contentAssistListener.onSelection),
this.listenerAdded=!0;this.computeProposals()}},computeProposals:function(){var a=this;this._computeProposals(this.textView.getCaretOffset()).then(function(b){a.dispatchEvent({type:"ProposalsComputed",data:{proposals:b}})})},getPrefixStart:function(a){for(;a>0&&/[A-Za-z0-9_]/.test(this.textView.getText(a-1,a));)a--;return a},handleError:function(a){typeof console!=="undefined"&&(console.log("Error retrieving content assist proposals"),console.log(a))},_computeProposals:function(a){var b=this.providers,
e=this.textView,f=e.getModel(),d=e.getText(),h={line:f.getLine(f.getLineAtOffset(a)),prefix:e.getText(this.getPrefixStart(a),a),selection:e.getSelection()},g=this,b=b.map(function(b){var e=b.computeProposals||b.getProposals,f;try{typeof e==="function"&&(f=e.apply(b,[d,a,h]))}catch(j){g.handleError(j)}return c.when(f)});return c.all(b,this.handleError).then(function(a){return a.reduce(function(a,b){return b instanceof Array?a.concat(b):a},[])})},setProviders:function(a){this.providers=a.slice(0)}};
a.EventTarget.addMixin(g.prototype);j.prototype={cancel:function(){this.getContentAssist().deactivate()},getContentAssist:function(){return this.contentAssist},isActive:function(){return this.getContentAssist().isActive()},lineUp:function(){for(var a=this.selectedIndex===0?this.proposals.length-1:this.selectedIndex-1;this.proposals[a].unselectable&&a>0;)a--;this.selectedIndex=a;this.widget&&this.widget.setSelectedIndex(this.selectedIndex);return!0},lineDown:function(){for(var a=this.selectedIndex===
this.proposals.length-1?0:this.selectedIndex+1;this.proposals[a].unselectable&&a<this.proposals.length-1;)a++;this.selectedIndex=a;this.widget&&this.widget.setSelectedIndex(this.selectedIndex);return!0},enter:function(){return this.contentAssist.apply(this.proposals[this.selectedIndex]||null)},tab:function(){return this.widget?(this.widget.createAccessible(this),this.widget.parentNode.focus(),!0):!1}};k.prototype={onClick:function(a){this.contentAssist.apply(this.getProposal(a.target));this.textView.focus()},
createDiv:function(a,b,c,e){var f=document.createElement("div");f.id="contentoption"+e;f.setAttribute("role","option");a.style==="hr"?a=document.createElement("hr"):(f.className=this.calculateClasses(a.style,b),a=document.createTextNode(this.getDisplayString(a)),b&&this.parentNode.setAttribute("aria-activedescendant",f.id));f.appendChild(a,f);c.appendChild(f)},createAccessible:function(a){this._isAccessible||this.parentNode.addEventListener("keydown",function(b){b.preventDefault();if(b.keyCode===
27)return a.cancel();else if(b.keyCode===38)return a.lineUp();else if(b.keyCode===40)return a.lineDown();else if(b.keyCode===13)return a.enter();return!1});this._isAccessible=!0},calculateClasses:function(a,b){var c=l[a];if(!c)c=l.dfault;return b?c+l.selected:c},getDisplayString:function(a){return typeof a==="string"?a:a.description&&typeof a.description==="string"?a.description:a.proposal},getProposal:function(a){for(var b=0,c=this.parentNode.firstChild;c!==null;c=c.nextSibling){if(c===a)return this.proposals[b]||
null;b++}return null},setSelectedIndex:function(a){this.selectedIndex=a;this.selectNode(this.parentNode.childNodes[this.selectedIndex])},selectNode:function(a){for(var b=this.parentNode.childNodes,c=0;c<b.length;c++){var e=b[c],f=e.className.indexOf(l.selected);if(f>=0)e.className=e.className.substring(0,f)+e.className.substring(f+l.selected.length);e===a&&(e.className+=l.selected,this.parentNode.setAttribute("aria-activedescendant",e.id),e.focus(),e.offsetTop<this.parentNode.scrollTop?e.scrollIntoView(!0):
e.offsetTop+e.offsetHeight>this.parentNode.scrollTop+this.parentNode.clientHeight&&e.scrollIntoView(!1))}},setProposals:function(a){this.proposals=a},show:function(){if(this.proposals.length===0)this.hide();else{this.parentNode.innerHTML="";for(var a=0;a<this.proposals.length;a++)this.createDiv(this.proposals[a],a===0,this.parentNode,a);this.position();this.parentNode.onclick=this.onClick.bind(this);this.isShowing=!0}},hide:function(){document.activeElement===this.parentNode&&this.textView.focus();
this.parentNode.style.display="none";this.parentNode.onclick=null;this.isShowing=!1},position:function(){var a=this.textView.getLocationAtOffset(this.textView.getCaretOffset());a.y+=this.textView.getLineHeight();this.textView.convert(a,"document","page");this.parentNode.style.position="fixed";this.parentNode.style.left=a.x+"px";this.parentNode.style.top=a.y+"px";this.parentNode.style.display="block";this.parentNode.scrollTop=0;var b=document.documentElement.clientWidth;if(a.y+this.parentNode.offsetHeight>
document.documentElement.clientHeight)this.parentNode.style.top=a.y-this.parentNode.offsetHeight-this.textView.getLineHeight()+"px";if(a.x+this.parentNode.offsetWidth>b)this.parentNode.style.left=b-this.parentNode.offsetWidth+"px"}};return{ContentAssist:g,ContentAssistMode:j,ContentAssistWidget:k}});
define("orion/textview/undoStack",[],function(){function b(a,b,e){this.offset=a;this.text=b;this.previousText=e}function d(){this.changes=[]}function a(a,b){this.view=a;this.size=b!==void 0?b:100;this.reset();var e=a.getModel();e.getBaseModel&&(e=e.getBaseModel());this.model=e;var d=this;this._listener={onChanging:function(a){d._onChanging(a)},onDestroy:function(a){d._onDestroy(a)}};e.addEventListener("Changing",this._listener.onChanging);a.addEventListener("Destroy",this._listener.onDestroy)}b.prototype=
{undo:function(a,b){this._doUndoRedo(this.offset,this.previousText,this.text,a,b)},redo:function(a,b){this._doUndoRedo(this.offset,this.text,this.previousText,a,b)},_doUndoRedo:function(a,b,e,d,g){var j=d.getModel();if(j.mapOffset&&d.annotationModel){var k=j.mapOffset(a,!0);if(k<0)for(var l=d.annotationModel.getAnnotations(a,a+1);l.hasNext();){var m=l.next();if(m.type==="orion.annotation.folding"){m.expand();k=j.mapOffset(a,!0);break}}if(k<0)return;a=k}d.setText(b,a,a+e.length);g&&d.setSelection(a,
a+b.length)}};d.prototype={add:function(a){this.changes.push(a)},end:function(a){this.endSelection=a.getSelection();this.endCaret=a.getCaretOffset()},undo:function(a,b){for(var e=this.changes.length-1;e>=0;e--)this.changes[e].undo(a,!1);if(b){var e=this.startSelection.start,d=this.startSelection.end;a.setSelection(this.startCaret?e:d,this.startCaret?d:e)}},redo:function(a,b){for(var e=0;e<this.changes.length;e++)this.changes[e].redo(a,!1);if(b){var e=this.endSelection.start,d=this.endSelection.end;
a.setSelection(this.endCaret?e:d,this.endCaret?d:e)}},start:function(a){this.startSelection=a.getSelection();this.startCaret=a.getCaretOffset()}};a.prototype={add:function(a){this.compoundChange?this.compoundChange.add(a):(this.stack.splice(this.index,this.stack.length-this.index,a),this.index++,this.stack.length>this.size&&(this.stack.shift(),this.index--,this.cleanIndex--))},markClean:function(){this.endCompoundChange();this._commitUndo();this.cleanIndex=this.index},isClean:function(){return this.cleanIndex===
this.getSize().undo},canUndo:function(){return this.getSize().undo>0},canRedo:function(){return this.getSize().redo>0},endCompoundChange:function(){this.compoundChange&&this.compoundChange.end(this.view);this.compoundChange=void 0},getSize:function(){var a=this.index,b=this.stack.length;this._undoStart!==void 0&&a++;return{undo:a,redo:b-a}},undo:function(){this._commitUndo();if(this.index<=0)return!1;var a=this.stack[--this.index];this._ignoreUndo=!0;a.undo(this.view,!0);this._ignoreUndo=!1;return!0},
redo:function(){this._commitUndo();if(this.index>=this.stack.length)return!1;var a=this.stack[this.index++];this._ignoreUndo=!0;a.redo(this.view,!0);this._ignoreUndo=!1;return!0},reset:function(){this.index=this.cleanIndex=0;this.stack=[];this._undoStart=void 0;this._undoText="";this._undoType=0;this._ignoreUndo=!1;this._compoundChange=void 0},startCompoundChange:function(){this._commitUndo();var a=new d;this.add(a);this.compoundChange=a;this.compoundChange.start(this.view)},_commitUndo:function(){if(this._undoStart!==
void 0)this._undoType===-1?this.add(new b(this._undoStart,"",this._undoText)):this.add(new b(this._undoStart,this._undoText,"")),this._undoStart=void 0,this._undoText="",this._undoType=0},_onDestroy:function(){this.model.removeEventListener("Changing",this._listener.onChanging);this.view.removeEventListener("Destroy",this._listener.onDestroy)},_onChanging:function(a){var f=a.text,e=a.start,d=a.removedCharCount,a=a.addedCharCount;if(!this._ignoreUndo){this._undoStart!==void 0&&!(a===1&&d===0&&this._undoType===
1&&e===this._undoStart+this._undoText.length||a===0&&d===1&&this._undoType===-1&&(e+1===this._undoStart||e===this._undoStart))&&this._commitUndo();if(!this.compoundChange)if(a===1&&d===0){if(this._undoStart===void 0)this._undoStart=e;this._undoText+=f;this._undoType=1;return}else if(a===0&&d===1){f=this._undoText.length>0&&this._undoStart===e;this._undoStart=e;this._undoType=-1;f?this._undoText+=this.model.getText(e,e+d):this._undoText=this.model.getText(e,e+d)+this._undoText;return}this.add(new b(e,
f,this.model.getText(e,e+d)))}}};return{UndoStack:a}});define("orion/edit/nls/messages",["orion/i18n!orion/edit/nls/messages"],function(b){var d={root:!0};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});return d});
define("orion/edit/nls/root/messages",{"Fetching ":"Fetching ","An error occurred: ":"An error occurred: ","No File Selected":"No File Selected","There are unsaved changes.  Do you still want to navigate away?":"There are unsaved changes.  Do you still want to navigate away?","Search Files":"Search Files","Enter search term:":"Enter search term:","Searching for occurrences of ":"Searching for occurrences of ","Toggle Outliner":"Toggle Outliner","There are unsaved changes.":"There are unsaved changes.",
Save:"Save","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?","Save this file":"Save this file","Go to Line":"Go to Line","Go to specified line number":"Go to specified line number","Go to line:":"Go to line:",Undo:"Undo",Redo:"Redo",Find:"Find","No response from server.  Check your internet connection and try again.":"No response from server.  Check your internet connection and try again."});
define("orion/textview/nls/messages",["orion/textview/i18n!orion/textview/nls/messages"],function(b){var d={root:{multipleAnnotations:"Multiple annotations:",line:"Line: ${0}",breakpoint:"Breakpoint",bookmark:"Bookmark",task:"Task",error:"Error",warning:"Warning",matchingSearch:"Matching Search",currentSearch:"Current Search",currentLine:"Current Line",matchingBracket:"Matching Bracket",currentBracket:"Current Bracket"}};Object.keys(b).forEach(function(a){typeof d[a]==="undefined"&&(d[a]=b[a])});
return d});define("orion/textview/nls/root/messages",{multipleAnnotations:"Multiple annotations:",line:"Line: ${0}",breakpoint:"Breakpoint",bookmark:"Bookmark",task:"Task",error:"Error",warning:"Warning",matchingSearch:"Matching Search",currentSearch:"Current Search",currentLine:"Current Line",matchingBracket:"Matching Bracket",currentBracket:"Current Bracket"});
define("orion/textview/annotations",["i18n!orion/textview/nls/messages","orion/textview/eventTarget"],function(b,d){function a(a,b,c){this.start=a;this.end=b;this._projectionModel=c;this.html=this._expandedHTML;this.style=this._expandedStyle;this.expanded=!0}function c(){}function f(a,e){var f=a.lastIndexOf("."),f=a.substring(f+1),d={title:b[f],style:{styleClass:"annotation "+f},html:"<div class='annotationHTML "+f+"'></div>",overviewStyle:{styleClass:"annotationOverview "+f}};e?d.lineStyle={styleClass:"annotationLine "+
f}:d.rangeStyle={styleClass:"annotationRange "+f};c.registerType(a,d)}function e(){}function h(a){this._annotations=[];var b=this;this._listener={onChanged:function(a){b._onChanged(a)}};this.setTextModel(a)}function g(a,b){this._view=a;this._annotationModel=b;var c=this;this._listener={onDestroy:function(a){c._onDestroy(a)},onLineStyle:function(a){c._onLineStyle(a)},onChanged:function(a){c._onAnnotationModelChanged(a)}};a.addEventListener("Destroy",this._listener.onDestroy);a.addEventListener("postLineStyle",
this._listener.onLineStyle);b.addEventListener("Changed",this._listener.onChanged)}a.prototype={_expandedHTML:"<div class='annotationHTML expanded'></div>",_expandedStyle:{styleClass:"annotation expanded"},_collapsedHTML:"<div class='annotationHTML collapsed'></div>",_collapsedStyle:{styleClass:"annotation collapsed"},collapse:function(){if(this.expanded){this.expanded=!1;this.html=this._collapsedHTML;this.style=this._collapsedStyle;var a=this._projectionModel,b=a.getBaseModel();this._projection=
{start:b.getLineStart(b.getLineAtOffset(this.start)+1),end:b.getLineEnd(b.getLineAtOffset(this.end),!0)};a.addProjection(this._projection)}},expand:function(){if(!this.expanded)this.expanded=!0,this.html=this._expandedHTML,this.style=this._expandedStyle,this._projectionModel.removeProjection(this._projection)}};c.ANNOTATION_ERROR="orion.annotation.error";c.ANNOTATION_WARNING="orion.annotation.warning";c.ANNOTATION_TASK="orion.annotation.task";c.ANNOTATION_BREAKPOINT="orion.annotation.breakpoint";
c.ANNOTATION_BOOKMARK="orion.annotation.bookmark";c.ANNOTATION_FOLDING="orion.annotation.folding";c.ANNOTATION_CURRENT_BRACKET="orion.annotation.currentBracket";c.ANNOTATION_MATCHING_BRACKET="orion.annotation.matchingBracket";c.ANNOTATION_CURRENT_LINE="orion.annotation.currentLine";c.ANNOTATION_CURRENT_SEARCH="orion.annotation.currentSearch";c.ANNOTATION_MATCHING_SEARCH="orion.annotation.matchingSearch";var j={};c.registerType=function(a,b){var c=b;if(typeof c!=="function")c=function(a,b,c){this.start=
a;this.end=b;if(c)this.title=c},c.prototype=b;c.prototype.type=a;j[a]=c;return a};c.createAnnotation=function(a,b,c,e){return new (this.getType(a))(b,c,e)};c.getType=function(a){return j[a]};f(c.ANNOTATION_ERROR);f(c.ANNOTATION_WARNING);f(c.ANNOTATION_TASK);f(c.ANNOTATION_BREAKPOINT);f(c.ANNOTATION_BOOKMARK);f(c.ANNOTATION_CURRENT_BRACKET);f(c.ANNOTATION_MATCHING_BRACKET);f(c.ANNOTATION_CURRENT_SEARCH);f(c.ANNOTATION_MATCHING_SEARCH);f(c.ANNOTATION_CURRENT_LINE,!0);c.registerType(c.ANNOTATION_FOLDING,
a);e.addMixin=function(a){var b=e.prototype,c;for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};e.prototype={addAnnotationType:function(a){if(!this._annotationTypes)this._annotationTypes=[];this._annotationTypes.push(a)},getAnnotationTypePriority:function(a){if(this._annotationTypes)for(var b=0;b<this._annotationTypes.length;b++)if(this._annotationTypes[b]===a)return b+1;return 0},getAnnotationsByType:function(a,b,c){a=a.getAnnotations(b,c);for(c=[];a.hasNext();)b=a.next(),this.getAnnotationTypePriority(b.type)!==
0&&c.push(b);var e=this;c.sort(function(a,b){return e.getAnnotationTypePriority(a.type)-e.getAnnotationTypePriority(b.type)});return c},isAnnotationTypeVisible:function(a){return this.getAnnotationTypePriority(a)!==0},removeAnnotationType:function(a){if(this._annotationTypes)for(var b=0;b<this._annotationTypes.length;b++)if(this._annotationTypes[b]===a){this._annotationTypes.splice(b,1);break}}};h.prototype={addAnnotation:function(a){if(a){var b=this._annotations,c=this._binarySearch(b,a.start);b.splice(c,
0,a);this.onChanged({type:"Changed",added:[a],removed:[],changed:[]})}},getTextModel:function(){return this._model},getAnnotations:function(a,b){var c=this._annotations,e,f=0,d=function(){for(;f<c.length;){var e=c[f++];if(a===e.start||(a>e.start?a<e.end:e.start<b))return e;if(e.start>=b)break}return null};e=d();return{next:function(){var a=e;a&&(e=d());return a},hasNext:function(){return e!==null}}},modifyAnnotation:function(a){if(a&&!(this._getAnnotationIndex(a)<0))this.onChanged({type:"Changed",
added:[],removed:[],changed:[a]})},onChanged:function(a){return this.dispatchEvent(a)},removeAnnotations:function(a){var b=this._annotations,c,e;if(a){c=[];for(e=b.length-1;e>=0;e--){var f=b[e];f.type===a&&b.splice(e,1);c.splice(0,0,f)}}else c=b;this.onChanged({type:"Changed",removed:c,added:[],changed:[]})},removeAnnotation:function(a){if(a&&(a=this._getAnnotationIndex(a),!(a<0)))this.onChanged({type:"Changed",removed:this._annotations.splice(a,1),added:[],changed:[]})},replaceAnnotations:function(a,
b){var c=this._annotations,e,f,d,h=[];if(a)for(e=a.length-1;e>=0;e--)d=a[e],f=this._getAnnotationIndex(d),f<0||(c.splice(f,1),h.splice(0,0,d));b||(b=[]);for(e=0;e<b.length;e++)d=b[e],f=this._binarySearch(c,d.start),c.splice(f,0,d);this.onChanged({type:"Changed",removed:h,added:b,changed:[]})},setTextModel:function(a){this._model&&this._model.removeEventListener("Changed",this._listener.onChanged);(this._model=a)&&this._model.addEventListener("Changed",this._listener.onChanged)},_binarySearch:function(a,
b){for(var c=a.length,e=-1,f;c-e>1;)f=Math.floor((c+e)/2),b<=a[f].start?c=f:e=f;return c},_getAnnotationIndex:function(a){for(var b=this._annotations,c=this._binarySearch(b,a.start);c<b.length&&b[c].start===a.start;){if(b[c]===a)return c;c++}return-1},_onChanged:function(a){var b=a.start,c=a.removedCharCount,e=this._annotations,f=b+c;if(0<e.length){for(var d={type:"Changed",added:[],removed:[],changed:[],textModelChangedEvent:a},a=a.addedCharCount-c,c=0;c<e.length;c++){var h=e[c];h.start>=f?(h.start+=
a,h.end+=a,d.changed.push(h)):h.end<=b||(h.start<b&&f<h.end?(h.end+=a,d.changed.push(h)):(e.splice(c,1),d.removed.push(h),c--))}if(d.added.length>0||d.removed.length>0||d.changed.length>0)this.onChanged(d)}}};d.EventTarget.addMixin(h.prototype);g.prototype={destroy:function(){var a=this._view;if(a)a.removeEventListener("Destroy",this._listener.onDestroy),a.removeEventListener("LineStyle",this._listener.onLineStyle),this.view=null;(a=this._annotationModel)&&a.removeEventListener("Changed",this._listener.onChanged)},
_mergeStyle:function(a,b){if(b){a||(a={});a.styleClass&&b.styleClass&&a.styleClass!==b.styleClass?a.styleClass+=" "+b.styleClass:a.styleClass=b.styleClass;var c;if(b.style){if(!a.style)a.style={};for(c in b.style)a.style[c]||(a.style[c]=b.style[c])}if(b.attributes){if(!a.attributes)a.attributes={};for(c in b.attributes)a.attributes[c]||(a.attributes[c]=b.attributes[c])}}return a},_mergeStyleRanges:function(a,b){a||(a=[]);var c,e;for(e=0;e<a.length&&b;e++){var f=a[e];if(b.end<=f.start)break;if(!(b.start>=
f.end)){c=this._mergeStyle({},f.style);c=this._mergeStyle(c,b.style);var d=[];d.push(e,1);b.start<f.start&&d.push({start:b.start,end:f.start,style:b.style});b.start>f.start&&d.push({start:f.start,end:b.start,style:f.style});d.push({start:Math.max(f.start,b.start),end:Math.min(f.end,b.end),style:c});b.end<f.end&&d.push({start:b.end,end:f.end,style:f.style});b=b.end>f.end?{start:f.end,end:b.end,style:b.style}:null;Array.prototype.splice.apply(a,d)}}b&&(c=this._mergeStyle({},b.style),a.splice(e,0,{start:b.start,
end:b.end,style:c}));return a},_onAnnotationModelChanged:function(a){function b(a){for(var d=0;d<a.length;d++)if(e.isAnnotationTypeVisible(a[d].type)){var h=a[d].start,g=a[d].end;f.getBaseModel&&(h=f.mapOffset(h,!0),g=f.mapOffset(g,!0));h!==-1&&g!==-1&&c.redrawRange(h,g)}}if(!a.textModelChangedEvent){var c=this._view;if(c){var e=this,f=c.getModel();b(a.added);b(a.removed);b(a.changed)}}},_onDestroy:function(){this.destroy()},_onLineStyle:function(a){var b=this._annotationModel,c=a.textView.getModel(),
e=b.getTextModel(),f=a.lineStart,d=a.lineStart+a.lineText.length;e!==c&&(f=c.mapOffset(f),d=c.mapOffset(d));for(b=b.getAnnotations(f,d);b.hasNext();)if(f=b.next(),this.isAnnotationTypeVisible(f.type)){if(f.rangeStyle){var d=f.start,h=f.end;e!==c&&(d=c.mapOffset(d,!0),h=c.mapOffset(h,!0));a.ranges=this._mergeStyleRanges(a.ranges,{start:d,end:h,style:f.rangeStyle})}if(f.lineStyle)a.style=this._mergeStyle({},a.style),a.style=this._mergeStyle(a.style,f.lineStyle)}}};e.addMixin(g.prototype);return{FoldingAnnotation:a,
AnnotationType:c,AnnotationTypeList:e,AnnotationModel:h,AnnotationStyler:g}});define("orion/textview/i18nUtil",[],function(){return{formatMessage:function(b){var d=arguments;return b.replace(/\$\{([^\}]+)\}/g,function(a,b){return d[(b<<0)+1]})}}});
define("orion/textview/textDND",[],function(){function b(b,a){this._view=b;this._undoStack=a;this._dragSelection=null;this._dropOffset=-1;this._dropText=null;var c=this;this._listener={onDragStart:function(a){c._onDragStart(a)},onDragEnd:function(a){c._onDragEnd(a)},onDragEnter:function(a){c._onDragEnter(a)},onDragOver:function(a){c._onDragOver(a)},onDrop:function(a){c._onDrop(a)},onDestroy:function(a){c._onDestroy(a)}};b.addEventListener("DragStart",this._listener.onDragStart);b.addEventListener("DragEnd",
this._listener.onDragEnd);b.addEventListener("DragEnter",this._listener.onDragEnter);b.addEventListener("DragOver",this._listener.onDragOver);b.addEventListener("Drop",this._listener.onDrop);b.addEventListener("Destroy",this._listener.onDestroy)}b.prototype={destroy:function(){var b=this._view;if(b)b.removeEventListener("DragStart",this._listener.onDragStart),b.removeEventListener("DragEnd",this._listener.onDragEnd),b.removeEventListener("DragEnter",this._listener.onDragEnter),b.removeEventListener("DragOver",
this._listener.onDragOver),b.removeEventListener("Drop",this._listener.onDrop),b.removeEventListener("Destroy",this._listener.onDestroy),this._view=null},_onDestroy:function(){this.destroy()},_onDragStart:function(b){var a=this._view,c=a.getSelection(),a=a.getModel();if(a.getBaseModel)c.start=a.mapOffset(c.start),c.end=a.mapOffset(c.end),a=a.getBaseModel();if(a=a.getText(c.start,c.end))this._dragSelection=c,b.event.dataTransfer.effectAllowed="copyMove",b.event.dataTransfer.setData("Text",a)},_onDragEnd:function(b){var a=
this._view;if(this._dragSelection){this._undoStack&&this._undoStack.startCompoundChange();(b=b.event.dataTransfer.dropEffect==="move")&&a.setText("",this._dragSelection.start,this._dragSelection.end);if(this._dropText){var c=this._dropText,f=this._dropOffset;if(b)if(f>=this._dragSelection.end)f-=this._dragSelection.end-this._dragSelection.start;else if(f>=this._dragSelection.start)f=this._dragSelection.start;a.setText(c,f,f);a.setSelection(f,f+c.length);this._dropText=null;this._dropOffset=-1}this._undoStack&&
this._undoStack.endCompoundChange()}this._dragSelection=null},_onDragEnter:function(b){this._onDragOver(b)},_onDragOver:function(b){var a=b.event.dataTransfer.types;if(a){var c=!this._view.getOptions("readonly");c&&(c=a.contains?a.contains("text/plain"):a.indexOf("text/plain")!==-1);if(!c)b.event.dataTransfer.dropEffect="none"}},_onDrop:function(b){var a=this._view,c=b.event.dataTransfer.getData("Text");if(c)b=a.getOffsetAtLocation(b.x,b.y),this._dragSelection?(this._dropOffset=b,this._dropText=c):
(a.setText(c,b,b),a.setSelection(b,b+c.length))}};return{TextDND:b}});
define("orion/textview/textModel",["orion/textview/eventTarget"],function(b){function d(a,b){this._lastLineIndex=-1;this._text=[""];this._lineOffsets=[0];this.setText(a);this.setLineDelimiter(b)}var a=window.navigator.platform.indexOf("Win")!==-1;d.prototype={find:function(a){if(this._text.length>1)this._text=[this._text.join("")];var b=a.string,e=b;!a.regex&&b&&(e=b.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&"));var d=null,g;if(e){var b=a.reverse,j=a.wrap,k=a.wholeWord,l=a.caseInsensitive,m=a.start||
0,n=a.end,a=a.end!==void 0,o="";o.indexOf("g")===-1&&(o+="g");l&&o.indexOf("i")===-1&&(o+="i");k&&(e="\\b"+e+"\\b");var q=this._text[0],p,r,s=0;a&&(q=q.substring(m,n),s=m);var x=RegExp(e,o);if(b)g=function(){var a=null;for(x.lastIndex=0;;){r=x.lastIndex;p=x.exec(q);if(r===x.lastIndex)return null;if(p){if(!(p.index<m)){if(!j||a)break;m=q.length}a={start:p.index+s,end:x.lastIndex+s}}else break}if(a)m=a.start;return a};else{if(!a)x.lastIndex=m;g=function(){for(;;){r=x.lastIndex;p=x.exec(q);if(r===x.lastIndex)break;
if(p)return{start:p.index+s,end:x.lastIndex+s};if(!(r!==0&&j))break}return null}}d=g()}return{next:function(){var a=d;a&&(d=g());return a},hasNext:function(){return d!==null}}},getCharCount:function(){for(var a=0,b=0;b<this._text.length;b++)a+=this._text[b].length;return a},getLine:function(a,b){var e=this.getLineCount();if(!(0<=a&&a<e))return null;var d=this._lineOffsets[a];if(a+1<e){e=this.getText(d,this._lineOffsets[a+1]);if(b)return e;for(var d=e.length,g;(g=e.charCodeAt(d-1))===10||g===13;)d--;
return e.substring(0,d)}else return this.getText(d)},getLineAtOffset:function(a){var b=this.getCharCount();if(!(0<=a&&a<=b))return-1;var e=this.getLineCount();if(a===b)return e-1;var d,g,j=this._lastLineIndex;if(0<=j&&j<e&&(d=this._lineOffsets[j],g=j+1<e?this._lineOffsets[j+1]:b,d<=a&&a<g))return j;for(var k=e,l=-1;k-l>1;)if(j=Math.floor((k+l)/2),d=this._lineOffsets[j],g=j+1<e?this._lineOffsets[j+1]:b,a<=d)k=j;else if(a<g){k=j;break}else l=j;return this._lastLineIndex=k},getLineCount:function(){return this._lineOffsets.length},
getLineDelimiter:function(){return this._lineDelimiter},getLineEnd:function(a,b){var e=this.getLineCount();if(!(0<=a&&a<e))return-1;if(a+1<e){e=this._lineOffsets[a+1];if(b)return e;for(var d=this.getText(Math.max(this._lineOffsets[a],e-2),e),g=d.length,j;(j=d.charCodeAt(g-1))===10||j===13;)g--;return e-(d.length-g)}else return this.getCharCount()},getLineStart:function(a){return!(0<=a&&a<this.getLineCount())?-1:this._lineOffsets[a]},getText:function(a,b){a===void 0&&(a=0);b===void 0&&(b=this.getCharCount());
if(a===b)return"";for(var e=0,d=0,g;d<this._text.length;){g=this._text[d].length;if(a<=e+g)break;e+=g;d++}for(var j=e,k=d;d<this._text.length;){g=this._text[d].length;if(b<=e+g)break;e+=g;d++}if(k===d)return this._text[k].substring(a-j,b-e);j=this._text[k].substring(a-j);e=this._text[d].substring(0,b-e);return j+this._text.slice(k+1,d).join("")+e},onChanging:function(a){return this.dispatchEvent(a)},onChanged:function(a){return this.dispatchEvent(a)},setLineDelimiter:function(b,f){b==="auto"&&(b=
void 0,this.getLineCount()>1&&(b=this.getText(this.getLineEnd(0),this.getLineEnd(0,!0))));this._lineDelimiter=b?b:a?"\r\n":"\n";if(f){var e=this.getLineCount();if(e>1){for(var d=Array(e),g=0;g<e;g++)d[g]=this.getLine(g);this.setText(d.join(this._lineDelimiter))}}},setText:function(a,b,e){a===void 0&&(a="");b===void 0&&(b=0);e===void 0&&(e=this.getCharCount());if(!(b===e&&a==="")){for(var d=this.getLineAtOffset(b),g=this.getLineAtOffset(e),j=b,k=e-b,l=g-d,m=a.length,n=0,o=this.getLineCount(),q=0,p=
0,r=0,s=[];;){q!==-1&&q<=r&&(q=a.indexOf("\r",r));p!==-1&&p<=r&&(p=a.indexOf("\n",r));if(p===-1&&q===-1)break;r=q!==-1&&p!==-1?q+1===p?p+1:(q<p?q:p)+1:q!==-1?q+1:p+1;s.push(b+r);n++}this.onChanging({type:"Changing",text:a,start:j,removedCharCount:k,addedCharCount:m,removedLineCount:l,addedLineCount:n});s.length===0&&(q=this.getLineStart(d),g=g+1<o?this.getLineStart(g+1):this.getCharCount(),b!==q&&(a=this.getText(q,b)+a,b=q),e!==g&&(a+=this.getText(e,g),e=g));g=m-k;for(q=d+l+1;q<o;q++)this._lineOffsets[q]+=
g;d=[d+1,l].concat(s);Array.prototype.splice.apply(this._lineOffsets,d);for(g=s=0;g<this._text.length;){q=this._text[g].length;if(b<=s+q)break;s+=q;g++}o=s;for(d=g;g<this._text.length;){q=this._text[g].length;if(e<=s+q)break;s+=q;g++}q=this._text[g];b=this._text[d].substring(0,b-o);e=q.substring(e-s);d=[d,g-d+1];b&&d.push(b);a&&d.push(a);e&&d.push(e);Array.prototype.splice.apply(this._text,d);if(this._text.length===0)this._text=[""];this.onChanged({type:"Changed",start:j,removedCharCount:k,addedCharCount:m,
removedLineCount:l,addedLineCount:n})}}};b.EventTarget.addMixin(d.prototype);return{TextModel:d}});
define("orion/textview/projectionTextModel",["orion/textview/textModel","orion/textview/eventTarget"],function(b,d){function a(a){this._model=a;this._projections=[]}a.prototype={addProjection:function(a){if(a){var f=this._model,e=this._projections;a._lineIndex=f.getLineAtOffset(a.start);a._lineCount=f.getLineAtOffset(a.end)-a._lineIndex;var d=a.text;d||(d="");a._model=typeof d==="string"?new b.TextModel(d,f.getLineDelimiter()):d;var f=this.mapOffset(a.start,!0),d=a.end-a.start,g=a._lineCount,j=a._model.getCharCount(),
k=a._model.getLineCount()-1;this.onChanging({type:"Changing",text:a._model.getText(),start:f,removedCharCount:d,addedCharCount:j,removedLineCount:g,addedLineCount:k});var l=this._binarySearch(e,a.start);e.splice(l,0,a);this.onChanged({type:"Changed",start:f,removedCharCount:d,addedCharCount:j,removedLineCount:g,addedLineCount:k})}},getProjections:function(){return this._projections.slice(0)},getBaseModel:function(){return this._model},mapOffset:function(a,b){var e=this._projections,d=0,g,j;if(b){for(g=
0;g<e.length;g++){j=e[g];if(j.start>a)break;if(j.end>a)return-1;d+=j._model.getCharCount()-(j.end-j.start)}return a+d}for(g=0;g<e.length;g++){j=e[g];if(j.start>a-d)break;var k=j._model.getCharCount();if(j.start+k>a-d)return-1;d+=k-(j.end-j.start)}return a-d},removeProjection:function(a){var b,e=0;for(b=0;b<this._projections.length;b++){var d=this._projections[b];if(d===a){a=d;break}e+=d._model.getCharCount()-(d.end-d.start)}if(b<this._projections.length){var d=this._model,e=a.start+e,g=a.end-a.start,
j=a._lineCount,k=a._model.getCharCount(),l=a._model.getLineCount()-1;this.onChanging({type:"Changing",text:d.getText(a.start,a.end),start:e,removedCharCount:k,addedCharCount:g,removedLineCount:l,addedLineCount:j});this._projections.splice(b,1);this.onChanged({type:"Changed",start:e,removedCharCount:k,addedCharCount:g,removedLineCount:l,addedLineCount:j})}},_binarySearch:function(a,b){for(var e=a.length,d=-1,g;e-d>1;)g=Math.floor((e+d)/2),b<=a[g].start?e=g:d=g;return e},getCharCount:function(){for(var a=
this._model.getCharCount(),b=this._projections,e=0;e<b.length;e++){var d=b[e];a+=d._model.getCharCount()-(d.end-d.start)}return a},getLine:function(a,b){if(a<0)return null;var e=this._model,d=this._projections,g=0,j=[],k=0,l,m,n;for(l=0;l<d.length;l++){n=d[l];if(n._lineIndex>=a-g)break;m=n._model.getLineCount()-1;if(n._lineIndex+m>=a-g)if(k=a-(n._lineIndex+g),k<m)return n._model.getLine(k,b);else j.push(n._model.getLine(m));k=n.end;g+=m-n._lineCount}for(k=Math.max(k,e.getLineStart(a-g));l<d.length;l++){n=
d[l];if(n._lineIndex>a-g)break;j.push(e.getText(k,n.start));m=n._model.getLineCount()-1;if(n._lineIndex+m>a-g)return j.push(n._model.getLine(0,b)),j.join("");j.push(n._model.getText());k=n.end;g+=m-n._lineCount}d=e.getLineEnd(a-g,b);k<d&&j.push(e.getText(k,d));return j.join("")},getLineAtOffset:function(a){for(var b=this._model,e=this._projections,d=0,g=0,j=0;j<e.length;j++){var k=e[j];if(k.start>a-d)break;var l=k._model.getCharCount();if(k.start+l>a-d){e=a-(k.start+d);g+=k._model.getLineAtOffset(e);
d+=e;break}g+=k._model.getLineCount()-1-k._lineCount;d+=l-(k.end-k.start)}return b.getLineAtOffset(a-d)+g},getLineCount:function(){for(var a=this._projections,b=this._model.getLineCount(),e=0;e<a.length;e++){var d=a[e];b+=d._model.getLineCount()-1-d._lineCount}return b},getLineDelimiter:function(){return this._model.getLineDelimiter()},getLineEnd:function(a,b){if(a<0)return-1;for(var e=this._model,d=this._projections,g=0,j=0,k=0;k<d.length;k++){var l=d[k];if(l._lineIndex>a-g)break;var m=l._model.getLineCount()-
1;if(l._lineIndex+m>a-g)return l._model.getLineEnd(a-(l._lineIndex+g),b)+l.start+j;j+=l._model.getCharCount()-(l.end-l.start);g+=m-l._lineCount}return e.getLineEnd(a-g,b)+j},getLineStart:function(a){if(a<0)return-1;for(var b=this._model,e=this._projections,d=0,g=0,j=0;j<e.length;j++){var k=e[j];if(k._lineIndex>=a-d)break;var l=k._model.getLineCount()-1;if(k._lineIndex+l>=a-d)return k._model.getLineStart(a-(k._lineIndex+d))+k.start+g;g+=k._model.getCharCount()-(k.end-k.start);d+=l-k._lineCount}return b.getLineStart(a-
d)+g},getText:function(a,b){a===void 0&&(a=0);var e=this._model,d=this._projections,g=0,j=[],k,l,m;for(k=0;k<d.length;k++){l=d[k];if(l.start>a-g)break;m=l._model.getCharCount();if(l.start+m>a-g)if(b!==void 0&&l.start+m>b-g)return l._model.getText(a-(l.start+g),b-(l.start+g));else j.push(l._model.getText(a-(l.start+g))),a=l.end+g+m-(l.end-l.start);g+=m-(l.end-l.start)}var n=a-g;if(b!==void 0){for(;k<d.length;k++){l=d[k];if(l.start>b-g)break;j.push(e.getText(n,l.start));m=l._model.getCharCount();if(l.start+
m>b-g)return j.push(l._model.getText(0,b-(l.start+g))),j.join("");j.push(l._model.getText());n=l.end;g+=m-(l.end-l.start)}j.push(e.getText(n,b-g))}else{for(;k<d.length;k++)l=d[k],j.push(e.getText(n,l.start)),j.push(l._model.getText()),n=l.end;j.push(e.getText(n))}return j.join("")},_onChanging:function(a,b,e,d,g,j){for(var k=this._model,l=this._projections,m,n=0,o,q=b+e;m<l.length;m++){e=l[m];if(e.start>b)break;n+=e._model.getCharCount()-(e.end-e.start)}b+=n;for(var p=m;m<l.length;m++){e=l[m];if(e.start>
q)break;n+=e._model.getCharCount()-(e.end-e.start);o+=e._model.getLineCount()-1-e._lineCount}e=q+n;n=m;this.onChanging(b,e-b,d,g+o,j);l.splice(l,n-p);for(a=a.length-(e-b);m<l.length;m++)e=l[m],e.start+=a,e.end+=a,e._lineIndex=k.getLineAtOffset(e.start)},onChanging:function(a){return this.dispatchEvent(a)},onChanged:function(a){return this.dispatchEvent(a)},setLineDelimiter:function(a){this._model.setLineDelimiter(a)},setText:function(a,b,e){a===void 0&&(a="");b===void 0&&(b=0);var d=b,g=e,j=this._model,
k=this._projections,l=0,m=0,n,o,q,p,r,s=0;for(n=0;n<k.length;n++){o=k[n];if(o.start>b-l)break;q=o._model.getCharCount();if(o.start+q>b-l)if(e!==void 0&&o.start+q>e-l){o._model.setText(a,b-(o.start+l),e-(o.start+l));return}else s=o._model.getLineCount()-1-o._model.getLineAtOffset(b-(o.start+l)),p={projection:o,start:b-(o.start+l)},b=o.end+l+q-(o.end-o.start);m+=o._model.getLineCount()-1-o._lineCount;l+=q-(o.end-o.start)}b-=l;var x=n,s=j.getLineAtOffset(b)+m-s;if(e!==void 0)for(;n<k.length;n++){o=k[n];
if(o.start>e-l)break;q=o._model.getCharCount();if(o.start+q>e-l){m+=o._model.getLineAtOffset(e-(o.start+l));q=e-(o.start+l);e=o.end+l;r={projection:o,end:q};break}m+=o._model.getLineCount()-1-o._lineCount;l+=q-(o.end-o.start)}else{for(;n<k.length;n++)o=k[n],m+=o._model.getLineCount()-1-o._lineCount,l+=o._model.getCharCount()-(o.end-o.start);e=g=j.getCharCount()+l}e-=l;o=j.getLineAtOffset(e)+m;g-=d;for(var m=o-s,s=a.length,v=q=o=l=0;;){o!==-1&&o<=v&&(o=a.indexOf("\r",v));q!==-1&&q<=v&&(q=a.indexOf("\n",
v));if(q===-1&&o===-1)break;v=o!==-1&&q!==-1?o+1===q?q+1:(o<q?o:q)+1:o!==-1?o+1:q+1;l++}this.onChanging({type:"Changing",text:a,start:d,removedCharCount:g,addedCharCount:s,removedLineCount:m,addedLineCount:l});j.setText(a,b,e);if(p)o=p.projection,o._model.setText("",p.start);if(r)o=r.projection,o._model.setText("",0,r.end),o.start=o.end,o._lineCount=0;k.splice(x,n-x);for(a=a.length-(e-b);n<k.length;n++)o=k[n],o.start+=a,o.end+=a,o._lineIndex=j.getLineAtOffset(o.start);this.onChanged({type:"Changed",
start:d,removedCharCount:g,addedCharCount:s,removedLineCount:m,addedLineCount:l})}};d.EventTarget.addMixin(a.prototype);return{ProjectionTextModel:a}});
define("orion/textview/textView",["orion/textview/textModel","orion/textview/keyBinding","orion/textview/eventTarget"],function(b,d,a){function c(a,b,c,e){typeof a.addEventListener==="function"?a.addEventListener(b,c,e===!0):a.attachEvent("on"+b,c)}function f(a,b,c){if(c){b.className="";for(var c=b.attributes,e=c.length;e-- >0;)c[e].specified&&b.removeAttributeNode(c[e])}if(a){if(a.styleClass)b.className=a.styleClass;if(c=a.style)for(var f in c)c.hasOwnProperty(f)&&(b.style[f]=c[f]);if(a=a.attributes)for(var d in a)a.hasOwnProperty(d)&&
b.setAttribute(d,a[d])}}function e(a){return a instanceof Array?a.slice(0):a}function h(a,b){if(a===b)return!0;if(a&&!b||!a&&b)return!1;if(a&&a.constructor===String||b&&b.constructor===String)return!1;if(a instanceof Array||b instanceof Array){if(!(a instanceof Array&&b instanceof Array))return!1;if(a.length!==b.length)return!1;for(var c=0;c<a.length;c++)if(!h(a[c],b[c]))return!1;return!0}if(!(a instanceof Object)||!(b instanceof Object))return!1;for(c in a)if(a.hasOwnProperty(c)){if(!b.hasOwnProperty(c))return!1;
if(!h(a[c],b[c]))return!1}for(c in b)if(!a.hasOwnProperty(c))return!1;return!0}function g(a,b,c){for(var e=0,f=0,d=0,g=a.length;d<g;){e!==-1&&e<=d&&(e=a.indexOf("\r",d));f!==-1&&f<=d&&(f=a.indexOf("\n",d));var h=d,j;if(f===-1&&e===-1){b(a.substring(d));break}e!==-1&&f!==-1?e+1===f?(j=e,d=f+1):(j=e<f?e:f,d=(e<f?e:f)+1):e!==-1?(j=e,d=e+1):(j=f,d=f+1);b(a.substring(h,j));c()}}function j(a){var b,c,e,f;if(window.getComputedStyle)a=window.getComputedStyle(a,null),b=a.getPropertyValue("padding-left"),c=
a.getPropertyValue("padding-top"),e=a.getPropertyValue("padding-right"),f=a.getPropertyValue("padding-bottom");else if(a.currentStyle)b=a.currentStyle.paddingLeft,c=a.currentStyle.paddingTop,e=a.currentStyle.paddingRight,f=a.currentStyle.paddingBottom;return{left:parseInt(b,10)||0,top:parseInt(c,10)||0,right:parseInt(e,10)||0,bottom:parseInt(f,10)||0}}function k(a){var b,c,e,f,d=a._trim;if(!d){d=j(a);if(window.getComputedStyle)f=window.getComputedStyle(a,null),b=f.getPropertyValue("border-left-width"),
c=f.getPropertyValue("border-top-width"),e=f.getPropertyValue("border-right-width"),f=f.getPropertyValue("border-bottom-width");else if(a.currentStyle)b=a.currentStyle.borderLeftWidth,c=a.currentStyle.borderTopWidth,e=a.currentStyle.borderRightWidth,f=a.currentStyle.borderBottomWidth;b=parseInt(b,10)||0;c=parseInt(c,10)||0;e=parseInt(e,10)||0;f=parseInt(f,10)||0;d.left+=b;d.top+=c;d.right+=e;d.bottom+=f;a._trim=d}return d}function l(a,b,c){this.start=a;this.end=b;this.caret=c}function m(a){this.left=
a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom}function n(a,b,c){this.view=a;this.lineIndex=b;this._lineDiv=c}function o(a){this._init(a)}var q=navigator.userAgent,p;document.selection&&window.ActiveXObject&&/MSIE/.test(q)&&(p=document.documentMode?document.documentMode:7);var r=parseFloat(q.split("Firefox/")[1]||q.split("Minefield/")[1])||void 0,s=q.indexOf("Opera")!==-1,x=q.indexOf("Chrome")!==-1,v=q.indexOf("Safari")!==-1&&!x,w=q.indexOf("WebKit")!==-1,t=q.indexOf("Android")!==-1,
u=q.indexOf("iPad")!==-1,y=navigator.platform.indexOf("Mac")!==-1,z=navigator.platform.indexOf("Win")!==-1,A=navigator.platform.indexOf("Linux")!==-1,C=typeof window.document.documentElement.addEventListener==="function",B=(!p||p>=9)&&typeof window.document.createRange().getBoundingClientRect==="function",I=z?"\r\n":"\n";l.prototype={clone:function(){return new l(this.start,this.end,this.caret)},collapse:function(){this.caret?this.end=this.start:this.start=this.end},extend:function(a){this.caret?
this.start=a:this.end=a;if(this.start>this.end)a=this.start,this.start=this.end,this.end=a,this.caret=!this.caret},setCaret:function(a){this.end=this.start=a;this.caret=!1},getCaret:function(){return this.caret?this.start:this.end},toString:function(){return"start="+this.start+" end="+this.end+(this.caret?" caret is at start":" caret is at end")},isEmpty:function(){return this.start===this.end},equals:function(a){return this.caret===a.caret&&this.start===a.start&&this.end===a.end}};m.prototype={toString:function(){return"{l="+
this.left+", t="+this.top+", r="+this.right+", b="+this.bottom+"}"}};n.prototype={create:function(a,b){if(!this._lineDiv){var c=this._lineDiv=this._createLine(a,b,this.lineIndex);c._line=this;return c}},_createLine:function(a,b,c){var e=this.view,d=e._model,g=d.getLine(c),j=d.getLineStart(c),k={type:"LineStyle",textView:e,lineIndex:c,lineText:g,lineStart:j};e.onLineStyle(k);d=b||document.createElement("DIV");if(!b||!h(b.viewStyle,k.style)){f(k.style,d,b);if(b)b._trim=null;d.viewStyle=k.style;d.setAttribute("role",
"presentation")}d.lineIndex=c;c=[];this._createRanges(k.ranges,g,0,g.length,j,{tabOffset:0,ranges:c});g=" ";!e._fullSelection&&p<9&&(g="\ufeff");w&&(g="\u200c");c.push({text:g,style:e._metrics.largestFontStyle,ignoreChars:1});var l,m,t,n,u,g=e=0,o,v;if(b){if(m=b.modelChangedEvent)m.removedLineCount===0&&m.addedLineCount===0?(v=m.start-j,o=m.addedCharCount-m.removedCharCount):v=-1,b.modelChangedEvent=void 0;m=b.firstChild}for(j=0;j<c.length;j++){l=c[j];n=l.text;e+=n.length;k=l.style;if(m)if(u=m.firstChild.data,
t=m.viewStyle,u===n&&h(k,t)){g+=u.length;m._rectsCache=void 0;l=m=m.nextSibling;continue}else for(;m;){if(v!==-1){t=e;t>=v&&(t-=o);u=(u=m.firstChild.data)?u.length:0;if(g+u>t)break;g+=u}t=m.nextSibling;d.removeChild(m);m=t}l=this._createSpan(d,document,n,k,l.ignoreChars);m?d.insertBefore(l,m):d.appendChild(l);if(b)b.lineWidth=void 0}if(b)for(a=l?l.nextSibling:null;a;)t=a.nextSibling,b.removeChild(a),a=t;else a.appendChild(d);return d},_createRanges:function(a,b,c,e,f,d){if(!(c>=e)){if(a)for(var g=
0;g<a.length;g++){var j=a[g];if(!(j.end<=f+c)){var k=Math.max(f+c,j.start)-f;if(k>=e)break;var l=Math.min(f+e,j.end)-f;if(k<l){k=Math.max(c,k);l=Math.min(e,l);for(c<k&&this._createRange(b,c,k,null,d);g+1<a.length&&a[g+1].start-f===l&&h(j.style,a[g+1].style);)j=a[g+1],l=Math.min(f+e,j.end)-f,g++;this._createRange(b,k,l,j.style,d);c=l}}}c<e&&this._createRange(b,c,e,null,d)}},_createRange:function(a,b,c,e,f){if(!(b>=c)){var d=this.view._customTabSize;if(d&&d!==8)for(var g=a.indexOf("\t",b);g!==-1&&g<
c;){b<g&&(b={text:a.substring(b,g),style:e},f.ranges.push(b),f.tabOffset+=b.text.length);b=d-f.tabOffset%d;if(b>0){for(var h="\u00a0",j=1;j<b;j++)h+=" ";b={text:h,style:e,ignoreChars:b-1};f.ranges.push(b);f.tabOffset+=b.text.length}b=g+1;g=a.indexOf("\t",b)}b<c&&(b={text:a.substring(b,c),style:e},f.ranges.push(b),f.tabOffset+=b.text.length)}},_createSpan:function(a,b,e,d,g){var h=d&&d.tagName==="A";if(h)a.hasLink=!0;a=h&&this.view._linksVisible?"A":"SPAN";h=b.createElement(a);h.appendChild(b.createTextNode(e));
f(d,h);if(a==="A"){var j=this.view;c(h,"click",function(a){return j._handleLinkClick(a)},!1)}h.viewStyle=d;if(g)h.ignoreChars=g;return h},_ensureCreated:function(){return this._lineDiv?this._lineDiv:this._createdDiv=this.create(this.view._clientDiv,null)},getBoundingClientRect:function(a,b){var c=this._ensureCreated(),e=this.view;if(a===void 0)return this._getLineBoundingClientRect(c,!0);var f=e._model,d=this.lineIndex,g=null;if(a<f.getLineEnd(d)){f=f.getLineStart(d);for(c=c.firstChild;c;){var d=
c.firstChild,h=d.length;c.ignoreChars&&(h-=c.ignoreChars);if(f+h>a){g=a-f;if(B)f=document.createRange(),f.setStart(d,g),f.setEnd(d,g+1),g=new m(f.getBoundingClientRect());else if(p)f=document.body.createTextRange(),f.moveToElementText(c),f.collapse(),f.moveEnd("character",g+1),f.moveStart("character",g),g=new m(f.getBoundingClientRect());else{var j=d.data;c.removeChild(d);c.appendChild(document.createTextNode(j.substring(0,g)));var k=document.createElement("SPAN");k.appendChild(document.createTextNode(j.substring(g,
g+1)));c.appendChild(k);c.appendChild(document.createTextNode(j.substring(g+1)));g=new m(k.getBoundingClientRect());c.innerHTML="";c.appendChild(d);this._createdDiv||(c=e._getSelection(),(f<=c.start&&c.start<f+h||f<=c.end&&c.end<f+h)&&e._updateDOMSelection())}p&&(f=window.screen.logicalXDPI/window.screen.deviceXDPI,c=window.screen.logicalYDPI/window.screen.deviceYDPI,g.left*=f,g.right*=f,g.top*=c,g.bottom*=c);break}f+=h;c=c.nextSibling}}f=this.getBoundingClientRect();if(!g)e._wrapMode?(e=this.getClientRects(),
g=e[e.length-1],g.left=g.right,g.left+=f.left,g.top+=f.top,g.right+=f.left,g.bottom+=f.top):(g=new m(f),g.left=g.right);if(b||b===void 0)g.left-=f.left,g.top-=f.top,g.right-=f.left,g.bottom-=f.top;return g},_getClientRects:function(a,b){var c,e,f,d;if(!a._rectsCache){c=a.getClientRects();e=Array(c.length);for(d=0;d<c.length;d++)f=e[d]=new m(c[d]),f.left-=b.left,f.top-=b.top,f.right-=b.left,f.bottom-=b.top;a._rectsCache=e}c=a._rectsCache;e=[c.length];for(d=0;d<c.length;d++)e[d]=new m(c[d]);return e},
getClientRects:function(a){if(!this.view._wrapMode)return[this.getBoundingClientRect()];for(var b=this._ensureCreated(),c=[],e=b.firstChild,f,d=b.getBoundingClientRect();e;){for(var g=this._getClientRects(e,d),b=0;b<g.length;b++){var h=g[b],j;if(h.top!==h.bottom){var k=h.top+(h.bottom-h.top)/2;for(j=0;j<c.length;j++)if(f=c[j],f.top<=k&&k<f.bottom)break;if(j===c.length)c.push(h);else{if(h.left<f.left)f.left=h.left;if(h.top<f.top)f.top=h.top;if(h.right>f.right)f.right=h.right;if(h.bottom>f.bottom)f.bottom=
h.bottom}}}e=e.nextSibling}return a!==void 0?c[a]:c},_getLineBoundingClientRect:function(a,b){var c=new m(a.getBoundingClientRect());if(!this.view._wrapMode){c.right=c.left;for(var e=a.lastChild;e&&e.ignoreChars===e.firstChild.length;)e=e.previousSibling;if(e)e=e.getBoundingClientRect(),c.right=e.right+k(a).right}b&&(e=k(a),c.left+=e.left,c.right-=e.right);return c},getLineCount:function(){return!this.view._wrapMode?1:this.getClientRects().length},getLineIndex:function(a){if(!this.view._wrapMode)return 0;
for(var b=this.getClientRects(),a=this.getBoundingClientRect(a),a=a.top+(a.bottom-a.top)/2,c=0;c<b.length;c++)if(b[c].top<=a&&a<b[c].bottom)return c;return b.length-1},getLineStart:function(a){if(!this.view._wrapMode||a===0)return this.view._model.getLineStart(a);var b=this.getClientRects();return this.getOffset(b[a].left+1,b[a].top+1)},getOffset:function(a,b){var c=this.view,e=c._model,f=this.lineIndex,d=e.getLineStart(f),e=e.getLineEnd(f);if(d===e)return d;var g=this._ensureCreated(),f=this.getBoundingClientRect(),
h,j;if(c._wrapMode){h=this.getClientRects();if(b<h[0].top)b=h[0].top;for(var k=0;k<h.length;k++)if(j=h[k],j.top<=b&&b<j.bottom)break;if(a<j.left)a=j.left;a>j.right&&(a=j.right-1)}else a<0&&(a=0),a>f.right-f.left&&(a=f.right-f.left);var l=p?window.screen.logicalXDPI/window.screen.deviceXDPI:1,m=p?window.screen.logicalYDPI/window.screen.deviceYDPI:1,k=d,t=g.firstChild;a:for(;t;){var n=t.firstChild,g=n.length;t.ignoreChars&&(g-=t.ignoreChars);var u,o,v;h=this._getClientRects(t,f);for(var z=0;z<h.length;z++)if(j=
h[z],j.left<=a&&a<j.right&&(!c._wrapMode||j.top<=b&&b<j.bottom)){if(p||B){for(var z=B?document.createRange():document.body.createTextRange(),y=g,w=-1;y-w>1;){var r=Math.floor((y+w)/2);j=w+1;h=r===g-1&&t.ignoreChars?n.length:r+1;B?(z.setStart(n,j),z.setEnd(n,h)):(z.moveToElementText(t),z.move("character",j),z.moveEnd("character",h-j));h=z.getClientRects();for(var s=!1,q=0;q<h.length;q++)if(j=h[q],u=j.left*l-f.left,v=j.right*l-f.left,o=j.top*m-f.top,j=j.bottom*m-f.top,u<=a&&a<v&&(!c._wrapMode||o<=b&&
b<j)){s=!0;break}s?y=r:w=r}k+=y;j=y;h=y===g-1&&t.ignoreChars?n.length:Math.min(y+1,n.length);B?(z.setStart(n,j),z.setEnd(n,h)):(z.moveToElementText(t),z.move("character",j),z.moveEnd("character",h-j));j=z.getClientRects()[0];u=j.left*l-f.left;v=j.right*l-f.left;a>u+(v-u)/2&&k++}else{j=[];for(l=0;l<g;l++)j.push("<span>"),l===g-1?j.push(n.data.substring(l)):j.push(n.data.substring(l,l+1)),j.push("</span>");t.innerHTML=j.join("");for(l=t.firstChild;l;){j=l.getBoundingClientRect();u=j.left-f.left;v=j.right-
f.left;if(u<=a&&a<v){a>u+(v-u)/2&&k++;break}k++;l=l.nextSibling}if(!this._createdDiv)t.innerHTML="",t.appendChild(n),f=c._getSelection(),(k<=f.start&&f.start<k+g||k<=f.end&&f.end<k+g)&&c._updateDOMSelection()}break a}k+=g;t=t.nextSibling}return Math.min(e,Math.max(d,k))},getNextOffset:function(a,b,c){return b==="line"?(b=this.view._model,a=b.getLineAtOffset(a),c>0?b.getLineEnd(a):b.getLineStart(a)):b==="wordend"?this._getNextOffset_W3C(a,b,c):p?this._getNextOffset_IE(a,b,c):this._getNextOffset_W3C(a,
b,c)},_getNextOffset_W3C:function(a,b,c){function e(a){return 33<=a&&a<=47||58<=a&&a<=64||91<=a&&a<=94||a===96||123<=a&&a<=126}if(b==="word"||b==="wordend"){var f=this.view._model,d=f.getLineAtOffset(a),g=f.getLine(d),h=f.getLineStart(d),d=f.getLineEnd(d),f=g.length;a-=h;var j,k;if(c>0){if(a===f)return d;j=g.charCodeAt(a);k=e(j);c=!k&&!(j===32||j===9);for(a++;a<f;){j=g.charCodeAt(a);d=e(j);if(b==="wordend"){if(!d&&k)break}else if(d&&!k)break;j=!d&&!(j===32||j===9);if(b==="wordend"){if(!j&&c)break}else if(j&&
!c)break;c=j;k=d;a++}}else{if(a===0)return h;a--;j=g.charCodeAt(a);k=e(j);for(c=!k&&!(j===32||j===9);0<a;){j=g.charCodeAt(a-1);d=e(j);if(b==="wordend"){if(d&&!k)break}else if(!d&&k)break;j=!d&&!(j===32||j===9);if(b==="wordend"){if(j&&!c)break}else if(!j&&c)break;c=j;k=d;a--}}return h+a}return a+c},_getNextOffset_IE:function(a,b,c){var e=this._ensureCreated(),f=this.view._model,d=this.lineIndex,g=0,h;h=f.getLineStart(d);if(a===f.getLineEnd(d))g=document.body.createTextRange(),g.moveToElementText(e.lastChild),
h=g.text.length,g.moveEnd(b,c),g=a+g.text.length-h;else if(a===h&&c<0)g=h;else for(e=e.firstChild;e;){f=e.firstChild.length;e.ignoreChars&&(f-=e.ignoreChars);if(h+f>a){g=document.body.createTextRange();a===h&&c<0?g.moveToElementText(e.previousSibling):(g.moveToElementText(e),g.collapse(),g.moveEnd("character",a-h));h=g.text.length;g.moveEnd(b,c);g=a+g.text.length-h;break}h=f+h;e=e.nextSibling}return g},destroy:function(){var a=this._createdDiv;if(a)a.parentNode.removeChild(a),this._createdDiv=null}};
o.prototype={addRuler:function(a,b){a.setView(this);var c=this._rulers;if(b!==void 0){var e,f;for(e=0,f=0;e<c.length&&f<b;e++)a.getLocation()===c[e].getLocation()&&f++;c.splice(f,0,a);b=f}else c.push(a);this._createRuler(a,b);this._update()},computeSize:function(){var a=0,b=0,c=this._model,e=this._clientDiv;if(!e)return{width:a,height:b};var f=e.style.width;if(w)e.style.width="0x7fffffffpx";for(var c=c.getLineCount(),d=0;d<c;d++){var g=this._getLine(d),h=g.getBoundingClientRect(),a=Math.max(a,h.right-
h.left);b+=h.bottom-h.top;g.destroy()}if(w)e.style.width=f;e=this._getViewPadding();a+=e.right+e.left;b+=e.bottom+e.top;return{width:a,height:b}},convert:function(a,b,c){if(this._clientDiv){var e=this._getScroll(),f=this._getViewPadding(),d=this._viewDiv.getBoundingClientRect();b==="document"&&(a.x!==void 0&&(a.x+=-e.x+d.left+f.left),a.y!==void 0&&(a.y+=-e.y+d.top+f.top));c==="document"&&(a.x!==void 0&&(a.x+=e.x-d.left-f.left),a.y!==void 0&&(a.y+=e.y-d.top-f.top));return a}},destroy:function(){for(var a=
0;a<this._rulers.length;a++)this._rulers[a].setView(null);this.rulers=null;this._destroyView();this.onDestroy({type:"Destroy"});this._actions=this._keyBindings=this._doubleClickSelection=this._selection=this._model=this._parent=null},focus:function(){this._clientDiv&&(this._updateDOMSelection(),s&&this._clientDiv.blur(),this._clientDiv.focus(),this._updateDOMSelection())},hasFocus:function(){return this._hasFocus},getActionDescription:function(a){if(a=this._actions[a])return a.actionDescription},
getActions:function(a){var b=[],c=this._actions,e;for(e in c)c.hasOwnProperty(e)&&(a||!c[e].defaultHandler)&&b.push(e);return b},getBottomIndex:function(a){return!this._clientDiv?0:this._getBottomIndex(a)},getBottomPixel:function(){return!this._clientDiv?0:this._getScroll().y+this._getClientHeight()},getCaretOffset:function(){return this._getSelection().getCaret()},getClientArea:function(){if(!this._clientDiv)return{x:0,y:0,width:0,height:0};var a=this._getScroll();return{x:a.x,y:a.y,width:this._getClientWidth(),
height:this._getClientHeight()}},getHorizontalPixel:function(){return!this._clientDiv?0:this._getScroll().x},getKeyBindings:function(a){for(var b=[],c=this._keyBindings,e=0;e<c.length;e++)c[e].actionID===a&&b.push(c[e].keyBinding);return b},getLineHeight:function(a){return!this._clientDiv?0:this._getLineHeight(a)},getLineIndex:function(a){return!this._clientDiv?0:this._getLineIndex(a)},getLinePixel:function(a){return!this._clientDiv?0:this._getLinePixel(a)},getLocationAtOffset:function(a){if(!this._clientDiv)return{x:0,
y:0};var b=this._model,a=Math.min(Math.max(0,a),b.getCharCount()),b=b.getLineAtOffset(a),c=this._getLine(b),a=c.getBoundingClientRect(a);c.destroy();c=a.left;b=this._getLinePixel(b)+a.top;return{x:c,y:b}},getOptions:function(){var a;if(arguments.length===0)a=this._defaultOptions();else if(arguments.length===1){if(a=arguments[0],typeof a==="string")return e(this["_"+a])}else{a={};for(var b in arguments)arguments.hasOwnProperty(b)&&(a[arguments[b]]=void 0)}for(var c in a)a.hasOwnProperty(c)&&(a[c]=
e(this["_"+c]));return a},getModel:function(){return this._model},getOffsetAtLocation:function(a,b){if(!this._clientDiv)return 0;var c=this._getLineIndex(b),e=this._getLine(c),c=e.getOffset(a,b-this._getLinePixel(c));e.destroy();return c},getRulers:function(){return this._rulers.slice(0)},getSelection:function(){var a=this._getSelection();return{start:a.start,end:a.end}},getText:function(a,b){return this._model.getText(a,b)},getTopIndex:function(a){return!this._clientDiv?0:this._getTopIndex(a)},getTopPixel:function(){return!this._clientDiv?
0:this._getScroll().y},invokeAction:function(a,b){if(this._clientDiv){var c=this._actions[a];if(c){if(!b&&c.handler&&c.handler())return;if(c.defaultHandler)return c.defaultHandler()}return!1}},isDestroyed:function(){return!this._clientDiv},onContextMenu:function(a){return this.dispatchEvent(a)},onDragStart:function(a){return this.dispatchEvent(a)},onDrag:function(a){return this.dispatchEvent(a)},onDragEnd:function(a){return this.dispatchEvent(a)},onDragEnter:function(a){return this.dispatchEvent(a)},
onDragOver:function(a){return this.dispatchEvent(a)},onDragLeave:function(a){return this.dispatchEvent(a)},onDrop:function(a){return this.dispatchEvent(a)},onDestroy:function(a){return this.dispatchEvent(a)},onLineStyle:function(a){return this.dispatchEvent(a)},onModelChanged:function(a){return this.dispatchEvent(a)},onModelChanging:function(a){return this.dispatchEvent(a)},onModify:function(a){return this.dispatchEvent(a)},onMouseDown:function(a){return this.dispatchEvent(a)},onMouseUp:function(a){return this.dispatchEvent(a)},
onMouseMove:function(a){return this.dispatchEvent(a)},onMouseOver:function(a){return this.dispatchEvent(a)},onMouseOut:function(a){return this.dispatchEvent(a)},onSelection:function(a){return this.dispatchEvent(a)},onScroll:function(a){return this.dispatchEvent(a)},onVerify:function(a){return this.dispatchEvent(a)},onFocus:function(a){return this.dispatchEvent(a)},onBlur:function(a){return this.dispatchEvent(a)},redraw:function(){if(!(this._redrawCount>0)){var a=this._model.getLineCount();this.redrawRulers(0,
a);this.redrawLines(0,a)}},redrawRulers:function(a,b){if(!(this._redrawCount>0))for(var c=this.getRulers(),e=0;e<c.length;e++)this.redrawLines(a,b,c[e])},redrawLines:function(a,b,c){if(!(this._redrawCount>0)&&(a===void 0&&(a=0),b===void 0&&(b=this._model.getLineCount()),a!==b)){var e=this._clientDiv;if(e){if(c)for(var f=(c.getLocation()==="left"?this._leftDiv:this._rightDiv).firstChild.rows[0].cells,d=0;d<f.length;d++)if(f[d].firstChild._ruler===c){e=f[d].firstChild;break}c?e.rulerChanged=!0:this._lineHeight&&
this._resetLineHeight(a,b);if(!c||c.getOverview()==="page")for(e=e.firstChild;e;){f=e.lineIndex;if(a<=f&&f<b)e.lineChanged=!0;e=e.nextSibling}if(!c&&!this._wrapMode&&a<=this._maxLineIndex&&this._maxLineIndex<b)this._checkMaxLineIndex=this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._queueUpdate()}}},redrawRange:function(a,b){if(!(this._redrawCount>0)){var c=this._model;a===void 0&&(a=0);b===void 0&&(b=c.getCharCount());var e=c.getLineAtOffset(a),c=c.getLineAtOffset(Math.max(a,b-
1))+1;this.redrawLines(e,c)}},removeRuler:function(a){for(var b=this._rulers,c=0;c<b.length;c++)if(b[c]===a){b.splice(c,1);a.setView(null);this._destroyRuler(a);this._update();break}},resize:function(){this._clientDiv&&this._handleResize(null)},setAction:function(a,b,c){if(a){var e=this._actions,f=e[a];f||(f=e[a]={});f.handler=b;f.actionDescription=c}},setKeyBinding:function(a,b){for(var c=this._keyBindings,e=0;e<c.length;e++){var f=c[e];if(f.keyBinding.equals(a)){b?f.actionID=b:f.predefined?f.actionID=
null:c.splice(e,1);return}}b&&c.push({keyBinding:a,actionID:b})},setCaretOffset:function(a,b){var c=this._model.getCharCount(),a=Math.max(0,Math.min(a,c));this._setSelection(new l(a,a,!1),b===void 0||b)},setHorizontalPixel:function(a){this._clientDiv&&(a=Math.max(0,a),this._scrollView(a-this._getScroll().x,0))},setRedraw:function(a){a?--this._redrawCount===0&&this.redraw():this._redrawCount++},setModel:function(a){if(a&&a!==this._model){this._model.removeEventListener("preChanging",this._modelListener.onChanging);
this._model.removeEventListener("postChanged",this._modelListener.onChanged);var b=this._model.getLineCount(),c=this._model.getCharCount(),e=a.getLineCount(),f=a.getCharCount(),d={type:"ModelChanging",text:a.getText(),start:0,removedCharCount:c,addedCharCount:f,removedLineCount:b,addedLineCount:e};this.onModelChanging(d);this._model=a;d={type:"ModelChanged",start:0,removedCharCount:c,addedCharCount:f,removedLineCount:b,addedLineCount:e};this.onModelChanged(d);this._model.addEventListener("preChanging",
this._modelListener.onChanging);this._model.addEventListener("postChanged",this._modelListener.onChanged);this._reset();this._update()}},setOptions:function(a){var b=this._defaultOptions(),c;for(c in a)if(a.hasOwnProperty(c)){var f=a[c];if(!h(this["_"+c],f)){var d=b[c]?b[c].update:null;d?d.call(this,f):this["_"+c]=e(f)}}},setSelection:function(a,b,c){var e=a>b;if(e)var f=a,a=b,b=f;f=this._model.getCharCount();a=Math.max(0,Math.min(a,f));b=Math.max(0,Math.min(b,f));this._setSelection(new l(a,b,e),
c===void 0||c)},setText:function(a,b,c){var e=b===void 0&&c===void 0;b===void 0&&(b=0);c===void 0&&(c=this._model.getCharCount());this._modifyContent({text:a,start:b,end:c,_code:!0},!e);if(e)this._columnX=-1,this._setSelection(new l(0,0,!1),!0),r&&this._fixCaret()},setTopIndex:function(a){this._clientDiv&&this._scrollView(0,this._getLinePixel(Math.max(0,a))-this._getScroll().y)},setTopPixel:function(a){this._clientDiv&&this._scrollView(0,Math.max(0,a)-this._getScroll().y)},showSelection:function(){return this._showCaret(!0)},
update:function(a,b){this._clientDiv&&(a&&this._updateStyle(),b===void 0||b?this._update():this._queueUpdate())},_handleRootMouseDown:function(a){if(!a)a=window.event;if(r&&a.which===1)this._clientDiv.contentEditable=!1,this._ignoreBlur=(this._overlayDiv||this._clientDiv).draggable=!0;var b=this._overlayDiv||this._clientDiv;if(p<9)b=this._viewDiv;for(var c=a.target?a.target:a.srcElement;c;){if(b===c)return;c=c.parentNode}a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
if(!C){var e=this;setTimeout(function(){e._clientDiv.focus()},0)}},_handleRootMouseUp:function(a){if(!a)a=window.event;if(r&&a.which===1)this._clientDiv.contentEditable=!0,(this._overlayDiv||this._clientDiv).draggable=!1,this._fixCaret(),this._ignoreBlur=!1},_handleBlur:function(){if(!this._ignoreBlur){this._hasFocus=!1;if(p<9&&!this._getSelection().isEmpty()){var a=document.createElement("DIV"),b=this._rootDiv;b.appendChild(a);b.removeChild(a)}if(this._selDiv1)if(this._selDiv1.style.background="lightgray",
this._selDiv2.style.background="lightgray",this._selDiv3.style.background="lightgray",window.getSelection){b=window.getSelection();for(a=b.anchorNode;a;){if(a===this._clientDiv){b.rangeCount>0&&b.removeAllRanges();break}a=a.parentNode}}else if(document.selection){this._ignoreSelect=!1;for(a=document.selection.createRange().parentElement();a;){if(a===this._clientDiv){document.selection.empty();break}a=a.parentNode}this._ignoreSelect=!0}if(!this._ignoreFocus)this.onBlur({type:"Blur"})}},_handleContextMenu:function(a){if(!a)a=
window.event;p&&this._lastMouseButton===3&&this._updateDOMSelection();var b=!1;if(this.isListening("ContextMenu"))b=this._createMouseEvent("ContextMenu",a),b.screenX=a.screenX,b.screenY=a.screenY,this.onContextMenu(b),b=b.defaultPrevented;if(b)return a.preventDefault&&a.preventDefault(),!1},_handleCopy:function(a){if(!this._ignoreCopy){if(!a)a=window.event;if(this._doCopy(a))return a.preventDefault&&a.preventDefault(),!1}},_handleCut:function(a){if(!a)a=window.event;if(this._doCut(a))return a.preventDefault&&
a.preventDefault(),!1},_handleDataModified:function(){this._startIME()},_handleDblclick:function(a){if(!a)a=window.event;this._lastMouseTime=a.timeStamp?a.timeStamp:(new Date).getTime();if(this._clickCount!==2)this._clickCount=2,this._handleMouse(a)},_handleDragStart:function(a){if(!a)a=window.event;if(r){var b=this;setTimeout(function(){b._clientDiv.contentEditable=!0;b._clientDiv.draggable=!1;b._ignoreBlur=!1},0)}if(this.isListening("DragStart")&&this._dragOffset!==-1)this._isMouseDown=!1,this.onDragStart(this._createMouseEvent("DragStart",
a)),this._dragOffset=-1;else return a.preventDefault&&a.preventDefault(),!1},_handleDrag:function(a){if(!a)a=window.event;if(this.isListening("Drag"))this.onDrag(this._createMouseEvent("Drag",a))},_handleDragEnd:function(a){if(!a)a=window.event;this._dropTarget=!1;this._dragOffset=-1;if(this.isListening("DragEnd"))this.onDragEnd(this._createMouseEvent("DragEnd",a));r&&(this._fixCaret(),a.dataTransfer.dropEffect==="none"&&!a.dataTransfer.mozUserCancelled&&this._fixCaret())},_handleDragEnter:function(a){if(!a)a=
window.event;var b=!0;this._dropTarget=!0;this.isListening("DragEnter")&&(b=!1,this.onDragEnter(this._createMouseEvent("DragEnter",a)));if(w||b)return a.preventDefault&&a.preventDefault(),!1},_handleDragOver:function(a){if(!a)a=window.event;var b=!0;this.isListening("DragOver")&&(b=!1,this.onDragOver(this._createMouseEvent("DragOver",a)));if(w||b){if(b)a.dataTransfer.dropEffect="none";a.preventDefault&&a.preventDefault();return!1}},_handleDragLeave:function(a){if(!a)a=window.event;this._dropTarget=
!1;if(this.isListening("DragLeave"))this.onDragLeave(this._createMouseEvent("DragLeave",a))},_handleDrop:function(a){if(!a)a=window.event;this._dropTarget=!1;if(this.isListening("Drop"))this.onDrop(this._createMouseEvent("Drop",a));a.preventDefault&&a.preventDefault();return!1},_handleFocus:function(){this._hasFocus=!0;u&&this._lastTouchOffset!==void 0?(this.setCaretOffset(this._lastTouchOffset,!0),this._lastTouchOffset=void 0):this._updateDOMSelection();if(this._selDiv1){var a=this._highlightRGB;
this._selDiv1.style.background=a;this._selDiv2.style.background=a;this._selDiv3.style.background=a}if(!this._ignoreFocus)this.onFocus({type:"Focus"})},_handleKeyDown:function(a){if(!a)a=window.event;var b=!1;switch(a.keyCode){case 16:case 17:case 18:case 91:b=!0;break;default:this._setLinksVisible(!1)}if(a.keyCode===229){if(this._readonly)return a.preventDefault&&a.preventDefault(),!1;b=!0;v&&y&&a.ctrlKey&&(b=!1);b&&this._startIME()}else b||this._commitIME();if((y||A)&&r<4||s)return this._keyDownEvent=
a,!0;if(this._doAction(a))return a.preventDefault?(a.preventDefault(),a.stopPropagation()):(a.cancelBubble=!0,a.returnValue=!1,a.keyCode=0),!1},_handleKeyPress:function(a){if(!a)a=window.event;if(y&&w&&(63232<=a.keyCode&&a.keyCode<=63487||a.keyCode===13||a.keyCode===8))return a.preventDefault&&a.preventDefault(),!1;if(((y||A)&&r<4||s)&&this._doAction(this._keyDownEvent))return a.preventDefault&&a.preventDefault(),!1;var b=y?a.metaKey:a.ctrlKey;if(a.charCode!==void 0&&b)switch(a.charCode){case 99:case 118:case 120:return!0}b=
!1;if(y){if(a.ctrlKey||a.metaKey)b=!0}else if(r){if(a.ctrlKey||a.altKey)b=!0}else a.ctrlKey^a.altKey&&(b=!0);if(!b&&(b=s?a.which:a.charCode!==void 0?a.charCode:a.keyCode,b>31))return this._doContent(String.fromCharCode(b)),a.preventDefault&&a.preventDefault(),!1},_handleKeyUp:function(a){if(!a)a=window.event;(y?a.metaKey:a.ctrlKey)||this._setLinksVisible(!1);a.keyCode===13&&this._commitIME()},_handleLinkClick:function(a){if(!a)a=window.event;if(!(y?a.metaKey:a.ctrlKey))return a.preventDefault&&a.preventDefault(),
!1},_handleMouse:function(a){var b=!0,c=window;if(p||r&&!this._overlayDiv)c=this._clientDiv;if(this._overlayDiv){if(this._hasFocus)this._ignoreFocus=!0;var e=this;setTimeout(function(){e.focus();e._ignoreFocus=!1},0)}this._clickCount===1?(b=this._setSelectionTo(a.clientX,a.clientY,a.shiftKey,!s&&this._hasFocus&&this.isListening("DragStart")))&&this._setGrab(c):(C&&this._setGrab(c),this._doubleClickSelection=null,this._setSelectionTo(a.clientX,a.clientY,a.shiftKey),this._doubleClickSelection=this._getSelection());
return b},_handleMouseDown:function(a){if(!a)a=window.event;if(this._linksVisible)if((a.target||a.srcElement).tagName!=="A")this._setLinksVisible(!1);else return;this._commitIME();var b=a.which;b||(a.button===4&&(b=2),a.button===2&&(b=3),a.button===1&&(b=1));var c=b!==2&&a.timeStamp?a.timeStamp:(new Date).getTime(),e=c-this._lastMouseTime,f=Math.abs(this._lastMouseX-a.clientX),d=Math.abs(this._lastMouseY-a.clientY),g=this._lastMouseButton===b;this._lastMouseX=a.clientX;this._lastMouseY=a.clientY;
this._lastMouseTime=c;this._lastMouseButton=b;if(b===1)this._isMouseDown=!0,g&&e<=this._clickTime&&f<=this._clickDist&&d<=this._clickDist?this._clickCount++:this._clickCount=1;if(this.isListening("MouseDown")&&(c=this._createMouseEvent("MouseDown",a),this.onMouseDown(c),c.defaultPrevented)){a.preventDefault();return}if(b===1&&this._handleMouse(a)&&(p>=9||s||x||v||r&&!this._overlayDiv))this._hasFocus||this.focus(),a.preventDefault();r&&this._lastMouseButton===3&&this._updateDOMSelection()},_handleMouseOver:function(a){if(!a)a=
window.event;if(this.isListening("MouseOver"))this.onMouseOver(this._createMouseEvent("MouseOver",a))},_handleMouseOut:function(a){if(!a)a=window.event;if(this.isListening("MouseOut"))this.onMouseOut(this._createMouseEvent("MouseOut",a))},_handleMouseMove:function(a){if(!a)a=window.event;var b=this._isClientDiv(a);if(this.isListening("MouseMove")&&b)this.onMouseMove(this._createMouseEvent("MouseMove",a));if(!this._dropTarget){var c=this._linksVisible||this._lastMouseMoveX!==a.clientX||this._lastMouseMoveY!==
a.clientY;this._lastMouseMoveX=a.clientX;this._lastMouseMoveY=a.clientY;this._setLinksVisible(c&&!this._isMouseDown&&(y?a.metaKey:a.ctrlKey));if(!C){if(a.button===0)return this._setGrab(null),!0;if(!this._isMouseDown&&a.button===1&&(this._clickCount&1)!==0&&b)return this._clickCount=2,this._handleMouse(a,this._clickCount)}if(this._isMouseDown&&this._dragOffset===-1){var b=a.clientX,a=a.clientY,e=this._getViewPadding(),f=this._viewDiv.getBoundingClientRect(),d=this._getClientWidth(),g=this._getClientHeight(),
c=f.left+e.left,h=f.top+e.top,d=f.left+e.left+d,e=f.top+e.top+g,f=this._model,g=f.getLineAtOffset(this._getSelection().getCaret());a<h&&g!==0?this._doAutoScroll("up",b,a-h):a>e&&g!==f.getLineCount()-1?this._doAutoScroll("down",b,a-e):b<c&&!this._wrapMode?this._doAutoScroll("left",b-c,a):b>d&&!this._wrapMode?this._doAutoScroll("right",b-d,a):(this._endAutoScroll(),this._setSelectionTo(b,a,!0))}}},_isClientDiv:function(a){for(var b=this._overlayDiv||this._clientDiv,a=a.target?a.target:a.srcElement;a;){if(b===
a)return!0;a=a.parentNode}return!1},_createMouseEvent:function(a,b){var c=this.convert({x:b.clientX,y:b.clientY},"page","document");return{type:a,event:b,clickCount:this._clickCount,x:c.x,y:c.y,preventDefault:function(){this.defaultPrevented=!0}}},_handleMouseUp:function(a){if(!a)a=window.event;var b=a.which?a.button===0:a.button===1;if(this.isListening("MouseUp")&&(this._isClientDiv(a)||b&&this._isMouseDown))this.onMouseUp(this._createMouseEvent("MouseUp",a));if(!this._linksVisible&&b&&this._isMouseDown){if(this._dragOffset!==
-1)b=this._getSelection(),b.extend(this._dragOffset),b.collapse(),this._setSelection(b,!0,!0),this._dragOffset=-1;this._isMouseDown=!1;this._endAutoScroll();C&&this._setGrab(null);r&&a.preventDefault()}},_handleMouseWheel:function(a){if(!a)a=window.event;var b=this._getLineHeight(),c=0,e=0;p||s?e=-a.wheelDelta/40*b:r?(b=y?a.detail*3:Math.max(-256,Math.min(256,a.detail))*b,a.axis===a.HORIZONTAL_AXIS?c=b:e=b):y?(e=c=40,a.wheelDeltaX%120!==0&&(c=1),a.wheelDeltaY%120!==0&&(e=1),c=-a.wheelDeltaX/c,-1<
c&&c<0&&(c=-1),0<c&&c<1&&(c=1),e=-a.wheelDeltaY/e,-1<e&&e<0&&(e=-1),0<e&&e<1&&(e=1)):(c=-a.wheelDeltaX,e=-a.wheelDeltaY/120*8*b);if(v){for(b=a.target;b&&b.lineIndex===void 0;)b=b.parentNode;this._mouseWheelLine=b}b=this._getScroll();this._scrollView(c,e);c=this._getScroll();if(b.x!==c.x||b.y!==c.y)return a.preventDefault&&a.preventDefault(),!1},_handlePaste:function(a){if(!this._ignorePaste){if(!a)a=window.event;if(this._doPaste(a)){if(p){var b=this;this._ignoreFocus=!0;setTimeout(function(){b._updateDOMSelection();
this._ignoreFocus=!1},0)}a.preventDefault&&a.preventDefault();return!1}}},_handleResize:function(){var a=this._parent.clientWidth,b=this._parent.clientHeight;if(this._parentWidth!==a||this._parentHeight!==b)this._parentWidth!==a&&this._resetLineHeight(),this._parentWidth=a,this._parentHeight=b,p<9?this._queueUpdate():this._update()},_handleRulerEvent:function(a){if(!a)a=window.event;for(var b=a.target?a.target:a.srcElement,c=b.lineIndex;b&&!b._ruler;){if(c===void 0&&b.lineIndex!==void 0)c=b.lineIndex;
b=b.parentNode}b=b?b._ruler:null;if(c===void 0&&b&&b.getOverview()==="document"){var c=this._getClientHeight(),e=this._model.getLineCount(),f=this._getViewPadding(),d=this._viewDiv.getBoundingClientRect(),c=Math.floor((a.clientY-d.top-this._metrics.scrollWidth)*e/(c+f.top+f.bottom-2*this._metrics.scrollWidth));0<=c&&c<e||(c=void 0)}if(b)switch(a.type){case "click":if(b.onClick)b.onClick(c,a);break;case "dblclick":if(b.onDblClick)b.onDblClick(c,a);break;case "mousemove":if(b.onMouseMove)b.onMouseMove(c,
a);break;case "mouseover":if(b.onMouseOver)b.onMouseOver(c,a);break;case "mouseout":if(b.onMouseOut)b.onMouseOut(c,a)}},_handleScroll:function(){var a=this._getScroll(),b=this._hScroll,c=this._vScroll;if(b!==a.x||c!==a.y)this._hScroll=a.x,this._vScroll=a.y,this._commitIME(),this._update(c===a.y),this.onScroll({type:"Scroll",oldValue:{x:b,y:c},newValue:a})},_handleSelectStart:function(a){if(!a)a=window.event;if(this._ignoreSelect)return a&&a.preventDefault&&a.preventDefault(),!1},_getModelOffset:function(a,
b){if(a){var c;c=a.tagName==="DIV"?a:a.parentNode.parentNode;var e=0,f=c.lineIndex;if(a.tagName!=="DIV")for(c=c.firstChild;c;){var d=c.firstChild;if(d===a){c.ignoreChars&&(e-=c.ignoreChars);e+=b;break}c.ignoreChars&&(e-=c.ignoreChars);e+=d.data.length;c=c.nextSibling}return Math.max(0,e)+this._model.getLineStart(f)}},_handleSelectionChange:function(){if(!t){var a=window.getSelection(),b=this._getModelOffset(a.anchorNode,a.anchorOffset),a=this._getModelOffset(a.focusNode,a.focusOffset);b===void 0||
a===void 0||this._setSelection(new l(b,a),!1,!1)}},_handleTextInput:function(a){if(!a)a=window.event;this._doContent(a.data);a.preventDefault()},_handleTouchStart:function(a){if(this._touchScrollTimer)this._vScrollDiv.style.display="none",this._hScrollDiv.style.display="none",clearInterval(this._touchScrollTimer),this._touchScrollTimer=null;var b=a.touches;if(b.length===1){var b=b[0],c=b.clientX,e=b.clientY;this._touchStartX=c;this._touchStartY=e;if(t&&(e<b.pageY-window.pageYOffset||c<b.pageX-window.pageXOffset))c=
b.pageX-window.pageXOffset,e=b.pageY-window.pageYOffset;b=this.convert({x:c,y:e},"page","document");this._lastTouchOffset=this.getOffsetAtLocation(b.x,b.y);this._touchStartTime=a.timeStamp;this._touching=!0;t&&this.setSelection(this._lastTouchOffset,this._lastTouchOffset)}},_handleTouchMove:function(a){var b=a.touches;if(b.length===1){b=b[0];this._touchCurrentX=b.clientX;this._touchCurrentY=b.clientY;if(!this._touchScrollTimer&&a.timeStamp-this._touchStartTime<200){this._vScrollDiv.style.display=
"block";if(!this._wrapMode)this._hScrollDiv.style.display="block";var c=this;this._touchScrollTimer=setInterval(function(){var a=0,b=0;if(c._touching)a=c._touchStartX-c._touchCurrentX,b=c._touchStartY-c._touchCurrentY,c._touchSpeedX=a/10,c._touchSpeedY=b/10,c._touchStartX=c._touchCurrentX,c._touchStartY=c._touchCurrentY;else if(Math.abs(c._touchSpeedX)<0.1&&Math.abs(c._touchSpeedY)<0.1){c._vScrollDiv.style.display="none";c._hScrollDiv.style.display="none";clearInterval(c._touchScrollTimer);c._touchScrollTimer=
null;return}else a=c._touchSpeedX*10,b=c._touchSpeedY*10,c._touchSpeedX*=0.95,c._touchSpeedY*=0.95;c._scrollView(a,b)},10)}this._touchScrollTimer&&a.preventDefault()}},_handleTouchEnd:function(a){if(a.touches.length===0)this._touching=!1},_doAction:function(a){for(var b=this._keyBindings,c=0;c<b.length;c++){var e=b[c];if(e.keyBinding.match(a)){if(e.actionID&&(a=this._actions[e.actionID]))if(a.handler){if(!a.handler())return a.defaultHandler?typeof a.defaultHandler()==="boolean":!1}else if(a.defaultHandler)return typeof a.defaultHandler()===
"boolean";return!0}}return!1},_doBackspace:function(a){var b=this._getSelection();if(b.isEmpty()){var c=this._model,e=b.getCaret(),f=c.getLineAtOffset(e),d=c.getLineStart(f);if(e===d)f>0&&b.extend(c.getLineEnd(f-1));else{var g=!1;this._expandTab&&a.unit==="character"&&(e-d)%this._tabSize===0&&(g=!/[^ ]/.test(c.getText(d,e)));g?b.extend(e-this._tabSize):(c=this._getLine(f),b.extend(c.getNextOffset(e,a.unit,-1)),c.destroy())}}this._modifyContent({text:"",start:b.start,end:b.end},!0);return!0},_doContent:function(a){var b=
this._getSelection();this._modifyContent({text:a,start:b.start,end:b.end,_ignoreDOMSelection:!0},!0)},_doCopy:function(a){var b=this._getSelection();return!b.isEmpty()?this._setClipboardText(this._getBaseText(b.start,b.end),a):!0},_doCursorNext:function(a){if(!a.select&&this._clearSelection("next"))return!0;var b=this._model,c=this._getSelection(),e=c.getCaret(),f=b.getLineAtOffset(e);e===b.getLineEnd(f)?f+1<b.getLineCount()&&c.extend(b.getLineStart(f+1)):(b=this._getLine(f),c.extend(b.getNextOffset(e,
a.unit,1)),b.destroy());a.select||c.collapse();this._setSelection(c,!0);return!0},_doCursorPrevious:function(a){if(!a.select&&this._clearSelection("previous"))return!0;var b=this._model,c=this._getSelection(),e=c.getCaret(),f=b.getLineAtOffset(e);e===b.getLineStart(f)?f>0&&c.extend(b.getLineEnd(f-1)):(b=this._getLine(f),c.extend(b.getNextOffset(e,a.unit,-1)),b.destroy());a.select||c.collapse();this._setSelection(c,!0);return!0},_doCut:function(a){var b=this._getSelection();return!b.isEmpty()?(b=this._getBaseText(b.start,
b.end),this._doContent(""),this._setClipboardText(b,a)):!0},_doDelete:function(a){var b=this._getSelection();if(b.isEmpty()){var c=this._model,e=b.getCaret(),f=c.getLineAtOffset(e);e===c.getLineEnd(f)?f+1<c.getLineCount()&&b.extend(c.getLineStart(f+1)):(c=this._getLine(f),b.extend(c.getNextOffset(e,a.unit,1)),c.destroy())}this._modifyContent({text:"",start:b.start,end:b.end},!0);return!0},_doEnd:function(a){var b=this._getSelection(),c=this._model;if(a.ctrl)b.extend(c.getCharCount());else{var e=b.getCaret(),
f=c.getLineAtOffset(e);if(this._wrapMode){var d=this._getLine(f),e=d.getLineIndex(e),e=e===d.getLineCount()-1?c.getLineEnd(f):d.getLineStart(e+1)-1;d.destroy()}else e=c.getLineEnd(f);b.extend(e)}a.select||b.collapse();this._setSelection(b,!0);return!0},_doEnter:function(a){var b=this._model,c=this._getSelection();this._doContent(b.getLineDelimiter());if(a&&a.noCursor)c.end=c.start,this._setSelection(c);return!0},_doHome:function(a){var b=this._getSelection(),c=this._model;if(a.ctrl)b.extend(0);else{var e=
b.getCaret(),f=c.getLineAtOffset(e);this._wrapMode?(c=this._getLine(f),e=c.getLineIndex(e),e=c.getLineStart(e),c.destroy()):e=c.getLineStart(f);b.extend(e)}a.select||b.collapse();this._setSelection(b,!0);return!0},_doLineDown:function(a){var b=this._model,c=this._getSelection(),e=c.getCaret(),f=b.getLineAtOffset(e),d=this._getLine(f),g=this._columnX,h=1,j=!1;if(g===-1||a.wholeLine||a.select&&p)g=a.wholeLine?b.getLineEnd(f+1):e,g=d.getBoundingClientRect(g).left;(e=d.getLineIndex(e))<d.getLineCount()-
1?h=d.getClientRects(e+1).top+1:(j=f===b.getLineCount()-1,f++);j?a.select&&(c.extend(b.getCharCount()),this._setSelection(c,!0,!0)):(d.lineIndex!==f&&(d.destroy(),d=this._getLine(f)),c.extend(d.getOffset(g,h)),a.select||c.collapse(),this._setSelection(c,!0,!0));this._columnX=g;d.destroy();return!0},_doLineUp:function(a){var b=this._model,c=this._getSelection(),e=c.getCaret(),f=b.getLineAtOffset(e),d=this._getLine(f),g=this._columnX,h=!1,j;if(g===-1||a.wholeLine||a.select&&p)g=a.wholeLine?b.getLineStart(f-
1):e,g=d.getBoundingClientRect(g).left;(e=d.getLineIndex(e))>0?j=d.getClientRects(e-1).top+1:(h=f===0,h||(f--,j=this._getLineHeight(f)-1));h?a.select&&(c.extend(0),this._setSelection(c,!0,!0)):(d.lineIndex!==f&&(d.destroy(),d=this._getLine(f)),c.extend(d.getOffset(g,j)),a.select||c.collapse(),this._setSelection(c,!0,!0));this._columnX=g;d.destroy();return!0},_doPageDown:function(a){var b=this._model,c=this._getSelection(),e=c.getCaret(),f=b.getLineAtOffset(e),d=b.getLineCount(),g=this._getScroll(),
h=this._getClientHeight(),j;if(this._lineHeight){b=this._columnX;g=this._getBoundsAtOffset(e);if(b===-1||a.select&&p)b=g.left;e=this._getLineIndex(g.top+h);j=this._getLine(e);f=this._getLinePixel(e);e=j.getOffset(b,g.top+h-f);h=j.getBoundingClientRect(e);j.destroy();c.extend(e);a.select||c.collapse();this._setSelection(c,!0,!0,h.top+f-g.top);this._columnX=b;return!0}if(f<d-1){var k=this._getLineHeight(),l=Math.min(d-f-1,Math.floor(h/k)),l=Math.max(1,l),b=this._columnX;if(b===-1||a.select&&p)j=this._getLine(f),
b=j.getBoundingClientRect(e).left,j.destroy();j=this._getLine(f+l);c.extend(j.getOffset(b,0));j.destroy();a.select||c.collapse();a=d*k;e=g.y+l*k;e+h>a&&(e=a-h);this._setSelection(c,!0,!0,e-g.y);this._columnX=b}return!0},_doPageUp:function(a){var b=this._model,c=this._getSelection(),e=c.getCaret(),f=b.getLineAtOffset(e),d=this._getScroll(),g=this._getClientHeight(),h;if(this._lineHeight){b=this._columnX;d=this._getBoundsAtOffset(e);if(b===-1||a.select&&p)b=d.left;e=this._getLineIndex(d.bottom-g);h=
this._getLine(e);f=this._getLinePixel(e);e=h.getOffset(b,d.bottom-g-f);g=h.getBoundingClientRect(e);h.destroy();c.extend(e);a.select||c.collapse();this._setSelection(c,!0,!0,g.top+f-d.top);this._columnX=b;return!0}if(f>0){var j=this._getLineHeight(),g=Math.max(1,Math.min(f,Math.floor(g/j))),b=this._columnX;if(b===-1||a.select&&p)h=this._getLine(f),b=h.getBoundingClientRect(e).left,h.destroy();h=this._getLine(f-g);c.extend(h.getOffset(b,this._getLineHeight(f-g)-1));h.destroy();a.select||c.collapse();
a=Math.max(0,d.y-g*j);this._setSelection(c,!0,!0,a-d.y);this._columnX=b}return!0},_doPaste:function(a){var b=this;return this._getClipboardText(a,function(a){a&&(A&&b._lastMouseButton===2&&(new Date).getTime()-b._lastMouseTime<=b._clickTime&&b._setSelectionTo(b._lastMouseX,b._lastMouseY),b._doContent(a))})!==null},_doScroll:function(a){var b=a.type,c=this._model,e=c.getLineCount(),a=this._getClientHeight(),f=this._getLineHeight();e*=f;var d=this._getScroll().y,g;switch(b){case "textStart":g=0;break;
case "textEnd":g=e-a;break;case "pageDown":g=d+a;break;case "pageUp":g=d-a;break;case "centerLine":b=this._getSelection(),g=c.getLineAtOffset(b.start),c=(c.getLineAtOffset(b.end)-g+1)*f,g=g*f-a/2+c/2}g!==void 0&&(g=Math.min(Math.max(0,g),e-a),this._scrollView(0,g-d));return!0},_doSelectAll:function(){var a=this._model,b=this._getSelection();b.setCaret(0);b.extend(a.getCharCount());this._setSelection(b,!1);return!0},_doTab:function(){if(this._tabMode&&!this._readonly){var a="\t";if(this._expandTab)var b=
this._model,a=this._getSelection().getCaret(),c=b.getLineAtOffset(a),b=b.getLineStart(c),a=Array(this._tabSize-(a-b)%this._tabSize+1).join(" ");this._doContent(a);return!0}},_doShiftTab:function(){return!this._tabMode||this._readonly?void 0:!0},_doTabMode:function(){this._tabMode=!this._tabMode;return!0},_doWrapMode:function(){this.setOptions({wrapMode:!this.getOptions("wrapMode")});return!0},_autoScroll:function(){var a=this._getSelection(),b=this.convert({x:this._autoScrollX,y:this._autoScrollY},
"page","document"),c=a.getCaret(),e=this._model.getLineAtOffset(c),f;if(this._autoScrollDir==="up"||this._autoScrollDir==="down")c=this._autoScrollY/this._getLineHeight(),c=c<0?Math.floor(c):Math.ceil(c),f=e,f=Math.max(0,Math.min(this._model.getLineCount()-1,f+c));else if(this._autoScrollDir==="left"||this._autoScrollDir==="right")f=this._getLineIndex(b.y),e=this._getLine(e),b.x+=e.getBoundingClientRect(c,!1).left,e.destroy();e=this._getLine(f);a.extend(e.getOffset(b.x,b.y-this._getLinePixel(f)));
e.destroy();this._setSelection(a,!0)},_autoScrollTimer:function(){this._autoScroll();var a=this;this._autoScrollTimerID=setTimeout(function(){a._autoScrollTimer()},this._AUTO_SCROLL_RATE)},_calculateLineHeightTimer:function(a){if(this._lineHeight&&!this._calculateLHTimer){var b=this._model.getLineCount(),c=0;if(a){for(var a=0,e=(new Date).getTime(),f=0;c<b;)if(this._lineHeight[c]||(a++,f||(f=c),this._lineHeight[c]=this._calculateLineHeight(c)),c++,(new Date).getTime()-e>100)break;this.redrawRulers(0,
b);this._queueUpdate()}if(c!==b){var d=this;this._calculateLHTimer=setTimeout(function(){d._calculateLHTimer=null;d._calculateLineHeightTimer(!0)},0)}else if(this._calculateLHTimer)clearTimeout(this._calculateLHTimer),this._calculateLHTimer=void 0}},_calculateLineHeight:function(a){var a=this._getLine(a),b=a.getBoundingClientRect();a.destroy();return Math.max(1,Math.ceil(b.bottom-b.top))},_calculateMetrics:function(){var a=this._clientDiv,b=document.createElement("DIV");b.style.lineHeight="normal";
var c={type:"LineStyle",textView:this,0:0,lineText:this._model.getLine(0),lineStart:0};this.onLineStyle(c);f(c.style,b);b.style.position="fixed";b.style.left="-1000px";var e=document.createElement("SPAN");e.appendChild(document.createTextNode(" "));b.appendChild(e);var d=document.createElement("SPAN");d.style.fontStyle="italic";d.appendChild(document.createTextNode(" "));b.appendChild(d);var g=document.createElement("SPAN");g.style.fontWeight="bold";g.appendChild(document.createTextNode(" "));b.appendChild(g);
c=document.createElement("SPAN");c.style.fontWeight="bold";c.style.fontStyle="italic";c.appendChild(document.createTextNode(" "));b.appendChild(c);a.appendChild(b);var h=b.getBoundingClientRect(),e=e.getBoundingClientRect(),d=d.getBoundingClientRect(),g=g.getBoundingClientRect(),c=c.getBoundingClientRect(),e=e.bottom-e.top,d=d.bottom-d.top,g=g.bottom-g.top,l=c.bottom-c.top,m=0,c=h.bottom-h.top<=0,h=Math.max(1,h.bottom-h.top);d>e&&(m=1);g>d&&(m=2);l>g&&(m=3);var t;if(m!==0){t={style:{}};if((m&1)!==
0)t.style.fontStyle="italic";if((m&2)!==0)t.style.fontWeight="bold"}e=k(b);a.removeChild(b);d=j(this._viewDiv);b=document.createElement("DIV");b.style.position="fixed";b.style.left="-1000px";b.style.paddingLeft=d.left+"px";b.style.paddingTop=d.top+"px";b.style.paddingRight=d.right+"px";b.style.paddingBottom=d.bottom+"px";b.style.width="100px";b.style.height="100px";l=document.createElement("DIV");l.style.width="100%";l.style.height="100%";b.appendChild(l);a.appendChild(b);d=b.getBoundingClientRect();
g=l.getBoundingClientRect();b.style.overflow="hidden";l.style.height="200px";l=b.clientWidth;b.style.overflow="scroll";m=b.clientWidth;a.removeChild(b);d={left:g.left-d.left,top:g.top-d.top,right:d.right-g.right,bottom:d.bottom-g.bottom};return{lineHeight:h,largestFontStyle:t,lineTrim:e,viewPadding:d,scrollWidth:l-m,invalid:c}},_clearSelection:function(a){var b=this._getSelection();if(b.isEmpty())return!1;a==="next"?b.start=b.end:b.end=b.start;this._setSelection(b,!0);return!0},_commitIME:function(){if(this._imeOffset!==
-1){this._scrollDiv.focus();this._clientDiv.focus();var a=this._model,b=a.getLineAtOffset(this._imeOffset),c=a.getLineStart(b),e=this._getDOMText(b),a=a.getLine(b),c=this._imeOffset-c,a=c+e.length-a.length;c!==a&&this._doContent(e.substring(c,a));this._imeOffset=-1}},_createActions:function(){var a=d.KeyBinding,b=this._keyBindings=[];b.push({actionID:"lineUp",keyBinding:new a(38),predefined:!0});b.push({actionID:"lineDown",keyBinding:new a(40),predefined:!0});b.push({actionID:"charPrevious",keyBinding:new a(37),
predefined:!0});b.push({actionID:"charNext",keyBinding:new a(39),predefined:!0});y?(b.push({actionID:"scrollPageUp",keyBinding:new a(33),predefined:!0}),b.push({actionID:"scrollPageDown",keyBinding:new a(34),predefined:!0}),b.push({actionID:"pageUp",keyBinding:new a(33,null,null,!0),predefined:!0}),b.push({actionID:"pageDown",keyBinding:new a(34,null,null,!0),predefined:!0}),b.push({actionID:"lineStart",keyBinding:new a(37,!0),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a(39,!0),predefined:!0}),
b.push({actionID:"wordPrevious",keyBinding:new a(37,null,null,!0),predefined:!0}),b.push({actionID:"wordNext",keyBinding:new a(39,null,null,!0),predefined:!0}),b.push({actionID:"scrollTextStart",keyBinding:new a(36),predefined:!0}),b.push({actionID:"scrollTextEnd",keyBinding:new a(35),predefined:!0}),b.push({actionID:"textStart",keyBinding:new a(38,!0),predefined:!0}),b.push({actionID:"textEnd",keyBinding:new a(40,!0),predefined:!0}),b.push({actionID:"scrollPageUp",keyBinding:new a(38,null,null,null,
!0),predefined:!0}),b.push({actionID:"scrollPageDown",keyBinding:new a(40,null,null,null,!0),predefined:!0}),b.push({actionID:"lineStart",keyBinding:new a(37,null,null,null,!0),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a(39,null,null,null,!0),predefined:!0}),b.push({actionID:"lineStart",keyBinding:new a(38,null,null,!0),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a(40,null,null,!0),predefined:!0})):(b.push({actionID:"pageUp",keyBinding:new a(33),predefined:!0}),b.push({actionID:"pageDown",
keyBinding:new a(34),predefined:!0}),b.push({actionID:"lineStart",keyBinding:new a(36),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a(35),predefined:!0}),b.push({actionID:"wordPrevious",keyBinding:new a(37,!0),predefined:!0}),b.push({actionID:"wordNext",keyBinding:new a(39,!0),predefined:!0}),b.push({actionID:"textStart",keyBinding:new a(36,!0),predefined:!0}),b.push({actionID:"textEnd",keyBinding:new a(35,!0),predefined:!0}));r&&A&&(b.push({actionID:"lineUp",keyBinding:new a(38,!0),
predefined:!0}),b.push({actionID:"lineDown",keyBinding:new a(40,!0),predefined:!0}));b.push({actionID:"selectLineUp",keyBinding:new a(38,null,!0),predefined:!0});b.push({actionID:"selectLineDown",keyBinding:new a(40,null,!0),predefined:!0});b.push({actionID:"selectCharPrevious",keyBinding:new a(37,null,!0),predefined:!0});b.push({actionID:"selectCharNext",keyBinding:new a(39,null,!0),predefined:!0});b.push({actionID:"selectPageUp",keyBinding:new a(33,null,!0),predefined:!0});b.push({actionID:"selectPageDown",
keyBinding:new a(34,null,!0),predefined:!0});y?(b.push({actionID:"selectLineStart",keyBinding:new a(37,!0,!0),predefined:!0}),b.push({actionID:"selectLineEnd",keyBinding:new a(39,!0,!0),predefined:!0}),b.push({actionID:"selectWordPrevious",keyBinding:new a(37,null,!0,!0),predefined:!0}),b.push({actionID:"selectWordNext",keyBinding:new a(39,null,!0,!0),predefined:!0}),b.push({actionID:"selectTextStart",keyBinding:new a(36,null,!0),predefined:!0}),b.push({actionID:"selectTextEnd",keyBinding:new a(35,
null,!0),predefined:!0}),b.push({actionID:"selectTextStart",keyBinding:new a(38,!0,!0),predefined:!0}),b.push({actionID:"selectTextEnd",keyBinding:new a(40,!0,!0),predefined:!0}),b.push({actionID:"selectLineStart",keyBinding:new a(37,null,!0,null,!0),predefined:!0}),b.push({actionID:"selectLineEnd",keyBinding:new a(39,null,!0,null,!0),predefined:!0}),b.push({actionID:"selectLineStart",keyBinding:new a(38,null,!0,!0),predefined:!0}),b.push({actionID:"selectLineEnd",keyBinding:new a(40,null,!0,!0),
predefined:!0})):(A&&(b.push({actionID:"selectWholeLineUp",keyBinding:new a(38,!0,!0),predefined:!0}),b.push({actionID:"selectWholeLineDown",keyBinding:new a(40,!0,!0),predefined:!0})),b.push({actionID:"selectLineStart",keyBinding:new a(36,null,!0),predefined:!0}),b.push({actionID:"selectLineEnd",keyBinding:new a(35,null,!0),predefined:!0}),b.push({actionID:"selectWordPrevious",keyBinding:new a(37,!0,!0),predefined:!0}),b.push({actionID:"selectWordNext",keyBinding:new a(39,!0,!0),predefined:!0}),
b.push({actionID:"selectTextStart",keyBinding:new a(36,!0,!0),predefined:!0}),b.push({actionID:"selectTextEnd",keyBinding:new a(35,!0,!0),predefined:!0}));b.push({actionID:"deletePrevious",keyBinding:new a(8),predefined:!0});b.push({actionID:"deletePrevious",keyBinding:new a(8,null,!0),predefined:!0});b.push({actionID:"deleteNext",keyBinding:new a(46),predefined:!0});b.push({actionID:"deleteWordPrevious",keyBinding:new a(8,!0),predefined:!0});b.push({actionID:"deleteWordPrevious",keyBinding:new a(8,
!0,!0),predefined:!0});b.push({actionID:"deleteWordNext",keyBinding:new a(46,!0),predefined:!0});b.push({actionID:"tab",keyBinding:new a(9),predefined:!0});b.push({actionID:"shiftTab",keyBinding:new a(9,null,!0),predefined:!0});b.push({actionID:"enter",keyBinding:new a(13),predefined:!0});b.push({actionID:"enter",keyBinding:new a(13,null,!0),predefined:!0});b.push({actionID:"selectAll",keyBinding:new a("a",!0),predefined:!0});b.push({actionID:"toggleTabMode",keyBinding:new a("m",!0),predefined:!0});
y&&(b.push({actionID:"deleteNext",keyBinding:new a(46,null,!0),predefined:!0}),b.push({actionID:"deleteWordPrevious",keyBinding:new a(8,null,null,!0),predefined:!0}),b.push({actionID:"deleteWordNext",keyBinding:new a(46,null,null,!0),predefined:!0}));if(!r){var c=y&&x;b.push({actionID:null,keyBinding:new a("u",!c,!1,!1,c),predefined:!0});b.push({actionID:null,keyBinding:new a("i",!c,!1,!1,c),predefined:!0});b.push({actionID:null,keyBinding:new a("b",!c,!1,!1,c),predefined:!0})}r&&(b.push({actionID:"copy",
keyBinding:new a(45,!0),predefined:!0}),b.push({actionID:"paste",keyBinding:new a(45,null,!0),predefined:!0}),b.push({actionID:"cut",keyBinding:new a(46,null,!0),predefined:!0}));y&&(b.push({actionID:"lineStart",keyBinding:new a("a",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"lineEnd",keyBinding:new a("e",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"lineUp",keyBinding:new a("p",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"lineDown",keyBinding:new a("n",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"charPrevious",
keyBinding:new a("b",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"charNext",keyBinding:new a("f",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deletePrevious",keyBinding:new a("h",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deleteNext",keyBinding:new a("d",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deleteLineEnd",keyBinding:new a("k",!1,!1,!1,!0),predefined:!0}),r?(b.push({actionID:"scrollPageDown",keyBinding:new a("v",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deleteLineStart",keyBinding:new a("u",
!1,!1,!1,!0),predefined:!0}),b.push({actionID:"deleteWordPrevious",keyBinding:new a("w",!1,!1,!1,!0),predefined:!0})):(b.push({actionID:"pageDown",keyBinding:new a("v",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"centerLine",keyBinding:new a("l",!1,!1,!1,!0),predefined:!0}),b.push({actionID:"enterNoCursor",keyBinding:new a("o",!1,!1,!1,!0),predefined:!0})));var e=this;this._actions={lineUp:{defaultHandler:function(){return e._doLineUp({select:!1})}},lineDown:{defaultHandler:function(){return e._doLineDown({select:!1})}},
lineStart:{defaultHandler:function(){return e._doHome({select:!1,ctrl:!1})}},lineEnd:{defaultHandler:function(){return e._doEnd({select:!1,ctrl:!1})}},charPrevious:{defaultHandler:function(){return e._doCursorPrevious({select:!1,unit:"character"})}},charNext:{defaultHandler:function(){return e._doCursorNext({select:!1,unit:"character"})}},pageUp:{defaultHandler:function(){return e._doPageUp({select:!1})}},pageDown:{defaultHandler:function(){return e._doPageDown({select:!1})}},scrollPageUp:{defaultHandler:function(){return e._doScroll({type:"pageUp"})}},
scrollPageDown:{defaultHandler:function(){return e._doScroll({type:"pageDown"})}},wordPrevious:{defaultHandler:function(){return e._doCursorPrevious({select:!1,unit:"word"})}},wordNext:{defaultHandler:function(){return e._doCursorNext({select:!1,unit:"word"})}},textStart:{defaultHandler:function(){return e._doHome({select:!1,ctrl:!0})}},textEnd:{defaultHandler:function(){return e._doEnd({select:!1,ctrl:!0})}},scrollTextStart:{defaultHandler:function(){return e._doScroll({type:"textStart"})}},scrollTextEnd:{defaultHandler:function(){return e._doScroll({type:"textEnd"})}},
centerLine:{defaultHandler:function(){return e._doScroll({type:"centerLine"})}},selectLineUp:{defaultHandler:function(){return e._doLineUp({select:!0})}},selectLineDown:{defaultHandler:function(){return e._doLineDown({select:!0})}},selectWholeLineUp:{defaultHandler:function(){return e._doLineUp({select:!0,wholeLine:!0})}},selectWholeLineDown:{defaultHandler:function(){return e._doLineDown({select:!0,wholeLine:!0})}},selectLineStart:{defaultHandler:function(){return e._doHome({select:!0,ctrl:!1})}},
selectLineEnd:{defaultHandler:function(){return e._doEnd({select:!0,ctrl:!1})}},selectCharPrevious:{defaultHandler:function(){return e._doCursorPrevious({select:!0,unit:"character"})}},selectCharNext:{defaultHandler:function(){return e._doCursorNext({select:!0,unit:"character"})}},selectPageUp:{defaultHandler:function(){return e._doPageUp({select:!0})}},selectPageDown:{defaultHandler:function(){return e._doPageDown({select:!0})}},selectWordPrevious:{defaultHandler:function(){return e._doCursorPrevious({select:!0,
unit:"word"})}},selectWordNext:{defaultHandler:function(){return e._doCursorNext({select:!0,unit:"word"})}},selectTextStart:{defaultHandler:function(){return e._doHome({select:!0,ctrl:!0})}},selectTextEnd:{defaultHandler:function(){return e._doEnd({select:!0,ctrl:!0})}},deletePrevious:{defaultHandler:function(){return e._doBackspace({unit:"character"})}},deleteNext:{defaultHandler:function(){return e._doDelete({unit:"character"})}},deleteWordPrevious:{defaultHandler:function(){return e._doBackspace({unit:"word"})}},
deleteWordNext:{defaultHandler:function(){return e._doDelete({unit:"word"})}},deleteLineStart:{defaultHandler:function(){return e._doBackspace({unit:"line"})}},deleteLineEnd:{defaultHandler:function(){return e._doDelete({unit:"line"})}},tab:{defaultHandler:function(){return e._doTab()}},shiftTab:{defaultHandler:function(){return e._doShiftTab()}},enter:{defaultHandler:function(){return e._doEnter()}},enterNoCursor:{defaultHandler:function(){return e._doEnter({noCursor:!0})}},selectAll:{defaultHandler:function(){return e._doSelectAll()}},
copy:{defaultHandler:function(){return e._doCopy()}},cut:{defaultHandler:function(){return e._doCut()}},paste:{defaultHandler:function(){return e._doPaste()}},toggleWrapMode:{defaultHandler:function(){return e._doWrapMode()}},toggleTabMode:{defaultHandler:function(){return e._doTabMode()}}}},_createRuler:function(a,b){if(this._clientDiv){var c=a.getLocation()==="left"?this._leftDiv:this._rightDiv;c.style.display="block";var e=document.createElement("DIV");e._ruler=a;e.rulerChanged=!0;e.style.position=
"relative";var c=c.firstChild.rows[0],f=c.cells.length,c=c.insertCell(b===void 0||b<0||b>f?f:b);c.vAlign="top";c.appendChild(e)}},_createView:function(){if(!this._clientDiv){for(var a=this._parent;a.hasChildNodes();)a.removeChild(a.lastChild);var b=document.createElement("DIV");this._rootDiv=b;b.tabIndex=-1;b.style.position="relative";b.style.overflow="hidden";b.style.width="100%";b.style.height="100%";a.style.overflow="hidden";b.setAttribute("role","application");a.appendChild(b);var c=document.createElement("DIV");
c.className="textviewLeftRuler";this._leftDiv=c;c.tabIndex=-1;c.style.overflow="hidden";c.style.MozUserSelect="none";c.style.WebkitUserSelect="none";c.style.position="absolute";c.style.cursor="default";c.style.display="none";c.setAttribute("aria-hidden","true");a=document.createElement("TABLE");c.appendChild(a);a.cellPadding="0px";a.cellSpacing="0px";a.border="0px";a.insertRow(0);b.appendChild(c);c=document.createElement("DIV");c.className="textview";this._viewDiv=c;c.tabIndex=-1;c.style.overflow=
"auto";c.style.position="absolute";c.style.top="0px";c.style.bottom="0px";c.style.borderWidth="0px";c.style.margin="0px";c.style.outline="none";b.appendChild(c);var e=document.createElement("DIV");e.className="textviewRightRuler";this._rightDiv=e;e.tabIndex=-1;e.style.display="none";e.style.overflow="hidden";e.style.MozUserSelect="none";e.style.WebkitUserSelect="none";e.style.position="absolute";e.style.cursor="default";e.style.right="0px";e.setAttribute("aria-hidden","true");a=document.createElement("TABLE");
e.appendChild(a);a.cellPadding="0px";a.cellSpacing="0px";a.border="0px";a.insertRow(0);b.appendChild(e);this._scrollDiv=a=document.createElement("DIV");a.style.margin="0px";a.style.borderWidth="0px";a.style.padding="0px";c.appendChild(a);if(r)this._clipboardDiv=a=document.createElement("DIV"),a.style.position="fixed",a.style.whiteSpace="pre",a.style.left="-1000px",b.appendChild(a);if(!p&&!u)this._clipDiv=a=document.createElement("DIV"),a.style.position="absolute",a.style.overflow="hidden",a.style.margin=
"0px",a.style.borderWidth="0px",a.style.padding="0px",b.appendChild(a),this._clipScrollDiv=c=document.createElement("DIV"),c.style.position="absolute",c.style.height="1px",c.style.top="-1000px",a.appendChild(c);this._setFullSelection(this._fullSelection,!0);a=document.createElement("DIV");a.className="textviewContent";this._clientDiv=a;a.style.position="absolute";a.style.borderWidth="0px";a.style.margin="0px";a.style.padding="0px";a.style.outline="none";a.style.zIndex="1";a.style.WebkitUserSelect=
"text";a.setAttribute("spellcheck","false");if(u||t)a.style.WebkitTapHighlightColor="transparent";(this._clipDiv||b).appendChild(a);if(u||t)this._vScrollDiv=c=document.createElement("DIV"),c.style.position="absolute",c.style.borderWidth="1px",c.style.borderColor="white",c.style.borderStyle="solid",c.style.borderRadius="4px",c.style.backgroundColor="black",c.style.opacity="0.5",c.style.margin="0px",c.style.padding="0px",c.style.outline="none",c.style.zIndex="3",c.style.width="8px",c.style.display=
"none",b.appendChild(c),this._hScrollDiv=c=document.createElement("DIV"),c.style.position="absolute",c.style.borderWidth="1px",c.style.borderColor="white",c.style.borderStyle="solid",c.style.borderRadius="4px",c.style.backgroundColor="black",c.style.opacity="0.5",c.style.margin="0px",c.style.padding="0px",c.style.outline="none",c.style.zIndex="3",c.style.height="8px",c.style.display="none",b.appendChild(c);if(r&&!a.setCapture)this._overlayDiv=c=document.createElement("DIV"),c.style.position=a.style.position,
c.style.borderWidth=a.style.borderWidth,c.style.margin=a.style.margin,c.style.padding=a.style.padding,c.style.cursor="text",c.style.zIndex="2",(this._clipDiv||b).appendChild(c);a.contentEditable="true";a.setAttribute("role","textbox");a.setAttribute("aria-multiline","true");this._setWrapMode(this._wrapMode,!0);this._setReadOnly(this._readonly);this._setThemeClass(this._themeClass,!0);this._setTabSize(this._tabSize,!0);if(!document.getElementById("_textviewStyle")&&(b="",w&&this._metrics.scrollWidth>
0&&(b+="\n.textviewContainer ::-webkit-scrollbar-corner {background: #eeeeee;}"),r&&y&&this._highlightRGB&&this._highlightRGB!=="Highlight"&&(b+="\n.textviewContainer ::-moz-selection {background: "+this._highlightRGB+";}"),b))a=document.createElement("STYLE"),a.id="_textviewStyle",c=document.getElementsByTagName("HEAD")[0]||document.documentElement,a.appendChild(document.createTextNode(b)),c.insertBefore(a,c.firstChild);this._hookEvents();b=this._rulers;for(a=0;a<b.length;a++)this._createRuler(b[a]);
this._update()}},_defaultOptions:function(){return{parent:{value:void 0,update:null},model:{value:void 0,update:this.setModel},readonly:{value:!1,update:this._setReadOnly},fullSelection:{value:!0,update:this._setFullSelection},tabMode:{value:!0,update:null},tabSize:{value:8,update:this._setTabSize},expandTab:{value:!1,update:null},wrapMode:{value:!1,update:this._setWrapMode},themeClass:{value:void 0,update:this._setThemeClass}}},_destroyRuler:function(a){var b=a.getLocation()==="left"?this._leftDiv:
this._rightDiv;if(b){for(var c=b.firstChild.rows[0],e=c.cells,f=0;f<e.length;f++)if(e[f].firstChild._ruler===a)break;if(f!==e.length&&(c.cells[f]._ruler=void 0,c.deleteCell(f),e.length===0))b.style.display="none"}},_destroyView:function(){if(this._clientDiv){this._setGrab(null);this._unhookEvents();if(this._autoScrollTimerID)clearTimeout(this._autoScrollTimerID),this._autoScrollTimerID=null;if(this._updateTimer)clearTimeout(this._updateTimer),this._updateTimer=null;var a=this._rootDiv;a.parentNode.removeChild(a);
this._hScrollDiv=this._vScrollDiv=this._rightDiv=this._leftDiv=this._overlayDiv=this._clientDiv=this._clipScrollDiv=this._clipDiv=this._viewDiv=this._scrollDiv=this._rootDiv=this._clipboardDiv=this._selDiv3=this._selDiv2=this._selDiv1=null}},_doAutoScroll:function(a,b,c){this._autoScrollDir=a;this._autoScrollX=b;this._autoScrollY=c;this._autoScrollTimerID||this._autoScrollTimer()},_endAutoScroll:function(){this._autoScrollTimerID&&clearTimeout(this._autoScrollTimerID);this._autoScrollTimerID=this._autoScrollDir=
void 0},_fixCaret:function(){var a=this._clientDiv;if(a){var b=this._hasFocus;this._ignoreFocus=!0;b&&a.blur();a.contentEditable=!1;a.contentEditable=!0;b&&a.focus();this._ignoreFocus=!1}},_getBaseText:function(a,b){var c=this._model;c.getBaseModel&&(a=c.mapOffset(a),b=c.mapOffset(b),c=c.getBaseModel());return c.getText(a,b)},_getBottomIndex:function(a){var b=this._bottomChild;if(a&&this._getClientHeight()>this._getLineHeight()){var a=b.getBoundingClientRect(),c=this._clientDiv.getBoundingClientRect();
a.bottom>c.bottom&&(b=this._getLinePrevious(b)||b)}return b.lineIndex},_getBoundsAtOffset:function(a){var b=this._getLine(this._model.getLineAtOffset(a)),a=b.getBoundingClientRect(a),c=this._getLinePixel(b.lineIndex);a.top+=c;a.bottom+=c;b.destroy();return a},_getClientHeight:function(){var a=this._getViewPadding();return Math.max(0,this._viewDiv.clientHeight-a.top-a.bottom)},_getClientWidth:function(){var a=this._getViewPadding();return Math.max(0,this._viewDiv.clientWidth-a.left-a.right)},_getClipboardText:function(a,
b){var c=this._model.getLineDelimiter(),e,f;if(window.clipboardData)return e=[],f=window.clipboardData.getData("Text"),g(f,function(a){e.push(a)},function(){e.push(c)}),f=e.join(""),b&&b(f),f;if(r){this._ignoreFocus=!0;var d=this._clipboardDiv;d.innerHTML="<pre contenteditable=''></pre>";d.firstChild.focus();var h=this,j=function(){var a=h._getTextFromElement(d);d.innerHTML="";e=[];g(a,function(a){e.push(a)},function(){e.push(c)});return e.join("")},k=!1;this._ignorePaste=!0;if(!A||this._lastMouseButton!==
2)try{k=document.execCommand("paste",!1,null)}catch(l){k=d.childNodes.length>1||d.firstChild&&d.firstChild.childNodes.length>0}this._ignorePaste=!1;if(!k)return a?(setTimeout(function(){h.focus();(f=j())&&b&&b(f);h._ignoreFocus=!1},0),null):(this.focus(),this._ignoreFocus=!1,"");this.focus();this._ignoreFocus=!1;(f=j())&&b&&b(f);return f}return a&&a.clipboardData?(e=[],f=a.clipboardData.getData("text/plain"),g(f,function(a){e.push(a)},function(){e.push(c)}),(f=e.join(""))&&b&&b(f),f):""},_getDOMText:function(a){for(var a=
this._getLineNode(a).firstChild,b="";a;){for(var c=a.firstChild;c;){if(a.ignoreChars)for(var e=0;e<c.length;e++){var f=c.data.substring(e,e+1);f!==" "&&(b+=f)}else b+=c.data;c=c.nextSibling}a=a.nextSibling}return b},_getTextFromElement:function(a){var b=a.ownerDocument,c=b.defaultView;if(!c.getSelection)return a.innerText||a.textContent;b=b.createRange();b.selectNode(a);var a=c.getSelection(),c=[],e;for(e=0;e<a.rangeCount;e++)c.push(a.getRangeAt(e));this._ignoreSelect=!0;a.removeAllRanges();a.addRange(b);
b=a.toString();a.removeAllRanges();for(e=0;e<c.length;e++)a.addRange(c[e]);this._ignoreSelect=!1;return b},_getViewPadding:function(){return this._metrics.viewPadding},_getLine:function(a){var b=this._getLineNode(a);return b&&!b.lineChanged&&!b.lineRemoved?b._line:new n(this,a)},_getLineHeight:function(a,b){if(a!==void 0&&this._lineHeight){var c=this._lineHeight[a];if(c)return c;if(b||b===void 0)return this._lineHeight[a]=this._calculateLineHeight(a)}return this._metrics.lineHeight},_getLineNode:function(a){for(var b=
this._clientDiv.firstChild;b;){if(a===b.lineIndex)return b;b=b.nextSibling}},_getLineNext:function(a){for(a=a?a.nextSibling:this._clientDiv.firstChild;a&&a.lineIndex===-1;)a=a.nextSibling;return a},_getLinePrevious:function(a){for(a=a?a.previousSibling:this._clientDiv.lastChild;a&&a.lineIndex===-1;)a=a.previousSibling;return a},_getLinePixel:function(a){a=Math.min(Math.max(0,a),this._model.getLineCount());if(this._lineHeight){var b=this._getTopIndex(),c=-this._topIndexY+this._getScroll().y;if(a>b)for(;b<
a;b++)c+=this._getLineHeight(b);else for(b-=1;b>=a;b--)c-=this._getLineHeight(b);return c}return this._getLineHeight()*a},_getLineIndex:function(a){var b,c=0,e=this._model.getLineCount();if(this._lineHeight){var c=this._getTopIndex(),f=-this._topIndexY+this._getScroll().y;if(a!==f)if(a<f)for(;a<f&&c>0;)a+=this._getLineHeight(--c);else for(b=this._getLineHeight(c);a-b>=f&&c<e-1;)a-=b,b=this._getLineHeight(++c)}else b=this._getLineHeight(),c=Math.floor(a/b);return Math.max(0,Math.min(e-1,c))},_getScroll:function(){var a=
this._viewDiv;return{x:a.scrollLeft,y:a.scrollTop}},_getSelection:function(){return this._selection.clone()},_getTopIndex:function(a){var b=this._topChild;if(a&&this._getClientHeight()>this._getLineHeight()){var a=b.getBoundingClientRect(),c=this._getViewPadding(),e=this._viewDiv.getBoundingClientRect();a.top<e.top+c.top&&(b=this._getLineNext(b)||b)}return b.lineIndex},_hookEvents:function(){var a=this;this._modelListener={onChanging:function(b){a._onModelChanging(b)},onChanged:function(b){a._onModelChanged(b)}};
this._model.addEventListener("preChanging",this._modelListener.onChanging);this._model.addEventListener("postChanged",this._modelListener.onChanged);var b=this._handlers=[],e=this._clientDiv,f=this._viewDiv,d=this._rootDiv,g=this._overlayDiv||e,h=p?document:window;b.push({target:window,type:"resize",handler:function(b){return a._handleResize(b)}});b.push({target:e,type:"blur",handler:function(b){return a._handleBlur(b)}});b.push({target:e,type:"focus",handler:function(b){return a._handleFocus(b)}});
b.push({target:f,type:"focus",handler:function(){e.focus()}});b.push({target:f,type:"scroll",handler:function(b){return a._handleScroll(b)}});b.push({target:e,type:"textInput",handler:function(b){return a._handleTextInput(b)}});b.push({target:e,type:"keydown",handler:function(b){return a._handleKeyDown(b)}});b.push({target:e,type:"keypress",handler:function(b){return a._handleKeyPress(b)}});b.push({target:e,type:"keyup",handler:function(b){return a._handleKeyUp(b)}});b.push({target:e,type:"selectstart",
handler:function(b){return a._handleSelectStart(b)}});b.push({target:e,type:"contextmenu",handler:function(b){return a._handleContextMenu(b)}});b.push({target:e,type:"copy",handler:function(b){return a._handleCopy(b)}});b.push({target:e,type:"cut",handler:function(b){return a._handleCut(b)}});b.push({target:e,type:"paste",handler:function(b){return a._handlePaste(b)}});if(u||t)b.push({target:document,type:"selectionchange",handler:function(b){return a._handleSelectionChange(b)}}),b.push({target:e,
type:"touchstart",handler:function(b){return a._handleTouchStart(b)}}),b.push({target:e,type:"touchmove",handler:function(b){return a._handleTouchMove(b)}}),b.push({target:e,type:"touchend",handler:function(b){return a._handleTouchEnd(b)}});else{b.push({target:e,type:"mousedown",handler:function(b){return a._handleMouseDown(b)}});b.push({target:e,type:"mouseover",handler:function(b){return a._handleMouseOver(b)}});b.push({target:e,type:"mouseout",handler:function(b){return a._handleMouseOut(b)}});
b.push({target:h,type:"mouseup",handler:function(b){return a._handleMouseUp(b)}});b.push({target:h,type:"mousemove",handler:function(b){return a._handleMouseMove(b)}});b.push({target:d,type:"mousedown",handler:function(b){return a._handleRootMouseDown(b)}});b.push({target:d,type:"mouseup",handler:function(b){return a._handleRootMouseUp(b)}});b.push({target:g,type:"dragstart",handler:function(b){return a._handleDragStart(b)}});b.push({target:g,type:"drag",handler:function(b){return a._handleDrag(b)}});
b.push({target:g,type:"dragend",handler:function(b){return a._handleDragEnd(b)}});b.push({target:g,type:"dragenter",handler:function(b){return a._handleDragEnter(b)}});b.push({target:g,type:"dragover",handler:function(b){return a._handleDragOver(b)}});b.push({target:g,type:"dragleave",handler:function(b){return a._handleDragLeave(b)}});b.push({target:g,type:"drop",handler:function(b){return a._handleDrop(b)}});b.push({target:this._clientDiv,type:r?"DOMMouseScroll":"mousewheel",handler:function(b){return a._handleMouseWheel(b)}});
if(r&&(!z||r>=15))(f=window.MutationObserver||window.MozMutationObserver)?(this._mutationObserver=new f(function(b){a._handleDataModified(b)}),this._mutationObserver.observe(e,{subtree:!0,characterData:!0})):b.push({target:this._clientDiv,type:"DOMCharacterDataModified",handler:function(b){return a._handleDataModified(b)}});this._overlayDiv&&(b.push({target:this._overlayDiv,type:"mousedown",handler:function(b){return a._handleMouseDown(b)}}),b.push({target:this._overlayDiv,type:"mouseover",handler:function(b){return a._handleMouseOver(b)}}),
b.push({target:this._overlayDiv,type:"mouseout",handler:function(b){return a._handleMouseOut(b)}}),b.push({target:this._overlayDiv,type:"contextmenu",handler:function(b){return a._handleContextMenu(b)}}));C||b.push({target:this._clientDiv,type:"dblclick",handler:function(b){return a._handleDblclick(b)}})}f=this._leftDiv;d=this._rightDiv;p&&b.push({target:f,type:"selectstart",handler:function(){return!1}});b.push({target:f,type:r?"DOMMouseScroll":"mousewheel",handler:function(b){return a._handleMouseWheel(b)}});
b.push({target:f,type:"click",handler:function(b){a._handleRulerEvent(b)}});b.push({target:f,type:"dblclick",handler:function(b){a._handleRulerEvent(b)}});b.push({target:f,type:"mousemove",handler:function(b){a._handleRulerEvent(b)}});b.push({target:f,type:"mouseover",handler:function(b){a._handleRulerEvent(b)}});b.push({target:f,type:"mouseout",handler:function(b){a._handleRulerEvent(b)}});p&&b.push({target:d,type:"selectstart",handler:function(){return!1}});b.push({target:d,type:r?"DOMMouseScroll":
"mousewheel",handler:function(b){return a._handleMouseWheel(b)}});b.push({target:d,type:"click",handler:function(b){a._handleRulerEvent(b)}});b.push({target:d,type:"dblclick",handler:function(b){a._handleRulerEvent(b)}});b.push({target:d,type:"mousemove",handler:function(b){a._handleRulerEvent(b)}});b.push({target:d,type:"mouseover",handler:function(b){a._handleRulerEvent(b)}});b.push({target:d,type:"mouseout",handler:function(b){a._handleRulerEvent(b)}});for(f=0;f<b.length;f++)d=b[f],c(d.target,
d.type,d.handler,d.capture)},_init:function(a){var c=a.parent;typeof c==="string"&&(c=window.document.getElementById(c));if(!c)throw"no parent";a.parent=c;a.model=a.model||new b.TextModel;var c=this._defaultOptions(),e;for(e in c)c.hasOwnProperty(e)&&(this["_"+e]=a[e]!==void 0?a[e]:c[e].value);this._rulers=[];this._selection=new l(0,0,!1);this._linksVisible=!1;this._maxLineWidth=this._redrawCount=0;this._maxLineIndex=-1;this._ignoreSelect=!0;this._hasFocus=this._ignoreFocus=!1;this._dragOffset=this._columnX=
-1;this._autoScrollTimerID=this._autoScrollY=this._autoScrollX=null;this._AUTO_SCROLL_RATE=50;this._mouseUpClosure=this._moseMoveClosure=this._grabControl=null;this._clickCount=this._lastMouseTime=this._lastMouseY=this._lastMouseX=0;this._clickTime=250;this._clickDist=5;this._isMouseDown=!1;this._doubleClickSelection=null;this._vScroll=this._hScroll=0;this._imeOffset=-1;this._createActions();this._createView()},_modifyContent:function(a,b){if(!this._readonly||a._code)if(a.type="Verify",this.onVerify(a),
!(a.text===null||a.text===void 0)){var c=this._model;try{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!0;c.setText(a.text,a.start,a.end)}finally{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!1}b&&(c=this._getSelection(),c.setCaret(a.start+a.text.length),this._setSelection(c,!0));this.onModify({type:"Modify"})}},_onModelChanged:function(a){a.type="ModelChanged";this.onModelChanged(a);a.type="Changed";var b=a.start,c=a.addedCharCount,e=a.removedCharCount,f=a.addedLineCount,d=a.removedLineCount,
g=this._getSelection();g.end>b&&(g.end>b&&g.start<b+e?g.setCaret(b+c):(g.start+=c-e,g.end+=c-e),this._setSelection(g,!1,!1));b=this._model.getLineAtOffset(b);for(c=this._getLineNext();c;){e=c.lineIndex;if(b<=e&&e<=b+d)b===e&&!c.modelChangedEvent&&!c.lineRemoved?(c.modelChangedEvent=a,c.lineChanged=!0):(c.lineRemoved=!0,c.lineChanged=!1,c.modelChangedEvent=null);if(e>b+d)c.lineIndex=e+f-d,c._line.lineIndex=c.lineIndex;c=this._getLineNext(c)}if(!this._wrapMode&&b<=this._maxLineIndex&&this._maxLineIndex<=
b+d)this._checkMaxLineIndex=this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._update()},_onModelChanging:function(a){a.type="ModelChanging";this.onModelChanging(a);a.type="Changing"},_queueUpdate:function(){if(!this._updateTimer&&!this._ignoreQueueUpdate){var a=this;this._updateTimer=setTimeout(function(){a._updateTimer=null;a._update()},0)}},_resetLineHeight:function(a,b){if(this._wrapMode){if(a!==void 0&&b!==void 0)for(var c=a;c<b;c++)this._lineHeight[c]=void 0;else this._lineHeight=
Array(this._model.getLineCount());this._calculateLineHeightTimer()}else this._lineHeight=null},_resetLineWidth:function(){var a=this._clientDiv;if(a)for(a=a.firstChild;a;)a.lineWidth=void 0,a=a.nextSibling},_reset:function(){this._maxLineIndex=-1;this._maxLineWidth=0;this._columnX=-1;this._bottomChild=this._topChild=null;this._topIndexY=0;this._resetLineHeight();this._setSelection(new l(0,0,!1),!1,!1);if(this._viewDiv)this._viewDiv.scrollLeft=0,this._viewDiv.scrollTop=0;var a=this._clientDiv;if(a){for(var b=
a.firstChild;b;)b.lineRemoved=!0,b=b.nextSibling;if(r)this._ignoreFocus=!1,(b=this._hasFocus)&&a.blur(),a.contentEditable=!1,a.contentEditable=!0,b&&a.focus(),this._ignoreFocus=!1}},_scrollView:function(a,b){this._ensureCaretVisible=!1;var c=this._viewDiv;a&&(c.scrollLeft+=a);b&&(c.scrollTop+=b)},_setClipboardText:function(a,b){var c;if(window.clipboardData)return c=[],g(a,function(a){c.push(a)},function(){c.push(I)}),window.clipboardData.setData("Text",c.join(""));if(b&&b.clipboardData&&(c=[],g(a,
function(a){c.push(a)},function(){c.push(I)}),b.clipboardData.setData("text/plain",c.join(""))))return!0;var e=document.createElement("PRE");e.style.position="fixed";e.style.left="-1000px";g(a,function(a){e.appendChild(document.createTextNode(a))},function(){e.appendChild(document.createElement("BR"))});e.appendChild(document.createTextNode(" "));this._clientDiv.appendChild(e);var f=document.createRange();f.setStart(e.firstChild,0);f.setEndBefore(e.lastChild);var d=window.getSelection();d.rangeCount>
0&&d.removeAllRanges();d.addRange(f);var h=this,f=function(){e&&e.parentNode===h._clientDiv&&h._clientDiv.removeChild(e);h._updateDOMSelection()},d=!1;this._ignoreCopy=!0;try{d=document.execCommand("copy",!1,null)}catch(j){}this._ignoreCopy=!1;if(!d&&b)return setTimeout(f,0),!1;f();return!0},_setDOMSelection:function(a,b,c,e){for(var f,d,g,h,j=0,k=a.firstChild,l,m,t=this._model.getLine(a.lineIndex).length;k;){l=k.firstChild;m=l.length;k.ignoreChars&&(m-=k.ignoreChars);if(j+m>b||j+m>=t){f=l;d=b-j;
k.ignoreChars&&m>0&&d===m&&(d+=k.ignoreChars);break}j+=m;k=k.nextSibling}for(var j=0,k=c.firstChild,n=this._model.getLine(c.lineIndex).length;k;){l=k.firstChild;m=l.length;k.ignoreChars&&(m-=k.ignoreChars);if(m+j>e||j+m>=n){g=l;h=e-j;k.ignoreChars&&m>0&&h===m&&(h+=k.ignoreChars);break}j+=m;k=k.nextSibling}this._setDOMFullSelection(a,b,t,c,e,n);if(this._hasFocus)if(window.getSelection)a=document.createRange(),a.setStart(f,d),a.setEnd(g,h),g=window.getSelection(),this._ignoreSelect=!1,g.rangeCount>
0&&g.removeAllRanges(),g.addRange(a),this._ignoreSelect=!0;else if(document.selection)b=document.body,a=document.createElement("DIV"),b.appendChild(a),b.removeChild(a),a=b.createTextRange(),a.moveToElementText(f.parentNode),a.moveStart("character",d),f=b.createTextRange(),f.moveToElementText(g.parentNode),f.moveStart("character",h),a.setEndPoint("EndToStart",f),this._ignoreSelect=!1,a.select(),this._ignoreSelect=!0},_setDOMFullSelection:function(a,b,c,e,f){if(this._selDiv1&&(c=this._selDiv1,c.style.width=
"0px",c.style.height="0px",c=this._selDiv2,c.style.width="0px",c.style.height="0px",c=this._selDiv3,c.style.width="0px",c.style.height="0px",!(a===e&&b===f))){var d=this._model,g=this._getViewPadding(),h=this._clientDiv.getBoundingClientRect(),j=this._viewDiv.getBoundingClientRect(),c=j.left+g.left,k=h.right,g=j.top+g.top,l=h.bottom,j=h=0;this._clipDiv?(j=this._clipDiv.getBoundingClientRect(),h=j.left-this._clipDiv.scrollLeft):(j=this._rootDiv.getBoundingClientRect(),h=j.left);j=j.top;this._ignoreDOMSelection=
!0;var a=(new n(this,a.lineIndex,a)).getBoundingClientRect(d.getLineStart(a.lineIndex)+b,!1),m=a.left,f=(new n(this,e.lineIndex,e)).getBoundingClientRect(d.getLineStart(e.lineIndex)+f,!1),b=f.left;this._ignoreDOMSelection=!1;var d=this._selDiv1,m=Math.min(k,Math.max(c,m)),t=Math.min(l,Math.max(g,a.top)),u=k,e=Math.min(l,Math.max(g,a.bottom));d.style.left=m-h+"px";d.style.top=t-j+"px";d.style.width=Math.max(0,u-m)+"px";d.style.height=Math.max(0,e-t)+"px";if(a.top===f.top)u=Math.min(b,k),d.style.width=
Math.max(0,u-m)+"px";else if(a=Math.min(l,Math.max(g,f.top)),b=Math.min(k,Math.max(c,b)),g=Math.min(l,Math.max(g,f.bottom)),l=this._selDiv3,l.style.left=c-h+"px",l.style.top=a-j+"px",l.style.width=Math.max(0,b-c)+"px",l.style.height=Math.max(0,g-a)+"px",a-e>0)g=this._selDiv2,g.style.left=c-h+"px",g.style.top=e-j+"px",g.style.width=Math.max(0,k-c)+"px",g.style.height=Math.max(0,a-e)+"px"}},_setGrab:function(a){if(a!==this._grabControl)a?(a.setCapture&&a.setCapture(),this._grabControl=a):(this._grabControl.releaseCapture&&
this._grabControl.releaseCapture(),this._grabControl=null)},_setLinksVisible:function(a){if(this._linksVisible!==a){this._linksVisible=a;if(p&&a)this._hadFocus=this._hasFocus;var b=this._clientDiv;b.contentEditable=!a;this._hadFocus&&!a&&b.focus();if(this._overlayDiv)this._overlayDiv.style.zIndex=a?"-1":"1";for(a=this._getLineNext();a;){if(a.hasLink)for(b=a.firstChild;b;){var c=b.nextSibling,e=b.viewStyle;e&&e.tagName==="A"&&a.replaceChild(a._line._createSpan(a,document,b.firstChild.data,e),b);b=
c}a=this._getLineNext(a)}}},_setSelection:function(a,b,c,e){if(a){this._columnX=-1;c===void 0&&(c=!0);var f=this._selection;this._selection=a;b&&this._showCaret(!1,e);c&&this._updateDOMSelection();if(!f.equals(a))this.onSelection({type:"Selection",oldValue:{start:f.start,end:f.end},newValue:{start:a.start,end:a.end}})}},_setSelectionTo:function(a,b,c,e){var f=this._model,d=this._getSelection(),b=this.convert({x:a,y:b},"page","document"),a=this._getLineIndex(b.y);if(this._clickCount===1){f=this._getLine(a);
a=f.getOffset(b.x,b.y-this._getLinePixel(a));f.destroy();if(e&&!c&&d.start<=a&&a<d.end)return this._dragOffset=a,!1;d.extend(a);c||d.collapse()}else(this._clickCount&1)===0?(f=this._getLine(a),a=f.getOffset(b.x,b.y-this._getLinePixel(a)),this._doubleClickSelection?a>=this._doubleClickSelection.start?(c=this._doubleClickSelection.start,e=f.getNextOffset(a,"wordend",1)):(c=f.getNextOffset(a,"word",-1),e=this._doubleClickSelection.end):(c=f.getNextOffset(a,"word",-1),e=f.getNextOffset(c,"wordend",1)),
f.destroy()):this._doubleClickSelection?(e=f.getLineAtOffset(this._doubleClickSelection.start),a>=e?(c=f.getLineStart(e),e=f.getLineEnd(a)):(c=f.getLineStart(a),e=f.getLineEnd(e))):(c=f.getLineStart(a),e=f.getLineEnd(a)),d.setCaret(c),d.extend(e);this._setSelection(d,!0,!0);return!0},_setFullSelection:function(a,b){this._fullSelection=a;if(w)this._fullSelection=!0;var c=this._clipDiv||this._rootDiv;if(c)if(this._fullSelection){if(!this._selDiv1&&this._fullSelection&&!u){this._highlightRGB=w?"transparent":
"Highlight";var e=document.createElement("DIV");this._selDiv1=e;e.style.position="absolute";e.style.borderWidth="0px";e.style.margin="0px";e.style.padding="0px";e.style.outline="none";e.style.background=this._highlightRGB;e.style.width="0px";e.style.height="0px";e.style.zIndex="0";c.appendChild(e);var f=document.createElement("DIV");this._selDiv2=f;f.style.position="absolute";f.style.borderWidth="0px";f.style.margin="0px";f.style.padding="0px";f.style.outline="none";f.style.background=this._highlightRGB;
f.style.width="0px";f.style.height="0px";f.style.zIndex="0";c.appendChild(f);var d=document.createElement("DIV");this._selDiv3=d;d.style.position="absolute";d.style.borderWidth="0px";d.style.margin="0px";d.style.padding="0px";d.style.outline="none";d.style.background=this._highlightRGB;d.style.width="0px";d.style.height="0px";d.style.zIndex="0";c.appendChild(d);if(r&&y){c=window.getComputedStyle(d,null).getPropertyValue("background-color");switch(c){case "rgb(119, 141, 168)":c="rgb(199, 208, 218)";
break;case "rgb(127, 127, 127)":c="rgb(198, 198, 198)";break;case "rgb(255, 193, 31)":c="rgb(250, 236, 115)";break;case "rgb(243, 70, 72)":c="rgb(255, 176, 139)";break;case "rgb(255, 138, 34)":c="rgb(255, 209, 129)";break;case "rgb(102, 197, 71)":c="rgb(194, 249, 144)";break;case "rgb(140, 78, 184)":c="rgb(232, 184, 255)";break;default:c="rgb(180, 213, 255)"}this._highlightRGB=c;e.style.background=c;f.style.background=c;d.style.background=c}b||this._updateDOMSelection()}}else{if(this._selDiv1)c.removeChild(this._selDiv1),
this._selDiv1=null;if(this._selDiv2)c.removeChild(this._selDiv2),this._selDiv2=null;if(this._selDiv3)c.removeChild(this._selDiv3),this._selDiv3=null}},_setReadOnly:function(a){this._readonly=a;this._clientDiv.setAttribute("aria-readonly",a?"true":"false")},_setTabSize:function(a,b){this._tabSize=a;this._customTabSize=void 0;var c=this._clientDiv;if(s){if(c)c.style.OTabSize=this._tabSize+""}else if(r>=4){if(c)c.style.MozTabSize=this._tabSize+""}else if(this._tabSize!==8)this._customTabSize=this._tabSize;
b||(this.redrawLines(),this._resetLineWidth())},_setThemeClass:function(a,b){this._themeClass=a;var c="textviewContainer";this._themeClass&&(c+=" "+this._themeClass);this._rootDiv.className=c;this._updateStyle(b)},_setWrapMode:function(a,b){this._wrapMode=a;var c=this._clientDiv,e=this._viewDiv;a?(c.style.whiteSpace="pre-wrap",c.style.wordWrap="break-word",e.style.overflowX="hidden",e.style.overflowY="scroll"):(c.style.whiteSpace="pre",c.style.wordWrap="normal",e.style.overflowX="auto",e.style.overflowY=
"auto");b||(this.redraw(),this._resetLineWidth());this._resetLineHeight()},_showCaret:function(a,b){if(this._clientDiv){var c=this._model,e=this._getSelection(),f=this._getScroll(),d=e.getCaret(),g=e.start,h=e.end,j=c.getLineAtOffset(h),k=Math.max(Math.max(g,c.getLineStart(j)),h-1),c=this._getClientWidth(),j=this._getClientHeight(),l=c/4,m=this._getBoundsAtOffset(d===g?g:k),t=m.left,n=m.right,u=m.top,o=m.bottom;a&&!e.isEmpty()&&(m=this._getBoundsAtOffset(d===h?g:k),m.top===u?d===g?n=t+Math.min(m.right-
t,c):t=n-Math.min(n-m.left,c):d===g?o=u+Math.min(m.bottom-u,j):u=o-Math.min(o-m.top,j));e=0;t<f.x&&(e=Math.min(t-f.x,-l));n>f.x+c&&(e=Math.max(n-f.x-c,l));d=0;u<f.y?d=u-f.y:o>f.y+j&&(d=o-f.y-j);b&&(b>0?d>0&&(d=Math.max(d,b)):d<0&&(d=Math.min(d,b)));return e!==0||d!==0?(this._scrollView(e,d),j!==this._getClientHeight()||c!==this._getClientWidth()?this._showCaret():this._ensureCaretVisible=!0,!0):!1}},_startIME:function(){if(this._imeOffset===-1){var a=this._getSelection();a.isEmpty()||this._modifyContent({text:"",
start:a.start,end:a.end},!0);this._imeOffset=a.start}},_unhookEvents:function(){this._model.removeEventListener("preChanging",this._modelListener.onChanging);this._model.removeEventListener("postChanged",this._modelListener.onChanged);this._modelListener=null;for(var a=0;a<this._handlers.length;a++){var b=this._handlers[a],c=b.target,e=b.type,b=b.handler;typeof c.removeEventListener==="function"?c.removeEventListener(e,b,!1):c.detachEvent("on"+e,b)}this._handlers=null;if(this._mutationObserver)this._mutationObserver.disconnect(),
this._mutationObserver=null},_updateDOMSelection:function(){if(!this._ignoreDOMSelection&&this._clientDiv){var a=this._getSelection(),b=this._model,c=b.getLineAtOffset(a.start),e=b.getLineAtOffset(a.end),f=this._getLineNext();if(f){var d=this._getLinePrevious(),g;c<f.lineIndex?(g=f,c=0):c>d.lineIndex?(g=d,c=0):(g=this._getLineNode(c),c=a.start-b.getLineStart(c));e<f.lineIndex?a=0:e>d.lineIndex?(f=d,a=0):(f=this._getLineNode(e),a=a.end-b.getLineStart(e));this._setDOMSelection(g,c,f,a)}}},_update:function(a){if(!(this._redrawCount>
0)){if(this._updateTimer)clearTimeout(this._updateTimer),this._updateTimer=null,a=!1;var b=this._clientDiv;if(b){if(this._metrics.invalid)this._ignoreQueueUpdate=!0,this._updateStyle(),this._ignoreQueueUpdate=!1;var c=this._model,e=this._getScroll(),f=this._getViewPadding(),d=c.getLineCount(),g=this._getLineHeight(),h=this._getClientWidth();if(this._wrapMode)b.style.width=h+"px";var j,k,l,m,t=0,u=0;if(this._lineHeight){for(;u<d;){l=this._getLineHeight(u);if(t+l>e.y)break;t+=l;u++}j=u;k=Math.max(0,
j-1);l=c=e.y-t;j>0&&(c+=this._getLineHeight(j-1))}else m=Math.max(0,e.y)/g,j=Math.floor(m),k=Math.max(0,j-1),c=Math.round((m-k)*g),l=Math.round((m-j)*g);this._topIndexY=l;m=this._parent;var o=m.clientWidth,v=m.clientHeight;m=this._getClientHeight();if(a){k=0;this._leftDiv&&(j=this._leftDiv.getBoundingClientRect(),k=j.right-j.left);j=h;for(this._wrapMode||(j=Math.max(this._maxLineWidth,j));u<d;)l=this._getLineHeight(u,!1),t+=l,u++;d=t}else{for(var h=this._viewDiv,e=Math.min(j+Math.floor((m+l)/g),d-
1),z=Math.min(e+1,d-1),g=b.firstChild;g;){l=g.lineIndex;var y=g.nextSibling;if(!(k<=l&&l<=z)||g.lineRemoved||g.lineIndex===-1)this._mouseWheelLine===g?(g.style.display="none",g.lineIndex=-1):b.removeChild(g);g=y}g=this._getLineNext();y=document.createDocumentFragment();for(l=k;l<=z;l++)if(!g||g.lineIndex>l)(new n(this,l)).create(y,null);else{y.firstChild&&(b.insertBefore(y,g),y=document.createDocumentFragment());if(g&&g.lineChanged)g=(new n(this,l)).create(y,g),g.lineChanged=!1;g=this._getLineNext(g)}y.firstChild&&
b.insertBefore(y,g);if(w&&!this._wrapMode)b.style.width="0x7fffffffpx";g=this._getLineNext();l=m+c;for(y=!1;g;){k=g.lineWidth;if(k===void 0)z=g._line.getBoundingClientRect(),k=g.lineWidth=Math.ceil(z.right-z.left),this._lineHeight&&(this._lineHeight[g.lineIndex]=Math.ceil(z.bottom-z.top));if(this._lineHeight&&!y&&(l-=this._lineHeight[g.lineIndex],l<0))e=g.lineIndex,y=!0;if(!this._wrapMode){if(k>=this._maxLineWidth)this._maxLineWidth=k,this._maxLineIndex=g.lineIndex;if(this._checkMaxLineIndex===g.lineIndex)this._checkMaxLineIndex=
-1}if(g.lineIndex===j)this._topChild=g;if(g.lineIndex===e)this._bottomChild=g;g=this._getLineNext(g)}if(this._checkMaxLineIndex!==-1&&(l=this._checkMaxLineIndex,this._checkMaxLineIndex=-1,0<=l&&l<d)){g=new n(this,l);z=g.getBoundingClientRect();k=z.right-z.left;if(k>=this._maxLineWidth)this._maxLineWidth=k,this._maxLineIndex=l;g.destroy()}for(;u<d;)l=this._getLineHeight(u,u<=e),t+=l,u++;d=t;this._updateRuler(this._leftDiv,j,e);this._updateRuler(this._rightDiv,j,e);k=0;this._leftDiv&&(j=this._leftDiv.getBoundingClientRect(),
k=j.right-j.left);e=0;this._rightDiv&&(e=this._rightDiv.getBoundingClientRect(),e=e.right-e.left);h.style.left=k+"px";h.style.right=e+"px";e=this._scrollDiv;e.style.height=d+"px";t=h=this._getClientWidth();this._wrapMode||(t=Math.max(this._maxLineWidth,t));j=t;if((!p||p>=9)&&this._maxLineWidth>h)t+=f.right+f.left;e.style.width=t+"px";if(this._clipScrollDiv)this._clipScrollDiv.style.width=t+"px";e=this._getScroll();t=m+f.top+f.bottom;this._updateRulerSize(this._leftDiv,t);this._updateRulerSize(this._rightDiv,
t)}if(this._vScrollDiv)t=m-8,u=Math.max(15,Math.ceil(Math.min(1,t/(d+f.top+f.bottom))*t)),this._vScrollDiv.style.left=k+h-8+"px",this._vScrollDiv.style.top=Math.floor(Math.max(0,e.y*t/d))+"px",this._vScrollDiv.style.height=u+"px";if(!this._wrapMode&&this._hScrollDiv)t=h-8,u=Math.max(15,Math.ceil(Math.min(1,t/(this._maxLineWidth+f.left+f.right))*t)),this._hScrollDiv.style.left=k+Math.floor(Math.max(0,Math.floor(e.x*t/this._maxLineWidth)))+"px",this._hScrollDiv.style.top=m-9+"px",this._hScrollDiv.style.width=
u+"px";z=e.x;l=this._clipDiv;t=this._overlayDiv;if(l){l.scrollLeft=z;u=k+f.left;g=f.top;a=h;k=m;z=0;y=-c;if(e.x===0)u-=f.left,a+=f.left,z=f.left;e.x+h===j&&(a+=f.right);e.y===0&&(g-=f.top,k+=f.top,y+=f.top);e.y+m===d&&(k+=f.bottom);l.style.left=u+"px";l.style.top=g+"px";l.style.right=o-a-u+"px";l.style.bottom=v-k-g+"px";b.style.left=z+"px";b.style.top=y+"px";b.style.width=j+"px";b.style.height=m+c+"px";if(t)t.style.left=b.style.left,t.style.top=b.style.top,t.style.width=b.style.width,t.style.height=
b.style.height}else{u=z;g=c;o=z+h;v=c+m;u===0&&(u-=f.left);g===0&&(g-=f.top);o===j&&(o+=f.right);e.y+m===d&&(v+=f.bottom);b.style.clip="rect("+g+"px,"+o+"px,"+v+"px,"+u+"px)";b.style.left=-z+k+f.left+"px";b.style.width=(w?j:h+z)+"px";if(!a)b.style.top=-c+f.top+"px",b.style.height=m+c+"px";if(t&&(t.style.clip=b.style.clip,t.style.left=b.style.left,t.style.width=b.style.width,!a))t.style.top=b.style.top,t.style.height=b.style.height}this._updateDOMSelection();b=this._ensureCaretVisible;this._ensureCaretVisible=
!1;m!==this._getClientHeight()&&(this._update(),b&&this._showCaret())}}},_updateRulerSize:function(a,b){if(a){for(var c=this._topIndexY,e=this._getLineHeight(),f=a.firstChild.rows[0].cells,d=0;d<f.length;d++){var g=f[d].firstChild,h=e;g._ruler.getOverview()==="page"&&(h+=c);g.style.top=-h+"px";g.style.height=b+h+"px"}a.style.height=b+"px"}},_updateRuler:function(a,b,c){if(a)for(var a=a.firstChild.rows[0].cells,e=this._getLineHeight(),d=this._getViewPadding(),g=0;g<a.length;g++){var h=a[g].firstChild,
j=h._ruler;h.rulerChanged&&f(j.getRulerStyle(),h);var k,l=h.firstChild;l?(k=l,l=l.nextSibling):(k=document.createElement("DIV"),k.style.visibility="hidden",h.appendChild(k));var m,t;if(h.rulerChanged&&k){m=-1;if(t=j.getWidestAnnotation())if(f(t.style,k),t.html)k.innerHTML=t.html;k.lineIndex=m;k.style.height=e+d.top+"px"}var u,n;if(j.getOverview()==="page"){for(j=j.getAnnotations(b,c+1);l;)m=l.lineIndex,t=l.nextSibling,(!(b<=m&&m<=c)||l.lineChanged)&&h.removeChild(l),l=t;l=h.firstChild.nextSibling;
n=document.createDocumentFragment();for(m=b;m<=c;m++)if(!l||l.lineIndex>m){u=document.createElement("DIV");if(t=j[m]){f(t.style,u);if(t.html)u.innerHTML=t.html;u.annotation=t}u.lineIndex=m;u.style.height=this._getLineHeight(m)+"px";n.appendChild(u)}else if(n.firstChild&&(h.insertBefore(n,l),n=document.createDocumentFragment()),l)l=l.nextSibling;n.firstChild&&h.insertBefore(n,l)}else{t=this._getClientHeight();m=this._model.getLineCount();l=t+d.top+d.bottom-2*this._metrics.scrollWidth;k=e*m<l?e:l/m;
if(h.rulerChanged){for(t=h.childNodes.length;t>1;)h.removeChild(h.lastChild),t--;j=j.getAnnotations(0,m);n=document.createDocumentFragment();for(var o in j)if(m=o>>>0,!(m<0)){u=document.createElement("DIV");t=j[o];f(t.style,u);u.style.position="absolute";u.style.top=this._metrics.scrollWidth+e+Math.floor(m*k)+"px";if(t.html)u.innerHTML=t.html;u.annotation=t;u.lineIndex=m;n.appendChild(u)}h.appendChild(n)}else if(h._oldTrackHeight!==l)for(u=h.firstChild?h.firstChild.nextSibling:null;u;)u.style.top=
this._metrics.scrollWidth+e+Math.floor(u.lineIndex*k)+"px",u=u.nextSibling;h._oldTrackHeight=l}h.rulerChanged=!1}},_updateStyle:function(a){if(!a&&p)this._rootDiv.style.lineHeight="normal";var b=this._metrics=this._calculateMetrics();this._rootDiv.style.lineHeight=p?b.lineHeight-(b.lineTrim.top+b.lineTrim.bottom)+"px":"normal";a||(this.redraw(),this._resetLineWidth())}};a.EventTarget.addMixin(o.prototype);return{TextView:o}});
define("orion/textview/tooltip",["i18n!orion/textview/nls/messages","orion/textview/textView","orion/textview/textModel","orion/textview/projectionTextModel"],function(b,d,a,c){function f(a){this._view=a;this._create(a.getOptions("parent").ownerDocument);a.addEventListener("Destroy",this,this.destroy)}f.getTooltip=function(a){if(!a._tooltip)a._tooltip=new f(a);return a._tooltip};f.prototype={_create:function(a){if(!this._tooltipDiv){var b=this._tooltipDiv=a.createElement("DIV");b.className="textviewTooltip";
b.setAttribute("aria-live","assertive");b.setAttribute("aria-atomic","true");var c=this._tooltipContents=a.createElement("DIV");b.appendChild(c);a.body.appendChild(b);this.hide()}},destroy:function(){if(this._tooltipDiv){this.hide();var a=this._tooltipDiv.parentNode;a&&a.removeChild(this._tooltipDiv);this._tooltipDiv=null}},hide:function(){if(this._contentsView)this._contentsView.destroy(),this._contentsView=null;if(this._tooltipContents)this._tooltipContents.innerHTML="";if(this._tooltipDiv)this._tooltipDiv.style.visibility=
"hidden";if(this._showTimeout)clearTimeout(this._showTimeout),this._showTimeout=null;if(this._hideTimeout)clearTimeout(this._hideTimeout),this._hideTimeout=null;if(this._fadeTimeout)clearInterval(this._fadeTimeout),this._fadeTimeout=null},isVisible:function(){return this._tooltipDiv&&this._tooltipDiv.style.visibility==="visible"},setTarget:function(a,b){if(this.target!==a&&(this._target=a,this.hide(),a)){var c=this;b===0?c.show(!0):c._showTimeout=setTimeout(function(){c.show(!0)},b?b:500)}},show:function(a){if(this._target){var b=
this._target.getTooltipInfo();if(b){var f=this._tooltipDiv,j=this._tooltipContents;f.style.left=f.style.right=f.style.width=f.style.height=j.style.width=j.style.height="auto";var k=b.contents;k instanceof Array&&(k=this._getAnnotationContents(k));if(typeof k==="string")j.innerHTML=k;else if(this._isNode(k))j.appendChild(k);else if(k instanceof c.ProjectionTextModel){var l=this._view,m=l.getOptions();m.wrapMode=!1;m.parent=j;var n=m.themeClass;n?((n=n.replace("tooltip",""))&&(n=" "+n),n="tooltip"+
n):n="tooltip";m.themeClass=n;m=this._contentsView=new d.TextView(m);m._clientDiv.contentEditable=!1;m.addEventListener("LineStyle",function(a){l.onLineStyle(a)});m.setModel(k);k=m.computeSize();j.style.width=k.width+20+"px";j.style.height=k.height+"px";m.resize()}else return;j=f.ownerDocument.documentElement;b.anchor==="right"?(k=j.clientWidth-b.x,f.style.right=k+"px"):(k=parseInt(this._getNodeStyle(f,"padding-left","0"),10),k+=parseInt(this._getNodeStyle(f,"border-left-width","0"),10),k=b.x-k,f.style.left=
k+"px");f.style.maxWidth=j.clientWidth-k-10+"px";k=parseInt(this._getNodeStyle(f,"padding-top","0"),10);k+=parseInt(this._getNodeStyle(f,"border-top-width","0"),10);k=b.y-k;f.style.top=k+"px";f.style.maxHeight=j.clientHeight-k-10+"px";f.style.opacity="1";f.style.visibility="visible";if(a){var o=this;o._hideTimeout=setTimeout(function(){var a=parseFloat(o._getNodeStyle(f,"opacity","1"));o._fadeTimeout=setInterval(function(){f.style.visibility==="visible"&&a>0?(a-=0.1,f.style.opacity=a):o.hide()},50)},
5E3)}}}},_getAnnotationContents:function(a){function f(a){var b=a.title;if(b==="")return null;var c="<div>";a.html&&(c+=a.html+"&nbsp;");if(!b)b=a.end,a=j.getLineStart(j.getLineAtOffset(a.start)),b=j.getLineEnd(j.getLineAtOffset(b),!0),b=j.getText(a,b);b=b.replace(/</g,"&lt;").replace(/>/g,"&gt;");c+="<span style='vertical-align:middle;'>"+b+"</span><div>";return c}if(a.length===0)return null;var d=this._view.getModel(),j=d.getBaseModel?d.getBaseModel():d;if(a.length===1)if(d=a[0],d.title!==void 0)return f(d);
else{var a=new c.ProjectionTextModel(j),k=j.getLineStart(j.getLineAtOffset(d.start)),l=j.getCharCount();d.end!==l&&a.addProjection({start:d.end,end:l});k>0&&a.addProjection({start:0,end:k});return a}else{k="<div><em>"+b.multipleAnnotations+"</em></div>";for(l=0;l<a.length;l++)d=a[l],(d=f(d))&&(k+=d);return k}},_getNodeStyle:function(a,b,c){var f;if(a&&(f=a.style[b],!f))if(a.currentStyle){for(f=0;(f=b.indexOf("-",f))!==-1;)b=b.substring(0,f)+b.substring(f+1,f+2).toUpperCase()+b.substring(f+2);f=a.currentStyle[b]}else f=
(a=a.ownerDocument.defaultView.getComputedStyle(a,null))?a.getPropertyValue(b):null;return f||c},_isNode:function(a){return typeof Node==="object"?a instanceof Node:a&&typeof a==="object"&&typeof a.nodeType==="number"&&typeof a.nodeName==="string"}};return{Tooltip:f}});
define("orion/editor/editor","i18n!orion/editor/nls/messages,orion/textview/keyBinding,orion/textview/eventTarget,orion/textview/tooltip,orion/textview/annotations,orion/textview/i18nUtil".split(","),function(b,d,a,c,f,e){function h(a){this._textViewFactory=a.textViewFactory;this._undoStackFactory=a.undoStackFactory;this._textDNDFactory=a.textDNDFactory;this._annotationFactory=a.annotationFactory;this._foldingRulerFactory=a.foldingRulerFactory;this._lineNumberRulerFactory=a.lineNumberRulerFactory;
this._contentAssistFactory=a.contentAssistFactory;this._keyBindingFactory=a.keyBindingFactory;this._statusReporter=a.statusReporter;this._domNode=a.domNode;this._foldingRuler=this._overviewRuler=this._lineNumberRuler=this._annotationRuler=this._annotationModel=this._annotationStyler=null;this._dirty=!1;this._title=this._contentAssist=null;this._keyModes=[]}function g(a){var b=this,c=Array.prototype.slice.call(arguments,1);return c.length?function(){return arguments.length?b.apply(a,c.concat(Array.prototype.slice.call(arguments))):
b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}var j;h.prototype={getAnnotationModel:function(){return this._annotationModel},getAnnotationRuler:function(){return this._annotationRuler},getAnnotationStyler:function(){return this._annotationStyler},getFoldingRuler:function(){return this._foldingRuler},getLineNumberRuler:function(){return this._lineNumberRuler},getModel:function(){var a=this._textView.getModel();a.getBaseModel&&(a=a.getBaseModel());return a},getOverviewRuler:function(){return this._overviewRuler},
getTextView:function(){return this._textView},getTitle:function(){return this._title},getKeyModes:function(){return this._keyModes},isDirty:function(){return this._dirty},setAnnotationRulerVisible:function(a){if(this._annotationRulerVisible!==a&&(this._annotationRulerVisible=a,this._annotationRuler)){var b=this._textView;a?b.addRuler(this._annotationRuler,0):b.removeRuler(this._annotationRuler)}},setFoldingRulerVisible:function(a){if(this._foldingRulerVisible!==a&&(this._foldingRulerVisible=a,this._foldingRuler)){var b=
this._textView;b.getModel().getBaseModel&&(a?b.addRuler(this._foldingRuler,100):b.removeRuler(this._foldingRuler))}},setDirty:function(a){if(this._dirty!==a)this._dirty=a,this.onDirtyChanged({type:"DirtyChanged"})},setLineNumberRulerVisible:function(a){if(this._lineNumberRulerVisible!==a&&(this._lineNumberRulerVisible=a,this._lineNumberRuler)){var b=this._textView;a?b.addRuler(this._lineNumberRuler,1):b.removeRuler(this._lineNumberRuler)}},setOverviewRulerVisible:function(a){if(this._overviewRulerVisible!==
a&&(this._overviewRulerVisible=a,this._overviewRuler)){var b=this._textView;a?b.addRuler(this._overviewRuler):b.removeRuler(this._overviewRuler)}},mapOffset:function(a,b){var c=this._textView.getModel();c.getBaseModel&&(a=c.mapOffset(a,b));return a},getCaretOffset:function(){return this.mapOffset(this._textView.getCaretOffset())},getSelection:function(){var a=this._textView,b=a.getSelection(),a=a.getModel();if(a.getBaseModel)b.start=a.mapOffset(b.start),b.end=a.mapOffset(b.end);return b},getText:function(a,
b){var c=this._textView.getModel();c.getBaseModel&&(c=c.getBaseModel());return c.getText(a,b)},_expandOffset:function(a){var b=this._textView.getModel(),c=this._annotationModel;if(c&&b.getBaseModel)for(a=c.getAnnotations(a,a+1);a.hasNext();)b=a.next(),b.type===f.AnnotationType.ANNOTATION_FOLDING&&b.expand&&(b.expand(),c.modifyAnnotation(b))},setCaretOffset:function(a){var b=this._textView,c=b.getModel();c.getBaseModel&&(this._expandOffset(a),a=c.mapOffset(a,!0));b.setCaretOffset(a)},setText:function(a,
b,c){var e=this._textView,f=e.getModel();f.getBaseModel&&(b!==void 0&&(this._expandOffset(b),b=f.mapOffset(b,!0)),c!==void 0&&(this._expandOffset(c),c=f.mapOffset(c,!0)));e.setText(a,b,c)},setFoldingEnabled:function(a){this.setFoldingRulerVisible(a)},setSelection:function(a,b,c){var e=this._textView,f=e.getModel();f.getBaseModel&&(this._expandOffset(a),this._expandOffset(b),a=f.mapOffset(a,!0),b=f.mapOffset(b,!0));e.setSelection(a,b,c)},moveSelection:function(a,b,c,e){var f=this._textView;this.setSelection(a,
b||a,!1);var b=f.getTopPixel(),d=f.getBottomPixel(),a=this.getModel().getLineAtOffset(a),a=f.getLinePixel(a);a<b||a>d?(d=Math.max(0,a-Math.floor((a<b?3:1)*(d-b)/4)),(new j({node:f,duration:300,curve:[b,d],onAnimate:function(a){f.setTopPixel(Math.floor(a))},onEnd:function(){f.showSelection();(e===void 0||e)&&f.focus();c&&c()}})).play()):(f.showSelection(),(e===void 0||e)&&f.focus(),c&&c())},checkDirty:function(){this.setDirty(!this._undoStack.isClean())},reportStatus:function(a,b,c){this._statusReporter?
this._statusReporter(a,b,c):window.alert(b==="error"?"ERROR: "+a:a)},_getTooltipInfo:function(a,b){var c=this._textView,e=this.getAnnotationModel();if(!e)return null;var f=this._annotationStyler;if(!f)return null;var d=c.getOffsetAtLocation(a,b);if(d===-1)return null;d=this.mapOffset(d);f=f.getAnnotationsByType(e,d,d+1);e=[];for(d=0;d<f.length;d++)f[d].rangeStyle&&e.push(f[d]);if(e.length===0)return null;c=c.convert({x:a,y:b},"document","page");return{contents:e,anchor:"left",x:c.x+10,y:c.y+20}},
_highlightCurrentLine:function(a,b){var c=this._annotationModel;if(c){var e=this._textView.getModel(),d=b?e.getLineAtOffset(b.start):-1,g=e.getLineAtOffset(a.start),h=a.start===a.end,j=!b||b.start===b.end,s=e.getLineStart(g),x=e.getLineEnd(g);e.getBaseModel&&(s=e.mapOffset(s),x=e.mapOffset(x));e=this._currentLineAnnotation;if(!(d===g&&j&&h&&e&&e.start===s&&e.end===x)){var d=e?[e]:null,v;h&&(e=f.AnnotationType.createAnnotation(f.AnnotationType.ANNOTATION_CURRENT_LINE,s,x),v=[e]);this._currentLineAnnotation=
e;c.replaceAnnotations(d,v)}}},installTextView:function(){this._textView=this._textViewFactory();if(this._undoStackFactory)this._undoStack=this._undoStackFactory.createUndoStack(this);if(this._textDNDFactory)this._textDND=this._textDNDFactory.createTextDND(this,this._undoStack);if(this._contentAssistFactory){var a=this._contentAssistFactory.createContentAssistMode(this);this._keyModes.push(a);this._contentAssist=a.getContentAssist()}var e=this,g=this._textView,h=this;this._listener={onModelChanged:function(){h.checkDirty()},
onMouseOver:function(a){h._listener.onMouseMove(a)},onMouseMove:function(a){var b=c.Tooltip.getTooltip(g);b&&b.setTarget({x:a.x,y:a.y,getTooltipInfo:function(){return h._getTooltipInfo(this.x,this.y)}})},onMouseOut:function(){var a=c.Tooltip.getTooltip(g);a&&a.setTarget(null)},onSelection:function(a){h._updateCursorStatus();h._highlightCurrentLine(a.newValue,a.oldValue)}};g.addEventListener("ModelChanged",this._listener.onModelChanged);g.addEventListener("Selection",this._listener.onSelection);g.addEventListener("MouseOver",
this._listener.onMouseOver);g.addEventListener("MouseOut",this._listener.onMouseOut);g.addEventListener("MouseMove",this._listener.onMouseMove);this._keyBindingFactory&&this._keyBindingFactory(this,this._keyModes,this._undoStack,this._contentAssist);g.setKeyBinding(new d.KeyBinding(27),"cancelMode");g.setAction("cancelMode",function(){for(var a=!1,b=0;b<this._keyModes.length;b++)this._keyModes[b].isActive()&&(a=this._keyModes[b].cancel()||a);return a}.bind(this),{name:b.cancelMode});g.setAction("lineUp",
function(){for(var a=0;a<this._keyModes.length;a++)if(this._keyModes[a].isActive())return this._keyModes[a].lineUp();return!1}.bind(this));g.setAction("lineDown",function(){for(var a=0;a<this._keyModes.length;a++)if(this._keyModes[a].isActive())return this._keyModes[a].lineDown();return!1}.bind(this));g.setAction("enter",function(){for(var a=0;a<this._keyModes.length;a++)if(this._keyModes[a].isActive())return this._keyModes[a].enter();return!1}.bind(this));a=function(a){if(a!==void 0&&a!==-1){for(var b=
this.getView().getModel(),c=this.getAnnotationModel(),d=e.mapOffset(b.getLineStart(a)),a=e.mapOffset(b.getLineEnd(a)),b=c.getAnnotations(d,a),g=null;b.hasNext();){var h=b.next();if(h.type===f.AnnotationType.ANNOTATION_BOOKMARK){g=h;break}}g?c.removeAnnotation(g):(g=f.AnnotationType.createAnnotation(f.AnnotationType.ANNOTATION_BOOKMARK,d,a),g.title=void 0,c.addAnnotation(g))}};if(this._annotationFactory){var j=g.getModel();j.getBaseModel&&(j=j.getBaseModel());if(this._annotationModel=this._annotationFactory.createAnnotationModel(j))if(j=
this._annotationStyler=this._annotationFactory.createAnnotationStyler(g,this._annotationModel))j.addAnnotationType(f.AnnotationType.ANNOTATION_CURRENT_SEARCH),j.addAnnotationType(f.AnnotationType.ANNOTATION_MATCHING_SEARCH),j.addAnnotationType(f.AnnotationType.ANNOTATION_ERROR),j.addAnnotationType(f.AnnotationType.ANNOTATION_WARNING),j.addAnnotationType(f.AnnotationType.ANNOTATION_MATCHING_BRACKET),j.addAnnotationType(f.AnnotationType.ANNOTATION_CURRENT_BRACKET),j.addAnnotationType(f.AnnotationType.ANNOTATION_CURRENT_LINE),
j.addAnnotationType("orion.annotation.highlightError");g.annotationModel=this._annotationModel;var j=this._annotationFactory.createAnnotationRulers(this._annotationModel),q=this._annotationRuler=j.annotationRuler;if(q)q.onClick=function(a){if(a!==void 0&&a!==-1)for(var b=this.getView().getModel(),c=this.getAnnotationModel(),f=e.mapOffset(b.getLineStart(a)),a=e.mapOffset(b.getLineEnd(a)),a=c.getAnnotations(f,a);a.hasNext();)if(c=a.next(),this.isAnnotationTypeVisible(c.type)){a=e.getModel();e.onGotoLine(a.getLineAtOffset(f),
c.start-f,c.end-f);break}},q.onDblClick=a,q.setMultiAnnotationOverlay({html:"<div class='annotationHTML overlay'></div>"}),q.addAnnotationType(f.AnnotationType.ANNOTATION_ERROR),q.addAnnotationType(f.AnnotationType.ANNOTATION_WARNING),q.addAnnotationType(f.AnnotationType.ANNOTATION_TASK),q.addAnnotationType(f.AnnotationType.ANNOTATION_BOOKMARK);this.setAnnotationRulerVisible(!0);if(q=this._overviewRuler=j.overviewRuler)q.onClick=function(a){a!==void 0&&(a=g.getModel().getLineStart(a),e.moveSelection(e.mapOffset(a)))},
q.addAnnotationType(f.AnnotationType.ANNOTATION_CURRENT_SEARCH),q.addAnnotationType(f.AnnotationType.ANNOTATION_MATCHING_SEARCH),q.addAnnotationType(f.AnnotationType.ANNOTATION_ERROR),q.addAnnotationType(f.AnnotationType.ANNOTATION_WARNING),q.addAnnotationType(f.AnnotationType.ANNOTATION_TASK),q.addAnnotationType(f.AnnotationType.ANNOTATION_BOOKMARK),q.addAnnotationType(f.AnnotationType.ANNOTATION_MATCHING_BRACKET),q.addAnnotationType(f.AnnotationType.ANNOTATION_CURRENT_BRACKET),q.addAnnotationType(f.AnnotationType.ANNOTATION_CURRENT_LINE);
this.setOverviewRulerVisible(!0)}if(this._lineNumberRulerFactory)this._lineNumberRuler=this._lineNumberRulerFactory.createLineNumberRuler(this._annotationModel),this._lineNumberRuler.onDblClick=a,this.setLineNumberRulerVisible(!0);if(this._foldingRulerFactory)this._foldingRuler=this._foldingRulerFactory.createFoldingRuler(this._annotationModel),this._foldingRuler.addAnnotationType(f.AnnotationType.ANNOTATION_FOLDING),this.setFoldingRulerVisible(!1);this.dispatchEvent({type:"TextViewInstalled",textView:g})},
_updateCursorStatus:function(){var a=this.getModel(),c=this.getCaretOffset(),f=a.getLineAtOffset(c),a=a.getLineStart(f);c-=a;for(a=0;a<this._keyModes.length;a++){var d=this._keyModes[a];if(d.isActive()&&d.isStatusActive&&d.isStatusActive())return}this.reportStatus(e.formatMessage(b.lineColumn,f+1,c+1))},showProblems:function(a){var b=this._annotationModel;if(b){for(var c=[],e=[],d=b.getTextModel(),g=b.getAnnotations(0,d.getCharCount()),h;g.hasNext();)h=g.next(),(h.type===f.AnnotationType.ANNOTATION_ERROR||
h.type===f.AnnotationType.ANNOTATION_WARNING)&&c.push(h);if(a)for(g=0;g<a.length;g++)if(h=a[g]){var j=h.description.replace(/'/g,"&#39;").replace(/"/g,"&#34;"),s=d.getLineStart(h.line-1);h=f.AnnotationType.createAnnotation(h.severity==="error"?f.AnnotationType.ANNOTATION_ERROR:f.AnnotationType.ANNOTATION_WARNING,s+h.start-1,s+h.end,j);e.push(h)}b.replaceAnnotations(c,e)}},showSelection:function(a,b,c,e,f){typeof a==="number"?(typeof b!=="number"&&(b=a),this.moveSelection(a,b)):typeof c==="number"&&
(a=this.getModel().getLineStart(c-1),typeof e==="number"&&(a+=e),typeof f!=="number"&&(f=0),this.moveSelection(a,a+f))},setInput:function(a,b,c,e){this._title=a;this._textView&&(e?(this._undoStack.markClean(),this.checkDirty()):(b?this._textView.setText(b):c!==null&&c!==void 0&&(this._textView.setText(c),this._textView.getModel().setLineDelimiter("auto"),this._highlightCurrentLine(this._textView.getSelection())),this._undoStack.reset(),this.checkDirty(),this._textView.focus()));this.onInputChanged({type:"InputChanged",
title:a,message:b,contents:c,contentsSaved:e})},onInputChanged:function(a){return this.dispatchEvent(a)},onGotoLine:function(a,b,c){if(this._textView){var e=this.getModel(),f=e.getLineStart(a),d=0;c===void 0&&(c=0);typeof b==="string"?(a=e.getLine(a).indexOf(b),a!==-1&&(d=a,c=d+b.length)):(d=b,b=e.getLineEnd(a)-f,d=Math.min(d,b),c=Math.min(c,b));this.moveSelection(f+d,f+c)}},onDirtyChanged:function(a){return this.dispatchEvent(a)}};a.EventTarget.addMixin(h.prototype);j=function(){function a(b){this.options=
b}a.prototype.play=function(){var a=typeof this.options.duration==="number"?this.options.duration:350,b=this.options.easing||this.defaultEasing,c=this.options.onAnimate||function(){},e=this.options.onEnd||function(){},f=this.options.curve[0],d=this.options.curve[1]-f,g,h,j=-1;h=setInterval(function(){j=j===-1?(new Date).getTime():j;var k=((new Date).getTime()-j)/a;k<1?(k=b(k),g=f+k*d,c(g)):(clearInterval(h),e())},typeof this.options.rate==="number"?this.options.rate:20)};a.prototype.defaultEasing=
function(a){return Math.sin(a*(Math.PI/2))};return a}();if(!Function.prototype.bind)Function.prototype.bind=g;return{Editor:h,util:{bind:g}}});
define("orion/textview/rulers",["i18n!orion/textview/nls/messages","orion/textview/annotations","orion/textview/tooltip","orion/textview/i18nUtil"],function(b,d,a,c){function f(a,b,c,e){this._location=b||"left";this._overview=c||"page";this._rulerStyle=e;this._view=null;var f=this;this._listener={onTextModelChanged:function(a){f._onTextModelChanged(a)},onAnnotationModelChanged:function(a){f._onAnnotationModelChanged(a)}};this.setAnnotationModel(a)}function e(a,b,c,e,d){f.call(this,a,b,"page",c);this._oddStyle=
e||{style:{backgroundColor:"white"}};this._evenStyle=d||{style:{backgroundColor:"white"}};this._numOfDigits=0}function h(a,b,c){f.call(this,a,b,"page",c)}function g(a,b,c){f.call(this,a,b,"document",c)}function j(a,b,c){h.call(this,a,b,c)}f.prototype={getAnnotations:function(a,b){var c=this._annotationModel;if(!c)return[];var e=this._view.getModel(),f=e.getLineStart(a),d=e.getLineEnd(b-1),g=e;e.getBaseModel&&(g=e.getBaseModel(),f=e.mapOffset(f),d=e.mapOffset(d));for(var h=[],c=this.getAnnotationsByType(c,
f,d),f=0;f<c.length;f++)for(var d=c[f],j=g.getLineAtOffset(d.start),x=g.getLineAtOffset(Math.max(d.start,d.end-1)),v=j;v<=x;v++){var w=v;if(e!==g){w=g.getLineStart(v);w=e.mapOffset(w,!0);if(w===-1)continue;w=e.getLineAtOffset(w)}if(a<=w&&w<b){var t=this._mergeAnnotation(h[w],d,v-j,x-j+1);t&&(h[w]=t)}}if(!this._multiAnnotation&&this._multiAnnotationOverlay)for(var u in h)h[u]._multiple&&(h[u].html+=this._multiAnnotationOverlay.html);return h},getAnnotationModel:function(){return this._annotationModel},
getLocation:function(){return this._location},getOverview:function(){return this._overview},getRulerStyle:function(){return this._rulerStyle},getView:function(){return this._view},getWidestAnnotation:function(){return null},setAnnotationModel:function(a){this._annotationModel&&this._annotationModel.removEventListener("Changed",this._listener.onAnnotationModelChanged);(this._annotationModel=a)&&this._annotationModel.addEventListener("Changed",this._listener.onAnnotationModelChanged)},setMultiAnnotation:function(a){this._multiAnnotation=
a},setMultiAnnotationOverlay:function(a){this._multiAnnotationOverlay=a},setView:function(a){this._onTextModelChanged&&this._view&&this._view.removeEventListener("ModelChanged",this._listener.onTextModelChanged);this._view=a;this._onTextModelChanged&&this._view&&this._view.addEventListener("ModelChanged",this._listener.onTextModelChanged)},onClick:function(){},onDblClick:function(){},onMouseMove:function(b,c){var e=a.Tooltip.getTooltip(this._view);if(e&&!(e.isVisible()&&this._tooltipLineIndex===b)){this._tooltipLineIndex=
b;var f=this;e.setTarget({y:c.clientY,getTooltipInfo:function(){return f._getTooltipInfo(f._tooltipLineIndex,this.y)}})}},onMouseOver:function(a,b){this.onMouseMove(a,b)},onMouseOut:function(){var b=a.Tooltip.getTooltip(this._view);b&&b.setTarget(null)},_getTooltipInfo:function(a,b){if(a!==void 0){var c=this._view,e=c.getModel(),f=this._annotationModel,d=[];if(f){var d=e.getLineStart(a),g=e.getLineEnd(a);e.getBaseModel&&(d=e.mapOffset(d),g=e.mapOffset(g));d=this.getAnnotationsByType(f,d,g)}f=this._getTooltipContents(a,
d);if(!f)return null;f={contents:f,anchor:this.getLocation()};d=c.getClientArea();d.y=this.getOverview()==="document"?c.convert({y:b},"view","document").y:c.getLocationAtOffset(e.getLineStart(a)).y;c.convert(d,"document","page");f.x=d.x;f.y=d.y;f.anchor==="right"&&(f.x+=d.width);return f}},_getTooltipContents:function(a,b){return b},_onAnnotationModelChanged:function(a){function b(a){for(var d=0;d<a.length;d++)if(f.isAnnotationTypeVisible(a[d].type)){var g=a[d].start,h=a[d].end;e.getBaseModel&&(g=
e.mapOffset(g,!0),h=e.mapOffset(h,!0));g!==-1&&h!==-1&&c.redrawLines(e.getLineAtOffset(g),e.getLineAtOffset(Math.max(g,h-1))+1,f)}}var c=this._view;if(c){var e=c.getModel(),f=this,d=e.getLineCount();a.textModelChangedEvent?(a=a.textModelChangedEvent.start,e.getBaseModel&&(a=e.mapOffset(a,!0)),a=e.getLineAtOffset(a),c.redrawLines(a,d,f)):(b(a.added),b(a.removed),b(a.changed))}},_mergeAnnotation:function(a,b,c){a||(a={});if(c===0)if(a.html&&b.html){if(b.html!==a.html&&!a._multiple&&this._multiAnnotation)a.html=
this._multiAnnotation.html;a._multiple=!0}else a.html=b.html;a.style=this._mergeStyle(a.style,b.style);return a},_mergeStyle:function(a,b){if(b){a||(a={});a.styleClass&&b.styleClass&&a.styleClass!==b.styleClass?a.styleClass+=" "+b.styleClass:a.styleClass=b.styleClass;var c;if(b.style){if(!a.style)a.style={};for(c in b.style)a.style[c]||(a.style[c]=b.style[c])}if(b.attributes){if(!a.attributes)a.attributes={};for(c in b.attributes)a.attributes[c]||(a.attributes[c]=b.attributes[c])}}return a}};d.AnnotationTypeList.addMixin(f.prototype);
e.prototype=new f;e.prototype.getAnnotations=function(a,b){for(var c=f.prototype.getAnnotations.call(this,a,b),e=this._view.getModel(),d=a;d<b;d++){var g=d&1?this._oddStyle:this._evenStyle,h=d;e.getBaseModel&&(h=e.getLineStart(h),h=e.getBaseModel().getLineAtOffset(e.mapOffset(h)));c[d]||(c[d]={});c[d].html=h+1+"";if(!c[d].style)c[d].style=g}return c};e.prototype.getWidestAnnotation=function(){var a=this._view.getModel().getLineCount();return this.getAnnotations(a-1,a)[a-1]};e.prototype._onTextModelChanged=
function(a){var a=a.start,b=this._view.getModel(),c=((b.getBaseModel?b.getBaseModel().getLineCount():b.getLineCount())+"").length;if(this._numOfDigits!==c)this._numOfDigits=c,this._view.redrawLines(b.getLineAtOffset(a),b.getLineCount(),this)};h.prototype=new f;g.prototype=new f;g.prototype.getRulerStyle=function(){var a={style:{lineHeight:"1px",fontSize:"1px"}};return a=this._mergeStyle(a,this._rulerStyle)};g.prototype.onClick=function(a){a!==void 0&&this._view.setTopIndex(a)};g.prototype._getTooltipContents=
function(a,e){if(e.length===0){var d=this._view.getModel(),g=a;d.getBaseModel&&(g=d.getLineStart(g),g=d.getBaseModel().getLineAtOffset(d.mapOffset(g)));return c.formatMessage(b.line,g+1)}return f.prototype._getTooltipContents.call(this,a,e)};g.prototype._mergeAnnotation=function(a,b,c,e){if(c===0){if(!a)a={html:"&nbsp;",style:{style:{height:3*e+"px"}}},a.style=this._mergeStyle(a.style,b.overviewStyle);return a}};j.prototype=new h;j.prototype.onClick=function(b){if(b!==void 0){var c=this._annotationModel;
if(c){var e=this._view.getModel(),f=e.getLineStart(b),b=e.getLineEnd(b,!0);e.getBaseModel&&(f=e.mapOffset(f),b=e.mapOffset(b),e=e.getBaseModel());for(var d,c=c.getAnnotations(f,b);!d&&c.hasNext();)b=c.next(),this.isAnnotationTypeVisible(b.type)&&(d=b);d&&e.getLineAtOffset(d.start)===e.getLineAtOffset(f)&&((e=a.Tooltip.getTooltip(this._view))&&e.setTarget(null),d.expanded?d.collapse():d.expand(),this._annotationModel.modifyAnnotation(d))}}};j.prototype._getTooltipContents=function(a,b){return b.length===
1&&b[0].expanded?null:h.prototype._getTooltipContents.call(this,a,b)};j.prototype._onAnnotationModelChanged=function(a){function b(a){for(d=0;d<a.length;d++)if(f.isAnnotationTypeVisible(a[d].type)){var c=a[d].start;e.getBaseModel&&(c=e.mapOffset(c,!0));c!==-1&&(j=Math.min(j,e.getLineAtOffset(c)))}}if(a.textModelChangedEvent)h.prototype._onAnnotationModelChanged.call(this,a);else{var c=this._view;if(c){var e=c.getModel(),f=this,d,g=e.getLineCount(),j=g;b(a.added);b(a.removed);b(a.changed);a=c.getRulers();
for(d=0;d<a.length;d++)c.redrawLines(j,g,a[d])}}};return{Ruler:f,AnnotationRuler:h,LineNumberRuler:e,OverviewRuler:g,FoldingRuler:j}});
define("orion/editor/editorFeatures","i18n!orion/editor/nls/messages,orion/textview/undoStack,orion/textview/keyBinding,orion/textview/rulers,orion/textview/annotations,orion/textview/tooltip,orion/textview/textDND,orion/editor/regex,orion/textview/i18nUtil".split(","),function(b,d,a,c,f,e,h,g,j){function k(){}function l(){}function m(){}function n(){}function o(){}function q(a,b,c){this.editor=a;this.textView=a.getTextView();this.undoStack=b;this._incrementalFindActive=!1;this._incrementalFindSuccess=
!0;this._incrementalFindIgnoreSelection=!1;this._incrementalFindPrefix="";this._searcher=c;this._lastEditLocation=null;this.init()}function p(a,b,c,e){this.editor=a;this.textView=a.getTextView();this.undoStack=b;this.contentAssist=c;this.linkedMode=e;this.contentAssist&&this.contentAssist.addEventListener("ProposalApplied",this.contentAssistProposalApplied.bind(this));this.init()}function r(a){this.editor=a;this.textView=a.getTextView();this.linkedModeActive=!1;this.linkedModePositions=[];this.linkedModeEscapePosition=
this.linkedModeCurrentPositionIndex=0;this.linkedModeListener={onVerify:function(a){for(var b=!1,c=0,e=0;e<this.linkedModePositions.length;++e){var f=this.linkedModePositions[e];if(b)f.offset+=c;else if(a.start>=f.offset&&a.end<=f.offset+f.length)b=f.length,f.length=a.start-f.offset+a.text.length+(f.offset+f.length-a.end),c=f.length-b,b=!0}b?this.linkedModeEscapePosition+=c:this.cancel()}.bind(this)}}k.prototype={createUndoStack:function(c){var c=c.getTextView(),e=new d.UndoStack(c,200);c.setKeyBinding(new a.KeyBinding("z",
!0),"undo");c.setAction("undo",function(){e.undo();return!0},{name:b.undo});var f=navigator.platform.indexOf("Mac")!==-1;c.setKeyBinding(f?new a.KeyBinding("z",!0,!0):new a.KeyBinding("y",!0),"redo");c.setAction("redo",function(){e.redo();return!0},{name:b.redo});return e}};l.prototype={createLineNumberRuler:function(a){return new c.LineNumberRuler(a,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"})}};m.prototype={createFoldingRuler:function(a){return new c.FoldingRuler(a,
"left",{styleClass:"ruler folding"})}};n.prototype={createAnnotationModel:function(a){return new f.AnnotationModel(a)},createAnnotationStyler:function(a,b){return new f.AnnotationStyler(a,b)},createAnnotationRulers:function(a){var b=new c.AnnotationRuler(a,"left",{styleClass:"ruler annotations"}),a=new c.OverviewRuler(a,"right",{styleClass:"ruler overview"});return{annotationRuler:b,overviewRuler:a}}};o.prototype={createTextDND:function(a,b){return new h.TextDND(a.getTextView(),b)}};q.prototype={init:function(){var c=
this;this._incrementalFindListener={onVerify:function(a){var e=c.editor,f=e.getModel(),d=e.mapOffset(a.start),h=e.mapOffset(a.end),d=f.getText(d,h),f=c._incrementalFindPrefix;if((f=f.match(RegExp("^"+g.escape(d),"i")))&&f.length>0)f=c._incrementalFindPrefix+=a.text,c.editor.reportStatus(j.formatMessage(b.incrementalFind,f)),d=e.getSelection().start,(d=e.getModel().find({string:f,start:d,caseInsensitive:f.toLowerCase()===f}).next())?(c._incrementalFindSuccess=!0,c._incrementalFindIgnoreSelection=!0,
e.moveSelection(d.start,d.end),c._incrementalFindIgnoreSelection=!1):(e.reportStatus(j.formatMessage(b.incrementalFindNotFound,f),"error"),c._incrementalFindSuccess=!1),a.text=null},onSelection:function(){c._incrementalFindIgnoreSelection||c.toggleIncrementalFind()}};this._lastEditListener={onModelChanged:function(a){if(c.editor.isDirty())c._lastEditLocation=a.start+a.addedCharCount}};this.textView.addEventListener("ModelChanged",this._lastEditListener.onModelChanged);this.textView.setKeyBinding(new a.KeyBinding("k",
!0),"findNext");this.textView.setAction("findNext",function(){if(this._searcher){var a=this.textView.getSelection();a.start<a.end?this._searcher.findNext(!0,this.textView.getText(a.start,a.end)):this._searcher.findNext(!0);return!0}return!1}.bind(this),{name:b.findNext});this.textView.setKeyBinding(new a.KeyBinding("k",!0,!0),"findPrevious");this.textView.setAction("findPrevious",function(){if(this._searcher){var a=this.textView.getSelection();a.start<a.end?this._searcher.findNext(!1,this.textView.getText(a.start,
a.end)):this._searcher.findNext(!1);return!0}return!1}.bind(this),{name:b.findPrevious});this.textView.setKeyBinding(new a.KeyBinding("j",!0),"incrementalFind");this.textView.setAction("incrementalFind",function(){if(this._searcher&&this._searcher.visible())return!0;var a=this.editor;if(this._incrementalFindActive){var c=this._incrementalFindPrefix;if(c.length!==0){var e;e=0;this._incrementalFindSuccess&&(e=a.getSelection().start+1);(e=a.getModel().find({string:c,start:e,caseInsensitive:c.toLowerCase()===
c}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,a.moveSelection(e.start,e.end),this._incrementalFindIgnoreSelection=!1,a.reportStatus(j.formatMessage(b.incrementalFind,c))):(a.reportStatus(j.formatMessage(b.incrementalFindNotFound,c),"error"),this._incrementalFindSuccess=!1)}}else a.setCaretOffset(a.getCaretOffset()),this.toggleIncrementalFind();return!0}.bind(this),{name:b.incrementalFindKey});this.textView.setAction("deletePrevious",function(){if(this._incrementalFindActive){var a=
this.editor,c=this._incrementalFindPrefix,c=this._incrementalFindPrefix=c.substring(0,c.length-1);if(c.length===0)return this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,a.setCaretOffset(a.getSelection().start),this._incrementalFindIgnoreSelection=!1,this.toggleIncrementalFind(),!0;a.reportStatus(j.formatMessage(b.incrementalFind,c));var e=a.getModel().find({string:c,start:a.getCaretOffset()-c.length-1,reverse:!0,caseInsensitive:c.toLowerCase()===c}).next();e?(this._incrementalFindIgnoreSelection=
this._incrementalFindSuccess=!0,a.moveSelection(e.start,e.end),this._incrementalFindIgnoreSelection=!1):a.reportStatus(j.formatMessage(b.incrementalFindNotFound,c),"error");return!0}return!1}.bind(this));this.textView.setAction("tab",function(){if(this.textView.getOptions("tabMode")){var a=this.editor,b=a.getModel(),c=a.getSelection(),e=b.getLineAtOffset(c.start),f=b.getLineAtOffset(c.end>c.start?c.end-1:c.end);if(e!==f){var d=[];d.push("");for(var g=e;g<=f;g++)d.push(b.getLine(g,!0));var g=b.getLineStart(e),
b=b.getLineEnd(f,!0),h=this.textView.getOptions("tabSize","expandTab"),h=h.expandTab?Array(h.tabSize+1).join(" "):"\t";a.setText(d.join(h),g,b);a.setSelection(g===c.start?c.start:c.start+h.length,c.end+(f-e+1)*h.length);return!0}a=a.getKeyModes();for(c=0;c<a.length;c++)if(a[c].isActive())return a[c].tab();return!1}}.bind(this));this.textView.setAction("shiftTab",function(){if(this.textView.getOptions("tabMode")){for(var a=this.editor,b=a.getModel(),c=a.getSelection(),e=b.getLineAtOffset(c.start),
f=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),d=this.textView.getOptions("tabSize"),g=Array(d+1).join(" "),h=[],j=0,k=0,l=e;l<=f;l++){var m=b.getLine(l,!0);if(b.getLineStart(l)!==b.getLineEnd(l))if(m.indexOf("\t")===0)m=m.substring(1),j++;else if(m.indexOf(g)===0)m=m.substring(d),j+=d;else return!0;l===e&&(k=j);h.push(m)}e=b.getLineStart(e);d=b.getLineEnd(f,!0);b=b.getLineStart(f);a.setText(h.join(""),e,d);h=e===c.start?c.start:c.start-k;c=Math.max(h,c.end-j+(c.end===b+1&&c.start!==c.end?1:0));
a.setSelection(h,c);return!0}}.bind(this),{name:b.unindentLines});this.textView.setKeyBinding(new a.KeyBinding(38,!1,!1,!0),"moveLinesUp");this.textView.setAction("moveLinesUp",function(){var a=this.editor,b=a.getModel(),c=a.getSelection(),e=b.getLineAtOffset(c.start);if(e===0)return!0;var f=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),d=b.getLineCount(),c=b.getLineStart(e-1),g=b.getLineStart(e),h=b.getLineEnd(f,!0),j=b.getText(g,h),k=0;f===d-1&&(f=b.getLineEnd(e-1),e=b.getLineEnd(e-1,!0),j+=b.getText(f,
e),g=f,k=e-f);this.startUndo();a.setText("",g,h);a.setText(j,c,c);a.setSelection(c,c+j.length-k);this.endUndo();return!0}.bind(this),{name:b.moveLinesUp});this.textView.setKeyBinding(new a.KeyBinding(40,!1,!1,!0),"moveLinesDown");this.textView.setAction("moveLinesDown",function(){var a=this.editor,b=a.getModel(),c=a.getSelection(),e=b.getLineAtOffset(c.start),f=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),d=b.getLineCount();if(f===d-1)return!0;var e=b.getLineStart(e),c=b.getLineEnd(f,!0),g=b.getLineEnd(f+
1,!0)-(c-e),h=0;f!==d-2?b=b.getText(e,c):(f=b.getLineEnd(f),b=b.getText(f,c)+b.getText(e,f),h+=c-f);this.startUndo();a.setText("",e,c);a.setText(b,g,g);a.setSelection(g+h,g+h+b.length);this.endUndo();return!0}.bind(this),{name:b.moveLinesDown});this.textView.setKeyBinding(new a.KeyBinding(38,!0,!1,!0),"copyLinesUp");this.textView.setAction("copyLinesUp",function(){var a=this.editor,b=a.getModel(),c=a.getSelection(),e=b.getLineAtOffset(c.start),c=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),e=b.getLineStart(e),
f=b.getLineEnd(c,!0),d=b.getLineCount(),g="",f=b.getText(e,f);c===d-1&&(f+=g=b.getLineDelimiter());a.setText(f,e,e);a.setSelection(e,e+f.length-g.length);return!0}.bind(this),{name:b.copyLinesUp});this.textView.setKeyBinding(new a.KeyBinding(40,!0,!1,!0),"copyLinesDown");this.textView.setAction("copyLinesDown",function(){var a=this.editor,b=a.getModel(),c=a.getSelection(),e=b.getLineAtOffset(c.start),c=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),f=b.getLineStart(e),e=b.getLineEnd(c,!0),d=b.getLineCount(),
g="",f=b.getText(f,e);c===d-1&&(f=(g=b.getLineDelimiter())+f);a.setText(f,e,e);a.setSelection(e+g.length,e+f.length);return!0}.bind(this),{name:b.copyLinesDown});this.textView.setKeyBinding(new a.KeyBinding("d",!0,!1,!1),"deleteLines");this.textView.setAction("deleteLines",function(){var a=this.editor,b=a.getSelection(),c=a.getModel(),e=c.getLineAtOffset(b.start),b=c.getLineAtOffset(b.end>b.start?b.end-1:b.end),e=c.getLineStart(e),c=c.getLineEnd(b,!0);a.setText("",e,c);return!0}.bind(this),{name:b.deleteLines});
this.textView.setKeyBinding(new a.KeyBinding("l",!0),"gotoLine");this.textView.setAction("gotoLine",function(){var a=this.editor,c=a.getModel().getLineAtOffset(a.getCaretOffset());if(c=prompt(b.gotoLinePrompty,c+1))c=parseInt(c,10),a.onGotoLine(c-1,0);return!0}.bind(this),{name:b.gotoLine});this.textView.setKeyBinding(new a.KeyBinding(190,!0),"nextAnnotation");this.textView.setAction("nextAnnotation",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;for(var c=a.getModel(),d=a.getCaretOffset(),
b=b.getAnnotations(d,c.getCharCount());b.hasNext();){var g=b.next();if(!(g.start<=d)&&!(g.type!==f.AnnotationType.ANNOTATION_ERROR&&g.type!==f.AnnotationType.ANNOTATION_WARNING&&g.type!==f.AnnotationType.ANNOTATION_TASK&&g.type!==f.AnnotationType.ANNOTATION_BOOKMARK)){var h=e.Tooltip.getTooltip(this.textView);if(!h){a.moveSelection(g.start);break}var j=c.getLineAtOffset(g.start),k=this.textView;a.moveSelection(g.start,g.start,function(){setTimeout(function(){h.setTarget({getTooltipInfo:function(){var a=
k.convert({x:k.getLocationAtOffset(g.start).x,y:k.getLocationAtOffset(c.getLineStart(j)).y},"document","page");return{contents:[g],x:a.x,y:a.y+Math.floor(k.getLineHeight(j)*1.33)}}},0)},0)});break}}return!0}.bind(this),{name:b.nextAnnotation});this.textView.setKeyBinding(new a.KeyBinding(188,!0),"previousAnnotation");this.textView.setAction("previousAnnotation",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;for(var c=a.getModel(),d=a.getCaretOffset(),b=b.getAnnotations(0,d),
g=null;b.hasNext();){var h=b.next();h.start>=d||h.type!==f.AnnotationType.ANNOTATION_ERROR&&h.type!==f.AnnotationType.ANNOTATION_WARNING&&h.type!==f.AnnotationType.ANNOTATION_TASK&&h.type!==f.AnnotationType.ANNOTATION_BOOKMARK||(g=h)}if(g){var j=c.getLineAtOffset(g.start),k=e.Tooltip.getTooltip(this.textView);if(!k)return a.moveSelection(g.start),!0;var l=this.textView;a.moveSelection(g.start,g.start,function(){setTimeout(function(){k.setTarget({getTooltipInfo:function(){var a=l.convert({x:l.getLocationAtOffset(g.start).x,
y:l.getLocationAtOffset(c.getLineStart(j)).y},"document","page");return{contents:[g],x:a.x,y:a.y+Math.floor(l.getLineHeight(j)*1.33)}}},0)},0)})}return!0}.bind(this),{name:b.prevAnnotation});this.textView.setKeyBinding(new a.KeyBinding("e",!0,!1,!0,!1),"expand");this.textView.setAction("expand",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;var c=a.getModel(),a=a.getCaretOffset(),e=c.getLineAtOffset(a),a=c.getLineStart(e),e=c.getLineEnd(e,!0);c.getBaseModel&&(a=c.mapOffset(a),
e=c.mapOffset(e),c.getBaseModel());for(var d,c=b.getAnnotations(a,e);!d&&c.hasNext();)a=c.next(),a.type===f.AnnotationType.ANNOTATION_FOLDING&&(a.expanded||(d=a));d&&!d.expanded&&(d.expand(),b.modifyAnnotation(d));return!0}.bind(this),{name:b.expand});this.textView.setKeyBinding(new a.KeyBinding("c",!0,!1,!0,!1),"collapse");this.textView.setAction("collapse",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;var c=a.getModel(),e=a.getCaretOffset(),d=c.getLineAtOffset(e),e=c.getLineStart(d),
d=c.getLineEnd(d,!0);c.getBaseModel&&(e=c.mapOffset(e),d=c.mapOffset(d),c.getBaseModel());for(var g,c=b.getAnnotations(e,d);!g&&c.hasNext();)e=c.next(),e.type===f.AnnotationType.ANNOTATION_FOLDING&&(g=e);g&&g.expanded&&(a.setCaretOffset(g.start),g.collapse(),b.modifyAnnotation(g));return!0}.bind(this),{name:b.collapse});this.textView.setKeyBinding(new a.KeyBinding("e",!0,!0,!0,!1),"expandAll");this.textView.setAction("expandAll",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;
var a=a.getModel(),c=b.getAnnotations(0,a.getCharCount());for(this.textView.setRedraw(!1);c.hasNext();)a=c.next(),a.type===f.AnnotationType.ANNOTATION_FOLDING&&!a.expanded&&(a.expand(),b.modifyAnnotation(a));this.textView.setRedraw(!0);return!0}.bind(this),{name:b.expandAll});this.textView.setKeyBinding(new a.KeyBinding("c",!0,!0,!0,!1),"collapseAll");this.textView.setAction("collapseAll",function(){var a=this.editor,b=a.getAnnotationModel();if(!b)return!0;var a=a.getModel(),c=b.getAnnotations(0,
a.getCharCount());for(this.textView.setRedraw(!1);c.hasNext();)a=c.next(),a.type===f.AnnotationType.ANNOTATION_FOLDING&&a.expanded&&(a.collapse(),b.modifyAnnotation(a));this.textView.setRedraw(!0);return!0}.bind(this),{name:b.collapseAll});var d=navigator.platform.indexOf("Mac")!==-1;this.textView.setKeyBinding(new a.KeyBinding("q",!d,!1,!1,d),"lastEdit");this.textView.setAction("lastEdit",function(){typeof this._lastEditLocation==="number"&&this.editor.showSelection(this._lastEditLocation);return!0}.bind(this),
{name:b.lastEdit})},toggleIncrementalFind:function(){(this._incrementalFindActive=!this._incrementalFindActive)?(this.editor.reportStatus(j.formatMessage(b.incrementalFind,this._incrementalFindPrefix)),this.textView.addEventListener("Verify",this._incrementalFindListener.onVerify),this.textView.addEventListener("Selection",this._incrementalFindListener.onSelection)):(this._incrementalFindPrefix="",this.editor.reportStatus(""),this.textView.removeEventListener("Verify",this._incrementalFindListener.onVerify),
this.textView.removeEventListener("Selection",this._incrementalFindListener.onSelection),this.textView.setCaretOffset(this.textView.getCaretOffset()))},startUndo:function(){this.undoStack&&this.undoStack.startCompoundChange()},endUndo:function(){this.undoStack&&this.undoStack.endCompoundChange()},cancel:function(){this.toggleIncrementalFind()},isActive:function(){return this._incrementalFindActive},isStatusActive:function(){return this._incrementalFindActive},lineUp:function(){if(this._incrementalFindActive){var a=
this._incrementalFindPrefix;if(a.length===0)return!1;var c=this.editor,e=c.getModel(),e=this._incrementalFindSuccess?c.getCaretOffset()-a.length-1:e.getCharCount()-1;(e=c.getModel().find({string:a,start:e,reverse:!0,caseInsensitive:a.toLowerCase()===a}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,c.moveSelection(e.start,e.end),this._incrementalFindIgnoreSelection=!1,c.reportStatus(j.formatMessage(b.incrementalFind,a))):(c.reportStatus(j.formatMessage(b.incrementalFindNotFound,
a),"error"),this._incrementalFindSuccess=!1);return!0}return!1},lineDown:function(){if(this._incrementalFindActive){var a=this._incrementalFindPrefix;if(a.length===0)return!1;var c=this.editor,e=0;this._incrementalFindSuccess&&(e=c.getSelection().start+1);(e=c.getModel().find({string:a,start:e,caseInsensitive:a.toLowerCase()===a}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,c.moveSelection(e.start,e.end),this._incrementalFindIgnoreSelection=!1,c.reportStatus(j.formatMessage(b.incrementalFind,
a))):(c.reportStatus(j.formatMessage(b.incrementalFindNotFound,a),"error"),this._incrementalFindSuccess=!1);return!0}return!1},enter:function(){return!1}};p.prototype={startUndo:function(){this.undoStack&&this.undoStack.startCompoundChange()},endUndo:function(){this.undoStack&&this.undoStack.endCompoundChange()},init:function(){function c(a,b,e){var f=a.getLineAtOffset(b),d=a.getLineAtOffset(e),g,h,j,k,l,m;for(g=f;g>=0;g--)if(h=a.getLine(g),j=g===f?b-a.getLineStart(f):h.length,k=h.lastIndexOf("/*",
j),h=h.lastIndexOf("*/",j),h>k)break;else if(k!==-1){l=a.getLineStart(g)+k;break}for(g=d;g<a.getLineCount();g++)if(h=a.getLine(g),j=g===d?e-a.getLineStart(d):0,k=h.indexOf("/*",j),h=h.indexOf("*/",j),k!==-1&&k<h)break;else if(h!==-1){m=a.getLineStart(g)+h;break}return{commentStart:l,commentEnd:m}}this.textView.setAction("lineStart",function(){for(var a=this.editor,b=a.getModel(),c=a.getCaretOffset(),e=b.getLineAtOffset(c),f=b.getLineStart(e),b=b.getLine(e),e=0;e<b.length;e++){var d=b.charCodeAt(e);
if(!(d===32||d===9))break}e+=f;return c!==e?(a.setSelection(e,e),!0):!1}.bind(this));this.textView.setKeyBinding(new a.KeyBinding(191,!0),"toggleLineComment");this.textView.setAction("toggleLineComment",function(){for(var a=this.editor,b=a.getModel(),c=a.getSelection(),e=b.getLineAtOffset(c.start),f=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),d=!0,g=[],h,j,k=e;k<=f;k++)if(h=b.getLine(k,!0),g.push(h),!d||(j=h.indexOf("//"))===-1)d=!1;else if(j!==0){var l;for(l=0;l<j;l++)if(d=h.charCodeAt(l),!(d===
32||d===9))break;d=l===j}k=b.getLineStart(e);l=b.getLineEnd(f,!0);if(d){for(d=0;d<g.length;d++)h=g[d],j=h.indexOf("//"),g[d]=h.substring(0,j)+h.substring(j+2);g=g.join("");h=b.getLineStart(f);b=k===c.start?c.start:c.start-2;c=c.end-2*(f-e+1)+(c.end===h+1?2:0)}else g.splice(0,0,""),g=g.join("//"),b=k===c.start?c.start:c.start+2,c=c.end+2*(f-e+1);a.setText(g,k,l);a.setSelection(b,c);return!0}.bind(this),{name:b.toggleLineComment});var e=navigator.platform.indexOf("Mac")!==-1;this.textView.setKeyBinding(new a.KeyBinding(191,
!0,!e,!1,e),"addBlockComment");this.textView.setAction("addBlockComment",function(){var a=this.editor,b=a.getModel(),e=a.getSelection(),f=RegExp("/\\*|\\*/","g"),d=c(b,e.start,e.end);if(d.commentStart!==void 0&&d.commentEnd!==void 0)return!0;b=b.getText(e.start,e.end);if(b.length===0)return!0;d=b.length;b=b.replace(f,"");f=b.length;a.setText("/*"+b+"*/",e.start,e.end);a.setSelection(e.start+2,e.end+2+(f-d));return!0}.bind(this),{name:b.addBlockComment});this.textView.setKeyBinding(new a.KeyBinding(220,
!0,!e,!1,e),"removeBlockComment");this.textView.setAction("removeBlockComment",function(){var a=this.editor,b=a.getModel(),e=a.getSelection(),f=b.getText(e.start,e.end),d,g,h;for(h=0;h<f.length;h++)if(f.substring(h,h+2)==="/*"){d=e.start+h;break}for(;h<f.length;h++)if(f.substring(h,h+2)==="*/"){g=e.start+h;break}if(d!==void 0&&g!==void 0)a.setText(b.getText(d+2,g),d,g+2),a.setSelection(d,g);else{f=c(b,e.start,e.end);if(f.commentStart===void 0||f.commentEnd===void 0)return!0;b=b.getText(f.commentStart+
2,f.commentEnd);a.setText(b,f.commentStart,f.commentEnd+2);a.setSelection(e.start-2,e.end-2)}return!0}.bind(this),{name:b.removeBlockComment})},contentAssistProposalApplied:function(a){a=a.data.proposal;if(a.positions&&this.linkedMode){for(var b=[],c=0;c<a.positions.length;++c)b[c]={positions:[{offset:a.positions[c].offset,length:a.positions[c].length}]};this.linkedMode.enterLinkedMode({groups:b,escapePosition:a.escapePosition})}else a.escapePosition&&this.textView.setCaretOffset(a.escapePosition);
return!0},cancel:function(){return!1},isActive:function(){return!0},isStatusActive:function(){return!1},lineUp:function(){return!1},lineDown:function(){return!1},enter:function(){var a=this.editor,b=a.getSelection();if(b.start===b.end){for(var c=a.getModel(),e=c.getLineAtOffset(b.start),f=c.getLine(e,!0),d=c.getLineStart(e),e=0,d=b.start-d,g;e<d&&((g=f.charCodeAt(e))===32||g===9);)e++;if(e>0){for(var h=f.substring(0,e),e=d;e<f.length&&((g=f.charCodeAt(e++))===32||g===9);)b.end++;a.setText(c.getLineDelimiter()+
h,b.start,b.end);return!0}}return!1},tab:function(){return!1}};r.prototype={enterLinkedMode:function(c){if(!this.linkedModeActive){this.linkedModeActive=!0;this.linkedModePositions=[];for(var e=0;e<c.groups.length;++e){var f=c.groups[e];this.linkedModePositions[e]={offset:f.positions[0].offset,length:f.positions[0].length}}this.linkedModeEscapePosition=c.escapePosition;this.linkedModeCurrentPositionIndex=0;this.selectTextForLinkedModePosition(this.linkedModePositions[this.linkedModeCurrentPositionIndex]);
this.textView.addEventListener("Verify",this.linkedModeListener.onVerify);this.textView.setKeyBinding(new a.KeyBinding(9),"nextLinkedModePosition");this.textView.setAction("nextLinkedModePosition",function(){this.linkedModeCurrentPositionIndex=++this.linkedModeCurrentPositionIndex%this.linkedModePositions.length;this.selectTextForLinkedModePosition(this.linkedModePositions[this.linkedModeCurrentPositionIndex]);return!0}.bind(this));this.textView.setKeyBinding(new a.KeyBinding(9,!1,!0),"previousLinkedModePosition");
this.textView.setAction("previousLinkedModePosition",function(){this.linkedModeCurrentPositionIndex=this.linkedModeCurrentPositionIndex>0?this.linkedModeCurrentPositionIndex-1:this.linkedModePositions.length-1;this.selectTextForLinkedModePosition(this.linkedModePositions[this.linkedModeCurrentPositionIndex]);return!0}.bind(this));this.editor.reportStatus(b.linkedModeEntered,null,!0)}},isActive:function(){return this.linkedModeActive},isStatusActive:function(){return this.linkedModeActive},enter:function(){this.cancel();
return!0},cancel:function(c){if(this.linkedModeActive)this.linkedModeActive=!1,this.textView.removeEventListener("Verify",this.linkedModeListener.onVerify),this.textView.setKeyBinding(new a.KeyBinding(9),"tab"),this.textView.setKeyBinding(new a.KeyBinding(9,!1,!0),"shiftTab"),c||this.textView.setCaretOffset(this.linkedModeEscapePosition,!1),this.editor.reportStatus(b.linkedModeExited,null,!0)},lineUp:function(){this.cancel(!0);return!1},lineDown:function(){this.cancel(!0);return!1},selectTextForLinkedModePosition:function(a){this.textView.setSelection(a.offset,
a.offset+a.length)}};return{UndoFactory:k,LineNumberRulerFactory:l,FoldingRulerFactory:m,AnnotationFactory:n,TextDNDFactory:o,TextActions:q,SourceCodeActions:p,LinkedMode:r}});
define("orion/compare/compareUtils",["dojo","dijit"],function(b,d){var a=a||{};a.compareUtils=a.compareUtils||{};a.compareUtils.lookUpMapper=function(a,b,e){for(var d=0,g=0;g<a.length;g++){var j=a[g][b];j===0&&(j=1);if(e>=d&&e<d+j)return{mapperIndex:g,startFrom:d};if(g===a.length-1)break;d+=a[g][b]}return{mapperIndex:a.length-1,startFrom:d}};a.compareUtils.lookUpLineIndex=function(a,b,e){if(e===0)return 0;for(var d=0,g=0;g<e;g++)d+=a[g][b];return d};a.compareUtils.updateMapper=function(b,f,e,d,g){if(d!==
g&&(d>0||g>0)){var j=a.compareUtils.lookUpMapper(b,f,e);if(!(j.mapperIndex<0)){if(d>0)for(var k=e-j.startFrom,e=j.mapperIndex;e<b.length;e++){k=b[e][f]-k;if(d<=k){b[e][f]-=d;break}b[e][f]-=k;d-=k;k=0}g>0&&(b[j.mapperIndex][f]+=g)}}};a.compareUtils.overlapMapper=function(a,b,e,d,g){a=e+a[b]-1;a<e&&(a=e);g<d&&(g=d);return a<d||g<e?!1:!0};a.compareUtils.findFirstDiff=function(b,f,e,d){for(var g=0,j=void 0,k=0;k<b.length;k++){if(g>d)break;if(a.compareUtils.overlapMapper(b[k],f,g,e,d)&&(j={mapperIndex:k,
startFrom:g},b[k][2]!==0))break;g+=b[k][f]}return j};a.compareUtils.matchMapper=function(b,f,e,d){if(b.length===0)return e;var g=e+Math.round((d-e)/3),j=a.compareUtils.findFirstDiff(b,f,e,d),k=b[j.mapperIndex][f]===0?j.startFrom:j.startFrom+b[j.mapperIndex][f]-1,l=a.compareUtils.lookUpLineIndex(b,1-f,j.mapperIndex),m=j.startFrom-e;return b[j.mapperIndex][2]===0?l-m:g>=j.startFrom&&g<=k?l-Math.round((d-e)/3):g<j.startFrom?l-m:(b[j.mapperIndex][1-f]===0?l:l+b[j.mapperIndex][1-f]-1)-(k-e)};a.compareUtils.getMapperLineCount=
function(a){for(var b=0,e=0;e<a.length;e++)b+=Math.max(a[e][0],a[e][1]);return b};a.compareUtils.getAnnotationIndex=function(a,b){for(var e=0;e<a.length;e++)if(a[e][0]===b)return e;return-1};a.compareUtils.getAnnotationMapperIndex=function(a,b){return a[b][1]};a.compareUtils.getAnnotationIndexByMapper=function(a,b){for(var e=0;e<a.length;e++)if(a[e][1]===b)return{current:e,prev:e-1,next:e+1};return{current:-1,prev:-1,next:-1}};a.compareUtils.isMapperConflict=function(a,b){return b<0?!1:!a[b][3]?!1:
a[b][3]===1};a.compareUtils.mergeDiffBlocks=function(a,b,e,d,g,j){for(var k=0;k<b.length;k++){var l=b[k][0],m=e[b[k][1]];if(m[0]>0){for(var n="",o=0;o<m[0];o++)n=n+d[m[2]-1+o].substring(g)+j;m=a.getLineCount();l>=m&&(l=m-1);l=a.getLineStart(l);a.setText(n,l,l)}}};a.compareUtils.generateCompareHref=function(a,f){var e=require.toUrl("compare/compare.html"),d="",g="";f&&(f.readonly&&(d="?readonly"),f.conflict&&(d===""?d="?conflict":d+="&conflict"),f.block&&f.block>0&&(g=",block="+f.block,f.change&&f.change>
0&&(g=g+"&change="+f.change)));return b.create("a",{href:e+d+"#"+a+g}).href};a.compareUtils.parseCompareHash=function(a){var b={complexURL:a},e=a.indexOf(",block=");if(e>0){b.complexURL=a.substring(0,e);a=a.substring(e+1).split("&");for(e=0;e<a.length;e++){var d=a[e].split("=");if(d.length===2)if(d[0]==="block")b.block=parseInt(d[1]);else if(d[0]==="change")b.change=parseInt(d[1])}}return b};a.compareUtils.destroyDijit=function(a){(a=d.byId(a))&&a.destroyRecursive()};a.compareUtils.getDijitSizeStyle=
function(a){return"height:"+(b.marginBox(a).h+"px")+";width:100%"};return a.compareUtils});
define("orion/compare/compare-features","i18n!orion/compare/nls/messages,orion/compare/compareUtils,dojo,dijit,dijit/layout/ContentPane,dijit/layout/BorderContainer".split(","),function(b,d,a,c){var f=f||{};f.TwoWayCompareUIFactory=function(){function e(a){this._parentDivID=a.parentDivID;this._commandSpanId=a.commandSpanId;this._showTitle=a.showTitle;this._leftTitle=a.leftTitle;this._rightTitle=a.rightTitle;this._showLineStatus=a.showLineStatus}e.prototype={_createNoWrapTextDiv:function(b,c,e,f){var d=
document.createElement("table");d.width="100%";var m=document.createElement("tr");d.appendChild(m);var n=document.createElement("td");n.noWrap=!0;if(e)n.align=e;m.appendChild(n);e=document.createElement("h2");e.id=b;a.place(document.createTextNode(c),e,"only");n.appendChild(e);if(f&&!this._commandSpanId)this._commandSpanId="compare_rightContainerCommands",n=document.createElement("td"),n.id=this._commandSpanId,m.appendChild(n),n.noWrap=!0,n.align="right",d.align="right";return d},_createEditorParentDiv:function(b){b=
new c.layout.ContentPane({id:b,region:"center"});a.addClass(b.domNode,"paneScrolled");a.addClass(b.domNode,"compareEditorParent");return b},_createCompareCanvasDiv:function(b){var e=new c.layout.ContentPane({region:"leading",splitter:!1});a.addClass(e.domNode,"canvasContainer");var f=document.createElement("canvas");f.id=b;f.width=46;f.height=3E3;a.toggleClass(f,"compareCanvas",!0);e.attr("content",f);return e},_appendDomNode:function(a,b){b.placeAt(a)},_createTileDiv:function(e,f,d){e=this._createNoWrapTextDiv(e,
f?f:b["Compare..."],"left",d);f=new c.layout.ContentPane({region:"top"});a.addClass(f.domNode,"titleContainer");f.attr("content",e);return f},_createStatusDiv:function(e){var e=this._createNoWrapTextDiv(e,b["Line 0 : Col 0"],"center"),f=new c.layout.ContentPane({region:"bottom"});a.addClass(f.domNode,"statusContainer");f.attr("content",e);return f},_createLeftEditorParentDiv:function(a,b){return this._createEditorParentDiv(a,b)},_createRightEditorParentDiv:function(b,e){var f=new c.layout.BorderContainer({region:"center",
gutters:!1,design:"headline",liveSplitters:!1,persist:!1,splitter:!1});a.addClass(f.domNode,"borderContainer");this._appendDomNode(f,this._createCompareCanvasDiv(e));this._appendDomNode(f,this._createEditorParentDiv(b));return f},_createLeftBorder:function(){var b=new c.layout.BorderContainer({region:"leading",gutters:!1,design:"headline",liveSplitters:!0,persist:!1,splitter:!0});a.addClass(b.domNode,"leftBorder");if(this._showTitle)this._leftTitleDivId=this._parentDivID+"_left_title_id",this._appendDomNode(b,
this._createTileDiv(this._leftTitleDivId,this._leftTitle,!1));this._leftEditorParentDivId=this._parentDivID+"_left_editor_id";this._appendDomNode(b,this._createLeftEditorParentDiv(this._leftEditorParentDivId));if(this._showLineStatus)this._leftStatusDivId=this._parentDivID+"_left_status_id",this._appendDomNode(b,this._createStatusDiv(this._leftStatusDivId));return b},_createRightBorder:function(){var b=new c.layout.BorderContainer({region:"center",gutters:!1,design:"headline",liveSplitters:!1,persist:!1,
splitter:!1});a.addClass(b.domNode,"rightBorder");if(this._showTitle)this._rightTitleDivId=this._parentDivID+"_right_title_id",this._appendDomNode(b,this._createTileDiv(this._rightTitleDivId,this._rightTitle,!0));this._rightEditorParentDivId=this._parentDivID+"_right_editor_id";this._diffCanvasDivId=this._parentDivID+"_diff_canvas_id";this._appendDomNode(b,this._createRightEditorParentDiv(this._rightEditorParentDivId,this._diffCanvasDivId));if(this._showLineStatus)this._rightStatusDivId=this._parentDivID+
"_right_status_id",this._appendDomNode(b,this._createStatusDiv(this._rightStatusDivId));return b},buildUI:function(){this._topWidgetId=this._parentDivID+"_topWidget";this.destroy();var a=this._createLeftBorder(),b=this._createRightBorder(),e=d.getDijitSizeStyle(this._parentDivID),e=new c.layout.BorderContainer({id:this._topWidgetId,style:e,region:"center",gutters:!1,design:"headline",liveSplitters:!0,persist:!1,splitter:!0});e.placeAt(this._parentDivID);e.addChild(a);e.addChild(b);e.startup();e.layout()},
destroy:function(){d.destroyDijit(this._topWidgetId)},getEditorParentDivId:function(a){return a?this._leftEditorParentDivId:this._rightEditorParentDivId},getTitleDivId:function(a){return a?this._leftTitleDivId:this._rightTitleDivId},getStatusDivId:function(a){return a?this._leftStatusDivId:this._rightStatusDivId},getCommandSpanId:function(){return this._commandSpanId},getDiffCanvasDivId:function(){return this._diffCanvasDivId}};return e}();return f});
var JsDiff=function(){function b(a){for(var b=[],c=0;c<a.length;c++)a[c]&&b.push(a[c]);return b}function d(a){a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");return a=a.replace(/"/g,"&quot;")}var a=function(a){this.ignoreWhitespace=a};a.prototype={diff:function(a,b){if(b==a)return[{value:b}];if(!b)return[{value:a,removed:!0}];if(!a)return[{value:b,added:!0}];var b=this.tokenize(b),a=this.tokenize(a),c=b.length,e=a.length,f=c+e,d=[{newPos:-1,components:[]}],h=this.extractCommon(d[0],
b,a,0);if(d[0].newPos+1>=c&&h+1>=e)return d[0].components;for(var q=1;q<=f;q++)for(var p=-1*q;p<=q;p+=2){var r;r=d[p-1];var s=d[p+1],h=(s?s.newPos:0)-p;r&&(d[p-1]=void 0);var x=r&&r.newPos+1<c,v=s&&0<=h&&h<e;if(!x&&!v)d[p]=void 0;else if(!x||v&&r.newPos<s.newPos?(r={newPos:s.newPos,components:s.components.slice(0)},this.pushComponent(r.components,a[h],void 0,!0)):(r={newPos:r.newPos,components:r.components.slice(0)},r.newPos++,this.pushComponent(r.components,b[r.newPos],!0,void 0)),h=this.extractCommon(r,
b,a,p),r.newPos+1>=c&&h+1>=e)return r.components;else d[p]=r}},pushComponent:function(a,b,c,e){var f=a[a.length-1];f&&f.added===c&&f.removed===e?a[a.length-1]={value:this.join(f.value,b),added:c,removed:e}:a.push({value:b,added:c,removed:e})},extractCommon:function(a,b,c,e){for(var f=b.length,d=c.length,h=a.newPos,e=h-e;h+1<f&&e+1<d&&this.equals(b[h+1],c[e+1]);)h++,e++,this.pushComponent(a.components,b[h],void 0,void 0);a.newPos=h;return e},equals:function(a,b){var c=/\S/;return this.ignoreWhitespace&&
!c.test(a)&&!c.test(b)?!0:a==b},join:function(a,b){return a+b},tokenize:function(a){return a}};var c=new a,f=new a(!1);f.tokenize=function(a){return b(a.split(/(\s+|\b)/))};var e=new a(!0);e.tokenize=function(a){return b(a.split(/([{}:;,]|\s+)/))};var h=new a;h.tokenize=function(a){return a.split(/^/m)};return{diffChars:function(a,b){return c.diff(a,b)},diffWords:function(a,b){return f.diff(a,b)},diffLines:function(a,b){return h.diff(a,b)},diffCss:function(a,b){return e.diff(a,b)},createPatch:function(a,
b,c,e,f){var d=[];d.push("Index: "+a);d.push("===================================================================");d.push("--- "+a+"\t"+e);d.push("+++ "+a+"\t"+f);a=h.diff(b,c);a.push({value:"",lines:[]});for(var c=b=0,e=[],o=f=1,q=0;q<a.length;q++){var p=a[q],r=p.lines||p.value.replace(/\n$/,"").split("\n");p.lines=r;if(p.added||p.removed){if(!b){var s=a[q-1],b=f,c=o;s&&(e.push.apply(e,s.lines.slice(-4).map(function(a){return" "+a})),b-=4,c-=4)}e.push.apply(e,r.map(function(a){return(p.added?"+":
"-")+a}));p.added?o+=r.length:f+=r.length}else b&&(r.length<=8&&q<a.length-1?e.push.apply(e,r.map(function(a){return" "+a})):(s=Math.min(r.length,4),d.push("@@ -"+b+","+(f-b+s)+" +"+c+","+(o-c+s)+" @@"),d.push.apply(d,e),d.push.apply(d,r.slice(0,s).map(function(a){return" "+a})),c=b=0,e=[])),f+=r.length,o+=r.length}a.length>1&&!/\n$/.test(a[a.length-2].value)&&d.push("\\ No newline at end of file\n");return d.join("\n")},convertChangesToXML:function(a){for(var b=[],c=0;c<a.length;c++){var e=a[c];
e.added?b.push("<ins>"):e.removed&&b.push("<del>");b.push(d(e.value));e.added?b.push("</ins>"):e.removed&&b.push("</del>")}return b.join("")}}}();if(typeof module!=="undefined")module.exports=JsDiff;typeof define==="function"&&define.amd&&define("jsdiff/diff",[],function(){return JsDiff});
define("orion/compare/jsdiffAdapter",["jsdiff/diff"],function(b){var d=d||{};d.JSDiffAdapter=function(){function a(){}a.prototype={adapt:function(a,f){for(var e=a.split("\n"),d=f.split("\n"),g=e[e.length-1]==="",d=d[d.length-1]==="",j=b.diffLines(a,f),k=[],l=[],m=0,n=0,o=-1,q=0,p=!0,r=0;r<j.length;r++){var s=j[r],x=s.lines||s.value.split("\n"),v=x.length,w=0;x.length>1&&x[x.length-1]===""&&v--;v>1&&!p&&x[0]===""&&(v--,w++);s.lines=x;if(!s.added&&!s.removed){if(m||n)k.push([m,n,o]),n=m=0,o=-1,q+=n;
k.push([v,v,0]);q+=v}else if(s.added){o===-1&&(o=l.length+1);m+=v;for(p=w;p<v+w;p++)l.push(s.lines[p])}else n+=v;p=!1;x.length>1&&x[x.length-1]===""&&(p=!0)}if(m||n)k.push([m,n,o]),q+=n;q<e.length&&e.length>1&&(e=k[k.length-1],e[2]===0?(e[0]+=1,e[1]+=1):e[2]===-1?k.push([1,1,0]):g===d?k.push([1,1,0]):(d&&(e[0]+=1),g&&(e[1]+=1)));return{mapper:k,changContents:{array:l,index:0}}},adaptCharDiff:function(a,f,e){for(var a=e?b.diffWords(a,f):b.diffChars(a,f),f=[],d=e=0,g=0,j=0,k=0;k<a.length;k++){var l=
a[k];if(!l.added&&!l.removed){if(g>0||j>0)f.push([d,d+g,e,e+j]),d+=g,e+=j,j=g=0;d+=l.value.length;e+=l.value.length}else l.added?g+=l.value.length:j+=l.value.length}(g>0||j>0)&&f.push([d,d+g,e,e+j]);return f}};return a}();return d});
define("examples/textview/textStyler",["orion/textview/annotations"],function(b){function d(a,b){this.keywords=a;this.whitespacesVisible=b;this.setText("")}function a(){d.call(this,null,!0)}function c(a){d.call(this,null,a)}function f(){d.call(this,null,!1)}function e(b,e,k){this.commentStart="/*";this.commentEnd="*/";var l=[];switch(e){case "java":l=g;break;case "js":l=h;break;case "css":l=j}this.whitespacesVisible=!1;this.detectHyperlinks=!0;this.highlightCaretLine=!1;this.detectTasks=this.foldingEnabled=
!0;this._scanner=new d(l,this.whitespacesVisible);this._firstScanner=new f;this._commentScanner=new c(this.whitespacesVisible);this._whitespaceScanner=new a;if(e==="css")this._scanner.isCSS=!0,this._firstScanner.isCSS=!0;this.view=b;this.annotationModel=k;this._bracketAnnotations=void 0;var m=this;this._listener={onChanged:function(a){m._onModelChanged(a)},onDestroy:function(a){m._onDestroy(a)},onLineStyle:function(a){m._onLineStyle(a)},onMouseDown:function(a){m._onMouseDown(a)},onSelection:function(a){m._onSelection(a)}};
e=b.getModel();e.getBaseModel&&(e=e.getBaseModel());e.addEventListener("Changed",this._listener.onChanged);b.addEventListener("MouseDown",this._listener.onMouseDown);b.addEventListener("Selection",this._listener.onSelection);b.addEventListener("Destroy",this._listener.onDestroy);b.addEventListener("LineStyle",this._listener.onLineStyle);this._computeComments();this._computeFolding();b.redrawLines()}var h="break,case,class,catch,continue,const,debugger,default,delete,do,else,enum,export,extends,false,finally,for,function,if,implements,import,in,instanceof,interface,let,new,null,package,private,protected,public,return,static,super,switch,this,throw,true,try,typeof,undefined,var,void,while,with,yield".split(","),
g="abstract,boolean,break,byte,case,catch,char,class,continue,default,do,double,else,extends,false,final,finally,float,for,if,implements,import,instanceof,int,interface,long,native,new,null,package,private,protected,public,return,short,static,super,switch,synchronized,this,throw,throws,transient,true,try,void,volatile,while".split(","),j="alignment-adjust,alignment-baseline,animation,animation-delay,animation-direction,animation-duration,animation-iteration-count,animation-name,animation-play-state,animation-timing-function,appearance,azimuth,backface-visibility,background,background-attachment,background-clip,background-color,background-image,background-origin,background-position,background-repeat,background-size,baseline-shift,binding,bleed,bookmark-label,bookmark-level,bookmark-state,bookmark-target,border,border-bottom,border-bottom-color,border-bottom-left-radius,border-bottom-right-radius,border-bottom-style,border-bottom-width,border-collapse,border-color,border-image,border-image-outset,border-image-repeat,border-image-slice,border-image-source,border-image-width,border-left,border-left-color,border-left-style,border-left-width,border-radius,border-right,border-right-color,border-right-style,border-right-width,border-spacing,border-style,border-top,border-top-color,border-top-left-radius,border-top-right-radius,border-top-style,border-top-width,border-width,bottom,box-align,box-decoration-break,box-direction,box-flex,box-flex-group,box-lines,box-ordinal-group,box-orient,box-pack,box-shadow,box-sizing,break-after,break-before,break-inside,caption-side,clear,clip,color,color-profile,column-count,column-fill,column-gap,column-rule,column-rule-color,column-rule-style,column-rule-width,column-span,column-width,columns,content,counter-increment,counter-reset,crop,cue,cue-after,cue-before,cursor,direction,display,dominant-baseline,drop-initial-after-adjust,drop-initial-after-align,drop-initial-before-adjust,drop-initial-before-align,drop-initial-size,drop-initial-value,elevation,empty-cells,fit,fit-position,flex-align,flex-flow,flex-inline-pack,flex-order,flex-pack,float,float-offset,font,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,grid-columns,grid-rows,hanging-punctuation,height,hyphenate-after,hyphenate-before,hyphenate-character,hyphenate-lines,hyphenate-resource,hyphens,icon,image-orientation,image-rendering,image-resolution,inline-box-align,left,letter-spacing,line-height,line-stacking,line-stacking-ruby,line-stacking-shift,line-stacking-strategy,list-style,list-style-image,list-style-position,list-style-type,margin,margin-bottom,margin-left,margin-right,margin-top,mark,mark-after,mark-before,marker-offset,marks,marquee-direction,marquee-loop,marquee-play-count,marquee-speed,marquee-style,max-height,max-width,min-height,min-width,move-to,nav-down,nav-index,nav-left,nav-right,nav-up,opacity,orphans,outline,outline-color,outline-offset,outline-style,outline-width,overflow,overflow-style,overflow-x,overflow-y,padding,padding-bottom,padding-left,padding-right,padding-top,page,page-break-after,page-break-before,page-break-inside,page-policy,pause,pause-after,pause-before,perspective,perspective-origin,phonemes,pitch,pitch-range,play-during,position,presentation-level,punctuation-trim,quotes,rendering-intent,resize,rest,rest-after,rest-before,richness,right,rotation,rotation-point,ruby-align,ruby-overhang,ruby-position,ruby-span,size,speak,speak-header,speak-numeral,speak-punctuation,speech-rate,stress,string-set,table-layout,target,target-name,target-new,target-position,text-align,text-align-last,text-decoration,text-emphasis,text-height,text-indent,text-justify,text-outline,text-shadow,text-transform,text-wrap,top,transform,transform-origin,transform-style,transition,transition-delay,transition-duration,transition-property,transition-timing-function,unicode-bidi,vertical-align,visibility,voice-balance,voice-duration,voice-family,voice-pitch,voice-pitch-range,voice-rate,voice-stress,voice-volume,volume,white-space,white-space-collapse,widows,width,word-break,word-spacing,word-wrap,z-index".split(","),
k={styleClass:"token_singleline_comment"},l={styleClass:"token_multiline_comment"},m={styleClass:"token_doc_comment"},n={styleClass:"token_doc_html_markup"},o={styleClass:"token_task_tag"},q={styleClass:"token_doc_tag"},p={styleClass:"token_string"},r={styleClass:"token_number"},s={styleClass:"token_keyword"},x={styleClass:"token_space"},v={styleClass:"token_tab"},w={styleClass:"line_caret"};d.prototype={getOffset:function(){return this.offset},getStartOffset:function(){return this.startOffset},getData:function(){return this.text.substring(this.startOffset,
this.offset)},getDataLength:function(){return this.offset-this.startOffset},_default:function(a){switch(a){case 32:case 9:if(this.whitespacesVisible)return a===32?11:10;do a=this._read();while(a===32||a===9);this._unread(a);return 9;case 123:case 125:case 40:case 41:case 91:case 93:case 60:case 62:return a;default:var b=this.isCSS,c=this.offset-1;if(!b&&48<=a&&a<=57){var e=b=!1,f=!1,d=a;do if(a=this._read(),a===46&&!b)b=!0;else if(a===101&&!e)b=e=!0,a=this._read(),a!==45&&this._unread(a);else if(a===
120&&d===48&&this.offset-c===2)b=e=f=!0;else if(!(48<=a&&a<=57||f&&(65<=a&&a<=70||97<=a&&a<=102)))break;while(1);this._unread(a);return 3}if(97<=a&&a<=122||65<=a&&a<=90||a===95||45===a&&b){do a=this._read();while(97<=a&&a<=122||65<=a&&a<=90||a===95||48<=a&&a<=57||45===a&&b);this._unread(a);a=this.keywords;if(a.length>0){c=this.text.substring(c,this.offset);for(b=0;b<a.length;b++)if(this.keywords[b]===c)return 2}}return 1}},_read:function(){return this.offset<this.text.length?this.text.charCodeAt(this.offset++):
-1},_unread:function(a){a!==-1&&this.offset--},nextToken:function(){for(this.startOffset=this.offset;;){var a=this._read(),b;switch(a){case -1:return null;case 47:a=this._read();if(!this.isCSS&&a===47)for(;;)if(a=this._read(),a===-1||a===10||a===13)return this._unread(a),6;if(a===42){a=this._read();b=7;for(a===42&&(b=8);;){for(;a===42;)if(a=this._read(),a===47)return b;if(a===-1)return this._unread(a),b;a=this._read()}}this._unread(a);return 1;case 39:for(b=4;;)switch(a=this._read(),a){case 39:return b;
case 13:case 10:case -1:return this._unread(a),b;case 92:switch(a=this._read(),a){case 10:b=5;break;case 13:b=5,a=this._read(),a!==10&&this._unread(a)}}break;case 34:for(b=4;;)switch(a=this._read(),a){case 34:return b;case 13:case 10:case -1:return this._unread(a),b;case 92:switch(a=this._read(),a){case 10:b=5;break;case 13:b=5,a=this._read(),a!==10&&this._unread(a)}}break;default:return this._default(a)}}},setText:function(a){this.text=a;this.startOffset=this.offset=0}};a.prototype=new d(null);a.prototype.nextToken=
function(){for(this.startOffset=this.offset;;){var a=this._read();switch(a){case -1:return null;case 32:return 11;case 9:return 10;default:do a=this._read();while(!(a===32||a===9||a===-1));this._unread(a);return 1}}};c.prototype=new d(null);c.prototype.setType=function(a){this._type=a};c.prototype.nextToken=function(){for(this.startOffset=this.offset;;){var a=this._read();switch(a){case -1:return null;case 32:case 9:if(this.whitespacesVisible)return a===32?11:10;do a=this._read();while(a===32||a===
9);this._unread(a);return 9;case 60:if(this._type===8){do a=this._read();while(!(a===62||a===-1));if(a===62)return 12}return 1;case 64:if(this._type===8){do a=this._read();while(97<=a&&a<=122||65<=a&&a<=90||a===95||48<=a&&a<=57);this._unread(a);return 13}return 1;case 84:if((a=this._read())===79)if((a=this._read())===68)if((a=this._read())===79)if(a=this._read(),!(97<=a&&a<=122||65<=a&&a<=90||a===95||48<=a&&a<=57))return this._unread(a),14;this._unread(a);default:do a=this._read();while(!(a===32||
a===9||a===-1||a===60||a===64||a===84));this._unread(a);return 1}}};f.prototype=new d(null);f.prototype._default=function(a){for(;;)switch(a=this._read(),a){case 47:case 34:case 39:case -1:return this._unread(a),1}};e.prototype={getClassNameForToken:function(a){switch(a){case "singleLineComment":return k.styleClass;case "multiLineComment":return l.styleClass;case "docComment":return m.styleClass;case "docHtmlComment":return n.styleClass;case "tasktag":return o.styleClass;case "doctag":return q.styleClass;
case "string":return p.styleClass;case "number":return r.styleClass;case "keyword":return s.styleClass;case "space":return x.styleClass;case "tab":return v.styleClass;case "caretLine":return w.styleClass;case "rulerStyle":return"ruler";case "annotationsStyle":return;case "rulerFolding":return;case "rulerOverview":return"ruler.overview";case "rulerLines":return;case "rulerLinesEven":return"rulerLines.even";case "rulerLinesOdd":return"rulerLines.odd"}return null},destroy:function(){var a=this.view;
if(a){var b=a.getModel();b.getBaseModel&&(b=b.getBaseModel());b.removeEventListener("Changed",this._listener.onChanged);a.removeEventListener("MouseDown",this._listener.onMouseDown);a.removeEventListener("Selection",this._listener.onSelection);a.removeEventListener("Destroy",this._listener.onDestroy);a.removeEventListener("LineStyle",this._listener.onLineStyle);this.view=null}},setHighlightCaretLine:function(a){this.highlightCaretLine=a},setWhitespacesVisible:function(a){this.whitespacesVisible=a;
this._scanner.whitespacesVisible=a;this._commentScanner.whitespacesVisible=a},setDetectHyperlinks:function(a){this.detectHyperlinks=a},setFoldingEnabled:function(a){this.foldingEnabled=a},setDetectTasks:function(a){this.detectTasks=a},_binarySearch:function(a,b,c,e,f){var d;e===void 0&&(e=-1);if(f===void 0)f=a.length;for(;f-e>1;)if(d=Math.floor((f+e)/2),b<=a[d].start)f=d;else if(c&&b<a[d].end){f=d;break}else e=d;return f},_computeComments:function(){var a=this.view.getModel();a.getBaseModel&&(a=a.getBaseModel());
this.comments=this._findComments(a.getText())},_computeFolding:function(){if(this.foldingEnabled){var a=this.view.getModel();if(a.getBaseModel){var c=this.annotationModel;if(c){c.removeAnnotations(b.AnnotationType.ANNOTATION_FOLDING);for(var e=[],f=a.getBaseModel(),d=this.comments,g=0;g<d.length;g++){var h=d[g];(h=this._createFoldingAnnotation(a,f,h.start,h.end))&&e.push(h)}c.replaceAnnotations(null,e)}}}},_createFoldingAnnotation:function(a,c,e,f){var d=c.getLineAtOffset(e),c=c.getLineAtOffset(f);
return d===c?null:new (b.AnnotationType.getType(b.AnnotationType.ANNOTATION_FOLDING))(e,f,a)},_computeTasks:function(a,c,e){if(this.detectTasks){var f=this.annotationModel;if(f){var d=this.view.getModel(),g=d;d.getBaseModel&&(g=d.getBaseModel());for(var h=f.getAnnotations(c,e),d=[],j=b.AnnotationType.ANNOTATION_TASK;h.hasNext();){var k=h.next();k.type===j&&d.push(k)}h=[];k=this._commentScanner;k.setText(g.getText(c,e));for(var l;l=k.nextToken();){var m=k.getStartOffset()+c;l===14&&(l=g.getLineEnd(g.getLineAtOffset(m)),
a!==6&&(l=Math.min(l,e-this.commentEnd.length)),h.push(b.AnnotationType.createAnnotation(j,m,l,g.getText(m,l))))}f.replaceAnnotations(d,h)}}},_getLineStyle:function(a){if(this.highlightCaretLine){var b=this.view,c=b.getModel(),b=b.getSelection();if(b.start===b.end&&c.getLineAtOffset(b.start)===a)return w}return null},_getStyles:function(a,b,c){a.getBaseModel&&(c=a.mapOffset(c));for(var e=c+b.length,f=[],d=c,g=this.comments,h=this._binarySearch(g,c,!0);h<g.length;h++){if(g[h].start>=e)break;var j=
g[h].start,k=g[h].end;d<j&&this._parse(b.substring(d-c,j-c),d,f);var n=g[h].type,o;switch(n){case 8:o=m;break;case 7:o=l;break;case 5:o=p}d=Math.max(d,j);j=Math.min(e,k);(n===8||n===7)&&(this.whitespacesVisible||this.detectHyperlinks)?this._parseComment(b.substring(d-c,j-c),d,f,o,n):n===5&&this.whitespacesVisible?this._parseString(b.substring(d-c,j-c),d,f,p):f.push({start:d,end:j,style:o});d=k}d<e&&this._parse(b.substring(d-c,e-c),d,f);if(a.getBaseModel)for(b=0;b<f.length;b++)c=f[b].end-f[b].start,
f[b].start=a.mapOffset(f[b].start,!0),f[b].end=f[b].start+c;return f},_parse:function(a,b,c){var e=this._scanner;for(e.setText(a);a=e.nextToken();){var f=e.getStartOffset()+b,d=null;switch(a){case 2:d=s;break;case 3:d=r;break;case 5:case 4:if(this.whitespacesVisible){this._parseString(e.getData(),f,c,p);continue}else d=p;break;case 8:this._parseComment(e.getData(),f,c,m,a);continue;case 6:this._parseComment(e.getData(),f,c,k,a);continue;case 7:this._parseComment(e.getData(),f,c,l,a);continue;case 10:this.whitespacesVisible&&
(d=v);break;case 11:this.whitespacesVisible&&(d=x)}c.push({start:f,end:e.getOffset()+b,style:d})}},_parseComment:function(a,b,c,e,f){var d=this._commentScanner;d.setText(a);for(d.setType(f);a=d.nextToken();){var f=d.getStartOffset()+b,g=e;switch(a){case 10:this.whitespacesVisible&&(g=v);break;case 11:this.whitespacesVisible&&(g=x);break;case 12:g=n;break;case 13:g=q;break;case 14:g=o;break;default:this.detectHyperlinks&&(g=this._detectHyperlinks(d.getData(),f,c,g))}g&&c.push({start:f,end:d.getOffset()+
b,style:g})}},_parseString:function(a,b,c,e){var f=this._whitespaceScanner;for(f.setText(a);a=f.nextToken();){var d=f.getStartOffset()+b,g=e;switch(a){case 10:this.whitespacesVisible&&(g=v);break;case 11:this.whitespacesVisible&&(g=x)}g&&c.push({start:d,end:f.getOffset()+b,style:g})}},_detectHyperlinks:function(a,b,c,e){var f=null,d;if((d=a.indexOf("://"))>0){for(var f=a,g=d;g>0;){d=f.charCodeAt(g-1);if(!(97<=d&&d<=122||65<=d&&d<=90||45===d||48<=d&&d<=57))break;g--}if(g>0&&(d="\"\"''(){}[]<>".indexOf(f.substring(g-
1,g)),d!==-1&&(d&1)===0&&(d=f.lastIndexOf("\"\"''(){}[]<>".substring(d+1,d+2)))!==-1)){var h=d;d=this._clone(e);d.tagName="A";d.attributes={href:f.substring(g,h)};c.push({start:b,end:b+g,style:e});c.push({start:b+g,end:b+h,style:d});c.push({start:b+h,end:b+a.length,style:e});return null}}else a.toLowerCase().indexOf("bug#")===0&&(f="https://bugs.eclipse.org/bugs/show_bug.cgi?id="+parseInt(a.substring(4),10));return f?(d=this._clone(e),d.tagName="A",d.attributes={href:f},d):e},_clone:function(a){if(!a)return a;
var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b},_findComments:function(a,b){var b=b||0,c=this._firstScanner,e;c.setText(a);for(var f=[];e=c.nextToken();)(e===7||e===8||e===5)&&f.push({start:c.getStartOffset()+b,end:c.getOffset()+b,type:e}),(e===6||e===7||e===8)&&this._computeTasks(e,c.getStartOffset()+b,c.getOffset()+b);return f},_findMatchingBracket:function(a,b){var c="{}()[]<>",e=a.getText(b,b+1),f=c.indexOf(e,0);if(f===-1)return-1;var d;d=f&1?c.substring(f-1,f):c.substring(f+
1,f+2);for(var g=a.getLineAtOffset(b),c=a.getLine(g),h=a.getLineStart(g),j=a.getLineEnd(g),c=this._findBrackets(e,d,c,h,h,j),j=0;j<c.length;j++)if(h=c[j]>=0?1:-1,c[j]*h-1===b){var k=1;if(f&1){for(j--;j>=0;j--)if(h=c[j]>=0?1:-1,k+=h,k===0)return c[j]*h-1;for(g-=1;g>=0;){c=a.getLine(g);h=a.getLineStart(g);j=a.getLineEnd(g);c=this._findBrackets(e,d,c,h,h,j);for(f=c.length-1;f>=0;f--)if(h=c[f]>=0?1:-1,k+=h,k===0)return c[f]*h-1;g--}}else{for(j++;j<c.length;j++)if(h=c[j]>=0?1:-1,k+=h,k===0)return c[j]*
h-1;g+=1;for(f=a.getLineCount();g<f;){c=a.getLine(g);h=a.getLineStart(g);j=a.getLineEnd(g);c=this._findBrackets(e,d,c,h,h,j);for(j=0;j<c.length;j++)if(h=c[j]>=0?1:-1,k+=h,k===0)return c[j]*h-1;g++}}break}return-1},_findBrackets:function(a,b,c,e,f,d){for(var g=[],a=a.charCodeAt(0),b=b.charCodeAt(0),h=f,j=this._scanner,k,l=this.comments,m=this._binarySearch(l,f,!0);m<l.length;m++){if(l[m].start>=d)break;k=l[m].start;var n=l[m].end;if(h<k)for(j.setText(c.substring(h-f,k-f));k=j.nextToken();)k===a?g.push(j.getStartOffset()+
h-f+e+1):k===b&&g.push(-(j.getStartOffset()+h-f+e+1));h=n}if(h<d)for(j.setText(c.substring(h-f,d-f));k=j.nextToken();)k===a?g.push(j.getStartOffset()+h-f+e+1):k===b&&g.push(-(j.getStartOffset()+h-f+e+1));return g},_onDestroy:function(){this.destroy()},_onLineStyle:function(a){if(a.textView===this.view)a.style=this._getLineStyle(a.lineIndex);a.ranges=this._getStyles(a.textView.getModel(),a.lineText,a.lineStart)},_onSelection:function(a){var c=a.oldValue,e=a.newValue,f=this.view,a=f.getModel(),d;if(this.highlightCaretLine){var g=
a.getLineAtOffset(c.start);d=a.getLineAtOffset(e.start);var h=e.start===e.end,c=c.start===c.end;g===d&&c&&h||(c&&f.redrawLines(g,g+1),(g!==d||!c)&&h&&f.redrawLines(d,d+1))}if(this.annotationModel){var c=this._bracketAnnotations,j,k;if(e.start===e.end&&(k=f.getCaretOffset())>0)k-=1,a.getBaseModel&&(k=a.mapOffset(k),a=a.getBaseModel()),a=this._findMatchingBracket(a,k),a!==-1&&(j=[b.AnnotationType.createAnnotation(b.AnnotationType.ANNOTATION_MATCHING_BRACKET,a,a+1),b.AnnotationType.createAnnotation(b.AnnotationType.ANNOTATION_CURRENT_BRACKET,
k,k+1)]);this._bracketAnnotations=j;this.annotationModel.replaceAnnotations(c,j)}},_onMouseDown:function(a){if(a.clickCount===2){var b=this.view,c=b.getModel(),e=b.getOffsetAtLocation(a.x,a.y);if(e>0){var f=e-1,d=c;c.getBaseModel&&(f=c.mapOffset(f),d=c.getBaseModel());f=this._findMatchingBracket(d,f);f!==-1&&(a.preventDefault(),a=f,c.getBaseModel&&(a=c.mapOffset(a,!0)),e>a&&(e--,a++),b.setSelection(a,e))}}},_onModelChanged:function(a){var c=a.start,e=a.removedCharCount,f=a.addedCharCount-e,d=this.view,
a=d.getModel(),g=a.getBaseModel?a.getBaseModel():a,e=c+e,h=g.getCharCount(),j=this.comments.length,k=g.getLineStart(g.getLineAtOffset(c)),l=this._binarySearch(this.comments,k,!0),m=this._binarySearch(this.comments,e,!1,l-1,j);l<j&&this.comments[l].start<=k&&k<this.comments[l].end?(k=this.comments[l].start,k>c&&(k+=f)):k=l===j&&j>0&&h-f===this.comments[j-1].end?this.comments[j-1].start:k;var n;m<j?(n=this.comments[m].end,n>c&&(n+=f),m+=1):(m=j,n=h);for(var o,h=this._findComments(g.getText(k,n),k),
j=l;j<this.comments.length;j++)o=this.comments[j],o.start>c&&(o.start+=f),o.start>c&&(o.end+=f);var r=m-l!==h.length;if(!r)for(j=0;j<h.length;j++){o=this.comments[l+j];var p=h[j];if(o.start!==p.start||o.end!==p.end||o.type!==p.type){r=!0;break}}j=[l,m-l].concat(h);Array.prototype.splice.apply(this.comments,j);r&&(j=k,o=n,a!==g&&(j=a.mapOffset(j,!0),o=a.mapOffset(o,!0)),d.redrawRange(j,o));if(this.foldingEnabled&&g!==a&&this.annotationModel){d=this.annotationModel;l=d.getAnnotations(k,n);k=[];for(n=
[];l.hasNext();)if(o=l.next(),o.type===b.AnnotationType.ANNOTATION_FOLDING){n.push(o);for(j=0;j<h.length;j++)if(o.start===h[j].start&&o.end===h[j].end)break;j===h.length?(k.push(o),o.expand()):(j=o.start,m=o.end,j>c&&(j-=f),m>c&&(m-=f),j<=c&&c<m&&j<=e&&e<m&&(j=g.getLineAtOffset(o.start),m=g.getLineAtOffset(o.end),j!==m?o.expanded||(o.expand(),d.modifyAnnotation(o)):d.removeAnnotation(o)))}c=[];for(j=0;j<h.length;j++){o=h[j];for(f=0;f<n.length;f++)if(n[f].start===o.start&&n[f].end===o.end)break;f===
n.length&&(o=this._createFoldingAnnotation(a,g,o.start,o.end))&&c.push(o)}d.replaceAnnotations(k,c)}}};return{TextStyler:e}});
define("orion/editor/textMateStyler",["orion/editor/regex"],function(b){function d(a,b,e){this.initialize(a);this.grammar=this.clone(b);this.externalGrammars=e?this.clone(e):[];this._styles={};this._tree=null;this._allGrammars={};this.preprocess(this.grammar)}var a={unsupported:[{regex:/\(\?[ims\-]:/,func:function(){return"option on/off for subexp"}},{regex:/\(\?<([=!])/,func:function(a){return a[1]==="="?"lookbehind":"negative lookbehind"}},{regex:/\(\?>/,func:function(){return"atomic group"}}],
toRegExp:function(b){function f(a,b){throw Error('Unsupported regex feature "'+a+'": "'+b[0]+'" at index: '+b.index+" in "+b.input);}var e="",d,b=a.processGlobalFlag("x",b,function(a){for(var b="",c=!1,e=a.length,f=0;f<e;){var d=a.charAt(f);if(!c&&d==="#")for(;f<e&&d!=="\r"&&d!=="\n";)d=a.charAt(++f);else if(!c&&/\s/.test(d))for(;f<e&&/\s/.test(d);)d=a.charAt(++f);else d==="\\"?(b+=d,/\s/.test(a.charAt(f+1))||(b+=a.charAt(f+1),f+=1)):(d==="["?c=!0:d==="]"&&(c=!1),b+=d),f+=1}return b}),b=a.processGlobalFlag("i",
b,function(a){e+="i";return a});for(d=0;d<this.unsupported.length;d++){var g;(g=this.unsupported[d].regex.exec(b))&&f(this.unsupported[d].func(g),g)}return RegExp(b,e)},processGlobalFlag:function(a,b,e){function d(a,b){for(var c=0,e=a.length,f=-1,g=b;g<e&&f===-1;g++)switch(a.charAt(g)){case "\\":g++;break;case "(":c++;break;case ")":c--,c===0&&(f=g)}return f}var g="(?"+a+")",a="(?"+a+":";if(b.substring(0,g.length)===g)return e(b.substring(g.length));else if(b.substring(0,a.length)===a){g=d(b,0);if(g<
b.length-1)throw Error("Only a "+a+") group that encloses the entire regex is supported in: "+b);return e(b.substring(a.length,g))}return b},hasBackReference:function(a){return/\\\d+/.test(a.source)},getSubstitutedRegex:function(a,f,e){for(var e=typeof e==="undefined"?!0:!1,a=a.source.split(/(\\\d+)/g),d=[],g=0;g<a.length;g++){var j=a[g],k=/\\(\d+)/.exec(j);k?(j=f[k[1]]||"",d.push(e?b.escape(j):j)):d.push(j)}return RegExp(d.join(""))},groupify:function(a,b){for(var e=a.source,d=e.length,g=[],j=0,
k=[],l=1,m=1,n=[],o={},q={},p=0;p<d;p++){var r=g[g.length-1],s=e.charAt(p);switch(s){case "(":if(r===4)g.pop(),n.push(")"),k[k.length-1].end=p;var x=p+2<d?e.charAt(p+1)+""+e.charAt(p+2):null;if(x==="?:"||x==="?="||x==="?!"){var v;x==="?:"?v=1:(v=3,j++);g.push(v);k.push({start:p,end:-1,type:v});n.push(s);n.push(x);p+=x.length}else g.push(2),k.push({start:p,end:-1,type:2,oldNum:l,num:m}),n.push(s),j===0&&(q[m]=null),o[l]=m,l++,m++;break;case ")":r=g.pop();r===3&&j--;k[k.length-1].end=p;n.push(s);break;
case "*":case "+":case "?":case "}":var w=s,t=e.charAt(p-1),x=p-1;if(s==="}"){for(v=p-1;e.charAt(v)!=="{"&&v>=0;v--);t=e.charAt(v-1);x=v-1;w=e.substring(v,p+1)}v=k[k.length-1];if(t===")"&&(v.type===2||v.type===4)){n.splice(v.start,0,"(");n.push(w);n.push(")");s={start:v.start,end:n.length-1,type:4,num:v.num};for(t=0;t<k.length;t++)if(r=k[t],(r.type===2||r.type===4)&&r.start>=v.start&&r.end<=x)if(r.start+=1,r.end+=1,r.num+=1,r.type===2)o[r.oldNum]=r.num;k.push(s);m++;break}default:s!=="|"&&r!==2&&
r!==4&&j===0&&(g.push(4),k.push({start:p,end:-1,type:4,num:m}),n.push("("),q[m]=null,m++),n.push(s),s==="\\"&&(s=e.charAt(p+1),n.push(s),p+=1)}}for(;g.length;)g.pop(),n.push(")");var e=RegExp(n.join("")),d={},b=b||o,u;for(u in b)b.hasOwnProperty(u)&&(d[u]="\\"+b[u]);e=this.getSubstitutedRegex(e,d,!1);return[e,o,q]},complexCaptures:function(a){if(!a)return!1;for(var b in a)if(a.hasOwnProperty(b)&&b!=="0")return!0;return!1}};d.prototype={initialize:function(a){this.textView=a;var b=this;this._listener=
{onModelChanged:function(a){b.onModelChanged(a)},onDestroy:function(a){b.onDestroy(a)},onLineStyle:function(a){b.onLineStyle(a)}};a.addEventListener("ModelChanged",this._listener.onModelChanged);a.addEventListener("Destroy",this._listener.onDestroy);a.addEventListener("LineStyle",this._listener.onLineStyle);a.redrawLines()},onDestroy:function(){this.destroy()},destroy:function(){if(this.textView)this.textView.removeEventListener("ModelChanged",this._listener.onModelChanged),this.textView.removeEventListener("Destroy",
this._listener.onDestroy),this.textView.removeEventListener("LineStyle",this._listener.onLineStyle),this.textView=null;this._listener=this._tree=this._styles=this.grammar=null},clone:function f(a){var b;if(a instanceof Array){b=Array(a.length);for(var d=0;d<a.length;d++)b[d]=f(a[d])}else for(d in b={},a)if(Object.prototype.hasOwnProperty.call(a,d)){var j=a[d];b[d]=typeof j==="object"&&j!==null?f(j):j}return b},preprocess:function(a){for(a=[a];a.length!==0;){var b=a.pop();if(!b._resolvedRule||!b._typedRule)if(b._resolvedRule=
this._resolve(b),b._typedRule=this._createTypedRule(b),this.addStyles(b.name),this.addStyles(b.contentName),this.addStylesForCaptures(b.captures),this.addStylesForCaptures(b.beginCaptures),this.addStylesForCaptures(b.endCaptures),b._resolvedRule!==b&&a.push(b._resolvedRule),b.patterns)for(var d=0;d<b.patterns.length;d++)a.push(b.patterns[d])}},addStyles:function(a){if(a&&!this._styles[a]){this._styles[a]=[];for(var b=a.split("."),d=0;d<b.length;d++)this._styles[a].push(b.slice(0,d+1).join("-"))}},
addStylesForCaptures:function(a){for(var b in a)a.hasOwnProperty(b)&&this.addStyles(a[b].name)},ContainerRule:function(){function a(b){this.rule=b;this.subrules=b.patterns}a.prototype.valueOf=function(){return"aa"};return a}(),BeginEndRule:function(){function b(e){this.rule=e;this.beginRegex=a.toRegExp(e.begin);this.endRegex=a.toRegExp(e.end);this.subrules=e.patterns||[];this.endRegexHasBackRef=a.hasBackReference(this.endRegex);var f=a.complexCaptures(e.captures),e=a.complexCaptures(e.beginCaptures)||
a.complexCaptures(e.endCaptures);if(this.isComplex=f||e)f=a.groupify(this.beginRegex),this.beginRegex=f[0],this.beginOld2New=f[1],this.beginConsuming=f[2],f=a.groupify(this.endRegex,this.beginOld2New),this.endRegex=f[0],this.endOld2New=f[1],this.endConsuming=f[2]}b.prototype.valueOf=function(){return this.beginRegex};return b}(),MatchRule:function(){function b(e){this.rule=e;this.matchRegex=a.toRegExp(e.match);if(this.isComplex=a.complexCaptures(e.captures))e=a.groupify(this.matchRegex),this.matchRegex=
e[0],this.matchOld2New=e[1],this.matchConsuming=e[2]}b.prototype.valueOf=function(){return this.matchRegex};return b}(),_createTypedRule:function(a){return a.match?new this.MatchRule(a):a.begin?new this.BeginEndRule(a):new this.ContainerRule(a)},_resolve:function(a){var b=a;if(a.include){if(a.begin||a.end||a.match)throw Error('Unexpected regex pattern in "include" rule '+a.include);a=a.include;if(a.charAt(0)==="#"){if(b=this.grammar.repository&&this.grammar.repository[a.substring(1)],!b)throw Error("Couldn't find included rule "+
a+" in grammar repository");}else if(a==="$self")b=this.grammar;else if(a==="$base")throw Error('Include "$base" is not supported');else if(b=this._allGrammars[a],!b)for(var d=0;d<this.externalGrammars.length;d++){var g=this.externalGrammars[d];if(g.scopeName===a){this.preprocess(g);b=this._allGrammars[a]=g;break}}}return b},ContainerNode:function(){function a(b,f){this.parent=b;this.rule=f;this.children=[];this.end=this.start=null}a.prototype.addChild=function(a){this.children.push(a)};a.prototype.valueOf=
function(){var a=this.rule;return"ContainerNode { "+(a.include||"")+" "+(a.name||"")+(a.comment||"")+"}"};return a}(),BeginEndNode:function(){function b(e,f,d){this.parent=e;this.rule=f;this.children=[];this.setStart(d);this.endMatch=this.end=null;this.endRegexSubstituted=f.endRegexHasBackRef?a.getSubstitutedRegex(f.endRegex,d):null}b.prototype.addChild=function(a){this.children.push(a)};b.prototype.getIndexInParent=function(){return this.parent?this.parent.children.indexOf(this):-1};b.prototype.setStart=
function(a){this.start=a.index;this.beginMatch=a};b.prototype.setEnd=function(a){a&&typeof a==="object"?(this.endMatch=a,this.end=a.index+a[0].length):(this.endMatch=null,this.end=a)};b.prototype.shiftStart=function(a){this.start+=a;this.beginMatch.index+=a};b.prototype.shiftEnd=function(a){this.end+=a;this.endMatch&&(this.endMatch.index+=a)};b.prototype.valueOf=function(){return"{"+this.rule.beginRegex+" range="+this.start+".."+this.end+"}"};return b}(),push:function(a,b){if(b)for(var d=b.length;d>
0;)a.push(b[--d])},exec:function(a,b,d){(b=a.exec(b))&&(b.index+=d);a.lastIndex=0;return b},afterMatch:function(a){return a.index+a[0].length},getEndMatch:function(a,b,d){if(a instanceof this.BeginEndNode){var g=a.rule,a=a.endRegexSubstituted||g.endRegex;return!a?null:this.exec(a,b,d)}return null},initialParse:function(){this.textView.getModel().getCharCount();this._tree=new this.ContainerNode(null,this.grammar._typedRule);this.parse(this._tree,!1,0)},onModelChanged:function(a){var b=a.addedCharCount,
d=a.removedCharCount,a=a.start;if(this._tree){var g=this.textView.getModel(),j=g.getCharCount(),g=g.getLineEnd(g.getLineAtOffset(a)-1),k=this.getFirstDamaged(g,g),g=g===-1?0:g,b=k?this.parse(k,!0,g,a,b,d):j;this.textView.redrawRange(g,b)}else this.initialParse()},getFirstDamaged:function(a,b){if(a<0)return this._tree;for(var d=[this._tree],g=null;d.length;){var j=d.pop();if(!j.parent||this.isDamaged(j,a,b)){j instanceof this.BeginEndNode&&(g=j);for(var k=0;k<j.children.length;k++)d.push(j.children[k])}}return g||
this._tree},isDamaged:function(a,b,d){return a.start<=d&&a.end>b},parse:function(a,b,d,g,j,k){var l=this.textView.getModel(),m=l.getLineStart(l.getLineCount()-1),n=l.getCharCount(),o=this.getInitialExpected(a,d),q=-1;if(b)a.repaired=!0,a.endNeedsUpdate=!0,q=(q=a.children[a.children.length-1])?l.getLineEnd(l.getLineAtOffset(q.end+(j-k))):-1,g=l.getLineEnd(l.getLineAtOffset(g+k)),q=Math.max(q,g);for(var q=q===-1?n:q,g=o,p=a,r=!1,s=d,x=-1;p&&(!b||s<q);){var v=this.getNextMatch(l,p,s);v||(s=s>=m?n:l.getLineStart(l.getLineAtOffset(s)+
1));var w=v&&v.match,t=v&&v.rule,u=v&&v.isEnd;if(v&&v.isSub){if(s=this.afterMatch(w),t instanceof this.BeginEndRule)r=!0,b&&t===g.rule&&p===g.parent?(p=g,p.setStart(w),p.repaired=!0,p.endNeedsUpdate=!0,g=this.getNextExpected(g,"begin")):(b&&(this.prune(p,g),b=!1),w=new this.BeginEndNode(p,t,w),p.addChild(w),p=w)}else if(u||s===n){if(p instanceof this.BeginEndNode)w?(r=!0,x=Math.max(x,p.end),p.setEnd(w),s=this.afterMatch(w),b&&p===g&&p.parent===g.parent?(p.repaired=!0,delete p.endNeedsUpdate,g=this.getNextExpected(g,
"end")):b&&(this.prune(p,g),b=!1)):(p.setEnd(n),delete p.endNeedsUpdate);p=p.parent}b&&s>=q&&!r&&(this.prune(a,o),b=!1)}this.removeUnrepairedChildren(a,b,d);this.cleanup(b,a,d,q,n,j,k);return b?Math.max(x,s):s},removeUnrepairedChildren:function(a,b,d){if(b){for(var b=a.children,g=-1,j=0;j<b.length;j++){var k=b[j];if(!k.repaired&&this.isDamaged(k,d,Number.MAX_VALUE)){g=j;break}}if(g!==-1)a.children.length=g}},cleanup:function(a,b,d,g,j,k,l){if(a){a=k-l;j=this.getIntersecting(g-a+1,j);b=this.getIntersecting(d,
g);for(d=0;d<j.length;d++)g=j[d],!g.repaired&&g instanceof this.BeginEndNode&&(g.shiftEnd(a),g.shiftStart(a));for(d=0;d<b.length;d++)g=b[d],g.repaired&&g.endNeedsUpdate&&g.shiftEnd(a),delete g.endNeedsUpdate,delete g.repaired}else{b=this.getIntersecting(d,g);for(d=0;d<b.length;d++)delete b[d].repaired}},getNextMatch:function(a,b,d,g){var j=a.getLineAtOffset(d),j=a.getLineEnd(j),k=a.getText(d,j),l=[],m=[],a=[],j=[];for(this.push(l,b.rule.subrules);l.length;){var n=l.length?l.pop():null,n=n&&n._resolvedRule._typedRule;
if(n instanceof this.ContainerRule&&m.indexOf(n)===-1)m.push(n),this.push(l,n.subrules);else if(!n||!g||n.matchRegex){var o=n&&this.exec(n.matchRegex||n.beginRegex,k,d);o&&(a.push(o),j.push(n))}}l=Number.MAX_VALUE;m=-1;for(n=0;n<a.length;n++)if(o=a[n],o.index<l)l=o.index,m=n;if(!g&&(d=this.getEndMatch(b,k,d)))if(g=b.rule.applyEndPatternLast,m===-1||d.index<l||!g&&d.index===l)return{isEnd:!0,rule:b.rule,match:d};return m===-1?null:{isSub:!0,rule:j[m],match:a[m]}},getInitialExpected:function(a,b){var d,
g;if(a===this._tree)for(d=0;d<a.children.length;d++){if(g=a.children[d],g.start>=b)return g}else if(a instanceof this.BeginEndNode&&a.endMatch){var j=a.endMatch.index;for(d=0;d<a.children.length;d++)if(g=a.children[d],g.start>=b)break;if(g&&g.start<j)return g}return a},getNextExpected:function(a,b){if(b==="begin"){var d=a.children[0];return d?d:a}else if(b==="end"&&(d=a.parent)){var g=d.children[d.children.indexOf(a)+1];return g?g:d}return null},prune:function(a,b){if(b.parent===a)a.children.length=
b.getIndexInParent();else if(a instanceof this.BeginEndNode)a.endMatch=null,a.end=null;if(a.parent)a.parent.children.length=a.getIndexInParent()+1},onLineStyle:function(a){this._tree||this.initialParse();var b=a.lineStart,d=this.textView.getModel(),g=d.getLineEnd(a.lineIndex),j=d.getLineEnd(d.getLineAtOffset(b)-1),j=this.getFirstDamaged(j,j),b=this.getLineScope(d,j,b,g);a.ranges=this.toStyleRanges(b);a.ranges.sort(function(a,b){return a.start-b.start})},getLineScope:function(a,b,d,g){for(var j=d,
k=this.getInitialExpected(b,d),l=[],m=[];b&&j<g;){var n=this.getNextMatch(a,b,j);if(!n)break;var o=n&&n.match,q=n&&n.rule,p=n&&n.isSub,n=n&&n.isEnd;o.index!==j&&m.push({start:j,end:o.index,node:b});if(p)j=this.afterMatch(o),q instanceof this.BeginEndRule?(this.addBeginScope(l,o,q),b=k,k=this.getNextExpected(k,"begin")):this.addMatchScope(l,o,q);else if(n)j=this.afterMatch(o),this.addEndScope(l,o,q),k=this.getNextExpected(k,"end"),b=b.parent}j<g&&m.push({start:j,end:g,node:b});a=this.getInheritedLineScope(m,
d,g);return l.concat(a)},getInheritedLineScope:function(a){for(var b=[],d=0;d<a.length;d++)for(var g=a[d],j=g.node;j;){var k=j.rule.rule,l=k.name;if(k=k.contentName||l){this.addScopeRange(b,g.start,g.end,k);break}j=j.parent}return b},addBeginScope:function(a,b,d){var g=d.rule;this.addCapturesScope(a,b,g.beginCaptures||g.captures,d.isComplex,d.beginOld2New,d.beginConsuming)},addEndScope:function(a,b,d){var g=d.rule;this.addCapturesScope(a,b,g.endCaptures||g.captures,d.isComplex,d.endOld2New,d.endConsuming)},
addMatchScope:function(a,b,d){var g=d.rule,j=g.name;(g=g.captures)?this.addCapturesScope(a,b,g,d.isComplex,d.matchOld2New,d.matchConsuming):this.addScope(a,b,j)},addScope:function(a,b,d){d&&a.push({start:b.index,end:this.afterMatch(b),scope:d})},addScopeRange:function(a,b,d,g){g&&a.push({start:b,end:d,scope:g})},addCapturesScope:function(a,b,d,g,j,k){if(d)if(g){for(var g={1:0},l=0,m=1;b[m]!==void 0;m++)k[m]!==void 0&&(l+=b[m].length),b[m+1]!==void 0&&(g[m+1]=l);k=b.index;for(l=1;d[l];l++){var m=d[l].name,
n=j[l],o=k+g[n];typeof b[n]!=="undefined"&&this.addScopeRange(a,o,o+b[n].length,m)}}else this.addScope(a,b,d[0]&&d[0].name)},getIntersecting:function(a,b){for(var d=[],g=this._tree?[this._tree]:[];g.length;){var j=g.pop(),k=!1;j instanceof this.ContainerNode?k=!0:this.isDamaged(j,a,b)&&(k=!0,d.push(j));if(k)for(var k=j.children.length,l=0;l<k;l++)g.push(j.children[l])}return d.reverse()},toStyleRanges:function(a){for(var b=[],d=0;d<a.length;d++){var g=a[d],j=this._styles[g.scope];if(!j)throw Error("styles not found for "+
g.scope);j=j.join(" ");b.push({start:g.start,end:g.end,style:{styleClass:j}})}return b}};return{RegexUtil:a,TextMateStyler:d}});
define("orion/editor/asyncStyler",["i18n!orion/editor/nls/messages","orion/textview/annotations"],function(b,d){function a(a){return a.getProperty("objectClass").indexOf(f)!==-1&&a.getProperty("type")==="highlighter"}function c(a,b,c){this.initialize(a,b,c);this.lineStyles=[]}var f="orion.edit.highlighter",e=f+" service must be an event emitter";d.AnnotationType.registerType("orion.annotation.highlightError",{title:b.syntaxError,html:"<div class='annotationHTML error'></div>",rangeStyle:{styleClass:"annotationRange error"}});
c.prototype={initialize:function(b,c,e){this.textView=b;this.serviceRegistry=c;this.annotationModel=e;this.services=[];var d=this;this.listener={onModelChanging:function(a){d.onModelChanging(a)},onModelChanged:function(a){d.onModelChanged(a)},onDestroy:function(a){d.onDestroy(a)},onLineStyle:function(a){d.onLineStyle(a)},onStyleReady:function(a){d.onStyleReady(a)},onServiceAdded:function(a){d.onServiceAdded(a.serviceReference,d.serviceRegistry.getService(a.serviceReference))},onServiceRemoved:function(a){d.onServiceRemoved(a.serviceReference,
d.serviceRegistry.getService(a.serviceReference))}};b.addEventListener("ModelChanging",this.listener.onModelChanging);b.addEventListener("ModelChanged",this.listener.onModelChanged);b.addEventListener("Destroy",this.listener.onDestroy);b.addEventListener("LineStyle",this.listener.onLineStyle);c.addEventListener("registered",this.listener.onServiceAdded);c.addEventListener("unregistering",this.listener.onServiceRemoved);b=c.getServiceReferences(f);for(e=0;e<b.length;e++){var l=b[e];a(l)&&this.addServiceListener(c.getService(l))}},
onDestroy:function(){this.destroy()},destroy:function(){if(this.textView)this.textView.removeEventListener("ModelChanging",this.listener.onModelChanging),this.textView.removeEventListener("ModelChanged",this.listener.onModelChanged),this.textView.removeEventListener("Destroy",this.listener.onDestroy),this.textView.removeEventListener("LineStyle",this.listener.onLineStyle),this.textView=null;if(this.services){for(var a=0;a<this.services.length;a++)this.removeServiceListener(this.services[a]);this.services=
null}if(this.serviceRegistry)this.serviceRegistry.removeEventListener("registered",this.listener.onServiceAdded),this.serviceRegistry.removeEventListener("unregistering",this.listener.onServiceRemoved),this.serviceRegistry=null;this.lineStyles=this.listener=null},onModelChanging:function(a){this.startLine=this.textView.getModel().getLineAtOffset(a.start)},onModelChanged:function(a){var b=this.startLine;(a.addedLineCount||a.removedLineCount)&&Array.prototype.splice.apply(this.lineStyles,[b,a.removedLineCount].concat(this._getEmptyStyle(a.addedLineCount)))},
onStyleReady:function(a){var b=a.lineStyles||a.style,a=Number.MAX_VALUE,c=-1,e=this.textView.getModel(),f;for(f in b)b.hasOwnProperty(f)&&(this.lineStyles[f]=b[f],a=Math.min(a,f),c=Math.max(c,f));a=Math.max(a,0);c=Math.min(c,e.getLineCount());if(b=this.annotationModel){for(var m=b.getAnnotations(e.getLineStart(a),e.getLineEnd(c)),n=[];m.hasNext();){var o=m.next();o.type==="orion.annotation.highlightError"&&n.push(o)}m=[];for(o=a;o<=c;o++){f=o;var q=this.lineStyles[f],q=q&&q.errors;f=e.getLineStart(f);
if(q)for(var p=0;p<q.length;p++){var r=q[p];m.push(d.AnnotationType.createAnnotation("orion.annotation.highlightError",r.start+f,r.end+f))}}b.replaceAnnotations(n,m)}this.textView.redrawLines(a,c+1)},onLineStyle:function(a){function b(a,c){for(var e=a.length,f=[],d=0;d<e;d++){var g=a[d];f.push({start:g.start+c,end:g.end+c,style:g.style})}return f}var c=this.lineStyles[a.lineIndex];if(c)if(c.ranges)a.ranges=b(c.ranges,a.lineStart);else if(c.style)a.style=c.style},_getEmptyStyle:function(a){for(var b=
[],c=0;c<a;c++)b.push(null);return b},setContentType:function(a){this.contentType=a;if(this.services)for(a=0;a<this.services.length;a++){var b=this.services[a];b.setContentType&&b.setContentType(this.contentType)}},onServiceAdded:function(b,c){a(b)&&this.addServiceListener(c)},onServiceRemoved:function(a,b){this.services.indexOf(b)!==-1&&this.removeServiceListener(b)},addServiceListener:function(a){typeof a.addEventListener==="function"?(a.addEventListener("orion.edit.highlighter.styleReady",this.listener.onStyleReady),
this.services.push(a),a.setContentType&&this.contentType&&a.setContentType(this.contentType)):typeof console!=="undefined"&&console.log(Error(e))},removeServiceListener:function(a){typeof a.removeEventListener==="function"?(a.removeEventListener("orion.edit.highlighter.styleReady",this.listener.onStyleReady),a=this.services.indexOf(a),a!==-1&&this.services.splice(a,1)):typeof console!=="undefined"&&console.log(Error(e))}};return{AsyncStyler:c}});
define("examples/textview/textStylerOptions",["orion/bootstrap"],function(b){function d(c){this._styler=c;this._view=this._styler.view;var f=this;this._listener={onStorage:function(a){f._onStorage(a)}};var e=this;this._view&&b.startup().then(function(b){a=b.preferences;e.preferences=a;e._updateStylesheet(a);e.storageKey=a.listenForChangedSettings(e._listener.onStorage)})}var a;d.prototype={_getSetting:function(a,b,e){for(var d,g=0;g<a.length;g++)if(a[g].label===b)for(var j=0;j<a[g].data.length;j++)if(a[g].data[j].label===
e){d=a[g].data[j].value;break}return d},_styleSheet:function(a,b){function e(a,c){var e=k.getClassNameForToken(a);if(e){var g=d[c],q=d.fontWeight;j.push("."+b+" ."+e+" {");j.push("\tcolor: "+g+";");j.push("\tfont-weight: "+q+";");j.push("}")}}for(var d=[],g=0;g<a.length;g++)d[a[g].element]=a[g].value;var j=[];j.push("");g=d.fontFamily;g=g==="sans serif"?'"Menlo", "Consolas", "Vera Mono", "monospace"':"monospace";j.push("."+b+" {");j.push("\tfont-family: "+g+";");j.push("\tfont-size: "+d.fontSize+
";");j.push("\tcolor: "+d.text+";");j.push("}");j.push("."+b+" .textview {");j.push("\tbackground-color: "+d.background+";");j.push("}");j.push("."+b+".ruler.annotations{");j.push("\tbackground-color: red;");j.push("}");j.push("."+b+" .ruler {");j.push("\tbackground-color: "+d.annotationRuler+";");j.push("}");j.push("."+b+" .rulerLines {");j.push("\tcolor: "+d.lineNumber+";");j.push("\tbackground-color: "+d.annotationRuler+";");j.push("}");j.push("."+b+" .rulerLines.even {");j.push("\tcolor: "+d.lineNumber+
";");j.push("\tbackground-color: "+d.annotationRuler+";");j.push("}");j.push("."+b+" .rulerLines.odd {");j.push("\tcolor: "+d.lineNumber+";");j.push("\tbackground-color: "+d.annotationRuler+";");j.push("}");j.push("."+b+" .annotationLine.currentLine {");j.push("\tbackground-color: "+d.currentLine+";");j.push("}");var k=this._styler;k.getClassNameForToken&&(e("keyword","keyword"),e("string","string"),e("singleLineComment","comment"),e("multiLineComment","comment"),e("docComment","comment"),e("docHtmlComment",
"comment"));return j.join("\n")},_onStorage:function(a){a.key===this.storageKey&&this._updateStylesheet(this.preferences)},_updateStylesheet:function(a,b){var e,d=this;a.getPreferences("/settings",2).then(function(a){if(a.get("JavaScript Editor")!==void 0&&(e=JSON.parse(a.get("JavaScript Editor")))){if(d._stylesheet)d._stylesheet.parentNode.removeChild(d._stylesheet),d._stylesheet=null;a=d._stylesheet=document.createElement("STYLE");a.appendChild(document.createTextNode(d._styleSheet(e,"userTheme",
b)));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(a);var a=d._view,c={themeClass:null};a.getOptions(c);var k=c.themeClass;k?((k=k.replace("userTheme",""))&&(k+=" "),k+="userTheme"):k="userTheme";c.themeClass=k;a.setOptions(c);a.update(!0)}})}};return{TextStylerOptions:d}});
define("orion/highlight",["dojo","examples/textview/textStyler","orion/editor/textMateStyler","orion/editor/asyncStyler","examples/textview/textStylerOptions"],function(b,d,a,c,f){function e(e,h,k,l,m,n,o){function q(a,c){var e=a.getProperty("contentType"),f=a.getProperty("fileTypes");if(e)return h.isSomeExtensionOf(k,e).then(function(b){return b?a:null});else if(c&&f&&f.indexOf(c)!==-1)return e=new b.Deferred,e.callback(a),e;return null}var p=function(a){var b=null;switch(a&&a.id){case "application/javascript":case "application/json":b=
new d.TextStyler(l,"js",m);break;case "text/x-java-source":b=new d.TextStyler(l,"java",m);break;case "text/css":b=new d.TextStyler(l,"css",m)}b&&new f.TextStylerOptions(b);return b}(k);if(p)return n=new b.Deferred,n.callback(p),n;for(var p=n&&n.split(".").pop().toLowerCase(),n=e.getServiceReferences("orion.edit.highlighter"),r=[],s=[],x=0;x<n.length;x++){var v=n[x];v.getProperty("type")==="grammar"&&r.push(v.getProperty("grammar"));(v=q(v,p))&&s.push(v)}return(new b.DeferredList(s)).then(function(b){for(var f,
d=b.length-1;d>=0;d--){var h=b[d][1];if(h&&(o||h.getProperty("type")!=="highlighter")){f=h;break}}var j;if(f)if(b=f.getProperty("type"),b==="highlighter")j=new c.AsyncStyler(l,e,m),j.setContentType(k);else if(b==="grammar"||typeof b==="undefined")f=f.getProperty("grammar"),j=new a.TextMateStyler(l,f,r);return j})}function h(a){this.serviceRegistry=a;this.styler=null}h.prototype={setup:function(a,b,c,f,d){d=typeof d==="undefined"?!0:d;if(this.styler)this.styler.destroy&&this.styler.destroy(),this.styler=
null;var h=this;return e(this.serviceRegistry,this.serviceRegistry.getService("orion.core.contenttypes"),a,b,c,f,d).then(function(a){return h.styler=a})},getStyler:function(){return this.styler}};return{createStyler:e,SyntaxHighlighter:h}});
define("orion/compare/diffTreeNavigator",["orion/treeModelIterator","orion/compare/compareUtils","orion/textview/annotations","orion/compare/jsdiffAdapter"],function(b,d,a,c){var f={},e,h,g,j,k,l,m,n,o,q,p,r,s,x,v,w;f.DiffTreeNavigator=function(){function f(a,b,c,e,d,g){this._root={type:"root",children:[]};this._initialized=!1;this.initAll(a,b,c,e,d,g)}e="orion.annotation.diff.addedBlock";h="orion.annotation.diff.currentAddedBlock";g="orion.annotation.diff.deletedBlock";j="orion.annotation.diff.currentDeletedBlock";
k="orion.annotation.diff.blockTop";l="orion.annotation.diff.currentBlockTop";m="orion.annotation.diff.blockConflict";n="orion.annotation.diff.currentBlockConflict";o="orion.annotation.diff.addedWord";q="orion.annotation.diff.currentAddedWord";p="orion.annotation.diff.deletedWord";r="orion.annotation.diff.currentDeletedWord";s="orion.annotation.diff.emptyDeletedWordLeft";x="orion.annotation.diff.emptyDeletedWordRight";v="orion.annotation.diff.emptyAddedWordLeft";w="orion.annotation.diff.emptyAddedWordRight";
a.AnnotationType.registerType(e,{title:"",html:"",lineStyle:{styleClass:"annotationLine addedBlockDiff"}});a.AnnotationType.registerType(h,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentAddedBlockDiff"}});a.AnnotationType.registerType(g,{title:"",html:"",lineStyle:{styleClass:"annotationLine deletedBlockDiff"}});a.AnnotationType.registerType(j,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentDeletedBlockDiff"}});a.AnnotationType.registerType(k,{title:"",html:"",lineStyle:{styleClass:"annotationLine blockDiffTopOnly"}});
a.AnnotationType.registerType(l,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentBlockDiffTopOnly"}});a.AnnotationType.registerType(m,{title:"",html:"",lineStyle:{styleClass:"annotationLine blockDiffConflict"}});a.AnnotationType.registerType(n,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentBlockDiffConflict"}});a.AnnotationType.registerType(o,{title:"word added",html:"",rangeStyle:{styleClass:"annotationRange addedWordDiff"}});a.AnnotationType.registerType(q,{title:"",
html:"",rangeStyle:{styleClass:"annotationRange currentAddedWordDiff"}});a.AnnotationType.registerType(p,{title:"word deleted",html:"",rangeStyle:{styleClass:"annotationRange deletedWordDiff"}});a.AnnotationType.registerType(r,{title:"",html:"",rangeStyle:{styleClass:"annotationRange currentDeletedWordDiff"}});a.AnnotationType.registerType(s,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyDeletedWordDiffLeft"}});a.AnnotationType.registerType(x,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyDeletedWordDiffRight"}});
a.AnnotationType.registerType(v,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyAddedWordDiffLeft"}});a.AnnotationType.registerType(w,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyAddedWordDiffRight"}});f.prototype={initAll:function(a,b,c,e,f,d,g){this._charOrWordDiff=a?a:"word";if(b)this._initialized=!0;this.editorWrapper=[{editor:b,diffFeeder:e},{editor:c,diffFeeder:f}];this._curveRuler=g;(this._overviewRuler=d)&&this._overviewRuler.setDiffNavigator(this)},initMapper:function(a){if(a)for(var b=
0;b<this.editorWrapper.length;b++)this.editorWrapper[b].diffFeeder.init(this.editorWrapper[b].editor.getTextView().getModel(),a)},destroy:function(){this.initAll(this._charOrWordDiff)},renderAnnotations:function(){for(var a=0;a<this.editorWrapper.length;a++){this.editorWrapper[a].annoTypes=[];this.editorWrapper[a].diffFeeder.getBlockAnnoTypes(this.editorWrapper[a].annoTypes);this.editorWrapper[a].diffFeeder.getWordAnnoTypes(this.editorWrapper[a].annoTypes);for(var e=0;e<this.editorWrapper[a].annoTypes.length;e++)this.editorWrapper[a].annoTypes[e].current&&
this.editorWrapper[a].editor.getAnnotationStyler().addAnnotationType(this.editorWrapper[a].annoTypes[e].current),this.editorWrapper[a].annoTypes[e].normal&&this.editorWrapper[a].editor.getAnnotationStyler().addAnnotationType(this.editorWrapper[a].annoTypes[e].normal)}this._root.children=[];e=this.editorWrapper[0].diffFeeder.getDiffBlocks();if(!e||e.length===0)this.replaceAllAnnotations(!0,0,"block",!1,[]),this.replaceAllAnnotations(!0,1,"block",!1,[]),this.replaceAllAnnotations(!0,0,"word",!1,[]),
this.replaceAllAnnotations(!0,1,"word",!1,[]),this.replaceAllAnnotations(!0,0,"block",!0,[]),this.replaceAllAnnotations(!0,1,"block",!0,[]),this.replaceAllAnnotations(!0,0,"word",!0,[]),this.replaceAllAnnotations(!0,1,"word",!0,[]);else{for(var f=new c.JSDiffAdapter,a=0;a<e.length;a++){var d=this.generatePairBlockAnnotations(this._root,a);this._root.children.push(d);var g=this.generatePairWordAnnotations(d,a,f);if(g)d.children=g}this.replaceAllAnnotations(!1,0,"block",!0);this.replaceAllAnnotations(!1,
1,"block",!0);this.replaceAllAnnotations(!1,0,"word",!0);this.replaceAllAnnotations(!1,1,"word",!0);this.iterator=new b.TreeModelIterator(this._root.children)}},replaceAllAnnotations:function(a,b,c,e,f){for(var d=0;d<this.editorWrapper[b].annoTypes.length;d++)this.editorWrapper[b].annoTypes[d].type===c&&this.replaceDiffAnnotations(this.editorWrapper[b].editor,f?f:this.editorWrapper[b].annoTypes[d].list,e?this.editorWrapper[b].annoTypes[d].normal:this.editorWrapper[b].annoTypes[d].current,a)},getMapper:function(){return this.editorWrapper[0].diffFeeder.getMapper()},
getFeeder:function(a){return a?this.editorWrapper[1].diffFeeder:this.editorWrapper[0].diffFeeder},iterateOnBlock:function(a,b){this.iterator&&(this.iterator.iterateOnTop(a,b),this.updateCurrentAnnotation(!0))},iterateOnChange:function(a){if(this.iterator){this.iterator.iterate(a);var b=this.iterator.cursor();b.type==="block"&&b.children&&b.children.length>0&&this.iterator.iterate(a);this.updateCurrentAnnotation(!0)}},gotoBlock:function(a,b){if(this.iterator){if(a<0||a>=this._root.children.length||
this._root.children.length===0)a=0;b!==void 0&&b>=0&&this._root.children[a].children&&b<this._root.children[a].children.length?this.iterator.setCursor(this._root.children[a].children[b]):this.iterator.setCursor(this._root.children[a]);this.updateCurrentAnnotation(!1);this._positionDiffBlock()}},_hitDiffAnnotation:function(a,b,c){if(c===this.editorWrapper[a].editor.getTextView()){for(var e=0;e<this._root.children.length;e++){var c=this._root.children[e],f=a===0?c.oldA:c.newA;if(b>=f.start&&b<=f.end){e=
c;if(c.children&&c.children.length>0)for(f=0;f<c.children.length;f++){var d=c.children[f],g=a===0?d.oldA:d.newA;if(b>=g.start&&b<=g.end){e=d;break}}return e}}return null}},gotoChange:function(a,b){for(var c=0;c<this.editorWrapper.length;c++){var e=this._hitDiffAnnotation(c,a,b);if(e)return this.iterator.setCursor(e),this.updateCurrentAnnotation(!1,b),!0}return!1},getCurrentBlockIndex:function(){if(!this.iterator)return-1;var a=this.iterator.cursor();return!a?-1:a.type==="block"?a.index:a.parent.index},
getCurrentPosition:function(){if(!this.iterator)return{};var a=this.iterator.cursor();return a.type==="block"?{block:a.index+1}:{block:a.parent.index+1,change:a.index+1}},getCurrentMapperIndex:function(){var a=this.getCurrentBlockIndex();a<0&&(a=0);return this.getFeeder().getDiffBlocks().length===0?-1:this.getFeeder().getDiffBlocks()[a][1]},replaceDiffAnnotations:function(a,b,c,e){if(b&&c&&(a=a.getAnnotationModel())){for(var f=a.getAnnotations(0,a.getTextModel().getCharCount()),d=[];e&&f.hasNext();){var g=
f.next();g.type===c&&d.push(g)}a.replaceAnnotations(d,b)}},updateCurrentAnnotation:function(b,c){this.replaceAllAnnotations(!0,0,"block",!1,[]);this.replaceAllAnnotations(!0,1,"block",!1,[]);this.replaceAllAnnotations(!0,0,"word",!1,[]);this.replaceAllAnnotations(!0,1,"word",!1,[]);if(this.iterator){var e=this.iterator.cursor();if(e){var f,d,g={start:e.oldA.start,end:e.oldA.end},h={start:e.newA.start,end:e.newA.end};e.type==="word"?(f=this.editorWrapper[0].diffFeeder.getCurrentWordAnnoType(g,this.editorWrapper[0].editor.getTextView().getModel()),
d=this.editorWrapper[1].diffFeeder.getCurrentWordAnnoType(h,this.editorWrapper[1].editor.getTextView().getModel())):(f=this.editorWrapper[0].diffFeeder.getCurrentBlockAnnoType(e.index),d=this.editorWrapper[1].diffFeeder.getCurrentBlockAnnoType(e.index));this.replaceDiffAnnotations(this.editorWrapper[0].editor,[new (a.AnnotationType.getType(f.current))(g.start,g.end)],f,!0);this.replaceDiffAnnotations(this.editorWrapper[1].editor,[new (a.AnnotationType.getType(d.current))(h.start,h.end)],d,!0);if(b)this.autoSelecting=
!0,this.editorWrapper[0].editor.setSelection(e.oldA.start,e.oldA.end,!0),this.editorWrapper[1].editor.setSelection(e.newA.start,e.newA.end,!0),this.autoSelecting=!1;else if(c)this.autoSelecting=!0,c!==this.editorWrapper[0].editor.getTextView()&&this.editorWrapper[0].editor.setSelection(e.oldA.start,e.oldA.end,!0),c!==this.editorWrapper[1].editor.getTextView()&&this.editorWrapper[1].editor.setSelection(e.newA.start,e.newA.end,!0),this.autoSelecting=!1}}},generatePairBlockAnnotations:function(a,b){var c=
this.generateBlockDiffAnnotations(0,b),e=this.generateBlockDiffAnnotations(1,b);return{parent:a,index:b,type:"block",oldA:c,newA:e}},generatePairWordAnnotations:function(a,b,c){var e=this.editorWrapper[0].diffFeeder.getTextOnBlock(b),f=this.editorWrapper[1].diffFeeder.getTextOnBlock(b),b=null,d=0,g=0;if(e&&f)b=c.adaptCharDiff(e.text,f.text,this._charOrWordDiff==="word"),g=f.start,d=e.start;else return null;c=[];e=[];this.generateWordDiffAnnotations(0,c,d,b,2,3);this.generateWordDiffAnnotations(1,
e,g,b,0,1);b=[];for(d=0;d<c.length;d++)b.push({parent:a,index:d,type:"word",oldA:c[d],newA:e[d]});return b},getAnnoModelList:function(a,b,c){for(var e=0;e<this.editorWrapper[a].annoTypes.length;e++)if(this.editorWrapper[a].annoTypes[e].type===b&&this.editorWrapper[a].annoTypes[e].normal===c)return this.editorWrapper[a].annoTypes[e].list;return null},generateBlockDiffAnnotations:function(b,c){var e=this.editorWrapper[b].diffFeeder.getCurrentBlockAnnoType(c),f=this.getAnnoModelList(b,"block",e.normal),
d=this.editorWrapper[b].diffFeeder.getCharRange(c),e=a.AnnotationType.createAnnotation(e.normal,d.start,d.end);f&&f.push(e);return e},generateWordDiffAnnotations:function(b,c,e,f,d,g){if(f)for(var h=this.editorWrapper[b].diffFeeder.getCurrentWordAnnoType({start:-1,end:-1}),b=this.getAnnoModelList(b,"word",h.normal),j=0;j<f.length;j++){var k=a.AnnotationType.createAnnotation(h.normal,f[j][d]+e,f[j][g]+e);b.push(k);c.push(k)}},_updateOverviewRuler:function(){if(this._overviewRuler){var a=this.editorWrapper[0].editor.getTextView().getTopIndex();
this.editorWrapper[0].editor.getTextView().redrawLines(a,a+1,this._overviewRuler)}},_updateCurveRuler:function(){this._curveRuler&&this._curveRuler.render()},_setTextViewPosition:function(a,b){var c=a.getLineHeight(),e=a.getClientArea(),c=Math.floor(e.height/c/3);a.setTopIndex(b-c>0?b-c:0)},_positionDiffBlock:function(){var a=this.getCurrentBlockIndex(),b=this.getFeeder().getDiffBlocks();b.length!==0&&(this._setTextViewPosition(this.editorWrapper[0].editor.getTextView(),b[a][0]),this.editorWrapper[0].editor!==
this.editorWrapper[1].editor&&(a=d.lookUpLineIndex(this.getMapper(),0,b[a][1]),this._setTextViewPosition(this.editorWrapper[1].editor.getTextView(),a)),this._updateOverviewRuler(),this._updateCurveRuler())},matchPositionFromOverview:function(a){this._initialized&&this.gotoBlock(a<0?0:d.getAnnotationIndex(this.getFeeder().getDiffBlocks(),a))},gotoDiff:function(a,b){this.gotoChange(a,b)&&(this._updateOverviewRuler(),this._updateCurveRuler())},nextDiff:function(){this.iterateOnBlock(!0,!0);this._positionDiffBlock()},
prevDiff:function(){this.iterateOnBlock(!1,!0);this._positionDiffBlock()},nextChange:function(){this.iterateOnChange(!0);this._positionDiffBlock()},prevChange:function(){this.iterateOnChange(!1);this._positionDiffBlock()}};return f}();f.DiffBlockFeeder=function(){function a(){}a.prototype={getWordAnnoTypes:function(a){this._mapperColumnIndex===0?a.push({type:"word",current:q,normal:o,list:[]}):a.push({type:"word",current:r,normal:p,list:[]});a.push({type:"word",current:s});a.push({type:"word",current:x});
a.push({type:"word",current:v});a.push({type:"word",current:w})},getCurrentWordAnnoType:function(a,b){return a.start===a.end&&b?this._mapperColumnIndex===0?{current:this._repositionEmptyWord(a,b),normal:o}:{current:this._repositionEmptyWord(a,b),normal:p}:this._mapperColumnIndex===0?{current:q,normal:o}:{current:r,normal:p}},_repositionEmptyWord:function(a,b){var c=b.getLineAtOffset(a.start),e=b.getLineStart(c),f=b.getLineEnd(c);if(e!==f){if(a.start===f)return a.start--,this._mapperColumnIndex===
0?w:x;a.end++}else if(c>0&&(c--,e=b.getLineStart(c),f=b.getLineEnd(c),e!==f))return a.start=f-1,a.end=f,this._mapperColumnIndex===0?w:x;return this._mapperColumnIndex===0?v:s},getMapper:function(){return this._mapper},getDiffBlocks:function(){return this._diffBlocks},getDiffBlockH:function(a){if(!this._diffBlocks)return-1;a=this._diffBlocks[a][1];return a===-1?0:this._mapper[a][this._mapperColumnIndex]},getOverviewLineCount:function(){return this._textModel.getLineCount()},getLineNumber:function(a){return a},
getCharRange:function(a){var b=this._diffBlocks[a][0],c=b+this._mapper[this._diffBlocks[a][1]][this._mapperColumnIndex]-1,a=this._textModel.getLineStart(b);if(c<b)return{start:a,end:a};b=this._textModel.getLineEnd(c,!0);return{start:a,end:b}},getTextOnBlock:function(a){a=this.getCharRange(a);return{start:a.start,text:this._textModel.getText(a.start,a.end)}},isMapperEmpty:function(){return this._mapper.length===0}};return a}();f.TwoWayDiffBlockFeeder=function(){function a(b,c,e){this._mapperColumnIndex=
e;this.init(b,c)}a.prototype=new f.DiffBlockFeeder;a.prototype.init=function(a,b){this._textModel=a;this._diffBlocks=void 0;if(b){this._mapper=b;this._diffBlocks=[];for(var c=0,e=0;e<this._mapper.length;e++)this._mapper[e][2]!==0&&this._diffBlocks.push([c,e]),c+=this._mapper[e][this._mapperColumnIndex]}};a.prototype.getBlockAnnoTypes=function(a){this._mapperColumnIndex===0?a.push({type:"block",normal:e,current:h,list:[]}):a.push({type:"block",normal:g,current:j,list:[]});a.push({type:"block",normal:k,
current:l,list:[]});a.push({type:"block",normal:m,current:n,list:[]})};a.prototype.getCurrentBlockAnnoType=function(a){a=this._diffBlocks[a][1];if(this._mapper[a][this._mapperColumnIndex]===0)return{normal:k,current:l};else if(d.isMapperConflict(this.getMapper(),a))return{normal:m,current:n};else if(this._mapperColumnIndex===0)return{type:"block",normal:e,current:h,list:[]};return{type:"block",normal:g,current:j,list:[]}};return a}();f.inlineDiffBlockFeeder=function(){function a(b,c){this._mapperColumnIndex=
c;this.init(b)}a.prototype=new f.DiffBlockFeeder;a.prototype.setModel=function(a){this._textModel=a};a.prototype.init=function(a){this._diffBlocks=void 0;if(a){this._mapper=a;this._diffBlocks=[];this._gapBlocks=[];for(var b=a=0,c=0;c<this._mapper.length;c++){if(this._mapper[c][2]!==0){if(this._mapperColumnIndex===0){var e=a+this._mapper[c][1];this._diffBlocks.push([e,c]);this._gapBlocks.push([e,e+this._mapper[c][0],b])}else this._diffBlocks.push([a,c]),this._gapBlocks.push([a,a+this._mapper[c][1],
b]);a+=this._mapper[c][0]+this._mapper[c][1]}else this._gapBlocks.push([a,a+this._mapper[c][this._mapperColumnIndex],b]),a+=this._mapper[c][this._mapperColumnIndex];b+=this._mapper[c][this._mapperColumnIndex]}}};a.prototype.getBlockAnnoTypes=function(a){this._mapperColumnIndex===0?a.push({type:"block",normal:e,current:h,list:[]}):a.push({type:"block",normal:g,current:j,list:[]});a.push({type:"block",normal:m,current:n,list:[]})};a.prototype.getCurrentBlockAnnoType=function(a){a=this._diffBlocks[a][1];
if(this._mapper[a][this._mapperColumnIndex]===0)return{current:q,normal:o};else if(d.isMapperConflict(this.getMapper(),a))return{normal:m,current:n};else if(this._mapperColumnIndex===0)return{type:"block",normal:e,current:h,list:[]};return{type:"block",normal:g,current:j,list:[]}};a.prototype.getDiffBlockH=function(a){if(!this._diffBlocks)return-1;a=this._diffBlocks[a][1];return this._mapper[a][0]+this._mapper[a][1]};a.prototype.getLineNumber=function(a){for(var b=0;b<this._gapBlocks.length;b++)if(this._gapBlocks[b][0]!==
this._gapBlocks[b][1]&&a>=this._gapBlocks[b][0]&&a<this._gapBlocks[b][1])return a-this._gapBlocks[b][0]+this._gapBlocks[b][2];return-1};return a}();return f});
define("orion/compare/compare-rulers",["orion/compare/compareUtils","orion/compare/diffTreeNavigator"],function(b){var d=d||{};d.CompareRuler=function(){function a(a,b,e){this._location=a||"left";this._overview=b||"page";this._rulerStyle=e;this._editor=null;var d=this;this._listener={onModelChanged:function(a){d._onModelChanged(a)}}}a.prototype={setView:function(a){this._onModelChanged&&this._editor&&this._editor.removeEventListener("ModelChanged",this._listener.onModelChanged);this._editor=a;this._onModelChanged&&
this._editor&&this._editor.addEventListener("ModelChanged",this._listener.onModelChanged)},getLocation:function(){return this._location},getOverview:function(){return this._overview},getAnnotationModel:function(){return null},addAnnotationType:function(){},isAnnotationTypeVisible:function(){return!1},removeAnnotationType:function(){},setAnnotationModel:function(){},getAnnotations:function(a,b){for(var e=[],d=a;d<b;d++){var g=this.getStyle(d);g&&(e[d]={html:this.getHTML(d),style:g})}return e},getWidestAnnotation:function(){return{html:this.getHTML(-1),
style:this.getStyle(-1)}},getRulerStyle:function(){return this.getStyle(void 0)}};return a}();d.LineNumberCompareRuler=function(){function a(a,b,e,h,g,j){d.CompareRuler.call(this,e,"page",h);this._diffNavigator=a;this._oddStyle=g||{style:{backgroundColor:"white"}};this._evenStyle=j||{style:{backgroundColor:"white"}};this._numOfDigits=0;this._mapperColumnIndex=b}a.prototype=new d.CompareRuler;a.prototype.getStyle=function(a){return a===void 0?this._rulerStyle:this._evenStyle};a.prototype.getHTML=function(a){var b=
this._editor.getModel(),e=this._diffNavigator.getFeeder(this._mapperColumnIndex===0);return!e?"":a===-1?b.getLineCount():e.getLineNumber?(a=e.getLineNumber(a),a===-1?"":a+1):a+1};a.prototype._onModelChanged=function(a){var a=a.start,b=this._editor.getModel(),e=b.getLineCount(),d=(e+"").length;if(this._numOfDigits!==d)this._numOfDigits=d,this._editor.redrawLines(b.getLineAtOffset(a),e,this)};return a}();d.CompareOverviewRuler=function(){function a(a,b,e,h){this._diffNavigator=e;this._onClick=h;d.CompareRuler.call(this,
a,"document",b)}a.prototype=new d.CompareRuler;a.prototype.getStyle=function(a){var f,e;if(a===void 0)f=this._rulerStyle||{},e=f.style||(f.style={}),e.lineHeight="1px",e.fontSize="1px",e.width="14px";else if(f=a!==-1?{styleClass:"annotationOverview breakpoint"}:{},e=f.style||(f.style={}),e.cursor="pointer",e.width="8px",e.left="2px",this._editor.getModel(),a>=0){var d;if(this._diffNavigator&&this._diffNavigator.getFeeder())d=this._diffNavigator.getFeeder().getDiffBlocks();else return null;a=b.getAnnotationIndex(d,
a);if(a===-1)return null;d=b.getAnnotationMapperIndex(d,a);var g;g=this._diffNavigator.getMapper();if(d=b.isMapperConflict(g,d))e.border="1px #FF0000 solid";if(a===this._diffNavigator.getCurrentBlockIndex())e.backgroundColor=d?"red":"blue";a=this._diffNavigator.getFeeder().getDiffBlockH(a);d=this._diffNavigator.getFeeder().getOverviewLineCount();if(a<0)return null;g=this._editor.getClientArea();a=Math.floor(g.height*a/d);a<2&&(a=2);e.height=a+"px"}else return e.height="3px";return f};a.prototype.setDiffNavigator=
function(a){this._diffNavigator=a};a.prototype.getHTML=function(){return"&nbsp;"};a.prototype.onClick=function(a){a!==void 0&&this._onClick(a,this)};a.prototype._onModelChanged=function(){this._editor.getModel().getLineCount()>0&&this._editor.redrawLines(0,1,this)};return a}();d.CompareCurveRuler=function(){function a(a){this._canvasDiv=a;this._mapper=void 0;this._initialized=!1}a.prototype={init:function(a,b,e,d){this._initing=this._initialized=!0;this._mapper=a;this._leftEditor=b;this._rightEditor=
e;this._leftTextView=b.getTextView();this._rightTextView=e.getTextView();this._diffNavigator=d;this.render()},matchPositionFrom:function(a){var f=a?this._leftTextView:this._rightTextView,e=a?this._rightTextView:this._leftTextView,d=f.getTopIndex(),f=f.getBottomIndex(),a=b.matchMapper(this._mapper,a?0:1,d,f);e.setTopIndex(a)},copyToLeft:function(){if(this._diffNavigator.iterator){var a=this._diffNavigator.iterator.cursor();a&&this._leftTextView.setText(this._rightTextView.getText(a.oldA.start,a.oldA.end),
a.newA.start,a.newA.end)}},render:function(){if(this._mapper){var a=this._canvasDiv.getContext("2d");a.clearRect(0,0,this._canvasDiv.width,this._canvasDiv.height);a.strokeStyle="#AAAAAA";a.lineWidth=1;a.beginPath();var f=this._leftTextView.getTopIndex(),e=this._leftTextView.getBottomIndex(),d=this._rightTextView.getTopIndex(),g=this._rightTextView.getBottomIndex();this._leftLineH=this._leftTextView.getLineHeight();this._rightLineH=this._rightTextView.getLineHeight();for(var j=0,k=0,l=!1,m=0;m<this._mapper.length;m++){if(this._mapper[m][2]!==
0)if(b.overlapMapper(this._mapper[m],0,j,f,e)||b.overlapMapper(this._mapper[m],1,k,d,g))this._renderCurve(m,j,k,this._canvasDiv,a,f,e,d,g),l=!0;else if(l)break;j+=this._mapper[m][0];k+=this._mapper[m][1]}a.stroke()}},_renderCurve:function(a,b,e,d,g){var j=this._mapper[a],b=this._leftTextView.getLinePixel(b+j[0]/2)+j[0]%2*this._leftLineH/3-this._leftTextView.getTopPixel(),e=this._rightTextView.getLinePixel(e+j[1]/2)+j[1]%2*this._rightLineH/3-this._rightTextView.getTopPixel(),d=d.parentNode.clientWidth;
a===this._diffNavigator.getCurrentMapperIndex()?(g.stroke(),g.strokeStyle="#000",g.lineWidth=1,g.beginPath(),g.moveTo(0,b),g.bezierCurveTo(d/3,b,d*0.666,e,d,e),g.stroke(),g.strokeStyle="#AAAAAA",g.lineWidth=1,g.beginPath()):(g.moveTo(0,b),g.bezierCurveTo(d/3,b,d*0.666,e,d,e),g.stroke())},onChanged:function(a){if(a.removedLineCount!==a.addedLineCount)this._initing||b.updateMapper(this._mapper,0,this._leftTextView.getModel().getLineAtOffset(a.start),a.removedLineCount,a.addedLineCount),this._initing=
!1,(a.removedLineCount>0||a.addedLineCount>0)&&this.render()}};return a}();return d});
define("dojo/date",["dojo"],function(b){b.getObject("date",!0,b);b.date.getDaysInMonth=function(d){var a=d.getMonth(),c=[31,28,31,30,31,30,31,31,30,31,30,31];return a==1&&b.date.isLeapYear(d)?29:c[a]};b.date.isLeapYear=function(b){b=b.getFullYear();return!(b%400)||!(b%4)&&!!(b%100)};b.date.getTimezoneName=function(b){var a=b.toString(),c="",f=a.indexOf("(");if(f>-1)c=a.substring(++f,a.indexOf(")"));else if(f=/([A-Z\/]+) \d{4}$/,a=a.match(f))c=a[1];else if(a=b.toLocaleString(),f=/ ([A-Z\/]+)$/,a=a.match(f))c=
a[1];return c=="AM"||c=="PM"?"":c};b.date.compare=function(b,a,c){b=new Date(+b);a=new Date(+(a||new Date));c=="date"?(b.setHours(0,0,0,0),a.setHours(0,0,0,0)):c=="time"&&(b.setFullYear(0,0,0),a.setFullYear(0,0,0));return b>a?1:b<a?-1:0};b.date.add=function(b,a,c){var f=new Date(+b),e=!1,h="Date";switch(a){case "day":break;case "weekday":var g;(a=c%5)?g=parseInt(c/5):(a=c>0?5:-5,g=c>0?(c-5)/5:(c+5)/5);var j=b.getDay(),k=0;j==6&&c>0?k=1:j==0&&c<0&&(k=-1);j+=a;if(j==0||j==6)k=c>0?2:-2;c=7*g+a+k;break;
case "year":h="FullYear";e=!0;break;case "week":c*=7;break;case "quarter":c*=3;case "month":e=!0;h="Month";break;default:h="UTC"+a.charAt(0).toUpperCase()+a.substring(1)+"s"}if(h)f["set"+h](f["get"+h]()+c);e&&f.getDate()<b.getDate()&&f.setDate(0);return f};b.date.difference=function(d,a,c){var a=a||new Date,c=c||"day",f=a.getFullYear()-d.getFullYear(),e=1;switch(c){case "quarter":d=d.getMonth();a=a.getMonth();d=Math.floor(d/3)+1;a=Math.floor(a/3)+1;a+=f*4;e=a-d;break;case "weekday":f=Math.round(b.date.difference(d,
a,"day"));c=parseInt(b.date.difference(d,a,"week"));if(f%7==0)f=c*5;else{var e=0,h=d.getDay(),g=a.getDay(),c=parseInt(f/7),a=f%7,d=new Date(d);d.setDate(d.getDate()+c*7);d=d.getDay();if(f>0)switch(!0){case h==6:e=-1;break;case h==0:e=0;break;case g==6:e=-1;break;case g==0:e=-2;break;case d+a>5:e=-2}else if(f<0)switch(!0){case h==6:e=0;break;case h==0:e=1;break;case g==6:e=2;break;case g==0:e=1;break;case d+a<0:e=2}f+=e;f-=c*2}e=f;break;case "year":e=f;break;case "month":e=a.getMonth()-d.getMonth()+
f*12;break;case "week":e=parseInt(b.date.difference(d,a,"day")/7);break;case "day":e/=24;case "hour":e/=60;case "minute":e/=60;case "second":e/=1E3;case "millisecond":e*=a.getTime()-d.getTime()}return Math.round(e)};return b.date});
define("dojo/cldr/supplemental",["dojo","dojo/i18n"],function(b){b.getObject("cldr.supplemental",!0,b);b.cldr.supplemental.getFirstDayOfWeek=function(d){d={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,sy:6,tn:6,ye:6,ar:0,as:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,il:0,"in":0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mn:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,zw:0}[b.cldr.supplemental._region(d)];return d===void 0?
1:d};b.cldr.supplemental._region=function(d){var d=b.i18n.normalizeLocale(d),d=d.split("-"),a=d[1];a?a.length==4&&(a=d[2]):a={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[d[0]];return a};b.cldr.supplemental.getWeekend=function(d){var a=b.cldr.supplemental._region(d),d={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5}[a],a={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,
jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6}[a];d===void 0&&(d=6);a===void 0&&(a=0);return{start:d,end:a}};return b.cldr.supplemental});
define("dojo/cldr/nls/gregorian",{root:{"months-format-narrow":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"EEE, y-M-d","dateFormatItem-MMMEd":"E MMM d",eraNarrow:["BCE","CE"],"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y MMMM d","months-format-wide":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"dateTimeFormat-medium":"{1} {0}","dateFormatItem-EEEd":"d EEE",
"dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, y MMMM dd","dateFormatItem-Md":"M-d","dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","field-era":"Era","dateFormatItem-yM":"y-M","months-standAlone-wide":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"timeFormat-short":"HH:mm","quarters-format-wide":["Q1","Q2","Q3","Q4"],"timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"y MMM","dateFormatItem-yQ":"y Q","dateTimeFormats-appendItem-Era":"{0} {1}",
"field-hour":"Hour","months-format-abbr":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","dateFormatItem-H":"HH","months-standAlone-abbr":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["Q1","Q2","Q3","Q4"],"dateFormatItem-M":"L","days-standAlone-wide":"1,2,3,4,5,6,7".split(","),"timeFormat-medium":"HH:mm:ss",
"dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["BCE","CE"],"field-minute":"Minute","field-dayperiod":"Dayperiod","days-standAlone-abbr":"1,2,3,4,5,6,7".split(","),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"Yesterday","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"AM","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M-d","dateTimeFormat-full":"{1} {0}",
"field-day":"Day","days-format-wide":"1,2,3,4,5,6,7".split(","),"field-zone":"Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","months-standAlone-narrow":"1,2,3,4,5,6,7,8,9,10,11,12".split(","),"dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"1,2,3,4,5,6,7".split(","),eraNames:["BCE","CE"],"days-format-narrow":"1,2,3,4,5,6,7".split(","),"days-standAlone-narrow":"1,2,3,4,5,6,7".split(","),
"dateFormatItem-MMM":"LLL","field-month":"Month","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormat-short":"yyyy-MM-dd","field-second":"Second","dateFormatItem-yMMMEd":"EEE, y MMM d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Week","dateFormat-medium":"y MMM d","dayPeriods-format-narrow-pm":"PM","dateTimeFormat-short":"{1} {0}",
"dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a"},ar:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,"en-au":!0,"en-ca":!0,"en-gb":!0,es:!0,fi:!0,fr:!0,"fr-ch":!0,he:!0,hu:!0,it:!0,ja:!0,ko:!0,nb:!0,nl:!0,pl:!0,pt:!0,"pt-pt":!0,ro:!0,ru:!0,sk:!0,sl:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-hant":!0,"zh-hk":!0,"zh-tw":!0});
define("dojo/cldr/nls/en/gregorian",{"dateFormatItem-yM":"M/y","field-dayperiod":"AM/PM","dateFormatItem-yQ":"Q y","dayPeriods-format-wide-pm":"PM","field-minute":"Minute",eraNames:["Before Christ","Anno Domini"],"dateFormatItem-MMMEd":"E, MMM d","dateTimeFormat-full":"{1} {0}","field-day-relative+-1":"Yesterday","field-weekday":"Day of the Week","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-yQQQ":"QQQ y","days-standAlone-wide":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
"dateFormatItem-MMM":"LLL","months-standAlone-narrow":"J,F,M,A,M,J,J,A,S,O,N,D".split(","),"dateTimeFormat-short":"{1} {0}","field-era":"Era","field-hour":"Hour","dayPeriods-format-wide-am":"AM","dateTimeFormat-medium":"{1} {0}","dateFormatItem-y":"y","timeFormat-full":"h:mm:ss a zzzz","months-standAlone-abbr":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),"dateFormatItem-yMMM":"MMM y","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","days-standAlone-narrow":"S,M,T,W,T,F,S".split(","),
eraAbbr:["BC","AD"],"dateFormat-long":"MMMM d, y","timeFormat-medium":"h:mm:ss a","dateFormatItem-EEEd":"d EEE","field-zone":"Zone","dateFormatItem-Hm":"HH:mm","dateFormat-medium":"MMM d, y","dateFormatItem-Hms":"HH:mm:ss","quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-ms":"mm:ss","field-year":"Year","quarters-standAlone-narrow":["1","2","3","4"],"dateTimeFormat-long":"{1} {0}","field-week":"Week","months-standAlone-wide":"January,February,March,April,May,June,July,August,September,October,November,December".split(","),
"dateFormatItem-MMMd":"MMM d","timeFormat-long":"h:mm:ss a z","months-format-abbr":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),"dayPeriods-format-wide-noon":"noon","timeFormat-short":"h:mm a","field-month":"Month","quarters-format-abbr":["Q1","Q2","Q3","Q4"],"days-format-abbr":"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),"dateFormatItem-M":"L","days-format-narrow":"S,M,T,W,T,F,S".split(","),"field-second":"Second","field-day":"Day","dateFormatItem-MEd":"E, M/d","months-format-narrow":"J,F,M,A,M,J,J,A,S,O,N,D".split(","),
"dateFormatItem-hm":"h:mm a","days-standAlone-abbr":"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),"dateFormat-short":"M/d/yy","dateFormatItem-yMMMEd":"EEE, MMM d, y","dateFormat-full":"EEEE, MMMM d, y","dateFormatItem-Md":"M/d","dateFormatItem-yMEd":"EEE, M/d/y","months-format-wide":"January,February,March,April,May,June,July,August,September,October,November,December".split(","),"dateFormatItem-d":"d","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"days-format-wide":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
eraNarrow:["B","A"]});
define("dojo/date/locale","dojo,dojo/date,dojo/cldr/supplemental,dojo/regexp,dojo/string,dojo/i18n,i18n!dojo/cldr/nls/gregorian".split(","),function(b){b.getObject("date.locale",!0,b);(function(){function d(a,c,d,g){return g.replace(/([a-z])\1*/ig,function(j){var k,l,m=j.charAt(0),j=j.length,n=["abbr","wide","narrow"];switch(m){case "G":k=c[j<4?"eraAbbr":"eraNames"][a.getFullYear()<0?0:1];break;case "y":k=a.getFullYear();switch(j){case 1:break;case 2:if(!d.fullYear){k=String(k);k=k.substr(k.length-
2);break}default:l=!0}break;case "Q":case "q":k=Math.ceil((a.getMonth()+1)/3);l=!0;break;case "M":k=a.getMonth();j<3?(k+=1,l=!0):(m=["months-format",n[j-3]].join("-"),k=c[m][k]);break;case "w":k=b.date.locale._getWeekOfYear(a,0);l=!0;break;case "d":k=a.getDate();l=!0;break;case "D":k=b.date.locale._getDayOfYear(a);l=!0;break;case "E":k=a.getDay();j<3?(k+=1,l=!0):(m=["days-format",n[j-3]].join("-"),k=c[m][k]);break;case "a":k=a.getHours()<12?"am":"pm";k=d[k]||c["dayPeriods-format-wide-"+k];break;case "h":case "H":case "K":case "k":l=
a.getHours();switch(m){case "h":k=l%12||12;break;case "H":k=l;break;case "K":k=l%12;break;case "k":k=l||24}l=!0;break;case "m":k=a.getMinutes();l=!0;break;case "s":k=a.getSeconds();l=!0;break;case "S":k=Math.round(a.getMilliseconds()*Math.pow(10,j-3));l=!0;break;case "v":case "z":if(k=b.date.locale._getZone(a,!0,d))break;j=4;case "Z":k=b.date.locale._getZone(a,!1,d);k=[k<=0?"+":"-",b.string.pad(Math.floor(Math.abs(k)/60),2),b.string.pad(Math.abs(k)%60,2)];j==4&&(k.splice(0,0,"GMT"),k.splice(3,0,":"));
k=k.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+g);}l&&(k=b.string.pad(k,j));return k})}function a(a,c,d,g){var j=function(a){return a},c=c||j,d=d||j,g=g||j,k=a.match(/(''|[^'])+/g),l=a.charAt(0)=="'";b.forEach(k,function(a,b){a?(k[b]=(l?d:c)(a.replace(/''/g,"'")),l=!l):k[b]=""});return g(k.join(""))}function c(a,c,d,g){g=b.regexp.escapeString(g);d.strict||(g=g.replace(" a"," ?a"));return g.replace(/([a-z])\1*/ig,function(b){var g;g=b.charAt(0);var l=b.length,
m="",n="";d.strict?(l>1&&(m="0{"+(l-1)+"}"),l>2&&(n="0{"+(l-2)+"}")):(m="0?",n="0{0,2}");switch(g){case "y":g="\\d{2,4}";break;case "M":g=l>2?"\\S+?":"1[0-2]|"+m+"[1-9]";break;case "D":g="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+n+"[1-9][0-9]|"+m+"[1-9]";break;case "d":g="3[01]|[12]\\d|"+m+"[1-9]";break;case "w":g="[1-4][0-9]|5[0-3]|"+m+"[1-9]";break;case "E":g="\\S+";break;case "h":g="1[0-2]|"+m+"[1-9]";break;case "k":g="1[01]|"+m+"\\d";break;case "H":g="1\\d|2[0-3]|"+m+"\\d";break;case "K":g="1\\d|2[0-4]|"+
m+"[1-9]";break;case "m":case "s":g="[0-5]\\d";break;case "S":g="\\d{"+l+"}";break;case "a":l=d.am||c["dayPeriods-format-wide-am"];m=d.pm||c["dayPeriods-format-wide-pm"];g=l+"|"+m;d.strict||(l!=l.toLowerCase()&&(g+="|"+l.toLowerCase()),m!=m.toLowerCase()&&(g+="|"+m.toLowerCase()),g.indexOf(".")!=-1&&(g+="|"+g.replace(/\./g,"")));g=g.replace(/\./g,"\\.");break;default:g=".*"}a&&a.push(b);return"("+g+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}b.date.locale._getZone=function(a,c){return c?b.date.getTimezoneName(a):
a.getTimezoneOffset()};b.date.locale.format=function(c,e){var e=e||{},h=b.i18n.normalizeLocale(e.locale),g=e.formatLength||"short",h=b.date.locale._getGregorianBundle(h),j=[],k=b.hitch(this,d,c,h,e);if(e.selector=="year")return a(h["dateFormatItem-yyyy"]||"yyyy",k);var l;e.selector!="date"&&(l=e.timePattern||h["timeFormat-"+g])&&j.push(a(l,k));e.selector!="time"&&(l=e.datePattern||h["dateFormat-"+g])&&j.push(a(l,k));return j.length==1?j[0]:h["dateTimeFormat-"+g].replace(/\{(\d+)\}/g,function(a,b){return j[b]})};
b.date.locale.regexp=function(a){return b.date.locale._parseInfo(a).regexp};b.date.locale._parseInfo=function(f){var f=f||{},e=b.i18n.normalizeLocale(f.locale),e=b.date.locale._getGregorianBundle(e),d=f.formatLength||"short",g=f.datePattern||e["dateFormat-"+d],j=f.timePattern||e["timeFormat-"+d],d=f.selector=="date"?g:f.selector=="time"?j:e["dateTimeFormat-"+d].replace(/\{(\d+)\}/g,function(a,b){return[j,g][b]}),k=[];return{regexp:a(d,b.hitch(this,c,k,e,f)),tokens:k,bundle:e}};b.date.locale.parse=
function(a,c){var d=/[\u200E\u200F\u202A\u202E]/g,g=b.date.locale._parseInfo(c),j=g.tokens,k=g.bundle,d=RegExp("^"+g.regexp.replace(d,"")+"$",g.strict?"":"i").exec(a&&a.replace(d,""));if(!d)return null;var l=["abbr","wide","narrow"],m=[1970,0,1,0,0,0,0],n="",d=b.every(d,function(a,f){if(!f)return!0;var d=j[f-1],g=d.length;switch(d.charAt(0)){case "y":if(g!=2&&c.strict)m[0]=a;else if(a<100)a=Number(a),g=""+(new Date).getFullYear(),d=g.substring(0,2)*100,g=Math.min(Number(g.substring(2,4))+20,99),m[0]=
a<g?d+a:d-100+a;else{if(c.strict)return!1;m[0]=a}break;case "M":if(g>2){if(d=k["months-format-"+l[g-3]].concat(),c.strict||(a=a.replace(".","").toLowerCase(),d=b.map(d,function(a){return a.replace(".","").toLowerCase()})),a=b.indexOf(d,a),a==-1)return!1}else a--;m[1]=a;break;case "E":case "e":d=k["days-format-"+l[g-3]].concat();c.strict||(a=a.toLowerCase(),d=b.map(d,function(a){return a.toLowerCase()}));a=b.indexOf(d,a);if(a==-1)return!1;break;case "D":m[1]=0;case "d":m[2]=a;break;case "a":d=c.am||
k["dayPeriods-format-wide-am"];g=c.pm||k["dayPeriods-format-wide-pm"];if(!c.strict)var h=/\./g,a=a.replace(h,"").toLowerCase(),d=d.replace(h,"").toLowerCase(),g=g.replace(h,"").toLowerCase();if(c.strict&&a!=d&&a!=g)return!1;n=a==g?"p":a==d?"a":"";break;case "K":a==24&&(a=0);case "h":case "H":case "k":if(a>23)return!1;m[3]=a;break;case "m":m[4]=a;break;case "s":m[5]=a;break;case "S":m[6]=a}return!0}),g=+m[3];n==="p"&&g<12?m[3]=g+12:n==="a"&&g==12&&(m[3]=0);g=new Date(m[0],m[1],m[2],m[3],m[4],m[5],
m[6]);c.strict&&g.setFullYear(m[0]);var o=j.join(""),q=o.indexOf("d")!=-1,o=o.indexOf("M")!=-1;if(!d||o&&g.getMonth()>m[1]||q&&g.getDate()>m[2])return null;if(o&&g.getMonth()<m[1]||q&&g.getDate()<m[2])g=b.date.add(g,"hour",1);return g}})();(function(){var d=[];b.date.locale.addCustomFormats=function(a,b){d.push({pkg:a,name:b})};b.date.locale._getGregorianBundle=function(a){var c={};b.forEach(d,function(f){f=b.i18n.getLocalization(f.pkg,f.name,a);c=b.mixin(c,f)},this);return c}})();b.date.locale.addCustomFormats("dojo.cldr",
"gregorian");b.date.locale.getNames=function(d,a,c,f){var e,f=b.date.locale._getGregorianBundle(f),d=[d,c,a];c=="standAlone"&&(c=d.join("-"),e=f[c],e[0]==1&&(e=void 0));d[1]="format";return(e||f[d.join("-")]).concat()};b.date.locale.isWeekend=function(d,a){var c=b.cldr.supplemental.getWeekend(a),f=(d||new Date).getDay();c.end<c.start&&(c.end+=7,f<c.start&&(f+=7));return f>=c.start&&f<=c.end};b.date.locale._getDayOfYear=function(d){return b.date.difference(new Date(d.getFullYear(),0,1,d.getHours()),
d)+1};b.date.locale._getWeekOfYear=function(d,a){arguments.length==1&&(a=0);var c=(new Date(d.getFullYear(),0,1)).getDay(),f=Math.floor((b.date.locale._getDayOfYear(d)+(c-a+7)%7-1)/7);c==a&&f++;return f};return b.date.locale});
define("orion/git/widgets/CommitTooltipDialog","i18n!git/nls/gitmessages,require,dojo,dijit,dijit/TooltipDialog,dojo/date/locale".split(","),function(b,d,a,c){a.declare("orion.git.widgets.CommitTooltipDialog",[c.TooltipDialog],{widgetsInTemplate:!1,closable:!0,constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postCreate:function(){this.inherited(arguments);this.displayCommit(this.options.commit)},displayCommit:function(c){var e=a.create("div",{style:"padding:10px; max-width:520px"},
this.containerNode),d=c.Message.split(/(\r?\n|$)/)[0],g=a.create("a",{"class":"gitMainDescription",href:"/git/git-commit.html#"+c.Location+"?page=1&pageSize=1"},e);a.place(document.createTextNode(d),g);a.create("div",{style:"padding-top:15px"},e);g=a.create("div",{style:"display: inline-block; vertical-align:text-top;"},e);e=a.create("div",{style:"display: inline-block; vertical-align:text-top;"},e);if(c.AuthorImage)g=a.create("div",{"class":"git-author-icon-small"},g),d=new Image,d.src=c.AuthorImage,
d.name=c.AuthorName,d.width=35,d.height=35,a.place(d,g,"first");a.create("span",{"class":"gitSecondaryDescription"},e).textContent=a.string.substitute(b[" authored by ${0} {${1}) on ${2}"],[c.AuthorName,c.AuthorEmail,a.date.locale.format(new Date(c.Time),{formatLength:"short"})]);a.create("div",null,e);a.create("span",{"class":"gitSecondaryDescription"},e).textContent=a.string.substitute(b["committed by 0 (1)"],[c.CommitterName,c.CommitterEmail]);a.create("div",{style:"padding-top:15px"},e);a.create("span",
{"class":"gitSecondaryDescription"},e).textContent=b[" commit: "]+c.Name;if(c.Parents&&c.Parents.length>0)a.create("div",null,e),g=a.create("a",{"class":"gitSecondaryDescription",href:"/git/git-commit.html#"+c.Parents[0].Location+"?page=1&pageSize=1"},e),a.place(document.createTextNode(c.Parents[0].Name),g),d=a.create("span",{"class":"gitSecondaryDescription"},e),d.textContent=b["parent: "],a.place(g,d,"last");g=c.Tags&&c.Tags.length>0;if(c.Branches&&c.Branches.length>0){a.create("div",{style:"padding-top:15px"},
e);d=a.create("section",{style:"display: inline-block; vertical-align:text-top;"},e);a.create("span",{"class":"gitSecondaryDescription"},d).textContent=b["branches: "];for(var j=a.create("list",null,d),d=0;d<c.Branches.length;++d)a.create("span",{"class":"gitSecondaryDescription",style:"padding-left:10px;"},j).textContent=c.Branches[d].FullName}if(g){a.create("div",{style:"padding-top:15px"},e);e=a.create("section",{style:"display: inline-block; vertical-align:text-top;"},e);a.create("span",{"class":"gitSecondaryDescription"},
e).textContent=b["tags: "];e=a.create("list",null,e);for(d=0;d<c.Tags.length;++d)a.create("span",{"class":"gitSecondaryDescription",style:"padding-left:10px;"},e).textContent=c.Tags[d].Name}},_onBlur:function(){this.inherited(arguments);c.popup.hide&&c.popup.hide(this);c.popup.close(this)}})});
define("orion/git/gitPreferenceStorage",["orion/Deferred"],function(b){function d(a){this._prefix="/git/credentials";this._preferenceService=a.getService("orion.core.preference")}d.prototype={put:function(a,c){var f={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""};if(c!==void 0){if(c.gitSshUsername!==void 0&&c.gitSshUsername!==null)f.gitSshUsername=c.gitSshUsername;if(c.gitSshPassword!==void 0&&c.gitSshPassword!==null)f.gitSshPassword=c.gitSshPassword;if(c.gitPrivateKey!==void 0&&
c.gitPrivateKey!==null)f.gitPrivateKey=c.gitPrivateKey;if(c.gitPassphrase!==void 0&&c.gitPassphrase!==null)f.gitPassphrase=c.gitPassphrase}var e=new b;this._preferenceService.getPreferences(this._prefix,2).then(function(b){var c=b.get("settings");c===void 0?e.reject():c.enabled?(b.put(a,f),e.resolve()):e.reject()});return e},get:function(a){var c={gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""},f=new b;this._preferenceService.getPreferences(this._prefix,2).then(function(b){var d=
b.get("settings");d===void 0?f.reject():d.enabled?(b=b.get(a),b!==void 0?f.resolve(b):f.resolve(c)):f.reject()});return f},isEnabled:function(){var a=new b;this._preferenceService.getPreferences(this._prefix,2).then(function(b){b=b.get("settings");b===void 0?a.resolve(!1):a.resolve(b.enabled)});return a},enable:function(){var a=new b;this._preferenceService.getPreferences(this._prefix,2).then(function(b){b.put("settings",{enabled:!0});a.resolve()});return a},disable:function(){var a=new b;this._preferenceService.getPreferences(this._prefix,
2).then(function(b){b.put("settings",{enabled:!1});a.resolve()});return a},remove:function(a){var c=new b;this._preferenceService.getPreferences(this._prefix,2).then(function(b){b.remove(a);c.resolve()});return c},getRepositories:function(){var a=new b;this._preferenceService.getPreferences(this._prefix,2).then(function(b){for(var f=[],b=b.keys(),e=0;e<b.length;++e)b[e]!=="settings"&&f.push(b[e]);a.resolve(f)});return a}};return d.prototype.constructor=d});
define("text!orion/widgets/templates/DirectoryPrompterDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\t\t\t<div style="display: table">\n\t\t\t\t<div style="display: table-row" dojoAttachPoint="messageCell">\n\t\t\t\t\t<div style="display: table-cell;"><div style="width: 25em; padding-bottom: 5px;">${message}</div></div>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-row"> \n\t\t\t\t\t<div dojoAttachPoint="browseDirectoryExplorerTree" class="explorerTreeClass" id="${id}_browseDirectoryExplorerTree" style="width:25em; min-height: 25em; max-height:30em; height: auto; overflow-y: auto;"></div> \n\t\t\t\t</div> \n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t<button dojoAttachPoint="directoryBrowserButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">${buttonOk}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div> <\!-- end table --\>\n\t</div> <\!-- content pane --\>\n</div>'});
define("text!orion/git/widgets/templates/CloneGitRepositoryDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\t\t\t\t<span dojoAttachPoint="Basic">\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<label dojoAttachPoint="gitUrlLabel" for="${id}_gitUrl" style="padding-right: 10">${gitUrlLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: right; float: right">\n\t\t\t\t\t\t<input dojoAttachPoint="gitUrl" id="${id}_gitUrl" style="display: inline-block; width: 100%;" value="">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; clear: both; text-align: right;">\n\t\t\t\t\t\t<a dojoAttachPoint="advancedLink" href="javascript:">${gitTargetLocationText}</a>\n\t\t\t\t\t\t<a dojoAttachPoint="advancedLinkHide" href="javascript:" style="display: none">${gitDefaultTargetLocationText}</a>\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t\t<span dojoAttachPoint="Advanced" style="display: none;">\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<input dojoAttachPoint="isNewProject" type="radio" name="${id}_newExisting" checked value="new"/>\n\t\t\t\t\t\t<label dojoAttachPoint="gitNameLabel" for="${id}_gitName" style="padding-right: 10">${gitNameLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: right; float: right">\n\t\t\t\t\t\t<input dojoAttachPoint="gitName" id="${id}_gitName" style="display: inline-block; width: 100%;" value="">\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<div style="display: block; padding: 5; min-width: 120px; clear: both; float: left;">\n\t\t\t\t\t\t<input dojoAttachPoint="isExistingProject" type="radio" name="${id}_newExisting" value="existing"/>\n\t\t\t\t\t\t<label dojoAttachPoint="gitPathLabel" for="${id}_gitPath" style="padding-right: 10">${gitPathLabelText}</label>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: block; padding: 5; width: 40em; text-align: left; float: right;">\n\t\t\t\t\t\t\t<input dojoAttachPoint="gitPath" id="${id}_gitPath" type="hidden" value="">\n\t\t\t\t\t\t\t<div style="width: 30em; float: left" float="left" dojoAttachPoint="shownGitPath"></div>\n\t\t\t\t\t\t\t<div style="width: 10em; float: right; text-align: right"><a dojoAttachPoint="changeGitPath" href="javascript:">${gitChangeGitPathText}</a></div>\n\t\t\t\t\t</div>\n\t\t\t\t</span>\n\t\t\t\t<div style="display: block; padding: 5; clear: both; text-align: right">\n\t\t\t\t\t<button dojoAttachPoint="cloneItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/AddRemoteDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\t\t<div style="display: table">\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="gitRemoteLabel" for="${id}_gitRemote" style="padding-right: 10">${gitRemoteLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="gitRemote" id="${id}_gitRemote" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="gitRemoteURILabel" for="${id}_gitRemoteURI" style="padding-right: 10">${gitRemoteURILabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="gitRemoteURI" id="${id}_gitRemoteURI" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="cloneItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/AddRemoteDialog","i18n!git/nls/gitmessages,dojo,dijit,dijit/Dialog,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/AddRemoteDialog.html".split(","),function(b,d,a){d.declare("orion.git.widgets.AddRemoteDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:d.cache("orion","git/widgets/templates/AddRemoteDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title=b["Add Remote"];this.gitRemoteLabelText=b["Remote Name:"];this.gitRemoteURILabelText=b["Remote URI:"]},execute:function(){this.options.func&&this.options.func(this.gitRemote.value,this.gitRemoteURI.value);delete this.options.func}})});define("text!orion/git/widgets/templates/GitCredentialsDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\t\t<div style="display: none; padding-top: 10px; padding-bottom: 10px;" dojoAttachPoint="gitCredentialsLabel">Provide credentials for: <b dojoAttachPoint="url"></b></div>\n\t\t<div style="display: table">\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitSshUsernameRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t<label dojoAttachPoint="gitSshUsernameLabel" for="${id}_gitSshUsername" style="padding-right: 10">${gitSshUsernameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="gitSshUsername" id="${id}_gitSshUsername" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\t\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitSshPasswordRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="isSshPassword" type="radio" name="${id}_isSshPassword" checked value="password" style="width: 15px;"/>\n\t\t\t\t\t<label dojoAttachPoint="gitSshPasswordLabel" for="${id}_gitSshPassword" style="padding-right: 10">${gitSshPasswordLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input type="password" dojoAttachPoint="gitSshPassword" id="${id}_gitSshPassword" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPrivateKeyRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="isPrivateKey" type="radio" name="${id}_isSshPassword" value="privateKey" style="width: 15px;"/>\n\t\t\t\t\t<label dojoAttachPoint="gitPrivateKeyLabel" for="${id}_gitPrivateKey" style="padding-right: 10">${gitPrivateKeyLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<textarea dojoAttachPoint="gitPrivateKey" id="${id}_gitPrivateKey" style="display: inline-block; width: 98%;" value=""></textarea>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPrivateKeyFileRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="disply: table-cell; padding 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<label dojoAttachPoint="gitPrivateKeyFileLabel" for="${id}_gitPrivateKeyFile">${gitPrivateKeyFileLabelText}</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPrivateKeyFileRow_1">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input dojoAttachPoint="gitPrivateKeyFile" multiple="false" type="file" size="53" style="display: inline-block; width: 98%" id="${id}_gitPrivateKeyFile" label="Browse...">\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPassphraseRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<label dojoAttachPoint="gitPassphraseLabel" for="${id}_gitPassphrase">${gitPassphraseLabelText}</label>\n\t\t\t\t</div>\n\n\t\t\t</div>\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPassphraseRow_1">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<input type="password" dojoAttachPoint="gitPassphrase" id="${id}_gitPassphrase" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPause_1">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitSaveCredentialsRow">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t<img id="gitSaveCredentialsInfo" dojoAttachPoint="gitSaveCredentialsInfo" src="/images/info.gif" style="float: right; padding-right: 5px;">\n\t\t\t\t\t<input dojoAttachPoint="gitSaveCredentials" type="checkbox" style="float: right; padding-left: 15px;" name="${id}_gitSaveCredentials">\n\t\t\t\t\t<label dojoAttachPoint="gitSaveCredentialsLabel" for="gitSaveCredentials" style="float: right; padding-right: 15px;">${gitSaveCredentialsLabelText}</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row" dojoAttachPoint="gitPause_2">\n\t\t\t\t<div style="display: table-cell; padding: 5; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left; vertical-align: top;">\n\t\t\t\t\t&nbsp;\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="okButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">Ok\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/GitCredentialsDialog","i18n!git/nls/gitmessages,dojo,dijit,dijit/Tooltip,orion/git/gitPreferenceStorage,dijit/Dialog,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/GitCredentialsDialog.html".split(","),function(b,d,a,c,f){d.declare("orion.git.widgets.GitCredentialsDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:d.cache("orion","git/widgets/templates/GitCredentialsDialog.html"),constructor:function(){this.inherited(arguments);
this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||b["Git Credentials"];this.gitUrlLabelText=b["Repository URL:"];this.gitSshUsernameLabelText=b["Username:"];this.gitSshPasswordLabelText=b["Ssh password:"];this.gitPrivateKeyLabelText=b["Private key:"];this.gitPrivateKeyFileLabelText=b["Private key file (optional):"];this.gitSaveCredentialsLabelText=b["Don't prompt me again:"];this.gitPassphraseLabelText=b["Passphrase (optional):"];
if(!this.options.username&&!this.options.password&&!this.options.privatekey&&!this.options.passphrase)this.options.username=!0,this.options.password=!0,this.options.privatekey=!0,this.options.passphrase=!0;if(this.options.serviceRegistry)this._sshService=this.options.serviceRegistry.getService("orion.net.ssh"),this._progressService=this.options.serviceRegistry.getService("orion.page.progress")},postCreate:function(){this.inherited(arguments);var e=this;this.options.username||d.style(this.gitSshUsernameRow,
"display","none");this.options.password||d.style(this.gitSshPasswordRow,"display","none");this.options.privatekey||(d.style(this.gitPrivateKeyRow,"display","none"),d.style(this.gitPrivateKeyFileRow,"display","none"),d.style(this.gitPrivateKeyFileRow_1,"display","none"));this.options.passphrase||(d.style(this.gitPassphraseRow,"display","none"),d.style(this.gitPassphraseRow_1,"display","none"));if(this.options.errordata&&this.options.errordata.Url)d.style(this.gitCredentialsLabel,"display","block"),
this.url.textContent=this.options.errordata.Url;if(this.options.errordata&&this.options.errordata.User&&this.options.errordata.User!=="")this.gitSshUsername.value=this.options.errordata.User,d.style(this.gitSshUsernameRow,"display","none"),setTimeout(function(){e.gitSshPassword.focus()},400);var h=this;(new f(e.options.serviceRegistry)).isEnabled().then(function(a){a||(d.style(h.gitSaveCredentials,"display","none"),d.style(h.gitSaveCredentialsLabel,"display","none"),d.style(h.gitSaveCredentialsInfo,
"display","none"))});d.connect(this.gitSshPassword,"onfocus",null,d.hitch(this,function(){this.isSshPassword.checked=!0}));d.connect(this.gitPrivateKey,"onfocus",null,d.hitch(this,function(){this.isPrivateKey.checked=!0}));d.connect(this.gitPrivateKeyFile,"onfocus",null,d.hitch(this,function(){this.isPrivateKey.checked=!0}));d.connect(this.gitPassphrase,"onfocus",null,d.hitch(this,function(){this.isPrivateKey.checked=!0}));d.connect(a.byId(this.gitPrivateKeyFile),"onchange",function(a){e.privateKeyFile=
a.target.files[0]});new c({connectId:["gitSaveCredentialsInfo"],label:b["Your private key will be saved in the browser for further use"]})},execute:function(){var a=this,b=this.gitPrivateKey.value,c=this.url.textContent,d=function(b){a._sshService?a._sshService.getKnownHosts().then(function(c){a.options.func&&a.options.func({gitSshUsername:a.gitSshUsername.value,gitSshPassword:a.isSshPassword.checked?a.gitSshPassword.value:"",gitPrivateKey:a.isPrivateKey.checked?b:"",gitPassphrase:a.isPrivateKey.checked?
a.gitPassphrase.value:"",knownHosts:c});delete a.options.func}):(a.options.func&&a.options.func({gitSshUsername:a.gitSshUsername.value,gitSshPassword:a.gitSshPassword.value,gitPrivateKey:b,gitPassphrase:a.gitPassphrase.value,knownHosts:a.gitSshKnownHosts.value}),delete a.options.func)};if(this.privateKeyFile){var k=new FileReader;k.onload=function(){return function(k){b=k.target.result;k=new f(a.options.serviceRegistry);a.gitSaveCredentials.checked?k.put(c,{gitPrivateKey:b,gitPassphrase:a.gitPassphrase.value}).then(function(){d(b)}):
d(b)}}(this.privateKeyFile);k.readAsText(this.privateKeyFile)}else b.length>0?(k=new f(a.options.serviceRegistry),a.gitSaveCredentials.checked?k.put(c,{gitPrivateKey:b,gitPassphrase:a.gitPassphrase.value}).then(function(){d(b)}):d(b)):(k=new f(a.options.serviceRegistry),a.gitSaveCredentials.checked?k.put(c,{gitSshUsername:a.gitSshUsername.value,gitSshPassword:a.gitSshPassword.value}).then(function(){d(b)}):d(b))}})});define("text!dijit/form/templates/CheckBox.html",[],function(){return'<div class="dijit dijitReset dijitInline" role="presentation"\n\t><input\n\t \t${!nameAttrSetting} type="${type}" ${checkedAttrSetting}\n\t\tclass="dijitReset dijitCheckBoxInput"\n\t\tdojoAttachPoint="focusNode"\n\t \tdojoAttachEvent="onclick:_onClick"\n/></div>'});
define("dijit/form/ToggleButton",["dojo","dijit","dijit/form/Button"],function(b,d){return d.form.ToggleButton});
define("dijit/form/CheckBox",["dojo","dijit","text!dijit/form/templates/CheckBox.html","dijit/form/ToggleButton"],function(b,d){b.declare("dijit.form.CheckBox",d.form.ToggleButton,{templateString:b.cache("dijit.form","templates/CheckBox.html"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:!1,attributeMap:b.delegate(d.form._FormWidget.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(a){this._set("readOnly",a);b.attr(this.focusNode,"readOnly",a);d.setWaiState(this.focusNode,
"readonly",a)},_setValueAttr:function(a,c){typeof a=="string"&&(this._set("value",a),b.attr(this.focusNode,"value",a),a=!0);this._created&&this.set("checked",a,c)},_getValueAttr:function(){return this.checked?this.value:!1},_setLabelAttr:void 0,postMixInProperties:function(){if(this.value=="")this.value="on";this.checkedAttrSetting=this.checked?"checked":"";this.inherited(arguments)},_fillContent:function(){},reset:function(){this._hasBeenBlurred=!1;this.set("checked",this.params.checked||!1);this._set("value",
this.params.value||"on");b.attr(this.focusNode,"value",this.value)},_onFocus:function(){this.id&&b.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");this.inherited(arguments)},_onBlur:function(){this.id&&b.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");this.inherited(arguments)},_onClick:function(a){return this.readOnly?(b.stopEvent(a),!1):this.inherited(arguments)}});b.declare("dijit.form.RadioButton",d.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_setCheckedAttr:function(a){this.inherited(arguments);
if(this._created&&a){var c=this;b.query("INPUT[type=radio]",this.focusNode.form||b.doc).forEach(function(a){a.name==c.name&&a!=c.focusNode&&a.form==c.focusNode.form&&(a=d.getEnclosingWidget(a))&&a.checked&&a.set("checked",!1)})}},_clicked:function(){this.checked||this.set("checked",!0)}});return d.form.CheckBox});
define("dijit/form/Form","dojo,dijit,dijit/_Widget,dijit/_Templated,dijit/form/_FormMixin,dijit/layout/_ContentPaneResizeMixin".split(","),function(b,d){b.declare("dijit.form.Form",[d._Widget,d._Templated,d.form._FormMixin,d.layout._ContentPaneResizeMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>",attributeMap:b.delegate(d._Widget.prototype.attributeMap,
{action:"",method:"",encType:"","accept-charset":"",accept:"",target:""}),postMixInProperties:function(){this.nameAttrSetting=this.name?"name='"+this.name+"'":"";this.inherited(arguments)},execute:function(){},onExecute:function(){},_setEncTypeAttr:function(a){this.encType=a;b.attr(this.domNode,"encType",a);if(b.isIE)this.domNode.encoding=a},postCreate:function(){if(b.isIE&&this.srcNodeRef&&this.srcNodeRef.attributes){var a=this.srcNodeRef.attributes.getNamedItem("encType");a&&!a.specified&&typeof a.value==
"string"&&this.set("encType",a.value)}this.inherited(arguments)},reset:function(a){var b={returnValue:!0,preventDefault:function(){this.returnValue=!1},stopPropagation:function(){},currentTarget:a?a.target:this.domNode,target:a?a.target:this.domNode};this.onReset(b)!==!1&&b.returnValue&&this.inherited(arguments,[])},onReset:function(){return!0},_onReset:function(a){this.reset(a);b.stopEvent(a);return!1},_onSubmit:function(a){var c=d.form.Form.prototype;if(this.execute!=c.execute||this.onExecute!=
c.onExecute)b.deprecated("dijit.form.Form:execute()/onExecute() are deprecated. Use onSubmit() instead.","","2.0"),this.onExecute(),this.execute(this.getValues());this.onSubmit(a)===!1&&b.stopEvent(a)},onSubmit:function(){return this.isValid()},submit:function(){this.onSubmit()!==!1&&this.containerNode.submit()}});return d.form.Form});
define("dojo/data/util/filter",["dojo"],function(b){b.getObject("data.util.filter",!0,b);b.data.util.filter.patternToRegExp=function(b,a){for(var c="^",f=null,e=0;e<b.length;e++)switch(f=b.charAt(e),f){case "\\":c+=f;e++;c+=b.charAt(e);break;case "*":c+=".*";break;case "?":c+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":c+="\\";default:c+=f}c+="$";return a?RegExp(c,"mi"):RegExp(c,"m")};return b.data.util.filter});
define("dojo/data/util/sorter",["dojo"],function(b){b.getObject("data.util.sorter",!0,b);b.data.util.sorter.basicComparator=function(b,a){var c=-1;b===null&&(b=void 0);a===null&&(a=void 0);if(b==a)c=0;else if(b>a||b==null)c=1;return c};b.data.util.sorter.createSortFunction=function(d,a){function c(a,b,c,e){return function(d,f){var g=e.getValue(d,a),h=e.getValue(f,a);return b*c(g,h)}}for(var f=[],e,h=a.comparatorMap,g=b.data.util.sorter.basicComparator,j=0;j<d.length;j++){e=d[j];var k=e.attribute;
if(k){e=e.descending?-1:1;var l=g;h&&(typeof k!=="string"&&"toString"in k&&(k=k.toString()),l=h[k]||g);f.push(c(k,e,l,a))}}return function(a,b){for(var c=0;c<f.length;){var e=f[c++](a,b);if(e!==0)return e}return 0}};return b.data.util.sorter});
define("dojo/data/util/simpleFetch",["dojo","dojo/data/util/sorter"],function(b){b.getObject("data.util.simpleFetch",!0,b);b.data.util.simpleFetch.fetch=function(d){d=d||{};if(!d.store)d.store=this;var a=this;this._fetchItems(d,function(c,d){var e=d.abort||null,h=!1,g=d.start?d.start:0,j=d.count&&d.count!==Infinity?g+d.count:c.length;d.abort=function(){h=!0;e&&e.call(d)};var k=d.scope||b.global;if(!d.store)d.store=a;d.onBegin&&d.onBegin.call(k,c.length,d);d.sort&&c.sort(b.data.util.sorter.createSortFunction(d.sort,
a));if(d.onItem)for(var l=g;l<c.length&&l<j;++l){var m=c[l];h||d.onItem.call(k,m,d)}d.onComplete&&!h&&(l=null,d.onItem||(l=c.slice(g,j)),d.onComplete.call(k,l,d))},function(a,d){d.onError&&d.onError.call(d.scope||b.global,a,d)});return d};return b.data.util.simpleFetch});
define("dojo/data/ItemFileReadStore",["dojo","dojo/data/util/filter","dojo/data/util/simpleFetch","dojo/date/stamp"],function(b){b.declare("dojo.data.ItemFileReadStore",null,{constructor:function(d){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=!1;this.url=this._ccUrl=this._jsonFileUrl=d.url;this._jsonData=d.data;this.data=null;this._datatypeMap=d.typeMap||{};this._datatypeMap.Date||(this._datatypeMap.Date={type:Date,deserialize:function(a){return b.date.stamp.fromISOString(a)}});
this._features={"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0};this._itemsByIdentity=null;this._storeRefPropName="_S";this._itemNumPropName="_0";this._rootItemPropName="_RI";this._reverseRefMap="_RRM";this._loadInProgress=!1;this._queuedFetches=[];if(d.urlPreventCache!==void 0)this.urlPreventCache=d.urlPreventCache?!0:!1;if(d.hierarchical!==void 0)this.hierarchical=d.hierarchical?!0:!1;if(d.clearOnClose)this.clearOnClose=!0;if("failOk"in d)this.failOk=d.failOk?!0:!1},url:"",_ccUrl:"",data:null,
typeMap:null,clearOnClose:!1,urlPreventCache:!1,failOk:!1,hierarchical:!0,_assertIsItem:function(b){if(!this.isItem(b))throw Error("dojo.data.ItemFileReadStore: Invalid item argument.");},_assertIsAttribute:function(b){if(typeof b!=="string")throw Error("dojo.data.ItemFileReadStore: Invalid attribute argument.");},getValue:function(b,a,c){b=this.getValues(b,a);return b.length>0?b[0]:c},getValues:function(b,a){this._assertIsItem(b);this._assertIsAttribute(a);return(b[a]||[]).slice(0)},getAttributes:function(b){this._assertIsItem(b);
var a=[],c;for(c in b)c!==this._storeRefPropName&&c!==this._itemNumPropName&&c!==this._rootItemPropName&&c!==this._reverseRefMap&&a.push(c);return a},hasAttribute:function(b,a){this._assertIsItem(b);this._assertIsAttribute(a);return a in b},containsValue:function(d,a,c){var f=void 0;typeof c==="string"&&(f=b.data.util.filter.patternToRegExp(c,!1));return this._containsValue(d,a,c,f)},_containsValue:function(d,a,c,f){return b.some(this.getValues(d,a),function(a){if(a!==null&&!b.isObject(a)&&f){if(a.toString().match(f))return!0}else if(c===
a)return!0})},isItem:function(b){return b&&b[this._storeRefPropName]===this&&this._arrayOfAllItems[b[this._itemNumPropName]]===b?!0:!1},isItemLoaded:function(b){return this.isItem(b)},loadItem:function(b){this._assertIsItem(b.item)},getFeatures:function(){return this._features},getLabel:function(b){if(this._labelAttr&&this.isItem(b))return this.getValue(b,this._labelAttr)},getLabelAttributes:function(){return this._labelAttr?[this._labelAttr]:null},_fetchItems:function(d,a,c){var f=this,e=function(c,
e){var d=[],g,h;if(c.query){var j;g=c.queryOptions?c.queryOptions.ignoreCase:!1;var p={};for(h in c.query)j=c.query[h],typeof j==="string"?p[h]=b.data.util.filter.patternToRegExp(j,g):j instanceof RegExp&&(p[h]=j);for(g=0;g<e.length;++g){var r=!0,s=e[g];if(s===null)r=!1;else for(h in c.query)j=c.query[h],f._containsValue(s,h,j,p[h])||(r=!1);r&&d.push(s)}}else for(g=0;g<e.length;++g)h=e[g],h!==null&&d.push(h);a(d,c)};if(this._loadFinished)e(d,this._getItemsArray(d.queryOptions));else{if(this._jsonFileUrl!==
this._ccUrl)b.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl;else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null)this._jsonData=this.data,this.data=null;if(this._jsonFileUrl)if(this._loadInProgress)this._queuedFetches.push({args:d,filter:e});else{this._loadInProgress=!0;var h=b.xhrGet({url:f._jsonFileUrl,handleAs:"json-comment-optional",
preventCache:this.urlPreventCache,failOk:this.failOk});h.addCallback(function(a){try{f._getItemsFromLoadedData(a),f._loadFinished=!0,f._loadInProgress=!1,e(d,f._getItemsArray(d.queryOptions)),f._handleQueuedFetches()}catch(b){f._loadFinished=!0,f._loadInProgress=!1,c(b,d)}});h.addErrback(function(a){f._loadInProgress=!1;c(a,d)});var g=null;if(d.abort)g=d.abort;d.abort=function(){h&&h.fired===-1&&h.cancel();g&&g.call(d)}}else if(this._jsonData)try{this._loadFinished=!0,this._getItemsFromLoadedData(this._jsonData),
this._jsonData=null,e(d,this._getItemsArray(d.queryOptions))}catch(j){c(j,d)}else c(Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),d)}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var b=0;b<this._queuedFetches.length;b++){var a=this._queuedFetches[b],c=a.args;(a=a.filter)?a(c,this._getItemsArray(c.queryOptions)):this.fetchItemByIdentity(c)}this._queuedFetches=[]}},_getItemsArray:function(b){return b&&b.deep?
this._arrayOfAllItems:this._arrayOfTopLevelItems},close:function(){if(this.clearOnClose&&this._loadFinished&&!this._loadInProgress)(this._jsonFileUrl==""||this._jsonFileUrl==null)&&(this.url==""||this.url==null)&&this.data==null&&console.debug("dojo.data.ItemFileReadStore: WARNING!  Data reload  information has not been provided.  Please set 'url' or 'data' to the appropriate value before the next fetch"),this._arrayOfAllItems=[],this._arrayOfTopLevelItems=[],this._loadFinished=!1,this._itemsByIdentity=
null,this._loadInProgress=!1,this._queuedFetches=[]},_getItemsFromLoadedData:function(d){function a(a){return a!==null&&typeof a==="object"&&(!b.isArray(a)||f)&&!b.isFunction(a)&&(a.constructor==Object||b.isArray(a))&&typeof a._reference==="undefined"&&typeof a._type==="undefined"&&typeof a._value==="undefined"&&e.hierarchical}function c(d){e._arrayOfAllItems.push(d);for(var f in d){var g=d[f];if(g)if(b.isArray(g))for(var h=0;h<g.length;++h){var j=g[h];a(j)&&c(j)}else a(g)&&c(g)}}var f=!1,e=this;
this._labelAttr=d.label;var h,g;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=d.items;for(h=0;h<this._arrayOfTopLevelItems.length;++h)g=this._arrayOfTopLevelItems[h],b.isArray(g)&&(f=!0),c(g),g[this._rootItemPropName]=!0;var j={},k;for(h=0;h<this._arrayOfAllItems.length;++h)for(k in g=this._arrayOfAllItems[h],g){if(k!==this._rootItemPropName){var l=g[k];l!==null?b.isArray(l)||(g[k]=[l]):g[k]=[null]}j[k]=k}for(;j[this._storeRefPropName];)this._storeRefPropName+="_";for(;j[this._itemNumPropName];)this._itemNumPropName+=
"_";for(;j[this._reverseRefMap];)this._reverseRefMap+="_";if(j=d.identifier){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=j;for(h=0;h<this._arrayOfAllItems.length;++h)if(g=this._arrayOfAllItems[h],d=g[j],d=d[0],Object.hasOwnProperty.call(this._itemsByIdentity,d))if(this._jsonFileUrl)throw Error("dojo.data.ItemFileReadStore:  The json data as specified by: ["+this._jsonFileUrl+"] is malformed.  Items within the list have identifier: ["+j+"].  Value collided: ["+d+"]");else{if(this._jsonData)throw Error("dojo.data.ItemFileReadStore:  The json data provided by the creation arguments is malformed.  Items within the list have identifier: ["+
j+"].  Value collided: ["+d+"]");}else this._itemsByIdentity[d]=g}else this._features["dojo.data.api.Identity"]=Number;for(h=0;h<this._arrayOfAllItems.length;++h)g=this._arrayOfAllItems[h],g[this._storeRefPropName]=this,g[this._itemNumPropName]=h;for(h=0;h<this._arrayOfAllItems.length;++h)for(k in g=this._arrayOfAllItems[h],g){d=g[k];for(j=0;j<d.length;++j)if(l=d[j],l!==null&&typeof l=="object"){if("_type"in l&&"_value"in l){var m=l._type,n=this._datatypeMap[m];if(n)if(b.isFunction(n))d[j]=new n(l._value);
else if(b.isFunction(n.deserialize))d[j]=n.deserialize(l._value);else throw Error("dojo.data.ItemFileReadStore: Value provided in typeMap was neither a constructor, nor a an object with a deserialize function");else throw Error("dojo.data.ItemFileReadStore: in the typeMap constructor arg, no object class was specified for the datatype '"+m+"'");}if(l._reference){l=l._reference;if(b.isObject(l))for(m=0;m<this._arrayOfAllItems.length;++m){var n=this._arrayOfAllItems[m],o=!0,q;for(q in l)n[q]!=l[q]&&
(o=!1);o&&(d[j]=n)}else d[j]=this._getItemByIdentity(l);this.referenceIntegrity&&(l=d[j],this.isItem(l)&&this._addReferenceToMap(l,g,k))}else this.isItem(l)&&this.referenceIntegrity&&this._addReferenceToMap(l,g,k)}}},_addReferenceToMap:function(){},getIdentity:function(b){var a=this._features["dojo.data.api.Identity"];if(a===Number)return b[this._itemNumPropName];else if(b=b[a])return b[0];return null},fetchItemByIdentity:function(d){var a,c;if(this._loadFinished)a=this._getItemByIdentity(d.identity),
d.onItem&&(c=d.scope?d.scope:b.global,d.onItem.call(c,a));else{var f=this;if(this._jsonFileUrl!==this._ccUrl)b.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl;else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null&&this._jsonData==null)this._jsonData=this.data,this.data=null;if(this._jsonFileUrl)this._loadInProgress?
this._queuedFetches.push({args:d}):(this._loadInProgress=!0,c=b.xhrGet({url:f._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk}),c.addCallback(function(c){var h=d.scope?d.scope:b.global;try{f._getItemsFromLoadedData(c),f._loadFinished=!0,f._loadInProgress=!1,a=f._getItemByIdentity(d.identity),d.onItem&&d.onItem.call(h,a),f._handleQueuedFetches()}catch(g){f._loadInProgress=!1,d.onError&&d.onError.call(h,g)}}),c.addErrback(function(a){f._loadInProgress=
!1;d.onError&&d.onError.call(d.scope?d.scope:b.global,a)}));else if(this._jsonData)f._getItemsFromLoadedData(f._jsonData),f._jsonData=null,f._loadFinished=!0,a=f._getItemByIdentity(d.identity),d.onItem&&(c=d.scope?d.scope:b.global,d.onItem.call(c,a))}},_getItemByIdentity:function(b){var a=null;this._itemsByIdentity&&Object.hasOwnProperty.call(this._itemsByIdentity,b)?a=this._itemsByIdentity[b]:Object.hasOwnProperty.call(this._arrayOfAllItems,b)&&(a=this._arrayOfAllItems[b]);a===void 0&&(a=null);return a},
getIdentityAttributes:function(){var b=this._features["dojo.data.api.Identity"];return b===Number?null:[b]},_forceLoad:function(){var d=this;if(this._jsonFileUrl!==this._ccUrl)b.deprecated("dojo.data.ItemFileReadStore: ","To change the url, set the url property of the store, not _jsonFileUrl.  _jsonFileUrl support will be removed in 2.0"),this.url=this._ccUrl=this._jsonFileUrl;else if(this.url!==this._ccUrl)this._ccUrl=this._jsonFileUrl=this.url;if(this.data!=null)this._jsonData=this.data,this.data=
null;if(this._jsonFileUrl){var a=b.xhrGet({url:this._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk,sync:!0});a.addCallback(function(a){try{if(d._loadInProgress!==!0&&!d._loadFinished)d._getItemsFromLoadedData(a),d._loadFinished=!0;else if(d._loadInProgress)throw Error("dojo.data.ItemFileReadStore:  Unable to perform a synchronous load, an async load is in progress.");}catch(b){throw console.log(b),b;}});a.addErrback(function(a){throw a;})}else if(this._jsonData)d._getItemsFromLoadedData(d._jsonData),
d._jsonData=null,d._loadFinished=!0}});b.extend(b.data.ItemFileReadStore,b.data.util.simpleFetch);return b.data.ItemFileReadStore});define("text!orion/widgets/templates/NewItemDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\t\t<div style="display: table">\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="itemNameLabel" for="${id}_itemName" style="padding-right: 10">${itemNameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 30em; text-align: left;">\n\t\t\t\t\t<input dojoType="dijit.form.ValidationTextBox" dojoAttachPoint="itemName" id="${id}_itemName" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: none;" dojoAttachPoint="itemAdvancedInfo">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="itemURLLabel" for="itemURL" style="padding-right: 10">Server Path:</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; width: 40em; text-align: left; padding:5;">\n\t\t\t\t\t<input dojoAttachPoint="itemURL" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: none;" dojoAttachPoint="itemAdvancedInfo1">\n\t\t\t\t<div style="display: table-cell;"></div>\n\t\t\t\t<div style="display: table-cell;">\n\t\t\t\t\t<input dojoAttachPoint="createCheckbox" id="${id}_createCheckbox" dojoType="dijit.form.CheckBox" checked="checked" value="on" type="checkbox">\n\t\t\t\t\t<label dojoAttachPoint="createCheckboxLabel" for="${id}_createCheckbox">Create if doesn\'t exist</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="newItemButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/widgets/NewItemDialog","i18n!orion/widgets/nls/messages,dojo,dijit,dijit/Dialog,dijit/form/CheckBox,dijit/form/CheckBox,dijit/form/Form,dijit/form/ValidationTextBox,dojo/data/ItemFileReadStore,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/NewItemDialog.html".split(","),function(b,d,a){d.declare("orion.widgets.NewItemDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:d.cache("orion","widgets/templates/NewItemDialog.html"),constructor:function(a){this.options=
a||{};this.options.advanced=this.options.advanced||!1},postMixInProperties:function(){this.inherited(arguments);this.itemNameLabelText=this.options.label||b["Name:"]},postCreate:function(){this.inherited(arguments);this.options.advanced?(this.itemAdvancedInfo.style.display="table-row",this.itemAdvancedInfo1.style.display="table-row",d.connect(this.itemURL,"onkeyup",null,d.hitch(this,this.onURLChange))):(this.itemAdvancedInfo.style.display="none",this.itemAdvancedInfo1.style.display="none")},execute:function(){var a,
b;this.newItemButton.focus();this.options.advanced&&(a=this.itemURL.value.replace(/^\s+|\s+$/g,""),b=this.createCheckbox.get("disabled")?!1:this.createCheckbox.get("checked"));this.options.func(this.itemName.value,a&&a!==""?a:void 0,b)},onURLChange:function(){var a=this.itemURL.value;a.match(/^file:\/\//)?this.createCheckbox.set("disabled",!1):a.match(/^[a-zA-Z][a-zA-Z]+:\/\/.+/)?this.createCheckbox.set("disabled",!0):this.createCheckbox.set("disabled",!1)}})});
define("text!dijit/templates/TreeNode.html",[],function(){return'<div class="dijitTreeNode" role="presentation"\n\t><div dojoAttachPoint="rowNode" class="dijitTreeRow" role="presentation" dojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick"\n\t\t><img src="${_blankGif}" alt="" dojoAttachPoint="expandoNode" class="dijitTreeExpando" role="presentation"\n\t\t/><span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" role="presentation"\n\t\t></span\n\t\t><span dojoAttachPoint="contentNode"\n\t\t\tclass="dijitTreeContent" role="presentation">\n\t\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="iconNode" class="dijitIcon dijitTreeIcon" role="presentation"\n\t\t\t/><span dojoAttachPoint="labelNode" class="dijitTreeLabel" role="treeitem" tabindex="-1" aria-selected="false" dojoAttachEvent="onfocus:_onLabelFocus"></span>\n\t\t</span\n\t></div>\n\t<div dojoAttachPoint="containerNode" class="dijitTreeContainer" role="presentation" style="display: none;"></div>\n</div>'});
define("text!dijit/templates/Tree.html",[],function(){return'<div class="dijitTree dijitTreeContainer" role="tree"\n\tdojoAttachEvent="onkeypress:_onKeyPress">\n\t<div class="dijitInline dijitTreeIndent" style="position: absolute; top: -9999px" dojoAttachPoint="indentDetector"></div>\n</div>'});
define("dijit/tree/TreeStoreModel",["dojo","dijit"],function(b,d){b.declare("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(a){b.mixin(this,a);this.connects=[];a=this.store;if(!a.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.Tree: store must support dojo.data.Identity");if(a.getFeatures()["dojo.data.api.Notification"])this.connects=this.connects.concat([b.connect(a,
"onNew",this,"onNewItem"),b.connect(a,"onDelete",this,"onDeleteItem"),b.connect(a,"onSet",this,"onSetItem")])},destroy:function(){b.forEach(this.connects,b.disconnect)},getRoot:function(a,c){this.root?a(this.root):this.store.fetch({query:this.query,onComplete:b.hitch(this,function(c){if(c.length!=1)throw Error(this.declaredClass+": query "+b.toJson(this.query)+" returned "+c.length+" items, but must return exactly one item");this.root=c[0];a(this.root)}),onError:c})},mayHaveChildren:function(a){return b.some(this.childrenAttrs,
function(b){return this.store.hasAttribute(a,b)},this)},getChildren:function(a,c,d){var e=this.store;if(e.isItemLoaded(a)){for(var h=[],g=0;g<this.childrenAttrs.length;g++)var j=e.getValues(a,this.childrenAttrs[g]),h=h.concat(j);var k=0;this.deferItemLoadingUntilExpand||b.forEach(h,function(a){e.isItemLoaded(a)||k++});k==0?c(h):b.forEach(h,function(a,b){e.isItemLoaded(a)||e.loadItem({item:a,onItem:function(a){h[b]=a;--k==0&&c(h)},onError:d})})}else{var l=b.hitch(this,arguments.callee);e.loadItem({item:a,
onItem:function(a){l(a,c,d)},onError:d})}},isItem:function(a){return this.store.isItem(a)},fetchItemByIdentity:function(a){this.store.fetchItemByIdentity(a)},getIdentity:function(a){return this.store.getIdentity(a)},getLabel:function(a){return this.labelAttr?this.store.getValue(a,this.labelAttr):this.store.getLabel(a)},newItem:function(a,b,d){var e={parent:b,attribute:this.childrenAttrs[0]},h;this.newItemIdAttr&&a[this.newItemIdAttr]?this.fetchItemByIdentity({identity:a[this.newItemIdAttr],scope:this,
onItem:function(g){g?this.pasteItem(g,null,b,!0,d):(h=this.store.newItem(a,e))&&d!=void 0&&this.pasteItem(h,b,b,!1,d)}}):(h=this.store.newItem(a,e))&&d!=void 0&&this.pasteItem(h,b,b,!1,d)},pasteItem:function(a,c,d,e,h){var g=this.store,j=this.childrenAttrs[0];c&&b.forEach(this.childrenAttrs,function(d){if(g.containsValue(c,d,a)){if(!e){var f=b.filter(g.getValues(c,d),function(b){return b!=a});g.setValues(c,d,f)}j=d}});if(d)if(typeof h=="number"){var k=g.getValues(d,j).slice();k.splice(h,0,a);g.setValues(d,
j,k)}else g.setValues(d,j,g.getValues(d,j).concat(a))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(a,c){c&&this.getChildren(c.item,b.hitch(this,function(a){this.onChildrenChange(c.item,a)}))},onDeleteItem:function(a){this.onDelete(a)},onSetItem:function(a,c){if(b.indexOf(this.childrenAttrs,c)!=-1)this.getChildren(a,b.hitch(this,function(b){this.onChildrenChange(a,b)}));else this.onChange(a)}});return d.tree.TreeStoreModel});
define("dijit/tree/ForestStoreModel",["dojo","dijit","dijit/tree/TreeStoreModel"],function(b,d){b.declare("dijit.tree.ForestStoreModel",d.tree.TreeStoreModel,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(a){this.root={store:this,root:!0,id:a.rootId,label:a.rootLabel,children:a.rootChildren}},mayHaveChildren:function(a){return a===this.root||this.inherited(arguments)},getChildren:function(a,c,d){a===this.root?this.root.children?c(this.root.children):this.store.fetch({query:this.query,
onComplete:b.hitch(this,function(a){this.root.children=a;c(a)}),onError:d}):this.inherited(arguments)},isItem:function(a){return a===this.root?!0:this.inherited(arguments)},fetchItemByIdentity:function(a){if(a.identity==this.root.id){var c=a.scope?a.scope:b.global;a.onItem&&a.onItem.call(c,this.root)}else this.inherited(arguments)},getIdentity:function(a){return a===this.root?this.root.id:this.inherited(arguments)},getLabel:function(a){return a===this.root?this.root.label:this.inherited(arguments)},
newItem:function(a,b,d){return b===this.root?(this.onNewRootItem(a),this.store.newItem(a)):this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(a,b,f,e,h){if(b===this.root&&!e)this.onLeaveRoot(a);d.tree.TreeStoreModel.prototype.pasteItem.call(this,a,b===this.root?null:b,f===this.root?null:f,e,h);if(f===this.root)this.onAddToRoot(a)},onAddToRoot:function(a){console.log(this,": item ",a," added to root")},onLeaveRoot:function(a){console.log(this,": item ",a," removed from root")},
_requeryTop:function(){var a=this.root.children||[];this.store.fetch({query:this.query,onComplete:b.hitch(this,function(c){this.root.children=c;if(a.length!=c.length||b.some(a,function(a,b){return c[b]!=a}))this.onChildrenChange(this.root,c)})})},onNewItem:function(a,b){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(a){b.indexOf(this.root.children,a)!=-1&&this._requeryTop();this.inherited(arguments)},onSetItem:function(a,b,d,e){this._requeryTop();this.inherited(arguments)}});
return d.tree.ForestStoreModel});
define("dojo/dnd/Container",["dojo","dojo/dnd/common","dojo/parser"],function(b){b.declare("dojo.dnd.Container",null,{skipForm:!1,constructor:function(d,a){this.node=b.byId(d);a||(a={});this.creator=a.creator||null;this.skipForm=a.skipForm;this.parent=a.dropParent&&b.byId(a.dropParent);this.map={};this.current=null;this.containerState="";b.addClass(this.node,"dojoDndContainer");(!a||!a._skipStartup)&&this.startup();this.events=[b.connect(this.node,"onmouseover",this,"onMouseOver"),b.connect(this.node,
"onmouseout",this,"onMouseOut"),b.connect(this.node,"ondragstart",this,"onSelectStart"),b.connect(this.node,"onselectstart",this,"onSelectStart")]},creator:function(){},getItem:function(b){return this.map[b]},setItem:function(b,a){this.map[b]=a},delItem:function(b){delete this.map[b]},forInItems:function(d,a){var a=a||b.global,c=this.map,f=b.dnd._empty,e;for(e in c)e in f||d.call(a,c[e],e,this);return a},clearItems:function(){this.map={}},getAllNodes:function(){return b.query("> .dojoDndItem",this.parent)},
sync:function(){var d={};this.getAllNodes().forEach(function(a){if(a.id){var c=this.getItem(a.id);if(c){d[a.id]=c;return}}else a.id=b.dnd.getUniqueId();var c=a.getAttribute("dndType"),f=a.getAttribute("dndData");d[a.id]={data:f||a.innerHTML,type:c?c.split(/\s*,\s*/):["text"]}},this);this.map=d;return this},insertNodes:function(b,a,c){if(this.parent.firstChild)if(a){if(!c)c=this.parent.firstChild}else{if(c)c=c.nextSibling}else c=null;if(c)for(a=0;a<b.length;++a){var f=this._normalizedCreator(b[a]);
this.setItem(f.node.id,{data:f.data,type:f.type});this.parent.insertBefore(f.node,c)}else for(a=0;a<b.length;++a)f=this._normalizedCreator(b[a]),this.setItem(f.node.id,{data:f.data,type:f.type}),this.parent.appendChild(f.node);return this},destroy:function(){b.forEach(this.events,b.disconnect);this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(d,a){d._skipStartup=!0;return new b.dnd.Container(a,d)},startup:function(){if(!this.parent&&(this.parent=this.node,this.parent.tagName.toLowerCase()==
"table")){var d=this.parent.getElementsByTagName("tbody");if(d&&d.length)this.parent=d[0]}this.defaultCreator=b.dnd._defaultCreator(this.parent);this.sync()},onMouseOver:function(b){for(var a=b.relatedTarget;a;){if(a==this.node)break;try{a=a.parentNode}catch(c){a=null}}a||(this._changeState("Container","Over"),this.onOverEvent());a=this._getChildByEvent(b);if(this.current!=a)this.current&&this._removeItemClass(this.current,"Over"),a&&this._addItemClass(a,"Over"),this.current=a},onMouseOut:function(b){for(b=
b.relatedTarget;b;){if(b==this.node)return;try{b=b.parentNode}catch(a){b=null}}if(this.current)this._removeItemClass(this.current,"Over"),this.current=null;this._changeState("Container","");this.onOutEvent()},onSelectStart:function(d){(!this.skipForm||!b.dnd.isFormElement(d))&&b.stopEvent(d)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(d,a){var c="dojoDnd"+d,f=d.toLowerCase()+"State";b.replaceClass(this.node,c+a,c+this[f]);this[f]=a},_addItemClass:function(d,a){b.addClass(d,
"dojoDndItem"+a)},_removeItemClass:function(d,a){b.removeClass(d,"dojoDndItem"+a)},_getChildByEvent:function(d){if(d=d.target)for(var a=d.parentNode;a;d=a,a=d.parentNode)if(a==this.parent&&b.hasClass(d,"dojoDndItem"))return d;return null},_normalizedCreator:function(d,a){var c=(this.creator||this.defaultCreator).call(this,d,a);if(!b.isArray(c.type))c.type=["text"];if(!c.node.id)c.node.id=b.dnd.getUniqueId();b.addClass(c.node,"dojoDndItem");return c}});b.dnd._createNode=function(d){return!d?b.dnd._createSpan:
function(a){return b.create(d,{innerHTML:a})}};b.dnd._createTrTd=function(d){var a=b.create("tr");b.create("td",{innerHTML:d},a);return a};b.dnd._createSpan=function(d){return b.create("span",{innerHTML:d})};b.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};b.dnd._defaultCreator=function(d){var d=d.tagName.toLowerCase(),a=d=="tbody"||d=="thead"?b.dnd._createTrTd:b.dnd._createNode(b.dnd._defaultCreatorNodes[d]);return function(c,d){var e=c&&b.isObject(c),h,g;e&&c.tagName&&c.nodeType&&
c.getAttribute?(h=c.getAttribute("dndData")||c.innerHTML,e=(e=c.getAttribute("dndType"))?e.split(/\s*,\s*/):["text"],g=c):(h=e&&c.data?c.data:c,e=e&&c.type?c.type:["text"],g=(d=="avatar"?b.dnd._createSpan:a)(String(h)));if(!g.id)g.id=b.dnd.getUniqueId();return{node:g,data:h,type:e}}};return b.dnd.Container});
define("dijit/tree/_dndContainer",["dojo","dijit","dojo/dnd/common","dojo/dnd/Container"],function(b,d){b.getObject("tree",!0,b);d.tree._compareNodes=function(a,b){if(a===b)return 0;if("sourceIndex"in document.documentElement)return a.sourceIndex-b.sourceIndex;else if("compareDocumentPosition"in document.documentElement)return a.compareDocumentPosition(b)&2?1:-1;else if(document.createRange){var d=doc.createRange();d.setStartBefore(a);var e=doc.createRange();e.setStartBefore(b);return d.compareBoundaryPoints(d.END_TO_END,
e)}else throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");};b.declare("dijit.tree._dndContainer",null,{constructor:function(a,c){this.tree=a;this.node=a.domNode;b.mixin(this,c);this.map={};this.current=null;this.containerState="";b.addClass(this.node,"dojoDndContainer");this.events=[b.connect(this.node,"onmouseenter",this,"onOverEvent"),b.connect(this.node,"onmouseleave",this,"onOutEvent"),b.connect(this.tree,"_onNodeMouseEnter",this,"onMouseOver"),
b.connect(this.tree,"_onNodeMouseLeave",this,"onMouseOut"),b.connect(this.node,"ondragstart",b,"stopEvent"),b.connect(this.node,"onselectstart",b,"stopEvent")]},getItem:function(a){return{data:this.selection[a],type:["treeNode"]}},destroy:function(){b.forEach(this.events,b.disconnect);this.node=this.parent=null},onMouseOver:function(a){this.current=a},onMouseOut:function(){this.current=null},_changeState:function(a,c){var d="dojoDnd"+a,e=a.toLowerCase()+"State";b.replaceClass(this.node,d+c,d+this[e]);
this[e]=c},_addItemClass:function(a,c){b.addClass(a,"dojoDndItem"+c)},_removeItemClass:function(a,c){b.removeClass(a,"dojoDndItem"+c)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}});return d.tree._dndContainer});
define("dijit/tree/_dndSelector",["dojo","dijit","dojo/dnd/common","dijit/tree/_dndContainer"],function(b,d){b.declare("dijit.tree._dndSelector",d.tree._dndContainer,{constructor:function(){this.selection={};this.anchor=null;d.setWaiState(this.tree.domNode,"multiselect",!this.singular);this.events.push(b.connect(this.tree.domNode,"onmousedown",this,"onMouseDown"),b.connect(this.tree.domNode,"onmouseup",this,"onMouseUp"),b.connect(this.tree.domNode,"onmousemove",this,"onMouseMove"))},singular:!1,getSelectedTreeNodes:function(){var a=
[],b=this.selection,d;for(d in b)a.push(b[d]);return a},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(a,b){this.setSelection(this.getSelectedTreeNodes().concat([a]));if(b)this.anchor=a;return a},removeTreeNode:function(a){this.setSelection(this._setDifference(this.getSelectedTreeNodes(),[a]));return a},isTreeNodeSelected:function(a){return a.id&&!!this.selection[a.id]},setSelection:function(a){var c=
this.getSelectedTreeNodes();b.forEach(this._setDifference(c,a),b.hitch(this,function(a){a.setSelected(!1);this.anchor==a&&delete this.anchor;delete this.selection[a.id]}));b.forEach(this._setDifference(a,c),b.hitch(this,function(a){a.setSelected(!0);this.selection[a.id]=a}));this._updateSelectionProperties()},_setDifference:function(a,c){b.forEach(c,function(a){a.__exclude__=!0});var d=b.filter(a,function(a){return!a.__exclude__});b.forEach(c,function(a){delete a.__exclude__});return d},_updateSelectionProperties:function(){var a=
this.getSelectedTreeNodes(),c=[],d=[];b.forEach(a,function(a){d.push(a);c.push(a.getTreePath())});a=b.map(d,function(a){return a.item});this.tree._set("paths",c);this.tree._set("path",c[0]||[]);this.tree._set("selectedNodes",d);this.tree._set("selectedNode",d[0]||null);this.tree._set("selectedItems",a);this.tree._set("selectedItem",a[0]||null)},onMouseDown:function(a){if(this.current&&!this.tree.isExpandoNode(a.target,this.current)&&a.button!=b.mouseButtons.RIGHT){b.stopEvent(a);var c=this.current,
d=b.isCopyKey(a),e=c.id;!this.singular&&!a.shiftKey&&this.selection[e]?this._doDeselect=!0:(this._doDeselect=!1,this.userSelect(c,d,a.shiftKey))}},onMouseUp:function(a){if(this._doDeselect)this._doDeselect=!1,this.userSelect(this.current,b.isCopyKey(a),a.shiftKey)},onMouseMove:function(){this._doDeselect=!1},userSelect:function(a,b,f){if(this.singular)this.anchor==a&&b?this.selectNone():(this.setSelection([a]),this.anchor=a);else if(f&&this.anchor){f=this.anchor;d.tree._compareNodes(this.anchor.rowNode,
a.rowNode)<0?b=f:(b=a,a=f);for(nodes=[];b!=a;)nodes.push(b),b=this.tree._getNextNode(b);nodes.push(a);this.setSelection(nodes)}else this.selection[a.id]&&b?this.removeTreeNode(a):b?this.addTreeNode(a,!0):(this.setSelection([a]),this.anchor=a)},forInSelectedItems:function(a,c){var c=c||b.global,d;for(d in this.selection)a.call(c,this.getItem(d),d,this)}});return d.tree._dndSelector});
define("dijit/Tree","dojo,dijit,text!dijit/templates/TreeNode.html,text!dijit/templates/Tree.html,dojo/fx,dojo/DeferredList,dijit/_Widget,dijit/_Templated,dijit/_Container,dijit/_Contained,dijit/_CssStateMixin,dojo/cookie,dijit/tree/TreeStoreModel,dijit/tree/ForestStoreModel,dijit/tree/_dndSelector".split(","),function(b,d){b.declare("dijit._TreeNode",[d._Widget,d._Templated,d._Container,d._Contained,d._CssStateMixin],{item:null,isTreeNode:!0,label:"",isExpandable:null,isExpanded:!1,state:"UNCHECKED",
templateString:b.cache("dijit","templates/TreeNode.html"),baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow",labelNode:"dijitTreeLabel"},attributeMap:b.delegate(d._Widget.prototype.attributeMap,{label:{node:"labelNode",type:"innerText"},tooltip:{node:"rowNode",type:"attribute",attribute:"title"}}),buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);this.isExpandable&&d.setWaiState(this.labelNode,"expanded",this.isExpanded);this.setSelected(!1)},
_setIndentAttr:function(a){var c=Math.max(a,0)*this.tree._nodePixelIndent+"px";b.style(this.domNode,"backgroundPosition",c+" 0px");b.style(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",c);b.forEach(this.getChildren(),function(b){b.set("indent",a+1)});this._set("indent",a)},markProcessing:function(){this.state="LOADING";this._setExpando(!0)},unmarkProcessing:function(){this._setExpando(!1)},_updateItemClasses:function(a){var b=this.tree,d=b.model;b._v10Compat&&a===d.root&&(a=null);
this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a,"row","Row")},_applyClassAndStyle:function(a,c,d){var e="_"+c+"Class";c+="Node";var h=this[e];this[e]=this.tree["get"+d+"Class"](a,this.isExpanded);b.replaceClass(this[c],this[e]||"",h||"");b.style(this[c],this.tree["get"+d+"Style"](a,this.isExpanded)||{})},_updateLayout:function(){var a=this.getParent();!a||a.rowNode.style.display=="none"?b.addClass(this.domNode,"dijitTreeIsRoot"):b.toggleClass(this.domNode,
"dijitTreeIsLast",!this.getNextSibling())},_setExpando:function(a){var c=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"],a=a?0:this.isExpandable?this.isExpanded?1:2:3;b.replaceClass(this.expandoNode,c[a],c);this.expandoNodeText.innerHTML=["*","-","+","*"][a]},expand:function(){if(this._expandDeferred)return this._expandDeferred;this._wipeOut&&this._wipeOut.stop();this.isExpanded=!0;d.setWaiState(this.labelNode,"expanded","true");(this.tree.showRoot||
this!==this.tree.rootNode)&&d.setWaiRole(this.containerNode,"group");b.addClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&d.setWaiState(this.tree.domNode,"expanded","true");var a,c=b.fx.wipeIn({node:this.containerNode,duration:d.defaultDuration,onEnd:function(){a.callback(!0)}});a=this._expandDeferred=new b.Deferred(function(){c.stop()});c.play();return a},collapse:function(){if(this.isExpanded){this._expandDeferred&&
(this._expandDeferred.cancel(),delete this._expandDeferred);this.isExpanded=!1;d.setWaiState(this.labelNode,"expanded","false");this==this.tree.rootNode&&d.setWaiState(this.tree.domNode,"expanded","false");b.removeClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);if(!this._wipeOut)this._wipeOut=b.fx.wipeOut({node:this.containerNode,duration:d.defaultDuration});this._wipeOut.play()}},indent:0,setChildItems:function(a){var c=this.tree,f=c.model,
e=[];b.forEach(this.getChildren(),function(a){d._Container.prototype.removeChild.call(this,a)},this);this.state="LOADED";a&&a.length>0?(this.isExpandable=!0,b.forEach(a,function(a){var b=f.getIdentity(a),d=c._itemNodesMap[b],k;if(d)for(var l=0;l<d.length;l++)if(d[l]&&!d[l].getParent()){k=d[l];k.set("indent",this.indent+1);break}k||(k=this.tree._createTreeNode({item:a,tree:c,isExpandable:f.mayHaveChildren(a),label:c.getLabel(a),tooltip:c.getTooltip(a),dir:c.dir,lang:c.lang,indent:this.indent+1}),d?
d.push(k):c._itemNodesMap[b]=[k]);this.addChild(k);(this.tree.autoExpand||this.tree._state(a))&&e.push(c._expandNode(k))},this),b.forEach(this.getChildren(),function(a){a._updateLayout()})):this.isExpandable=!1;this._setExpando&&this._setExpando(!1);this._updateItemClasses(this.item);if(this==c.rootNode)(a=this.tree.showRoot?this:this.getChildren()[0])?(a.setFocusable(!0),c.lastFocused=a):c.domNode.setAttribute("tabIndex","0");return new b.DeferredList(e)},getTreePath:function(){for(var a=this,b=
[];a&&a!==this.tree.rootNode;)b.unshift(a.item),a=a.getParent();b.unshift(this.tree.rootNode.item);return b},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(a){this.inherited(arguments);var c=this.getChildren();if(c.length==0)this.isExpandable=!1,this.collapse();b.forEach(c,function(a){a._updateLayout()})},makeExpandable:function(){this.isExpandable=!0;this._setExpando(!1)},_onLabelFocus:function(){this.tree._onNodeFocus(this)},setSelected:function(a){d.setWaiState(this.labelNode,
"selected",a);b.toggleClass(this.rowNode,"dijitTreeRowSelected",a)},setFocusable:function(a){this.labelNode.setAttribute("tabIndex",a?"0":"-1")},_onClick:function(a){this.tree._onClick(this,a)},_onDblClick:function(a){this.tree._onDblClick(this,a)},_onMouseEnter:function(a){this.tree._onNodeMouseEnter(this,a)},_onMouseLeave:function(a){this.tree._onNodeMouseLeave(this,a)}});b.declare("dijit.Tree",[d._Widget,d._Templated],{store:null,model:null,query:null,label:"",showRoot:!0,childrenAttr:["children"],
paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:!1,openOnDblClick:!1,templateString:b.cache("dijit","templates/Tree.html"),persist:!0,autoExpand:!1,dndController:"dijit.tree._dndSelector",dndParams:"onDndDrop,itemCreator,onDndCancel,checkAcceptance,checkItemAcceptance,dragThreshold,betweenThreshold".split(","),onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(a,c){b.publish(this.id,
[b.mixin({tree:this,event:a},c||{})])},postMixInProperties:function(){this.tree=this;if(this.autoExpand)this.persist=!1;this._itemNodesMap={};if(!this.cookieName)this.cookieName=this.id+"SaveStateCookie";this._loadDeferred=new b.Deferred;this.inherited(arguments)},postCreate:function(){this._initState();this.model||this._store2model();this.connect(this.model,"onChange","_onItemChange");this.connect(this.model,"onChildrenChange","_onItemChildrenChange");this.connect(this.model,"onDelete","_onItemDelete");
this._load();this.inherited(arguments);if(this.dndController){if(b.isString(this.dndController))this.dndController=b.getObject(this.dndController);for(var a={},c=0;c<this.dndParams.length;c++)this[this.dndParams[c]]&&(a[this.dndParams[c]]=this[this.dndParams[c]]);this.dndController=new this.dndController(this,a)}},_store2model:function(){this._v10Compat=!0;b.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var a={id:this.id+"_ForestStoreModel",store:this.store,
query:this.query,childrenAttrs:this.childrenAttr};if(this.params.mayHaveChildren)a.mayHaveChildren=b.hitch(this,"mayHaveChildren");if(this.params.getItemChildren)a.getChildren=b.hitch(this,function(a,b,e){this.getItemChildren(this._v10Compat&&a===this.model.root?null:a,b,e)});this.model=new d.tree.ForestStoreModel(a);this.showRoot=Boolean(this.label)},onLoad:function(){},_load:function(){this.model.getRoot(b.hitch(this,function(a){var c=this.rootNode=this.tree._createTreeNode({item:a,tree:this,isExpandable:!0,
label:this.label||this.getLabel(a),indent:this.showRoot?0:-1});if(!this.showRoot)c.rowNode.style.display="none",d.setWaiRole(this.domNode,"presentation"),d.setWaiRole(c.labelNode,"presentation"),d.setWaiRole(c.containerNode,"tree");this.domNode.appendChild(c.domNode);a=this.model.getIdentity(a);this._itemNodesMap[a]?this._itemNodesMap[a].push(c):this._itemNodesMap[a]=[c];c._updateLayout();this._expandNode(c).addCallback(b.hitch(this,function(){this._loadDeferred.callback(!0);this.onLoad()}))}),function(a){console.error(this,
": error loading root: ",a)})},getNodesByItem:function(a){return!a?[]:[].concat(this._itemNodesMap[b.isString(a)?a:this.model.getIdentity(a)])},_setSelectedItemAttr:function(a){this.set("selectedItems",[a])},_setSelectedItemsAttr:function(a){var c=this;this._loadDeferred.addCallback(b.hitch(this,function(){var d=b.map(a,function(a){return!a||b.isString(a)?a:c.model.getIdentity(a)}),e=[];b.forEach(d,function(a){e=e.concat(c._itemNodesMap[a]||[])});this.set("selectedNodes",e)}))},_setPathAttr:function(a){return a.length?
this.set("paths",[a]):this.set("paths",[])},_setPathsAttr:function(a){function c(a,h,g){var j=a.shift(),k=b.filter(h,function(a){return a.getIdentity()==j})[0];k?a.length?d._expandNode(k).addCallback(function(){c(a,k.getChildren(),g)}):g.callback(k):g.errback("Could not expand path at "+j)}var d=this;return(new b.DeferredList(b.map(a,function(a){var h=new b.Deferred,a=b.map(a,function(a){return b.isString(a)?a:d.model.getIdentity(a)});a.length?d._loadDeferred.addCallback(function(){c(a,[d.rootNode],
h)}):h.errback("Empty path");return h}))).addCallback(function(a){d.set("selectedNodes",b.map(b.filter(a,function(a){return a[0]}),function(a){return a[1]}))})},_setSelectedNodeAttr:function(a){this.set("selectedNodes",[a])},_setSelectedNodesAttr:function(a){this._loadDeferred.addCallback(b.hitch(this,function(){this.dndController.setSelection(a)}))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(a){return this.model.getLabel(a)},getIconClass:function(a,b){return!a||this.model.mayHaveChildren(a)?
b?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onKeyPress:function(a){if(!a.altKey){var c=b.keys,f=d.getEnclosingWidget(a.target);if(f){var e=a.charOrCode;if(typeof e=="string"&&e!=" ")!a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey&&(this._onLetterKeyNav({node:f,key:e.toLowerCase()}),b.stopEvent(a));else{this._curSearch&&(clearTimeout(this._curSearch.timer),
delete this._curSearch);var h=this._keyHandlerMap;if(!h)h={},h[c.ENTER]="_onEnterKey",h[c.SPACE]=h[" "]="_onEnterKey",h[this.isLeftToRight()?c.LEFT_ARROW:c.RIGHT_ARROW]="_onLeftArrow",h[this.isLeftToRight()?c.RIGHT_ARROW:c.LEFT_ARROW]="_onRightArrow",h[c.UP_ARROW]="_onUpArrow",h[c.DOWN_ARROW]="_onDownArrow",h[c.HOME]="_onHomeKey",h[c.END]="_onEndKey",this._keyHandlerMap=h;this._keyHandlerMap[e]&&(this[this._keyHandlerMap[e]]({node:f,item:f.item,evt:a}),b.stopEvent(a))}}}},_onEnterKey:function(a){this._publish("execute",
{item:a.item,node:a.node});this.dndController.userSelect(a.node,b.isCopyKey(a.evt),a.evt.shiftKey);this.onClick(a.item,a.node,a.evt)},_onDownArrow:function(a){(a=this._getNextNode(a.node))&&a.isTreeNode&&this.focusNode(a)},_onUpArrow:function(a){var a=a.node,b=a.getPreviousSibling();if(b)for(a=b;a.isExpandable&&a.isExpanded&&a.hasChildren();)a=a.getChildren(),a=a[a.length-1];else if(b=a.getParent(),this.showRoot||b!==this.rootNode)a=b;a&&a.isTreeNode&&this.focusNode(a)},_onRightArrow:function(a){a=
a.node;a.isExpandable&&!a.isExpanded?this._expandNode(a):a.hasChildren()&&(a=a.getChildren()[0])&&a.isTreeNode&&this.focusNode(a)},_onLeftArrow:function(a){a=a.node;a.isExpandable&&a.isExpanded?this._collapseNode(a):(a=a.getParent())&&a.isTreeNode&&(this.showRoot||a!==this.rootNode)&&this.focusNode(a)},_onHomeKey:function(){var a=this._getRootOrFirstNode();a&&this.focusNode(a)},_onEndKey:function(){for(var a=this.rootNode;a.isExpanded;)a=a.getChildren(),a=a[a.length-1];a&&a.isTreeNode&&this.focusNode(a)},
multiCharSearchDuration:250,_onLetterKeyNav:function(a){var b=this._curSearch;b?(b.pattern+=a.key,clearTimeout(b.timer)):b=this._curSearch={pattern:a.key,startNode:a.node};var d=this;b.timer=setTimeout(function(){delete d._curSearch},this.multiCharSearchDuration);a=b.startNode;do(a=this._getNextNode(a))||(a=this._getRootOrFirstNode());while(a!==b.startNode&&a.label.toLowerCase().substr(0,b.pattern.length)!=b.pattern);a&&a.isTreeNode&&a!==b.startNode&&this.focusNode(a)},isExpandoNode:function(a,c){return b.isDescendant(a,
c.expandoNode)},_onClick:function(a,c){var d=this.isExpandoNode(c.target,a);this.openOnClick&&a.isExpandable||d?a.isExpandable&&this._onExpandoClick({node:a}):(this._publish("execute",{item:a.item,node:a,evt:c}),this.onClick(a.item,a,c),this.focusNode(a));b.stopEvent(c)},_onDblClick:function(a,c){var d=c.target,d=d==a.expandoNode||d==a.expandoNodeText;this.openOnDblClick&&a.isExpandable||d?a.isExpandable&&this._onExpandoClick({node:a}):(this._publish("execute",{item:a.item,node:a,evt:c}),this.onDblClick(a.item,
a,c),this.focusNode(a));b.stopEvent(c)},_onExpandoClick:function(a){a=a.node;this.focusNode(a);a.isExpanded?this._collapseNode(a):this._expandNode(a)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(a){if(a.isExpandable&&a.isExpanded&&a.hasChildren())return a.getChildren()[0];else{for(;a&&a.isTreeNode;){var b=a.getNextSibling();if(b)return b;a=a.getParent()}return null}},_getRootOrFirstNode:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},
_collapseNode:function(a){a._expandNodeDeferred&&delete a._expandNodeDeferred;a.isExpandable&&a.state!="LOADING"&&(a.collapse(),this.onClose(a.item,a),a.item&&(this._state(a.item,!1),this._saveState()))},_expandNode:function(a,c){if(a._expandNodeDeferred&&!c)return a._expandNodeDeferred;var d=this.model,e=a.item,h=this;switch(a.state){case "UNCHECKED":a.markProcessing();var g=a._expandNodeDeferred=new b.Deferred;d.getChildren(e,function(b){a.unmarkProcessing();var b=a.setChildItems(b),c=h._expandNode(a,
!0);b.addCallback(function(){c.addCallback(function(){g.callback()})})},function(a){console.error(h,": error loading root children: ",a)});break;default:g=a._expandNodeDeferred=a.expand(),this.onOpen(a.item,a),e&&(this._state(e,!0),this._saveState())}return g},focusNode:function(a){d.focus(a.labelNode)},_onNodeFocus:function(a){if(a&&a!=this.lastFocused)this.lastFocused&&!this.lastFocused._destroyed&&this.lastFocused.setFocusable(!1),a.setFocusable(!0),this.lastFocused=a},_onNodeMouseEnter:function(){},
_onNodeMouseLeave:function(){},_onItemChange:function(a){var c=this._itemNodesMap[this.model.getIdentity(a)];if(c){var d=this.getLabel(a),e=this.getTooltip(a);b.forEach(c,function(b){b.set({item:a,label:d,tooltip:e});b._updateItemClasses(a)})}},_onItemChildrenChange:function(a,c){var d=this._itemNodesMap[this.model.getIdentity(a)];d&&b.forEach(d,function(a){a.setChildItems(c)})},_onItemDelete:function(a){var a=this.model.getIdentity(a),c=this._itemNodesMap[a];c&&(b.forEach(c,function(a){this.dndController.removeTreeNode(a);
var b=a.getParent();b&&b.removeChild(a);a.destroyRecursive()},this),delete this._itemNodesMap[a])},_initState:function(){if(this.persist){var a=b.cookie(this.cookieName);this._openedItemIds={};a&&b.forEach(a.split(","),function(a){this._openedItemIds[a]=!0},this)}},_state:function(a,b){if(!this.persist)return!1;var d=this.model.getIdentity(a);if(arguments.length===1)return this._openedItemIds[d];b?this._openedItemIds[d]=!0:delete this._openedItemIds[d]},_saveState:function(){if(this.persist){var a=
[],c;for(c in this._openedItemIds)a.push(c);b.cookie(this.cookieName,a.join(","),{expires:365})}},destroy:function(){this._curSearch&&(clearTimeout(this._curSearch.timer),delete this._curSearch);this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!b.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},destroyRecursive:function(){this.destroy()},resize:function(a){a&&b.marginBox(this.domNode,a);this._nodePixelIndent=b._getMarginSize(this.tree.indentDetector).w;
this.tree.rootNode&&this.tree.rootNode.set("indent",this.showRoot?0:-1)},_createTreeNode:function(a){return new d._TreeNode(a)}});return d.Tree});define("text!orion/widgets/templates/_ExplorerTreeNode.html",[],function(){return'<div class="dijitTreeNode" waiRole="presentation">\n\t<div dojoAttachPoint="rowNode" class="dijitTreeRow"\n\t\twaiRole="presentation"\n\t\tdojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave, onclick:_onClick, ondblclick:_onDblClick">\n\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="expandoNode" class="dijitTreeExpando" waiRole="presentation" />\n\t\t<span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" waiRole="presentation"></span>\n\t\t<span dojoAttachPoint="contentNode" class="dijitTreeContent" waiRole="presentation">\n\t\t\t<img src="${_blankGif}" alt="" dojoAttachPoint="iconNode" class="dijitIcon dijitTreeIcon" waiRole="presentation" />\n\t\t\t<\!-- labelNode\'s innerText will be label string --\>\n\t\t\t<span dojoAttachPoint="labelNode" class="dijitTreeLabel" wairole="treeitem" tabindex="-1" waiState="selected-false" dojoAttachEvent="onfocus:_onLabelFocus"></span>\n\t\t\t<a href="" dojoAttachPoint="followLink"><img src="${_blankGif}" alt="" dojoAttachPoint="followNode" class="dijitIcon dijitTreeIcon follow" waiRole="link"></a>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitTreeContainer"\n\t\twaiRole="presentation" style="display: none;">\n\t</div>\n</div>'});
define("orion/widgets/ExplorerTree",["dojo","dijit","dijit/Tree","text!orion/widgets/templates/_ExplorerTreeNode.html"],function(b,d){b.declare("orion.widgets._ExplorerTreeNode",[d._TreeNode],{templateString:b.cache("orion","widgets/templates/_ExplorerTreeNode.html"),_updateItemClasses:function(a){this.inherited(arguments);this._applyClassAndStyle(a,"follow","Follow");typeof this.tree.updateFollowLink==="function"&&this.tree.updateFollowLink(a,this.followLink)}});b.declare("orion.widgets.ExplorerTree",
[d.Tree],{selectedNodes:{},postCreate:function(){b.connect(this,"onMouseDown",this._eatSelectionEvent);b.connect(this.domNode,"onselectstart",this._eatSelectionEvent);this.inherited(arguments)},getFollowClass:function(){},getFollowStyle:function(){},updateFollowLink:function(){},onFollowClick:function(){},getSelectedItems:function(){var a=[];this._forEachSelectedNode(function(b,d){a.push(d.item)});return a},_getSelectedNodes:function(){var a=[];this._forEachSelectedNode(function(b,d){a.push(d)});
return a},_forEachSelectedNode:function(a){var b=this.selectedNodes,d;for(d in b)b.hasOwnProperty(d)&&a(d,b[d])},_createTreeNode:function(a){return new orion.widgets._ExplorerTreeNode(a)},_eatSelectionEvent:function(a){(b.isCopyKey(a)||a.shiftKey)&&b.stopEvent(a)},_onClick:function(a,c){var d=c.target,e=d===a.expandoNode||d===a.expandoNodeText,d=d===a.followNode;if(b.isCopyKey(c))this._toggleSelectNode(a),this.focusNode(a);else if(c.shiftKey)this.selectedNode&&(this._selectRange(this.selectedNode,
a),this.focusNode(a));else{if(d)this.onFollowClick(a.item,a,c);else this.openOnClick&&a.isExpandable||e?a.isExpandable&&this._onExpandoClick({node:a}):(this._publish("execute",{item:a.item,node:a,evt:c}),this.onClick(a.item,a,c),this.focusNode(a));!e&&!d&&this._selectNode(a)}d||b.stopEvent(c)},_onItemDelete:function(a){var c=this._itemNodesMap[this.model.getIdentity(a)];if(c){var d=this;b.forEach(c,function(a){d._removeFromSelection(a)})}this.inherited(arguments)},_getVisibleAncestor:function(a){if(!a)return null;
for(var b=a.getParent();b&&(!b.isExpandable||!b.isExpanded);)a=b,b=b.getParent();return a},_toggleSelectNode:function(a){this.selectedNodes[a.get("id")]?(a.setSelected(!1),this._removeFromSelection(a)):(a.setSelected(!0),this._addToSelection(a))},_addToSelection:function(a){this.selectedNodes[a.get("id")]=a},_removeFromSelection:function(a){delete this.selectedNodes[a.get("id")]},_selectRange:function(a,b){function d(a,b){var c=[],e=a;do c.push(e),e=g._getNextNode(e);while(e&&e!==b);return e===b?
(c.push(b),c):null}var e=this._getVisibleAncestor(a),h=this._getVisibleAncestor(b);if(e&&h)if(e===h)this._selectNode(e);else{var g=this,j=d(e,h);j?this._selectNodes(j.reverse(),!0):(j=d(h,e))?this._selectNodes(j,!0):console.debug("Warning: couldn't select range from "+e.label+" to "+h.label)}},_selectNode:function(a){this._selectNodes(a?[a]:null)},_selectNodes:function(a){this._forEachSelectedNode(function(a,b){b._destroyed||b.setSelected(!1)});this.selectedNodes={};if(a)for(var b=0;b<a.length;b++){var d=
a[b];d.setSelected(!0);this._addToSelection(d);this.selectedNode=d}}})});define("text!orion/git/widgets/templates/RemotePrompterDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\t\t\t<div style="display: table">\n\t\t\t\t<div style="display: table-row"> \n\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t\t<div dojoAttachPoint="treeContainerNode" id="${id}_treeContainerNode" dojoType="dijit.layout.BorderContainer" style="width:25em; height:25em; overflow:auto;" design="sidebar" gutters="true">\n\t\t\t\t\t\t\t<div dojoAttachPoint="treeContentPane" class="dijitDialogPaneContent" id="${id}_treeContentPane dojoType="dijit.layout.ContentPane" region="center" gutters="true">\n\t\t\t\t\t\t\t\t<div dojoAttachPoint="browseRemoteExplorerTree" class="explorerTreeClass" id="${id}_browseRemoteExplorerTree" style="margin-top: -3px;"></div> \n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: bottom;">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t\n\t\t\t\t<div style="display: table-row" dojoAttachPoint="newBranchSection">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t<label for="${id}_newBranch">${newBranchText}</label>\n\t\t\t\t\t<input dojoAttachPoint="newBranch" id="${id}_newBranch" value="" disabled=true/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t \n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\n\t\t\t\t\t\t<button dojoAttachPoint="RemoteBrowserButton" disabled=true dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">${buttonOk}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div> <\!-- end table --\>\n\t</div> <\!-- content pane --\>\n</div>'});
define("dojox",["dojo"],function(b){return dojox=b._dojox||{}});
define("dojo/io/iframe",["dojo"],function(b){b.getObject("io",!0,b);b.io.iframe={create:function(d,a,c){if(window[d])return window[d];if(window.frames[d])return window.frames[d];var f=null;c||(b.config.useXDomain&&!b.config.dojoBlankHtmlUrl&&console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl to the path on your domain to blank.html"),c=b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html"));
f=b.place('<iframe id="'+d+'" name="'+d+'" src="'+c+'" onload="'+a+'" style="position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden">',b.body());return window[d]=f},setSrc:function(d,a,c){try{if(c){var f;(f=b.isIE||b.isWebKit?d.contentWindow.document:d.contentWindow)?f.location.replace(a):d.location=a}else b.isWebKit?d.location=a:frames[d.name].location=a}catch(e){console.log("dojo.io.iframe.setSrc: ",e)}},doc:function(d){return d.contentDocument||d.name&&d.document&&
b.doc.getElementsByTagName("iframe")[d.name].contentWindow&&b.doc.getElementsByTagName("iframe")[d.name].contentWindow.document||d.name&&b.doc.frames[d.name]&&b.doc.frames[d.name].document||null},send:function(d){if(!this._frame)this._frame=this.create(this._iframeName,b._scopeName+".io.iframe._iframeOnload();");d=b._ioSetArgs(d,function(a){a.canceled=!0;a.ioArgs._callNext()},function(a){var c=null;try{var d=a.ioArgs,e=b.io.iframe,h=e.doc(e._frame),g=d.handleAs,c=h;if(g!="html")if(g=="xml"){if(b.isIE<
9||b.isIE&&b.isQuirks){b.query("a",e._frame.contentWindow.document.documentElement).orphan();var j=e._frame.contentWindow.document.documentElement.innerText,j=j.replace(/>\s+</g,"><"),j=b.trim(j),c=b._contentHandlers.xml({responseText:j})}}else c=h.getElementsByTagName("textarea")[0].value,g=="json"?c=b.fromJson(c):g=="javascript"&&(c=b.eval(c))}catch(k){c=k}finally{d._callNext()}return c},function(a,b){b.ioArgs._hasError=!0;b.ioArgs._callNext();return a});d.ioArgs._callNext=function(){if(!this._calledNext)this._calledNext=
!0,b.io.iframe._currentDfd=null,b.io.iframe._fireNextRequest()};this._dfdQueue.push(d);this._fireNextRequest();b._ioWatch(d,function(a){return!a.ioArgs._hasError},function(a){return!!a.ioArgs._finished},function(a){a.ioArgs._finished?a.callback(a):a.errback(Error("Invalid dojo.io.iframe request state"))});return d},_currentDfd:null,_dfdQueue:[],_iframeName:b._scopeName+"IoIframe",_fireNextRequest:function(){try{if(!(this._currentDfd||this._dfdQueue.length==0)){do var d=this._currentDfd=this._dfdQueue.shift();
while(d&&d.canceled&&this._dfdQueue.length);if(!d||d.canceled)this._currentDfd=null;else{var a=d.ioArgs,c=a.args;a._contentToClean=[];var f=b.byId(c.form),e=c.content||{};if(f){if(e){var h=function(c,e){b.create("input",{type:"hidden",name:c,value:e},f);a._contentToClean.push(c)},g;for(g in e){var j=e[g];if(b.isArray(j)&&j.length>1){var k;for(k=0;k<j.length;k++)h(g,j[k])}else f[g]?f[g].value=j:h(g,j)}}var l=f.getAttributeNode("action"),m=f.getAttributeNode("method"),n=f.getAttributeNode("target");
if(c.url)a._originalAction=l?l.value:null,l?l.value=c.url:f.setAttribute("action",c.url);if(!m||!m.value)m?m.value=c.method?c.method:"post":f.setAttribute("method",c.method?c.method:"post");a._originalTarget=n?n.value:null;n?n.value=this._iframeName:f.setAttribute("target",this._iframeName);f.target=this._iframeName;b._ioNotifyStart(d);f.submit()}else h=c.url+(c.url.indexOf("?")>-1?"&":"?")+a.query,b._ioNotifyStart(d),this.setSrc(this._frame,h,!0)}}}catch(o){d.errback(o)}},_iframeOnload:function(){var d=
this._currentDfd;if(d){var d=d.ioArgs,a=b.byId(d.args.form);if(a){for(var c=d._contentToClean,f=0;f<c.length;f++)for(var e=c[f],h=0;h<a.childNodes.length;h++){var g=a.childNodes[h];if(g.name==e){b.destroy(g);break}}d._originalAction&&a.setAttribute("action",d._originalAction);if(d._originalTarget)a.setAttribute("target",d._originalTarget),a.target=d._originalTarget}d._finished=!0}else this._fireNextRequest()}};return b.io.iframe});define("text!dijit/templates/ProgressBar.html",[],function(){return'<div class="dijitProgressBar dijitProgressBarEmpty" role="progressbar"\n\t><div  dojoAttachPoint="internalProgress" class="dijitProgressBarFull"\n\t\t><div class="dijitProgressBarTile" role="presentation"></div\n\t\t><span style="visibility:hidden">&nbsp;</span\n\t></div\n\t><div dojoAttachPoint="labelNode" class="dijitProgressBarLabel" id="${id}_label"></div\n\t><img dojoAttachPoint="indeterminateHighContrastImage" class="dijitProgressBarIndeterminateHighContrastImage" alt=""\n/></div>'});
define("dojo/cldr/nls/number",{root:{scientificFormat:"#E0","currencySpacing-afterCurrency-currencyMatch":"[:letter:]",infinity:"\u221e",list:";",percentSign:"%",minusSign:"-","currencySpacing-beforeCurrency-surroundingMatch":"[:digit:]","decimalFormat-short":"000T","currencySpacing-afterCurrency-insertBetween":"\u00a0",nan:"NaN",nativeZeroDigit:"0",plusSign:"+","currencySpacing-afterCurrency-surroundingMatch":"[:digit:]","currencySpacing-beforeCurrency-currencyMatch":"[:letter:]",currencyFormat:"\u00a4\u00a0#,##0.00",
perMille:"\u2030",group:",",percentFormat:"#,##0%",decimalFormat:"#,##0.###",decimal:".",patternDigit:"#","currencySpacing-beforeCurrency-insertBetween":"\u00a0",exponential:"E"},ar:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,"en-au":!0,"en-gb":!0,es:!0,fi:!0,fr:!0,"fr-ch":!0,he:!0,hu:!0,it:!0,ja:!0,ko:!0,nb:!0,nl:!0,pl:!0,pt:!0,"pt-pt":!0,ro:!0,ru:!0,sk:!0,sl:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-hant":!0,"zh-hk":!0});
define("dojo/cldr/nls/en/number",{group:",",percentSign:"%",exponential:"E",scientificFormat:"#E0",percentFormat:"#,##0%",list:";",infinity:"\u221e",patternDigit:"#",minusSign:"-",decimal:".",nan:"NaN",nativeZeroDigit:"0",perMille:"\u2030",decimalFormat:"#,##0.###",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)",plusSign:"+","decimalFormat-short":"000T"});
define("dojo/number",["dojo","dojo/i18n","i18n!dojo/cldr/nls/number","dojo/string","dojo/regexp"],function(b){b.getObject("number",!0,b);b.number.format=function(d,a){var a=b.mixin({},a||{}),c=b.i18n.normalizeLocale(a.locale),c=b.i18n.getLocalization("dojo.cldr","number",c);a.customs=c;c=a.pattern||c[(a.type||"decimal")+"Format"];return isNaN(d)||Math.abs(d)==Infinity?null:b.number._applyPattern(d,c,a)};b.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;b.number._applyPattern=function(d,a,c){var c=
c||{},f=c.customs.group,e=c.customs.decimal,a=a.split(";"),h=a[0],a=a[d<0?1:0]||"-"+h;if(a.indexOf("%")!=-1)d*=100;else if(a.indexOf("\u2030")!=-1)d*=1E3;else if(a.indexOf("\u00a4")!=-1)f=c.customs.currencyGroup||f,e=c.customs.currencyDecimal||e,a=a.replace(/\u00a4{1,3}/,function(a){return c[["symbol","currency","displayName"][a.length-1]]||c.currency||""});else if(a.indexOf("E")!=-1)throw Error("exponential notation not supported");var g=b.number._numberPatternRE,h=h.match(g);if(!h)throw Error("unable to find a number expression in pattern: "+
a);if(c.fractional===!1)c.places=0;return a.replace(g,b.number._formatAbsolute(d,h[0],{decimal:e,group:f,places:c.places,round:c.round}))};b.number.round=function(b,a,c){c=10/(c||10);return(c*+b).toFixed(a)/c};(0.9).toFixed()==0&&function(){var d=b.number.round;b.number.round=function(a,b,f){var e=Math.pow(10,-b||0),h=Math.abs(a);if(!a||h>=e||h*Math.pow(10,b+1)<5)e=0;return d(a,b,f)+(a>0?e:-e)}}();b.number._formatAbsolute=function(d,a,c){c=c||{};if(c.places===!0)c.places=0;if(c.places===Infinity)c.places=
6;var a=a.split("."),f=typeof c.places=="string"&&c.places.indexOf(","),e=c.places;if(f)e=c.places.substring(f+1);else if(!(e>=0))e=(a[1]||[]).length;c.round<0||(d=b.number.round(d,e,c.round));var d=String(Math.abs(d)).split("."),h=d[1]||"";if(a[1]||c.places){if(f)c.places=c.places.substring(0,f);f=c.places!==void 0?c.places:a[1]&&a[1].lastIndexOf("0")+1;f>h.length&&(d[1]=b.string.pad(h,f,"0",!0));e<h.length&&(d[1]=h.substr(0,e))}else d[1]&&d.pop();e=a[0].replace(",","");f=e.indexOf("0");f!=-1&&(f=
e.length-f,f>d[0].length&&(d[0]=b.string.pad(d[0],f)),e.indexOf("#")==-1&&(d[0]=d[0].substr(d[0].length-f)));var e=a[0].lastIndexOf(","),g,j;e!=-1&&(g=a[0].length-e-1,a=a[0].substr(0,e),e=a.lastIndexOf(","),e!=-1&&(j=a.length-e-1));a=[];for(e=d[0];e;)f=e.length-g,a.push(f>0?e.substr(f):e),e=f>0?e.slice(0,f):"",j&&(g=j,delete j);d[0]=a.reverse().join(c.group||",");return d.join(c.decimal||".")};b.number.regexp=function(d){return b.number._parseInfo(d).regexp};b.number._parseInfo=function(d){var d=
d||{},a=b.i18n.normalizeLocale(d.locale),a=b.i18n.getLocalization("dojo.cldr","number",a),c=d.pattern||a[(d.type||"decimal")+"Format"],f=a.group,e=a.decimal,h=1;if(c.indexOf("%")!=-1)h/=100;else if(c.indexOf("\u2030")!=-1)h/=1E3;else{var g=c.indexOf("\u00a4")!=-1;g&&(f=a.currencyGroup||f,e=a.currencyDecimal||e)}a=c.split(";");a.length==1&&a.push("-"+a[0]);a=b.regexp.buildGroupRE(a,function(a){a="(?:"+b.regexp.escapeString(a,".")+")";return a.replace(b.number._numberPatternRE,function(a){var c={signed:!1,
separator:d.strict?f:[f,""],fractional:d.fractional,decimal:e,exponent:!1},a=a.split("."),g=d.places;a.length==1&&h!=1&&(a[1]="###");if(a.length==1||g===0)c.fractional=!1;else{g===void 0&&(g=d.pattern?a[1].lastIndexOf("0")+1:Infinity);if(g&&d.fractional==void 0)c.fractional=!0;!d.places&&g<a[1].length&&(g+=","+a[1].length);c.places=g}a=a[0].split(",");if(a.length>1&&(c.groupSize=a.pop().length,a.length>1))c.groupSize2=a.pop().length;return"("+b.number._realNumberRegexp(c)+")"})},!0);g&&(a=a.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,
function(a,c,e,f){a=b.regexp.escapeString(d[["symbol","currency","displayName"][e.length-1]]||d.currency||"");c=c?"[\\s\\xa0]":"";f=f?"[\\s\\xa0]":"";return!d.strict?(c&&(c+="*"),f&&(f+="*"),"(?:"+c+a+f+")?"):c+a+f}));return{regexp:a.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:f,decimal:e,factor:h}};b.number.parse=function(d,a){var c=b.number._parseInfo(a),f=RegExp("^"+c.regexp+"$").exec(d);if(!f)return NaN;var e=f[1];if(!f[1]){if(!f[2])return NaN;e=f[2];c.factor*=-1}e=e.replace(RegExp("["+c.group+"\\s\\xa0]",
"g"),"").replace(c.decimal,".");return e*c.factor};b.number._realNumberRegexp=function(d){d=d||{};if(!("places"in d))d.places=Infinity;if(typeof d.decimal!="string")d.decimal=".";if(!("fractional"in d)||/^0/.test(d.places))d.fractional=[!0,!1];if(!("exponent"in d))d.exponent=[!0,!1];if(!("eSigned"in d))d.eSigned=[!0,!1];var a=b.number._integerRegexp(d),c=b.regexp.buildGroupRE(d.fractional,function(a){var b="";a&&d.places!==0&&(b="\\"+d.decimal,d.places==Infinity?b="(?:"+b+"\\d+)?":b+="\\d{"+d.places+
"}");return b},!0),f=b.regexp.buildGroupRE(d.exponent,function(a){return a?"([eE]"+b.number._integerRegexp({signed:d.eSigned})+")":""});a+=c;c&&(a="(?:(?:"+a+")|(?:"+c+"))");return a+f};b.number._integerRegexp=function(d){d=d||{};if(!("signed"in d))d.signed=[!0,!1];if("separator"in d){if(!("groupSize"in d))d.groupSize=3}else d.separator="";var a=b.regexp.buildGroupRE(d.signed,function(a){return a?"[-+]":""},!0),c=b.regexp.buildGroupRE(d.separator,function(a){if(!a)return"(?:\\d+)";a=b.regexp.escapeString(a);
a==" "?a="\\s":a=="\u00a0"&&(a="\\s\\xa0");var c=d.groupSize,h=d.groupSize2;return h?(a="(?:0|[1-9]\\d{0,"+(h-1)+"}(?:["+a+"]\\d{"+h+"})*["+a+"]\\d{"+c+"})",c-h>0?"(?:"+a+"|(?:0|[1-9]\\d{0,"+(c-1)+"}))":a):"(?:0|[1-9]\\d{0,"+(c-1)+"}(?:["+a+"]\\d{"+c+"})*)"},!0);return a+c};return b.number});
define("dijit/ProgressBar","dojo,dijit,text!dijit/templates/ProgressBar.html,dojo/fx,dojo/number,dijit/_Widget,dijit/_Templated".split(","),function(b,d){b.declare("dijit.ProgressBar",[d._Widget,d._Templated],{progress:"0",value:"",maximum:100,places:0,indeterminate:!1,label:"",name:"",templateString:b.cache("dijit","templates/ProgressBar.html"),_indeterminateHighContrastImagePath:b.moduleUrl("dijit","themes/a11y/indeterminate_progress.gif"),postMixInProperties:function(){this.inherited(arguments);
if(!("value"in this.params))this.value=this.indeterminate?Infinity:this.progress},buildRendering:function(){this.inherited(arguments);this.indeterminateHighContrastImage.setAttribute("src",this._indeterminateHighContrastImagePath.toString());this.update()},update:function(a){b.mixin(this,a||{});var a=this.internalProgress,c=this.domNode,f=1;this.indeterminate?(d.removeWaiState(c,"valuenow"),d.removeWaiState(c,"valuemin"),d.removeWaiState(c,"valuemax")):(String(this.progress).indexOf("%")!=-1?(f=Math.min(parseFloat(this.progress)/
100,1),this.progress=f*this.maximum):(this.progress=Math.min(this.progress,this.maximum),f=this.progress/this.maximum),d.setWaiState(c,"describedby",this.labelNode.id),d.setWaiState(c,"valuenow",this.progress),d.setWaiState(c,"valuemin",0),d.setWaiState(c,"valuemax",this.maximum));this.labelNode.innerHTML=this.report(f);b.toggleClass(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);a.style.width=f*100+"%";this.onChange()},_setValueAttr:function(a){this._set("value",a);a==Infinity?
this.update({indeterminate:!0}):this.update({indeterminate:!1,progress:a})},_setLabelAttr:function(a){this._set("label",a);this.update()},_setIndeterminateAttr:function(a){this.indeterminate=a;this.update()},report:function(a){return this.label?this.label:this.indeterminate?"&nbsp;":b.number.format(a,{type:"percent",places:this.places,locale:this.lang})},onChange:function(){}});return d.ProgressBar});define("text!orion/git/widgets/templates/ApplyPatchDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\n\t\t<form method="post" id="applyPatchDialog.myForm"\n\t\t\tenctype="multipart/form-data">\n\t\t\t<fieldset>\n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-row; height: 20px">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="radio" name="radio" value="urlRadio" id="applyPatchDialog.urlRadio" checked/>URL:\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="text" name="url" id="applyPatchDialog.url" style="display: inline-block; width: 98%;"\n\t\t\t\t\t\t\t\tdojoType="dijit.form.ValidationTextBox"\n\t\t\t\t\t\t\t\tregExp="^http(s)*://.+" invalidMessage="Invalid URL."/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-row; height: 20px">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="radio" name="radio" value="fileRadio" id="applyPatchDialog.fileRadio"/>File:\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px; vertical-align: top;">\n\t\t\t\t\t\t\t<div id="files" dojoType="dojox.form.uploader.FileList" uploaderId="applyPatchDialog.uploader"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input name="uploadedfile" multiple="false" type="file" id="applyPatchDialog.uploader" force="iframe"\n\t\t\t\t\t\t\t\tdojoType="dojox.form.Uploader" style="height: 20px" label="Browse..."/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;">\n\t\t\t\t\t\t\t<input type="submit" label="Finish" value="OK" dojoType="dijit.form.Button"\n\t\t\t\t\t\t\t\tstyle="padding: 20 0 10 0; float: right; clear: both;"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/OpenCommitDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" title="${title}" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<div style="display:table">\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<label for="resourceName" style="padding-right:10">${selectFile}</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<input type="text" dojoType="dijit.form.TextBox" dojoAttachPoint="resourceName" \n\t\t\t\t\t\tplaceHolder="${searchPlaceHolder}"\n\t\t\t\t\t\tintermediateChanges="true" style="width:30em;">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div dojoAttachPoint="results" style="max-height:400px; height:auto; overflow-y:auto;"></div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/OpenCommitDialog","i18n!git/nls/gitmessages,require,dojo,dijit,dijit/Dialog,dijit/form/TextBox,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/OpenCommitDialog.html,dojo/date/locale".split(","),function(b,d,a,c){return a.declare("orion.git.widgets.OpenCommitDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:a.cache("orion","git/widgets/templates/OpenCommitDialog.html"),SEARCH_DELAY:500,timeoutId:null,time:null,options:null,
constructor:function(){this.inherited(arguments);this.timeoutId=null;this.time=0;this.options=arguments[0];this.serviceRegistry=this.options.serviceRegistry;if(!this.serviceRegistry)throw Error("Missing required argument: serviceRegistry");this.repositories=this.options.repositories;if(!this.repositories)throw Error("Missing required argument: repositories");this.commitName=this.options.commitName},postMixInProperties:function(){this.options.title=this.options.title||b["Find Commit"];this.selectFile=
b["Type the commit name (sha1):"];this.searchPlaceHolder=b.Search;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);a.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(a.hitch(this,this.checkSearch),0)});a.connect(this.resourceName,"onKeyPress",this,function(b){b.keyCode===a.keys.ENTER&&this.results&&(b=a.query("a",this.results),b.length>0&&(window.open(b[0].href),this.hide()))});a.connect(this,
"onMouseUp",function(a){a.target.focus()});this.resourceName.set("value",this.commitName)},checkSearch:function(){clearTimeout(this.timeoutId);var b=(new Date).getTime();b-this.time>this.SEARCH_DELAY?(this.time=b,this.doSearch()):this.timeoutId=setTimeout(a.hitch(this,"checkSearch"),50)},_findCommitLocation:function(b,c,d){var g=this;d==null&&(d=new a.Deferred);b.length>0?g.serviceRegistry.getService("orion.git.provider").doGitLog("/gitapi/commit/"+c+b[0].ContentLocation+"?page=1&pageSize=1").then(function(a){d.callback(a.Children[0])},
function(){g._findCommitLocation(b.slice(1),c,d)}):d.errback();return d},doSearch:function(){var c=this.resourceName&&this.resourceName.get("value");if(c){a.place("<div>"+b["Searching&#x2026;"]+"</div>",this.results,"only");var e=this;this.serviceRegistry.getService("orion.page.message").setProgressMessage(b["Looking for the commit"]);this._findCommitLocation(this.repositories,c).then(function(b){a.empty(e.results);e.displayCommit(b,e.results)},function(){a.place("<div>No commits found</div>",e.results,
"only");e.serviceRegistry.getService("orion.page.message").setProgressMessage("")})}},displayCommit:function(c,e){var d=a.create("div",{style:"padding:10px; max-width:480px"},e),g=c.Message.split(/(\r?\n|$)/)[0],j=a.create("a",{"class":"gitMainDescription",href:"/git/git-commit.html#"+c.Location+"?page=1&pageSize=1"},d);a.place(document.createTextNode(g),j);a.connect(j,"onclick",j,a.hitch(this,function(){this.hide()}));a.create("div",{style:"padding-top:15px"},d);a.create("span",{"class":"gitSecondaryDescription"},
d).textContent=b[" commit: "]+c.Name;c.Parents&&c.Parents.length>0&&(a.create("div",null,d),a.place(document.createTextNode(b["parent: "]),d),g=a.create("a",{"class":"gitSecondaryDescription",href:"/git/git-commit.html#"+c.Parents[0].Location+"?page=1&pageSize=1"},d),a.place(document.createTextNode(c.Parents[0].Name),g),a.connect(g,"onclick",g,a.hitch(this,function(){this.hide()})));a.create("div",{style:"padding-top:15px"},d);if(c.AuthorImage)g=a.create("span",{"class":"git-author-icon-small",style:"margin-bottom:30px"},
d),j=new Image,j.src=c.AuthorImage,j.name=c.AuthorName,j.width=35,j.height=35,a.place(j,g,"first");a.create("span",{"class":"gitSecondaryDescription"},d).textContent=a.string.substitute(b[" authored by ${0} (${1})) on ${2}"],[c.AuthorName,c.AuthorEmail,a.date.locale.format(new Date(c.Time),{formatLength:"short"})]);a.create("div",null,d);a.create("span",{"class":"gitSecondaryDescription"},d).textContent=a.string.substitute(b["committed by 0 (1)"],[c.CommitterName,c.CommitterEmail])},show:function(){this.inherited(arguments);
this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)}})});define("text!orion/git/widgets/templates/ConfirmPushDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\t\t\t\t<\!--div style="text-align: left"--\>\n\t\t\t\t\t<div style="padding: 0px; text-align: left;"  , id = "div1">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div style="padding-top:10px; text-align: right;">\n\t\t\t\t\t<input type="button" id = "moreButton" label="More" value="OK" dojoType="dijit.form.Button"\n\t\t\t\t\t\t\tstyle="text-align:right; display:inline-block; clear: both"/>\n\t\t\t\t\t<input type="submit" label="OK" value="OK" dojoType="dijit.form.Button"\n\t\t\t\t\t\t\tstyle="text-align:right; display:inline-block; clear: both"/>\n\n\t\t\t\t\t</div>\n\t\t\t\t<\!--/div--\>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/ReviewRequestDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" title="${title}" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<div style="display:table">\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<label for="ReviewReqUrl" style="padding-right:10">${selectFile}</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<input type="text" dojoType="dijit.form.TextBox" dojoAttachPoint="ReviewReqUrl"\n\t\t\t\t\tstyle="width:30em;">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<br>\n\t\t\t<div style="display:table-row">\n\t\t\t\t<div style="display:table-cell; padding:5;">\n\t\t\t\t\t<label for="ReviewerName" style="padding-right:10">${reviewerName}</label>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div style="display: block; padding: 5; clear: both; text-align: left">\n\t\t\t\t<input type="text" dojoType="dijit.form.TextBox" dojoAttachPoint="ReviewerName"\n\t\t\t\t\tstyle="width:15em;" placeholder="Reviewer name">\n\t\t\t</div>\n\t\t\t<button dojoAttachPoint="AskForReview" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">Submit\n\t\t\t\t</button>\n\t\t\t<br>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/ReviewRequestDialog","i18n!git/nls/gitmessages,require,dojo,dijit,dijit/Dialog,dijit/form/TextBox,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/ReviewRequestDialog.html".split(","),function(b,d,a,c){return a.declare("orion.git.widgets.ReviewRequestDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:a.cache("orion","git/widgets/templates/ReviewRequestDialog.html"),SEARCH_DELAY:500,timeoutId:null,time:null,options:null,
constructor:function(){this.inherited(arguments);this.timeoutId=null;this.time=0;this.options=arguments[0];this.url=this.options.url},postMixInProperties:function(){this.options.title=this.options.title||b["Contribution Review Request"];this.selectFile=b["Paste link in email or IM"];this.reviewerName=b["Send the link to the reviewer"];this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.ReviewReqUrl.set("value",this.options.url)},show:function(){this.inherited(arguments);
this.ReviewReqUrl.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)},execute:function(){this.options.func&&this.options.func(this.ReviewerName.value);delete this.options.func}})});define("text!orion/git/widgets/templates/ContentDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\n\t\t<form method="post" id="contenDialog.myForm"\n\t\t\tenctype="multipart/form-data">\n\t\t\t<fieldset>\n\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t<div style="display: table-cell; padding: 1px;" , id = "div1" >\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n</div>'});
define("text!orion/git/widgets/templates/CommitDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">\n\t\t<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>\n\t\t<span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="onclick: onCancel" title="${buttonCancel}">\n\t\t\t<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>\n\t\t</span>\n\t</div>\n\t<div dojoAttachPoint="containerNode" class="dijitDialogPaneContent">\n\t\t<\!-- Actual content here --\>\n\t\t<div style="display: none; padding-top: 10px; padding-bottom: 10px;" dojoAttachPoint="commitInfoBar"><b dojoAttachPoint="commitInfo"></b></div>\n\t\t\n\t\t<div style="display: table">\n\t\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="commitMessageLabel" for="${id}_commitMessage" style="padding-right: 10">${commitMessageLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="commitMessage" id="${id}_commitMessage" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="amendLabel" for="${id}_amend" style="padding-right: 10">${amendLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="amend" id="${id}_amend" type="checkbox" style="display: inline-block;">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="committerNameLabel" for="${id}_committerName" style="padding-right: 10">${committerNameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="committerName" id="${id}_committerName" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="committerEmailLabel" for="${id}_committerEmail" style="padding-right: 10">${committerEmailLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="committerEmail" id="${id}_committerEmail" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="authorNameLabel" for="${id}_authorName" style="padding-right: 10">${authorNameLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="authorName" id="${id}_authorName" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<label dojoAttachPoint="authorEmailLabel" for="${id}_authorEmail" style="padding-right: 10">${authorEmailLabelText}</label>\n\t\t\t\t</div>\n\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t<input dojoAttachPoint="authorEmail" id="${id}_authorEmail" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div style="display: table-row">\n\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t<button dojoAttachPoint="commitChangesButton" dojoType="dijit.form.Button" type="submit" value="OK" style="padding: 20 0 10 0; float: right; clear: both;">OK\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>'});
define("orion/git/widgets/CommitDialog","i18n!git/nls/gitmessages,dojo,dijit,dijit/Dialog,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/CommitDialog.html".split(","),function(b,d,a){d.declare("orion.git.widgets.CommitDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:d.cache("orion","git/widgets/templates/CommitDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);
this.title=b["Commit Changes"];this.commitMessageLabelText=b["Message:"];this.amendLabelText=b["Amend:"];this.committerNameLabelText=b["Committer Name:"];this.committerEmailLabelText=b["Committer Email:"];this.authorNameLabelText=b["Author Name:"];this.authorEmailLabelText=b["Author Email:"]},postCreate:function(){this.inherited(arguments);if(this.options.body.Message)this.commitMessage.value=this.options.body.Message;d.connect(this.commitMessage,"onkeyup",d.hitch(this,this.validate));if(this.options.body.Amend)this.amend.checked=
!0;if(this.options.body.CommitterName)this.committerName.value=this.options.body.CommitterName;d.connect(this.committerName,"onkeyup",d.hitch(this,this.validate));if(this.options.body.CommitterEmail)this.committerEmail.value=this.options.body.CommitterEmail;d.connect(this.committerEmail,"onkeyup",d.hitch(this,this.validate));if(this.options.body.AuthorName)this.authorName.value=this.options.body.AuthorName;d.connect(this.authorName,"onkeyup",d.hitch(this,this.validate));if(this.options.body.AuthorEmail)this.authorEmail.value=
this.options.body.AuthorEmail;d.connect(this.authorEmail,"onkeyup",d.hitch(this,this.validate));this.validate()},validate:function(){this.commitMessage.value?this.committerName.value?this.committerEmail.value?this.authorName.value?this.authorEmail.value?(d.style(this.commitInfoBar,"display","none"),this.commitChangesButton.disabled=!1):(d.style(this.commitInfoBar,"display","block"),this.commitChangesButton.disabled=!0,this.commitInfo.textContent=b["The author mail is required."]):(d.style(this.commitInfoBar,
"display","block"),this.commitChangesButton.disabled=!0,this.commitInfo.textContent=b["The author name is required."]):(d.style(this.commitInfoBar,"display","block"),this.commitChangesButton.disabled=!0,this.commitInfo.textContent=b["The committer mail is required."]):(d.style(this.commitInfoBar,"display","block"),this.commitChangesButton.disabled=!0,this.commitInfo.textContent=b["The committer name is required."]):(d.style(this.commitInfoBar,"display","block"),this.commitChangesButton.disabled=!0,
this.commitInfo.textContent=b["The commit message is required."])},execute:function(){if(this.options.func){var a={};a.Message=this.commitMessage.value;a.Amend=this.amend.checked?!0:!1;a.CommitterName=this.committerName.value;a.CommitterEmail=this.committerEmail.value;a.AuthorName=this.authorName.value;a.AuthorEmail=this.authorEmail.value;this.options.func(a)}delete this.options.func}})});
define("orion/git/gitClient",["require","dojo"],function(b,d){var a=a||{};a.GitService=function(){function a(b){if(b)this._serviceRegistry=b,this._serviceRegistration=b.registerService("orion.git.provider",this),this._sshService=b.getService("orion.net.ssh")}a.prototype={checkGitService:function(){},cloneGitRepository:function(a,c,h,g,j,k,l,m,n){var o=this,q={};if(a)q.Name=a;if(h)q.Path=h;if(c)q.GitUrl=c;q.Location=g;if(j)q.GitSshUsername=j;if(k)q.GitSshPassword=k;if(l)q.GitSshKnownHost=l;if(m)q.GitSshPrivateKey=
m;if(n)q.GitSshPassphrase=n;var a=b.toUrl("gitapi/clone/._"),a=a.substring(0,a.length-2),p=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson(q),handleAs:"json",timeout:15E3,load:function(a,b){d.hitch(o,o._getGitServiceResponse)(p,a,b)},error:function(a,b){return d.hitch(o,o._handleGitServiceResponseError)(p,this,a,b)}});return p},removeGitRepository:function(a){var b=this,c=new d.Deferred;d.xhrDelete({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,
f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){return d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f)}});return c},getDiffContent:function(a){var b=this,c=new d.Deferred;d.xhrGet({url:a,headers:{"Orion-Version":"1"},content:{parts:"diff"},handleAs:"text",timeout:15E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){return d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f,d.xhrGet)}});return c},getDiffFileURI:function(a){var b=this,
c=new d.Deferred;d.xhrGet({url:a,headers:{"Orion-Version":"1"},content:{parts:"uris"},handleAs:"json",timeout:15E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f,d.xhrGet)}});return c},getGitStatus:function(a){var b=this,c=new d.Deferred;d.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,
this,a,f,d.xhrGet)}});return c},stage:function(a){var b=this,c=new d.Deferred;d.xhrPut({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f)}});return c},stageMultipleFiles:function(a,b){var c=this,g=new d.Deferred;d.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:d.toJson({Path:b}),handleAs:"json",timeout:15E3,load:function(a,b){d.hitch(c,c._getGitServiceResponse)(g,
a,b)},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b)}});return g},unstageAll:function(a,b){var c=this,g=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:d.toJson({Reset:b}),load:function(a,b){d.hitch(c,c._getGitServiceResponse)(g,a,b)},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b)}});return g},unstage:function(a,b){var c=this,g=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},
handleAs:"json",timeout:15E3,postData:d.toJson({Path:b}),load:function(a,b){d.hitch(c,c._getGitServiceResponse)(g,a,b)},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b)}});return g},checkoutPath:function(a,b){var c=this,g=new d.Deferred;d.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:d.toJson({Path:b,RemoveUntracked:"true"}),handleAs:"json",timeout:15E3,load:function(a,b){d.hitch(c,c._getGitServiceResponse)(g,a,b)},error:function(a,b){return d.hitch(c,c._handleGitServiceResponseError)(g,
this,a,b)}});return g},commitAll:function(a,b,c){var g=this,j=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,postData:c,load:function(a,b){d.hitch(g,g._getGitServiceResponse)(j,a,b)},error:function(a,b){d.hitch(g,g._handleGitServiceResponseError)(j,this,a,b)}});return j},getGitClone:function(a){var b=this,c=new d.Deferred;d.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,
f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f,d.xhrGet)}});return c},getGitCloneConfig:function(a){var b=this,c=new d.Deferred;d.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f,d.xhrGet)}});return c},getGitBranch:function(a){var b=this,c=new d.Deferred;d.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",
timeout:5E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f,d.xhrGet)}});return c},getGitRemote:function(a){var b=this,c=new d.Deferred;d.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f,d.xhrGet)}});return c},checkoutBranch:function(a,b){var c=this,
g=new d.Deferred;d.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:d.toJson({Branch:b}),handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(c,c._getGitServiceResponse)(g,a,b)},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b)}});return g},resetIndex:function(a,b){var c=this,g=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson({Commit:b,Reset:"HARD"}),handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(c,c._getGitServiceResponse)(g,a,
b)},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b)}});return g},addBranch:function(a,b,c){var g=this,j={};if(b)j.Name=b;if(c)j.Branch=c;var k=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson(j),handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(g,g._getGitServiceResponse)(k,a,b)},error:function(a,b){d.hitch(g,g._handleGitServiceResponseError)(k,this,a,b)}});return k},removeBranch:function(a){var b=this,c=new d.Deferred;d.xhrDelete({url:a,
headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f)}});return c},addRemote:function(a,b,c){var g=this,j=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},putData:d.toJson({Remote:b,RemoteURI:c}),handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(g,g._getGitServiceResponse)(j,a,b)},error:function(a,b){d.hitch(g,g._handleGitServiceResponseError)(j,
this,a,b)}});return j},removeRemote:function(a){var b=this,c=new d.Deferred;d.xhrDelete({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f)}});return c},doGitLog:function(a){var b=this,c=new d.Deferred;d.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,
f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f,d.xhrGet)}});return c},getDiff:function(a,b){var c=this,g=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson({New:b}),handleAs:"json",timeout:5E3,load:function(a,b){g.callback(b.xhr.getResponseHeader("Location"))},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b,d.xhrPost)}});return g},doFetch:function(a,b,c,g,j,k,l){var m=this,n=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},
postData:d.toJson({Fetch:"true",Force:b,GitSshUsername:c,GitSshPassword:g,GitSshKnownHost:j,GitSshPrivateKey:k,GitSshPassphrase:l}),handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(m,m._getGitServiceResponse)(n,a,b)},error:function(a,b){d.hitch(m,m._handleGitServiceResponseError)(n,this,a,b)}});return n},doPull:function(a,b,c,g,j,k,l){var m=this,n=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson({Pull:"true",Force:b,GitSshUsername:c,GitSshPassword:g,GitSshKnownHost:j,
GitSshPrivateKey:k,GitSshPassphrase:l}),handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(m,m._getGitServiceResponse)(n,a,b)},error:function(a,b){d.hitch(m,m._handleGitServiceResponseError)(n,this,a,b)}});return n},doMerge:function(a,b,c){var g=this,j=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson({Merge:b,Squash:c}),handleAs:"json",timeout:5E3,load:function(a,b){var c=new d.Deferred;d.hitch(g,g._getGitServiceResponse)(c,a,b);c.then(function(a){j.callback({jsonData:a})})},
error:function(a,b){d.hitch(g,g._handleGitServiceResponseError)(j,this,a,b)}});return j},doCherryPick:function(a,b){var c=this,g=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson({"Cherry-Pick":b}),handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(c,c._getGitServiceResponse)(g,a,b)},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b)}});return g},doRebase:function(a,b,c){var g=this,j={};j.Rebase=b;if(c)j.Operation=c;var k=new d.Deferred;d.xhrPost({url:a,
headers:{"Orion-Version":"1"},postData:d.toJson(j),handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(g,g._getGitServiceResponse)(k,a,b)},error:function(a,b){d.hitch(g,g._handleGitServiceResponseError)(k,this,a,b)}});return k},doPush:function(a,b,c,g,j,k,l,m,n){var o=this,q=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson({PushSrcRef:b,PushTags:c,Force:g,GitSshUsername:j,GitSshPassword:k,GitSshKnownHost:l,GitSshPrivateKey:m,GitSshPassphrase:n}),handleAs:"json",timeout:5E3,
load:function(a,b){d.hitch(o,o._getGitServiceResponse)(q,a,b)},error:function(a,b){d.hitch(o,o._handleGitServiceResponseError)(q,this,a,b)}});return q},getLog:function(a,b){var c=this,g=new d.Deferred,j=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson({New:b}),handleAs:"json",timeout:5E3,load:function(a,b){j.callback(b.xhr.getResponseHeader("Location"))},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(j,this,a,b,d.xhrPost)}});j.then(function(a){d.xhrGet({url:a,
headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(c,c._getGitServiceResponse)(g,a,b)},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b,d.xhrGet)}})});return g},getDefaultRemoteBranch:function(a){var b=this,c=new d.Deferred,g=new d.Deferred;d.xhrGet({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,c){d.hitch(b,b._getGitServiceResponse)(g,a,c)},error:function(a,c){d.hitch(b,b._handleGitServiceResponseError)(g,
this,a,c,d.xhrGet)}});g.then(function(a){if(a.Children[0]==null)return null;d.xhrGet({url:a.Children[0].Location,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f,d.xhrGet)}})});return c},doAddTag:function(a,b){var c=this,g=new d.Deferred;d.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:d.toJson({Name:b}),handleAs:"json",timeout:5E3,load:function(a,
b){d.hitch(c,c._getGitServiceResponse)(g,a,b)},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b)}});return g},doRemoveTag:function(a){var b=this,c=new d.Deferred;d.xhrDelete({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:5E3,load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f)}});return c},checkoutTag:function(a,b,c){var g=this,j=new d.Deferred;d.xhrPut({url:a,headers:{"Orion-Version":"1"},
putData:d.toJson({Tag:b,Branch:c}),handleAs:"json",timeout:5E3,load:function(a,b){d.hitch(g,g._getGitServiceResponse)(j,a,b)},error:function(a,b){d.hitch(g,g._handleGitServiceResponseError)(j,this,a,b)}});return j},addCloneConfigurationProperty:function(a,b,c){var g=this,j=new d.Deferred;d.xhrPost({url:a,headers:{"Orion-Version":"1"},postData:d.toJson({Key:b,Value:c}),handleAs:"json",timeout:15E3,load:function(a,b){d.hitch(g,g._getGitServiceResponse)(j,a,b)},error:function(a,b){d.hitch(g,g._handleGitServiceResponseError)(j,
this,a,b)}});return j},editCloneConfigurationProperty:function(a,b){var c=this,g=new d.Deferred;d.xhrPut({url:a,headers:{"Orion-Version":"1"},putData:d.toJson({Value:b}),handleAs:"json",timeout:15E3,load:function(a,b){d.hitch(c,c._getGitServiceResponse)(g,a,b)},error:function(a,b){d.hitch(c,c._handleGitServiceResponseError)(g,this,a,b)}});return g},deleteCloneConfigurationProperty:function(a){var b=this,c=new d.Deferred;d.xhrDelete({url:a,headers:{"Orion-Version":"1"},handleAs:"json",timeout:15E3,
load:function(a,f){d.hitch(b,b._getGitServiceResponse)(c,a,f)},error:function(a,f){d.hitch(b,b._handleGitServiceResponseError)(c,this,a,f)}});return c},sendCommitReviewRequest:function(a,b,c,g,j,k){var l=this,m=new d.Deferred;d.xhrPost({url:b,handleAs:"json",timeout:15E3,postData:d.toJson({ReviewReqCommit:a,ReviewReqUrl:g,ReviewReqNotifyLogin:c,ReviewReqAuthorName:j,ReviewMessage:k}),load:function(a,b){d.hitch(l,l._getGitServiceResponse)(m,a,b)},error:function(a,b){d.hitch(l,l._handleGitServiceResponseError)(m,
this,a,b)}});return m},_getGitServiceResponse:function(a,b,c){if(c&&c.xhr.status===202)return c=new d.Deferred,c.callback(b),this._serviceRegistry.getService("orion.page.progress").showWhile(c).then(function(b){a.callback(b.Result.Severity==="Ok"?b.Result.JsonData:b.Result)});a.callback(b)},_handleGitServiceResponseError:function(a,b,c){a||(a=new d.Deferred);a.errback(c);return a}};return a}();return a});
define("orion/ssh/sshTools",[],function(){var b=b||{};b.SshService=function(){function b(a){if(a)this._serviceRegistry=a,this._serviceRegistration=a.registerService("orion.net.ssh",this)}b.prototype={_KNOWN_HOSTS:"known_hosts",addKnownHosts:function(a,b){b||(b="");var d=localStorage.getItem(b+this._KNOWN_HOSTS);d?d.indexOf(a)<0&&localStorage.setItem(b+this._KNOWN_HOSTS,d+"\n"+a):localStorage.setItem(b+this._KNOWN_HOSTS,a)},clearKnownhosts:function(a){a||(a="");localStorage.removeItem(a+this._KNOWN_HOSTS)},
getKnownHosts:function(a){a||(a="");return localStorage.getItem(a+this._KNOWN_HOSTS)}};return b}();return b});
define("orion/links",[],function(){function b(b){this._init(b)}b.prototype={_init:function(b){this._registry=b.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.textlink",this)},_replaceLink:function(b,a,c,f,e){var h=b.search(c);h>0&&(a.appendChild(document.createTextNode(b.substring(0,h))),b=b.substring(h));var c=b.replace(c,""),h=b.substring(0,b.length-c.length),g=h.split(" ",f);if(g.length===f){for(var b=document.createElement("a"),j=0;j<f;j++)e=e.replace("%"+
(j+1),g[j]);b.setAttribute("href",e);b.textContent=h;a.appendChild(b);b=c}return b},addLinks:function(b,a){var c=a||document.createElement("div"),f=this._registry.getServiceReferences("orion.core.linkScanner");if(f.length>0)for(var e=f[0],f=RegExp(e.getProperty("pattern"),"i"),h=e.getProperty("words"),e=e.getProperty("anchor"),g=b.search(f);g>=0;)b=this._replaceLink(b,c,f,h,e),g=b.search(f);b.length>0&&c.appendChild(document.createTextNode(b));return c}};b.prototype.constructor=b;return{TextLinkService:b}});
define("orion/contentTypes",[],function(){function b(a,b){function c(a,b,e,d){var e=b.filename.indexOf(e)>=0,f=b.extension.indexOf(d)>=0;if(e||f)if(!a||e&&a.extension.indexOf(d)>=0)return b;return a}for(var d=a&&a.split(".").pop(),f=null,l=0;l<b.length;l++){var m=b[l];c(f,m,a,d)===m&&(f=m)}return f}function d(b){this.serviceRegistry=b;this.map=function(a){function b(a){return a===null||typeof a==="undefined"?[]:a instanceof Array?a:[a]}for(var a=a.getServiceReferences(c).concat(a.getServiceReferences(f)),
e={},d=0;d<a.length;d++)for(var l=b(a[d].getProperty("contentTypes")),m=0;m<l.length;m++){var n=l[m];e[n.id]||(e[n.id]={id:n.id,name:n.name,image:n.image,"extends":n["extends"],extension:b(n.extension),filename:b(n.filename)})}return e}(b);b.registerService(a,this)}var a="orion.core.contenttypes",c="orion.core.contenttype",f="orion.file.contenttype";d.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(a[c]);return b},getContentTypesMap:function(){return this.map},
getFileContentType:function(a){return b(a.Name,this.getContentTypes())},getFilenameContentType:function(a){return b(a,this.getContentTypes())},getContentType:function(a){return this.map[a]||null},isExtensionOf:function(a,b){a=typeof a==="string"?this.getContentType(a):a;b=typeof b==="string"?this.getContentType(b):b;if(!a||!b)return!1;if(a.id===b.id)return!0;else for(var c=a,d={};c&&(c=this.getContentType(c["extends"]));){if(c.id===b.id)return!0;if(d[c.id])throw Error("Cycle: "+c.id);d[c.id]=!0}return!1},
isSomeExtensionOf:function(a,b){for(var c=0;c<b.length;c++)if(this.isExtensionOf(a,b[c]))return!0;return!1}};return{ContentTypeService:d,getFilenameContentType:b}});
define("dojo/hash",["dojo"],function(b){(function(){function d(a,b){var c=a.indexOf(b);return c>=0?a.substring(c+1):""}function a(){return d(location.href,"#")}function c(){b.publish("/dojo/hashchange",[a()])}function f(){a()!==g&&(g=a(),c())}function e(a){if(j)if(j.isTransitioning())setTimeout(b.hitch(null,e,a),l);else{var c=j.iframe.location.href,d=c.indexOf("?");j.iframe.location.replace(c.substring(0,d)+"?"+a)}else location.replace("#"+a),!k&&f()}function h(){function e(){g=a();j=x?g:d(v.href,
"?");k=!1;r=null}var f=document.createElement("iframe"),h=b.config.dojoBlankHtmlUrl||b.moduleUrl("dojo","resources/blank.html");b.config.useXDomain&&!b.config.dojoBlankHtmlUrl&&console.warn("dojo.hash: When using cross-domain Dojo builds, please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl to the path on your domain to blank.html");f.id="dojo-hash-iframe";f.src=h+"?"+a();f.style.display="none";document.body.appendChild(f);this.iframe=b.global["dojo-hash-iframe"];
var j,k,r,s,x,v=this.iframe.location;this.isTransitioning=function(){return k};this.pollLocation=function(){if(!x)try{var w=d(v.href,"?");if(document.title!=s)s=this.iframe.document.title=document.title}catch(t){x=!0,console.error("dojo.hash: Error adding history entry. Server unreachable.")}var u=a();if(k&&g===u)if(x||w===r)e(),c();else{setTimeout(b.hitch(this,this.pollLocation),0);return}else if(!(g===u&&(x||j===w)))if(g!==u){g=u;k=!0;r=u;f.src=h+"?"+r;x=!1;setTimeout(b.hitch(this,this.pollLocation),
0);return}else if(!x)location.href="#"+v.search.substring(1),e(),c();setTimeout(b.hitch(this,this.pollLocation),l)};e();setTimeout(b.hitch(this,this.pollLocation),l)}b.hash=function(b,c){if(!arguments.length)return a();b.charAt(0)=="#"&&(b=b.substring(1));c?e(b):location.href="#"+b;return b};var g,j,k,l=b.config.hashPollFrequency||100;b.addOnLoad(function(){"onhashchange"in b.global&&(!b.isIE||b.isIE>=8&&document.compatMode!="BackCompat")?k=b.connect(b.global,"onhashchange",c):document.addEventListener?
(g=a(),setInterval(f,l)):document.attachEvent&&(j=new h)})})();return b.hash});
define("orion/uiUtils",["i18n!orion/nls/messages","dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(b,d,a){function c(a){var b=window.navigator.platform.indexOf("Mac")!==-1;return b&&a.metaKey||!b&&a.ctrlKey}return{getUserKeyString:function(a){var b="",c=navigator.platform.indexOf("Mac")!==-1;a.mod1&&(b+=c?"Cmd+":"Ctrl+");a.mod2&&(b+="Shift+");a.mod3&&(b+="Alt+");a.mod4&&c&&(b+="Ctrl+");if(a.alphaKey)return b+a.alphaKey;for(var g in d.keys)if(typeof(d.keys[g]==="number")&&d.keys[g]===
a.keyCode)return b+g;var j;switch(a.keyCode){case 59:j=a.mod2?":":";";break;case 61:j=a.mod2?"+":"=";break;case 188:j=a.mod2?"<":",";break;case 190:j=a.mod2?">":".";break;case 191:j=a.mod2?"?":"/";break;case 192:j=a.mod2?"~":"`";break;case 219:j=a.mod2?"{":"[";break;case 220:j=a.mod2?"|":"\\";break;case 221:j=a.mod2?"}":"]";break;case 222:j=a.mod2?'"':"'"}return j?b+j:b+String.fromCharCode(a.keyCode)},getUserText:function(b,c,h,g,j,k,l,m,n){var l=function(l){return function(m){var o=a.byId(b),s=o.get("value");
l&&m.keyCode===d.keys.ESCAPE?(h&&d.style(c,"display","inline"),o.destroyRecursive(),k&&k()):l&&m.keyCode!==d.keys.ENTER||(!o.isValid()||!n&&s===g?h&&d.style(c,"display","inline"):j(s),o.destroyRecursive(),k&&k())}},o=new a.form.ValidationTextBox({id:b,required:!0,value:g||""});d.place(o.domNode,c,"after");d.addClass(o.domNode,"userEditBoxPrompt");h&&d.style(c,"display","none");d.connect(o,"onKeyDown",l(!0));d.connect(o,"onBlur",l(!1));window.setTimeout(function(){o.focus();if(g){var c=d.byId(b),e=
m?g.indexOf(m):-1;e>0?a.selectInputText(c,0,e):c.select()}},0)},openInNewWindow:c,followLink:function(a,b){b&&c(b)?window.open(a):window.location=a}}});
define("orion/commands","i18n!orion/nls/messages,require,dojo,dijit,orion/uiUtils,orion/PageUtil,orion/explorers/navigationUtils,dijit/Menu,dijit/form/DropDownButton,dijit/MenuItem,dijit/PopupMenuItem,dijit/MenuSeparator,dijit/Tooltip,dijit/TooltipDialog".split(","),function(b,d,a,c,f,e,h){function g(b,c,e){var d=function(){e&&a.addClass(this,e)},f=function(){e&&a.removeClass(this,e)};a.connect(b,"onmouseover",b,d);a.connect(c,"onfocus",b,d);a.connect(b,"onmouseout",b,f);a.connect(c,"onblur",b,f)}
function j(a,b,c,e,d){this.commandService=a;this.handler=b;this.items=c;this.userData=e;this.command=d;if(d.parameters)this.parameters=d.parameters.makeCopy();this.id=d.id}function k(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._init(a);this._parameterCollector=null;this.showMenuIcons=!1}function l(b,c,e){a.addClass(c,"commandImage");var d;b.imageClass?(d=a.create("span",{},c,"last"),a.addClass(d,b.spriteClass),a.addClass(d,b.imageClass)):
(d=new Image,d.alt=b.name,d.name=e,d.id=e,d.src=b.image,a.place(d,c,"last"));return d}function m(a){this._init(a)}function n(b,c,e,d,f,g,h){this.keyCode=typeof b==="string"?b.toUpperCase().charCodeAt(0):b;this.mod1=c!==void 0&&c!==null?c:!1;this.mod2=e!==void 0&&e!==null?e:!1;this.mod3=d!==void 0&&d!==null?d:!1;this.mod4=f!==void 0&&f!==null?f:!1;typeof g==="string"?(this.domScope=a.byId(g),this.scopeName=h||g):(this.domScope=g,this.scopeName=h||g?g.id:null)}function o(a,b){this.token=a;this.parameterName=
b}function q(a,b,c,e,d){this.name=a;this.type=b;this.label=c;this.value=e;this.lines=d||1}function p(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._options=b;this.optionsRequested=!1;this.getParameters=c;this.clientCollect=b&&b.clientCollect}var r=window.navigator.platform.indexOf("Mac")!==-1;j.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()},makeCopy:function(a){var b=new j(this.commandService,
this.handler,this.items,this.userData,this.command);b.domNode=this.domNode;b.domParent=this.domParent;if(a)b.parameters=a.makeCopy();else if(this.parameters)b.parameters=this.parameters.makeCopy();return b}};j.prototype.constructor=j;var s=a.declare(c.MenuItem,{constructor:function(){var b=arguments[0]||{};b.onKeyDown=a.hitch(this,function(b){if((b.keyCode===a.keys.ENTER||b.keyCode===a.keys.SPACE)&&this._anchorLocation)b.ctrlKey?window.open(this._anchorLocation):window.location=this._anchorLocation});
this.inherited(arguments||[b])},postCreate:function(){var b=a.query("a",this.domNode)[0];if(b)a.addClass(b,"commandMenuItemAnchor"),this._anchorLocation=b.href},_setLabelAttr:function(b){typeof b==="string"?this.containerNode.textContent=b:b&&(a.empty(this.containerNode),this.containerNode.appendChild(b.cloneNode(!0)))},setLink:function(b,c){var b=e.validateURLScheme(b),d=a.create("a",{className:"commandMenuItemAnchor",href:b});d.textContent=c;a.place(d,this.containerNode,"only");this._anchorLocation=
b},_onClick:function(a){this.hasLink||this.inherited(arguments)}}),x=a.declare(c.form.DropDownButton,{_setLabelAttr:function(b){if(typeof b==="string"){if(this._set("label",b),this.containerNode.textContent=b,this.showLabel===!1&&!this.params.title)this.titleNode.title=a.trim(this.containerNode.innerText||this.containerNode.textContent||"")}else b&&(a.empty(this.containerNode),this.containerNode.appendChild(b.cloneNode(!0)))}}),v=a.declare(c.PopupMenuItem,{_setLabelAttr:function(b){typeof b==="string"?
this.containerNode.textContent=b:(a.empty(this.containerNode),this.containerNode.appendChild(b.cloneNode(!0)))}}),w=a.declare(c.Tooltip,{constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.showDelay=1E3},_onUnHover:function(){this._showTimer&&(window.clearTimeout(this._showTimer),delete this._showTimer);this.polling=!1;this.close()},_onHover:function(b){this.inherited(arguments);this.polling=!0;this.pollForMissingTarget();window.setTimeout(function(){c._masterTT&&a.removeAttr(c._masterTT.containerNode,
"role")},this.showDelay+1)},pollForMissingTarget:function(){this.polling&&window.setTimeout(a.hitch(this,function(){this._stillInDocument(this._connectNode)?this.pollForMissingTarget():(this.polling=!1,this.close())}),this.showDelay+500)},_stillInDocument:function(a){for(;a;){if(a===window.document)return!0;a=a.parentNode}return!1},postMixInProperties:function(){this.inherited(arguments);this.options.commandParent&&c.byId(this.options.commandParent.id)&&a.connect(this.options.commandParent,"onClose",
a.hitch(this,function(){this.close()}))},_setLabelAttr:function(b){this.label=null;typeof b==="string"?this.domNode.textContent=b:(a.empty(this.domNode),this.domNode.appendChild(b.cloneNode(!0)))}});k.prototype={_init:function(b){this._registry=b.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.page.command",this);this._defaultSelectionService=b.selection;a.connect(window.document,"onkeydown",a.hitch(this,function(a){a=a||window.event;if(function(a){if(r){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 b=a.target.nodeName.toLowerCase();if(b==="input")switch(a.target.type.toLowerCase()){case "text":case "password":case "search":case "color":case "date":case "datetime":case "datetime-local":case "email":case "month":case "number":case "range":case "tel":case "time":case "url":case "week":return}else if(b==="textarea")return}this._processKey(a)}))},_processKey:function(b){function c(a){window.document.all?a.keyCode=0:(a.preventDefault(),a.stopPropagation())}for(var e in this._activeBindings)if(this._activeBindings[e]&&
this._activeBindings[e].keyBinding&&this._activeBindings[e].command&&this._activeBindings[e].keyBinding.match(b)){var d=this._activeBindings[e],f=d.invocation;if(f)if(d=d.command,d.hrefCallback){c(b);b=d.hrefCallback.call(f.handler||window,f);b.then?b.then(function(a){window.open(a)}):window.open(b);break}else if(d.callback){c(b);window.setTimeout(a.hitch(this,function(){this._invoke(f)}),0);break}}},processURL:function(b){for(var c in this._urlBindings)if(this._urlBindings[c]&&this._urlBindings[c].urlBinding&&
this._urlBindings[c].command){var e=this._urlBindings[c].urlBinding.match(b);if(e){var d=this._urlBindings[c],f=d.command,g=d.invocation;if(g&&g.parameters&&f.callback){g.parameters.setValue(e.parameterName,e.parameterValue);window.setTimeout(a.hitch(this,function(){this._invoke(g)}),0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(b,c,e,d){if(c){var f=this._commandList[b];f&&(f.visibleWhen?f.visibleWhen(c):1)&&f.callback&&window.setTimeout(a.hitch(this,function(){this._invoke(new j(this,
e,c,null,f),d)}),0)}else{var g=this._urlBindings[b];g&&g.command&&g.command.callback&&window.setTimeout(a.hitch(this,function(){this._invoke(g.invocation,d)}),0)}},getSelectionService:function(){return this._defaultSelectionService},setParameterCollector:function(a){this._parameterCollector=a},openParameterCollector:function(a,b,c){this._parameterCollector&&(this._parameterCollector.close(),this._parameterCollector.open(a,b,c))},closeParameterCollector:function(){this._parameterCollector&&this._parameterCollector.close()},
collectsParameters:function(){return this._parameterCollector},_invoke:function(a,b){return this._collectAndInvoke(a.makeCopy(b),!1)},_collectAndInvoke:function(b,e){if(b)if(this._parameterCollector&&b.parameters&&b.parameters.hasParameters()&&(e||b.parameters.shouldCollectParameters())){var d=!1;b.parameters.updateParameters(b);d=this._parameterCollector.collectParameters(b);if(!d){var f=new c.TooltipDialog({onBlur:function(){c.popup.close(f)}}),g=a.create("div");a.addClass(g,"parameterPopup");var h=
window.document.activeElement,j=this._parameterCollector.getFillFunction(b,function(){c.popup.close(f);f.destroyRecursive();h&&h.focus()})(g);g.childNodes.length>0&&(f.set("content",g),g=(g=c.byId(b.domParent.id))?a.position(g.eclipseScopeId,!0):a.position(b.domNode,!0),g.x&&g.y&&g.w&&(c.popup.open({popup:f,x:g.x+g.w-8,y:g.y+8}),window.setTimeout(function(){j.focus();j.select()},0),d=!0))}d||b.command.callback.call(b.handler||window,b)}else b.command.callback.call(b.handler||window,b);else window.console.log("Client attempted to invoke command without an available (rendered) command invocation")},
collectParameters:function(a){this._collectAndInvoke(a,!0)},showKeyBindings:function(b){var c={},e,d,g;for(g in this._activeBindings)if((d=this._activeBindings[g])&&d.keyBinding&&d.command)d.keyBinding.scopeName?(c[d.keyBinding.scopeName]||(c[d.keyBinding.scopeName]=[]),c[d.keyBinding.scopeName].push(d)):(e=f.getUserKeyString(d.keyBinding),a.place("<span role='listitem'>"+e+" = "+d.command.name+"<br></span>",b,"last"));for(var h in c)if(c[h].length&&c[h].length>0){a.place("<h2>"+h+"</h2>",b,"last");
for(g=0;g<c[h].length;g++)d=c[h][g],e=f.getUserKeyString(d.keyBinding),a.place("<span role='listitem'>"+e+" = "+d.command.name+"<br></span>",b,"last")}},addCommand:function(a){this._commandList[a.id]=a},addCommandGroup:function(a,b,c,e,d,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));if(a[b]){if(e)a[b].title=e;if(c)a[b].position=c;a[b].emptyGroupMessage=f}else a[b]={title:e,position:c,emptyGroupMessage:f,
children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){if(b)for(var c=b.split("/"),e=0;e<c.length;e++)if(c[e].length>1)a[c[e]]||(a[c[e]]={position:0,children:{}}),a=a[c[e]].children;return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,c,e,d,f,g){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=
this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));a[b]={position:c};f&&(c=this._commandList[b])&&(this._activeBindings[b]={command:c,keyBinding:f,bindingOnly:d});g&&(c=this._commandList[b])&&(this._urlBindings[b]={command:c,urlBinding:g,bindingOnly:d});a.sortedContributions=null},_isLastChildSeparator:function(b,e){if(e==="tool"||e==="button")return b.childNodes.length>0&&a.hasClass(b.childNodes[b.childNodes.length-1],"commandSeparator");if(e==="menu"){var d=b.getChildren();return d.length>
0&&d[d.length-1]instanceof c.MenuSeparator}return!1},renderCommands:function(b,c,e,d,f,g,h){if(typeof b!=="string")throw"a scope id for rendering must be specified";typeof c==="string"&&(c=a.byId(c));if(!c)throw"no parent";var j=this._contributionsByScopeId[b];if(!e&&j){var e=j.localSelectionService||this._defaultSelectionService,k=this;e&&e.getSelections(function(a){k.renderCommands(b,c,a,d,f,g)})}else j&&(this._render(this._contributionsByScopeId[b],c,e,d,f,g,h),f==="tool"||f==="button"?this._isLastChildSeparator(c,
f)&&c.removeChild(c.childNodes[c.childNodes.length-1]):f==="menu"&&this._isLastChildSeparator(c,f)&&(e=c.getChildren()[c.getChildren().length-1],c.removeChild(e),e.destroy()))},destroy:function(b){typeof b==="string"&&(b=a.byId(b));if(!b)throw"no parent";var e=c.findWidgets(b);a.forEach(e,function(a){a.destroyRecursive()});a.empty(b)},_render:function(e,d,f,k,l,m,n){var o=e.sortedContributions;if(!o){var o=[],r=!1,p;for(p in e)if(!e.hasOwnProperty||e.hasOwnProperty(p)){var w=e[p];if(w&&typeof w.position===
"number")w.id=p,o.push(w),r=!0}if(r)o.sort(function(a,b){return a.position-b.position}),e.sortedContributions=o}for(e=0;e<o.length;e++){var s,q;if(o[e].children&&Object.getOwnPropertyNames(o[e].children).length>0){p=o[e];var O,r=o[e].children,M=this;if(l==="tool"||l==="button")if(p.title){var G=new c.Menu({style:"display: none;"});s=new x({label:p.title==="*"?b.Actions:p.title,showLabel:p.title!=="*",style:"visibility: hidden;",dropDown:G});a.addClass(s.domNode,"commandMenu");n&&h.generateNavGrid(n,
s.domNode,s);w=d;d.nodeName.toLowerCase()==="ul"?w=a.create("li",{},d):a.addClass(s.domNode,"commandMargins");a.removeAttr(s.titleNode,"title");a.destroy(s.valueNode);g(s.domNode,s.focusNode);a.place(s.domNode,w,"last");G.eclipseScopeId=d.eclipseScopeId||d.id;window.setTimeout(a.hitch({contributions:r,emptyGroupMessage:p.emptyGroupMessage},function(){if(!G._destroyed){M._render(this.contributions,G,f,k,"menu",m,n);O=G.getChildren();if(M._isLastChildSeparator(G,"menu")){var b=O[O.length-1];G.removeChild(b);
b.destroy();O=G.getChildren()}O.length===0?this.emptyGroupMessage?(a.connect(s.focusNode,"onclick",this,function(){var a=document.createElement("p");a.textContent=this.emptyGroupMessage;var b=new c.TooltipDialog({content:a,onMouseLeave:function(){c.popup.close(b);b.destroyRecursive()}});c.popup.open({popup:b,around:s.domNode});window.setTimeout(function(){c.popup.close(b);b.destroyRecursive()},15E3)}),a.style(s.domNode,"visibility","visible")):(n&&h.removeNavGrid(n,s.domNode),s.destroyRecursive()):
a.style(s.domNode,"visibility","visible")}}),0)}else{var N;d.childNodes.length>0&&!this._isLastChildSeparator(d,l)&&(N=this.generateSeparatorImage(d));M._render(r,d,f,k,l,m,n);d.childNodes.length>0&&d.childNodes[d.childNodes.length-1]!==N&&(N=this.generateSeparatorImage(d))}else if(p.title)w=new c.Menu,p=new v({label:p.title,popup:w}),d.addChild(p),M._render(r,w,f,k,l,m,n),w.getChildren().length===0&&(p.set("label","removeme"),d.removeChild(p),p.destroyRecursive());else{var F;d.getChildren().length>
0&&!this._isLastChildSeparator(d,l)&&(F=new c.MenuSeparator,d.addChild(F));M._render(r,d,f,k,l,m,n);r=d.getChildren();r[r.length-1]!==F&&(F=new c.MenuSeparator,d.addChild(F))}}else{p=(r=this._commandList[o[e].id])?!0:!1;var E=null,E=null;if(r){q=new j(this,k,f,m,r);q.domParent=d;w=p&&(r.visibleWhen?r.visibleWhen(f):!0);if(this._activeBindings[r.id]&&this._activeBindings[r.id].keyBinding)E=this._activeBindings[r.id],E.invocation=w?q:null,E.bindingOnly&&(p=!1);if(this._urlBindings[r.id]&&this._urlBindings[r.id].urlBinding)E=
this._urlBindings[r.id],E.invocation=w?q:null,E.bindingOnly&&(p=!1);p=p&&w}if(p)if(r.choiceCallback)if(p=new c.Menu({style:"display: none;"}),l==="tool"||l==="button"){s=new x({label:r.name,dropDown:p,postCreate:function(){a.connect(this._buttonNode,"mousedown",this,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,f,k,m)});x.prototype.postCreate.apply(this,Array.prototype.slice.call(arguments))}});a.addClass(s.domNode,"commandMenu");a.removeAttr(s.titleNode,"title");a.destroy(s.valueNode);
if(r.image)a.addClass(s.iconNode,"commandImage"),s.iconNode.src=r.image;a.place(s.domNode,d,"last");s.eclipseCommand=r;s.eclipseChoices=p}else{if(l==="menu")w=new v({label:r.name,popup:p}),d.addChild(w),w.eclipseCommand=r,w.eclipseChoices=p,a.connect(d,"_openPopup",w,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,f,k,m)})}else l==="tool"?(p="tool"+r.id+e,r._addTool(d,p,q,n)):l==="button"?(p="button"+r.id+e,r._addButton(d,p,q,n)):l==="menu"&&r._addMenuItem(d,q,n)}}},generateSeparatorImage:function(b){b=
b.nodeName.toLowerCase()==="ul"?a.create("li",null,b,"last"):a.create("span",null,b,"last");a.addClass(b,"core-sprite-sep");a.addClass(b,"imageSprite");a.addClass(b,"commandSeparator");return b}};k.prototype.constructor=k;m.prototype={_init:function(a){this.id=a.id;this.name=a.name;a.tooltip||a.name?(this.tooltip=document.createElement("span"),this.tooltip.textContent=a.tooltip||a.name):this.tooltip=null;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;
this.image=a.image||d.toUrl("images/none.png");this.imageClass=a.imageClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters},_addTool:function(b,c,e,d){e.handler=e.handler||this;var f,j;if(this.hrefCallback){if(f=this._makeLink(e),!f)return}else f=a.create("span",{tabindex:d?"-1":"0",role:"button"}),this.hasImage()?(j=l(this,f,c),this._addAccessibleLabel(f)):(c=window.document.createTextNode(this.name),a.place(c,f,"last"),a.addClass(f,"commandMissingImageButton commandButton")),
this._hookCallback(f,e),g(f,f,j?"commandImageOver":"commandButtonOver");e.domNode=f;e.domParent=b;this.tooltip&&new w({connectId:[f],label:this.tooltip,position:["above","left","right","below"],commandParent:b,commandService:e.commandService});b.nodeName.toLowerCase()==="ul"?b=a.create("li",{},b):a.addClass(f,"commandMargins");a.place(f,b,"last");h.generateNavGrid(d,e.domNode)},_addButton:function(b,c,e,d){e.handler=e.handler||this;var f;if(this.hrefCallback){if(f=this._makeLink(e),!f)return}else{f=
a.create("span",{tabindex:"0",role:"button"});this._hookCallback(f,e);var j;this.name?(a.place(window.document.createTextNode(this.name),f,"last"),a.addClass(f,"commandButton"),j="commandButtonOver"):(l(this,f,c),j="commandImageOver",this._addAccessibleLabel(f));g(f,f,j)}f.id=c;this.tooltip&&new w({connectId:[f],label:this.tooltip,position:["above","left","right","below"],commandParent:b,commandService:e.commandService});e.domParent=b;e.domNode=f;b.nodeName.toLowerCase()==="ul"?b=a.create("li",{},
b):a.addClass(f,"commandMargins");a.place(f,b,"last");h.generateNavGrid(d,e.domNode)},_addMenuItem:function(b,c,e){var d=c.commandService.showMenuIcons;c.domParent=b.domNode;var f=new s({labelType:this.hrefCallback?"html":"text",label:this.name,iconClass:d?this.imageClass:null,hasLink:!!this.hrefCallback});this.tooltip&&new w({connectId:[f.domNode],label:this.tooltip,commandParent:b,commandService:c.commandService});if(this.hrefCallback){var g=this.hrefCallback.call(c.handler,c);if(g)if(g.then)g.then(a.hitch(this,
function(a){f.setLink(a,this.name)}));else if(g)f.setLink(g,this.name);else return}else if(this.callback)f.onClick=a.hitch(this,function(){c.commandService._invoke(c)});f.eclipseCommand=this;b.addChild(f);if(d)if(this.imageClass)a.addClass(f.iconNode,this.spriteClass);else if(this.image)a.addClass(f.iconNode,"commandMenuItem"),f.iconNode.src=this.image;c.domNode=f.domNode;h.generateNavGrid(e,c.domNode)},_makeLink:function(b){var c=a.create("a",{tabindex:"0"});a.addClass(c,"commandLink");a.place(window.document.createTextNode(this.name),
c,"last");b=this.hrefCallback.call(b.handler,b);if(b.then)b.then(function(a){c.href=a});else if(b)c.href=b;else return null;return c},_hookCallback:function(b,c){a.connect(b,"onclick",this,function(){c.commandService._invoke(c)});a.connect(b,"onkeypress",this,function(b){(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)&&c.commandService._invoke(c)})},_addAccessibleLabel:function(b){var c=this.name||this.tooltip;c&&a.attr(b,"aria-label",c)},populateChoicesMenu:function(b,e,d,f){b.focusedChild=
null;a.forEach(b.getChildren(),function(a){b.removeChild(a);a.destroy()});for(var d=this.getChoices(e,d,f),f=this.showMenuIcons,g=0;g<d.length;g++){var h=d[g],j;if(h.name){if(j=new c.MenuItem({label:h.name,iconClass:f?h.imageClass:null,onClick:this.makeChoiceCallback(h,e)}),f)if(h.imageClass)a.addClass(j.iconNode,h.spriteClass||"commandSprite");else if(h.image)a.addClass(j.iconNode,"commandImage"),j.iconNode.src=h.image}else j=new c.MenuSeparator;b.addChild(j)}},getChoices:function(a,b,c){return this.choiceCallback?
this.choiceCallback.call(b,a,c):null},makeChoiceCallback:function(a,b){return function(c){a.callback&&a.callback.call(a,b,c)}},hasImage:function(){return this.imageClass||this.image!==d.toUrl("images/none.png")}};m.prototype.constructor=m;n.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(r?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(r&&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}};n.prototype.constructor=n;o.prototype={match:function(a){a=e.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};o.prototype.constructor=o;q.prototype={optionsRequested:function(){return this.optionsRequested}};
q.prototype.constructor=q;p.prototype={_storeParameters:function(a){this.parameterTable=null;if(a){this.parameterTable={};for(var b=0;b<a.length;b++)this.parameterTable[a[b].name]=a[b]}},updateParameters:function(a){typeof this.getParameters==="function"&&this._storeParameters(this.getParameters(a))},hasParameters:function(){return this.parameterTable!==null},shouldCollectParameters:function(){return!this.clientCollect&&this.hasParameters()},parameterNamed:function(a){return this.parameterTable[a]},
valueFor:function(a){return(a=this.parameterTable[a])?a.value:null},setValue:function(a,b){var c=this.parameterTable[a];if(c)c.value=b},forEach:function(a){for(var b in this.parameterTable)this.parameterTable[b].type&&this.parameterTable[b].name&&a(this.parameterTable[b])},makeCopy:function(){var a=[];this.forEach(function(b){b=new q(b.name,b.type,b.label,b.value,b.lines);a.push(b)});var b=new p(a,this._options,this.getParameters);b.clientCollect=this.clientCollect;return b},hasOptionalParameters:function(){return this._hasOptionalParameters}};
p.prototype.constructor=p;return{CommandService:k,CommandKeyBinding:n,Command:m,CommandInvocation:j,CommandMenuItem:s,URLBinding:o,ParametersDescription:p,CommandParameter:q,CommandTooltip:w}});
define("orion/searchUtils",["require","dojo","orion/editor/regex","orion/commands"],function(b,d,a,c){var f=f||{};f.searchUtils=f.searchUtils||{};f.searchUtils.parseQueryStr=function(a,b){var c=a.indexOf("?"),d=a.indexOf("q=");c<d&&d>0&&(a=a.substring(c+1));c=a.indexOf("regEx&");c===0&&(a=a.substring(c+6));var d=a.split("&"),k={queryStr:a,start:0,rows:10,sort:"Path asc",replace:null};k.useRegEx=c===0;for(var l=0;l<d.length;l++){var m=d[l].indexOf("q="),n=d[l].indexOf("replace=");if(m>=0)c===0?f.searchUtils.parseLocationAndSearchStrRegEx(d[l].substring(m+
2),k,b):f.searchUtils.parseLocationAndSearchStr(d[l].substring(m+2),k,b);else if(n>=0)k.replace=d[l].substring(n+8);else if(m=d[l].split("="),m.length===2)if(m[0]==="rows")k.rows=parseInt(m[1]);else if(m[0]==="start")k.start=parseInt(m[1]);else if(m[0]==="sort")k.sort=m[1]}return k};f.searchUtils.copyQueryParams=function(a,b){return{sort:a.sort,useRegEx:a.useRegEx,rows:a.rows,start:a.start,searchStr:a.searchStr,location:a.location,replace:b?a.replace:null}};f.searchUtils.generateSearchHref=function(a){return b.toUrl("search/search.html")+
"#"+f.searchUtils.generateSearchQuery(a)};f.searchUtils.generateSearchQuery=function(a){var b="Path asc",c=40,d=0,f="",l="",m="",n="";if(a){a.useRegEx&&(n="regEx&");if(a.sort)b=a.sort;if(a.rows)c=a.rows;if(a.start)d=a.start;if(a.searchStr)f=a.searchStr;if(a.location)l=a.location,l.length>0&&l[l.length-1]!=="*"&&(l+="*"),l!==""&&(l="+Location:"+l);a.replace!==null&&a.replace!==void 0&&(m="&replace="+a.replace)}return"?"+n+"sort="+b+"&rows="+c+"&start="+d+"&q="+f+l+m};f.searchUtils.parseLocationAndSearchStr=
function(a,b,c){var d=a.indexOf("+Location:")>-1;b.location="";b.searchStr=a;if(d&&(a=a.split("+Location:"),a.length===2))d=a[1],d.length>0&&d[d.length-1]==="*"&&(d=d.substring(0,d.length-1)),b.location=d,b.searchStr=a[0];b.searchStrTitle=b.searchStr.split("\\").join("");if(b.searchStr.indexOf(" ")>=0)b.searchStrWithWhiteSpace='"'+b.searchStr+'"';b.inFileQuery=f.searchUtils.generateInFileQuery(b.searchStr,c)};f.searchUtils.parseLocationAndSearchStrRegEx=function(a,b,c){var d=a.indexOf("+Location:")>
-1;b.location="";b.searchStr=a;if(d&&(a=a.split("+Location:"),a.length===2))d=a[1],d.length>0&&d[d.length-1]==="*"&&(d=d.substring(0,d.length-1)),b.location=d,b.searchStr=a[0];b.searchStrTitle=b.searchStr;b.inFileQuery=f.searchUtils.generateInFileQueryRegEx(b.searchStr,c)};f.searchUtils.generateInFileQuery=function(b,c){var d={};d.originalSearchStr=b;var f=b.indexOf("*")>-1,k=b.indexOf("?")>-1;f&&(b=b.split("*").join(".*"));k&&(b=b.split("?").join("."));if(!f&&!k)d.searchStr=b.split("\\").join("").toLowerCase(),
d.wildCard=!1;else if(d.searchStr=b.toLowerCase(),f="",c&&(f="^"),k=a.parse("/"+f+d.searchStr+"/"))f=k.pattern,k=k.flags,k+=k.indexOf("i")===-1?"i":"",d.regExp={pattern:f,flags:k},d.wildCard=!0;d.searchStrLength=d.searchStr.length;return d};f.searchUtils.generateInFileQueryRegEx=function(b,c){var d={};d.originalSearchStr=b;d.searchStr=b;var f="";c&&(f="^");var k=a.parse("/"+f+d.searchStr+"/");if(k)f=k.pattern,k=k.flags,k+=k.indexOf("i")===-1?"i":"",d.regExp={pattern:f,flags:k},d.wildCard=!0;d.searchStrLength=
d.searchStr.length;return d};f.searchUtils.generateFindURLBinding=function(a,b,c){var d=",find=";a.wildCard&&(d+="@@useRegEx@@true@@");d+=encodeURIComponent(a.searchStr);typeof c==="string"&&(d=d+"@@replaceWith@@"+encodeURIComponent(c));typeof b==="number"&&(d=d+"@@atLine@@"+b);return d};f.searchUtils.parseFindURLBinding=function(a){var b=null,c=a.split("@@atLine@@");c.length>1&&(b=parseInt(c[1]),b<1&&(b=1));var a=null,c=c[0].split("@@replaceWith@@"),d=c[0],f=!1;d.indexOf("@@useRegEx@@true@@")===
0&&(f=!0,d=d.split("@@useRegEx@@true@@")[1]);c.length>1&&(a=c[1]);return{searchStr:d,replaceStr:a,lineNumber:b,useRegExp:f}};f.searchUtils.replaceRegEx=function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)};f.searchUtils.replaceStringLiteral=function(b,c,d){c=a.parse("/"+c+"/gim");return f.searchUtils.replaceRegEx(b,c,d)};f.searchUtils.searchOnelineLiteral=function(a,b,c){var d;d=0;for(var f=!1,l=[];;)if(d=b.indexOf(a.searchStr,d),d<0)break;else{l.push({startIndex:d});f=!0;if(c)break;d+=a.searchStrLength}return f?
l:null};f.searchUtils.findRegExp=function(a,b,c,d){if(!b)return null;c=c||"";c+=(c.indexOf("g")===-1?"g":"")+(c.indexOf("m")===-1?"m":"");var f=null;return(f=RegExp(b,c).exec(a.substring(d)))&&{startIndex:f.index+d,length:f[0].length}};f.searchUtils.searchOnelineRegEx=function(a,b,c){for(var d=0,k=!1,l=[];;)if(d=f.searchUtils.findRegExp(b,a.regExp.pattern,a.regExp.flags,d)){l.push(d);k=!0;if(c)break;d=d.startIndex+d.length}else break;return k?l:null};f.searchUtils.generateNewContents=function(a,b,
c,d,k){if(c&&a){var l;l=b.length>0?!0:!1;for(var m=0;m<a.length;m++){for(var n=a[m],o=!1,q=!1,p=[],r,s=0,x=0;x<c.children.length;x++)if(c.children[x].lineNumber-1===m){s=x;for(o=0;o<c.children[x].matches.length;o++)c.children[x+o].checked!==!1&&p.push(o);q=p.length>0;r=c.children[x].matches;o=!0;break}if(o){if(q){p=f.searchUtils.replaceCheckedMatches(n,d,r,p,k);n=p.replacedStr;for(o=0;o<c.children[s].matches.length;o++)c.children[s+o].newMatches=p.newMatches}else for(o=0;o<c.children[s].matches.length;o++)c.children[s+
o].newMatches=c.children[s+o].matches;l?b[m]=n:b.push(n)}else l||b.push(n)}}};f.searchUtils.generateMatchContext=function(a,b,c){var d=[],f=a*2+1,l;b.length<=f?(l=0,a=b.length-1):(l=c-a,l<0?(l=0,a=l+f-1):(a=c+a,a>b.length-1&&(a=b.length-1,l=a-f+1)));for(f=l;f<=a;f++)d.push({context:b[f],current:f===c});return d};f.searchUtils.splitFile=function(a){for(var b=0,c=0,d=0,f=0,l=[];;){b!==-1&&b<=d&&(b=a.indexOf("\r",d));c!==-1&&c<=d&&(c=a.indexOf("\n",d));if(c===-1&&b===-1){l.push(a.substring(f));break}var m=
1;b!==-1&&c!==-1?b+1===c?(m=2,d=c+1):d=(b<c?b:c)+1:d=b!==-1?b+1:c+1;l.push(a.substring(f,d-m));f=d}return l};f.searchUtils.searchWithinFile=function(a,b,c,d,k,l){c=f.searchUtils.splitFile(c);if(k)b.contents=c;if(b){b.children=[];for(var m=d=0;m<c.length;m++){var n=c[m];if(n&&n.length>0){var o=l?n:n.toLowerCase();if(o=a.wildCard?f.searchUtils.searchOnelineRegEx(a,o):f.searchUtils.searchOnelineLiteral(a,o)){var q=m+1;if(k)for(var p=0;p<o.length;p++){var r=p+1,r={parent:b,checked:b.checked,type:"detail",
matches:o,lineNumber:q,matchNumber:r,name:n,location:b.location+"-"+q+"-"+r};b.children.push(r)}else r={parent:b,context:f.searchUtils.generateMatchContext(2,c,m),checked:b.checked,type:"detail",matches:o,lineNumber:q,name:n,location:b.location+"-"+q},b.children.push(r);d+=o.length}}}b.totalMatches=d}};f.searchUtils.replaceCheckedMatches=function(a,b,c,d,f){for(var l=0,m="",n=[],o=0;o<c.length;o++){l!==c[o].startIndex&&(m+=a.substring(l,c[o].startIndex));if(c[o].length)f=c[o].length;for(var l=!1,
q=0;q<d.length;q++)if(d[q]===o){l=!0;break}l?(n.push({startIndex:m.length,length:b.length}),m+=b):(n.push({startIndex:m.length,length:f}),m+=a.substring(c[o].startIndex,c[o].startIndex+f));l=c[o].startIndex+f}l<a.length&&(m+=a.substring(l));return{replacedStr:m,newMatches:n}};f.searchUtils.fullPathNameByMeta=function(a){var b=a.length,c="";if(b>0)for(b-=1;b>-1;b--)c=c+(c===""?"":"/")+a[b].Name;return c};f.searchUtils.path2FolderName=function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};
f.searchUtils._storeRecentSearch=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("recentSearch",b)})};f.searchUtils.addRecentSearch=function(a,b,c){typeof b==="string"&&b&&a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(d){var k,d=d.get("recentSearch");typeof d==="string"&&(d=JSON.parse(d));if(d){for(k in d)if(d[k].name===b)return;d.length>=20&&d.splice(19,d.length-20+1)}else d=[];d.splice(0,0,{name:b,
regEx:c});f.searchUtils._storeRecentSearch(a,d)})};f.searchUtils.populateSearchMenu=function(a,b,g,j){b.focusedChild=null;d.forEach(b.getChildren(),function(a){b.removeChild(a);a.destroy()});f.searchUtils.getSearches(a,g,function(a){if(a)for(i in a)b.addChild(new c.CommandMenuItem({label:j(a[i]),hasLink:!0}))})};f.searchUtils.getSearches=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=a.get(b);typeof a==="string"&&(a=JSON.parse(a));a&&c&&
c(a)})};f.searchUtils.getMixedSearches=function(a,b,c){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){var d,e=a.get("recentSearch");typeof e==="string"&&(e=JSON.parse(e));if(b)for(d in a=a.get("search"),typeof a==="string"&&(a=JSON.parse(a)),a){var m=f.searchUtils.parseQueryStr(a[d].query);e.some(function(a){return m.searchStrTitle===a.name})||e.push({name:m.searchStrTitle,label:a[d].name})}e&&c&&c(e)})};f.searchUtils.getOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a=
a.get("openSearchPref");typeof a==="string"&&(a=JSON.parse(a));b(a?a.openInNewTab:!0)})};f.searchUtils.setOpenSearchPref=function(a,b){a.getService("orion.core.preference").getPreferences("/window/favorites").then(function(a){a.put("openSearchPref",{openInNewTab:b})})};return f.searchUtils});
define("orion/crawler/searchCrawler","i18n!orion/crawler/nls/messages,require,orion/searchUtils,orion/contentTypes,orion/Deferred,dojo".split(","),function(b,d,a,c,f,e){function h(b,c,d,e){this.registry=b;this.fileClient=c;this.fileLocations=[];this.fileSkeleton=[];this._totalCounter=this._hitCounter=0;this._searchOnName=e&&e.searchOnName;this._buildSkeletonOnly=e&&e.buildSkeletonOnly;this._fetchChildrenCallBack=e&&e.fetchChildrenCallBack;this.queryObj=this._searchOnName||this._buildSkeletonOnly?
null:a.parseQueryStr(d);this._location=e&&e.location;this._childrenLocation=e&&e.childrenLocation?e.childrenLocation:this._location}h.prototype.search=function(a){var c=this.registry.getService("orion.core.contenttypes");this._onSearchComplete=a;var d=this;this.registry.getService("orion.page.dialog").confirm(b["The search term on this location will not use indexed files."]+"\n"+b["It will take longer time. Do you want to proceed?"],function(a){a&&c.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}})})})})};h.prototype.searchName=function(b,c){if(b)this.queryObj=a.parseQueryStr(b,!0);if(c)this.onSearchNameComplete=c;var d=[];this._sort(this.fileSkeleton);if(this.fileSkeleton.length>0){for(var e=0;e<this.fileSkeleton.length;e++){var f=this.fileSkeleton[e].Name.toLowerCase();if(this.queryObj.inFileQuery.wildCard?a.searchOnelineRegEx(this.queryObj.inFileQuery,
f,!0):a.searchOnelineLiteral(this.queryObj.inFileQuery,f,!0))if(d.push(this.fileSkeleton[e]),d.length>=this.queryObj.rows)break}this.onSearchNameComplete({response:{numFound:d.length,docs:d}})}};h.prototype.buildSkeleton=function(a,b){this._buildingSkeleton=!0;var c=this.registry.getService("orion.core.contenttypes"),d=this;a();c.getContentTypes().then(function(a){d.contentTypesCache=a;d._visitRecursively(d._childrenLocation).then(function(){d._buildingSkeleton=!1;b();d.queryObj&&!d._buildSkeletonOnly&&
d.searchName()})})};h.prototype._searchCompleted=function(){console.log("Search Completed.")};h.prototype._searchFiles=function(){var a=[],b;if(this.fileLocations.length>0){b=this;for(var c=0;c<b.fileLocations.length;c++)a.push(b._sniffSearch(b.fileLocations[c]))}return f.all(a)};h.prototype._sort=function(a){a.sort(function(a,b){var c=a.Name&&a.Name.toLowerCase(),d=b.Name&&b.Name.toLowerCase();return c<d?-1:c>d?1:0})};h.prototype._visitRecursively=function(a){var b=[],d=this;this._fetchChildrenCallBack&&
this._fetchChildrenCallBack(a);return d.fileClient.fetchChildren(a).then(function(a){for(var e=0;e<a.length;e++)if(a[e].Directory!==void 0&&a[e].Directory===!1)if(d._searchOnName)b.push(d._buildSingleSkeleton(a[e]));else if(d._buildSkeletonOnly)b.push(d._buildSingleSkeleton(a[e]));else{var g=c.getFilenameContentType(a[e].Name,d.contentTypesCache);g&&g["extends"]==="text/plain"&&b.push(d._sniffSearch(a[e]))}else a[e].Location&&b.push(d._visitRecursively(a[e].ChildrenLocation));return f.all(b)})};h.prototype._hitOnceWithinFile=
function(b){b=b.toLowerCase();return this.queryObj.inFileQuery.wildCard?a.searchOnelineRegEx(this.queryObj.inFileQuery,b,!0):a.searchOnelineLiteral(this.queryObj.inFileQuery,b,!0)};h.prototype._sniffSearch=function(a){this._totalCounter++;var c=this;return c.fileClient.read(a.Location).then(function(d){if(c._hitOnceWithinFile(d))a.LastModified=a.LocalTimeStamp,c.fileLocations.push(a),c._hitCounter++,c._sort(c.fileLocations),c._onSearchComplete({response:{numFound:c.fileLocations.length,docs:c.fileLocations}},
!0);c.registry.getService("orion.page.message").setProgressResult({Message:e.string.substitute(b["${0} files found out of ${1}"],[c._hitCounter,c._totalCounter])})},function(a){console.error("Error loading file content: "+a.message)})};h.prototype._buildSingleSkeleton=function(a){this._totalCounter++;this.fileSkeleton.push(a);this.queryObj&&!this._buildSkeletonOnly&&this._totalCounter%100===0&&this.searchName();a=new f;a.resolve(this._totalCounter);return a};h.prototype.constructor=h;return{SearchCrawler:h}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,dojo,dijit,orion/searchUtils,orion/crawler/searchCrawler,dijit/form/Button,dijit/layout/BorderContainer,dijit/layout/ContentPane".split(","),function(b,d,a,c,f,e){function h(a){this.registry=a.serviceRegistry;this._commandService=a.commandService;(this._fileService=a.fileService)||console.error("No file service on search client")}h.prototype={search:function(a,b,c,d){var h=f.parseQueryStr(a),n=function(a){for(var b=[],c=0;c<a.response.docs.length;c++){var d=
a.response.docs[c];b.push({name:d.Name,path:d.Location,folderName:f.path2FolderName(d.Path?d.Path:d.Location,d.Name),directory:d.Directory,lineNumber:d.LineNumber})}return b};if(this._crawler&&!d)this._crawler.searchName(a,function(a){c(n(a),null)});else try{this._fileService.search(h.location,a).then(function(a){var b=h.searchStr,b=b.substring(b.indexOf("}")+1),b=b.substring(b.indexOf(":")+1);c(n(a),b)},function(a){c(null,null,a)})}catch(o){typeof o==="string"&&o.indexOf("search")>-1&&this._crawler?
this._crawler.searchName(a,function(a){c(n(a),null)}):typeof o==="string"&&o.indexOf("search")>-1&&d?(new e.SearchCrawler(this.registry,this._fileService,a,{childrenLocation:this.getChildrenLocation()})).search(function(a){c(n(a),null)}):this.registry.getService("orion.page.message").setErrorMessage(o)}},getFileService:function(){return this._fileService},setCrawler:function(a){this._crawler=a},handleError:function(b,c){console.error(b);var d=document.createTextNode(b);a.place(d,c,"only");return b},
setLocationByMetaData:function(c,d){var e="",f=null;this._searchRootLocation=this._fileService.fileServiceRootURL(c.Location);d&&c&&c.Parents&&c.Parents.length>0?f=d.index==="last"?c.Parents[c.Parents.length-1]:c.Parents[0]:c&&c.Directory&&c.Location&&c.Parents&&(f=c);if(f)this.setLocationbyURL(f.Location),e=f.Name,this._childrenLocation=f.ChildrenLocation;else if(c)this.setLocationbyURL(this._searchRootLocation),e=this._fileService.fileServiceName(c.Location),this._childrenLocation=c.ChildrenLocation;
f=a.byId("search");e||(e="");if(f&&f.placeholder){f.value="";var h=a.string.substitute(b["Search ${0}"],[e]);f.placeholder=h.length>30?h.substring(0,27)+"...":a.string.substitute(b["Search ${0}"],[e])}if(f&&f.title)f.title=b["Type a keyword or wild card to search in "]+e},setLocationbyURL:function(a){this._searchLocation=a},setRootLocationbyURL:function(a){this._searchRootLocation=a},setChildrenLocationbyURL:function(a){this._childrenLocation=a},getSearchLocation:function(){return this._searchLocation},
getSearchRootLocation:function(){return this._searchRootLocation},getChildrenLocation:function(){return this._childrenLocation},createSearchQuery:function(a,b,c,d,e,h){c||(c="Path");c+=" asc";if(b)return a=/\*$/.test(b)?"":"*",f.generateSearchQuery({sort:c,rows:100,start:0,location:d?this._searchRootLocation:this._searchLocation,searchStr:e+this._luceneEscape(b,!0)+a});b=h?!0:this.useRegEx;return f.generateSearchQuery({sort:c,useRegEx:b,rows:40,start:0,searchStr:b?a:this._luceneEscape(a,!0),location:d?
this._searchRootLocation:this._searchLocation})},_luceneEscape:function(a,b){for(var c="",d='+-&|!(){}[]^"~:\\'+(!b?"*?":""),e=0;e<a.length;e++){var f=a.charAt(e);d.indexOf(f)>=0&&(c+="\\");c+=f}return c},defaultRenderer:{makeRenderFunction:function(c,e,f,h,m){function n(a){return!c?!0:(a=c.getFilenameContentType(a))&&a["extends"]==="text/plain"?!0:!1}return function(c,g,p){if(p)a.place("<div>"+b["Search failed."]+"</div>",e,"only"),typeof h==="function"&&h(e);else{var p=function(){function a(b,c){var d=
c.folderName?c.folderName:c.path,e=document.createElement("span");e.id=d.replace(/[^a-zA-Z0-9_\.:\-]/g,"");e.appendChild(document.createTextNode(" - "+d+" "));b.appendChild(e)}var b={};return function(c,d){var e=d.name;if(b.hasOwnProperty(e)){a(c,d);var f=b[e];typeof f==="function"&&(b[e]=null,f())}else b[e]=function(){a(c,d)}}}(),r=!1;a.empty(e);if(c&&c.length>0){var s=document.createElement("table");s.setAttribute("role","presentation");for(var x=0;x<c.length;x++){var v=c[x],w;if(!r&&(r=!0,f))w=
s.insertRow(0).insertCell(0),w.textContent=f;w=s.insertRow(-1).insertCell(0);w.colspan=2;m&&m(w);var t=document.createElement("a");a.place(document.createTextNode(v.name),t);v.LineNumber&&a.place(document.createTextNode(" (Line "+v.LineNumber+")"),t);var u=v.location;v.isExternalResource?u=v.path:(u=v.directory?d.toUrl("navigate/table.html")+"#"+v.path:n(v.name)?d.toUrl("edit/edit.html")+"#"+v.path:v.path,u==="#"&&(u=""));t.setAttribute("href",u);t.setAttribute("aria-describedby",(v.folderName?v.folderName:
v.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));a.style(t,"verticalAlign","middle");w.appendChild(t);p(w,v)}a.place(s,e,"last");typeof h==="function"&&h(e)}!r&&g&&(c=a.string.substitute(b["No matches found for ${0}"],[g]),a.place(document.createTextNode(c),e,"only"),typeof h==="function"&&h(e))}}}}};h.prototype.constructor=h;return{Searcher:h}});
define("orion/widgets/OpenResourceDialog","i18n!orion/widgets/nls/messages,orion/crawler/searchCrawler,orion/contentTypes,require,dojo,dijit,dijit/Dialog,dijit/form/TextBox,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/OpenResourceDialog.html".split(","),function(b,d,a,c,f,e){return f.declare("orion.widgets.OpenResourceDialog",[e.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.cache("orion","widgets/templates/OpenResourceDialog.html"),SEARCH_DELAY:500,
timeoutId:null,time:null,options:null,searcher:null,searchRenderer:null,favService:null,constructor:function(){this.inherited(arguments);this.timeoutId=null;this.time=0;this.searcher=(this.options=arguments[0])&&this.options.searcher;this.contentTypeService=new a.ContentTypeService(this.searcher.registry);if(!this.searcher)throw Error("Missing required argument: searcher");this.searcher.setCrawler(null);this._forceUseCrawler=!1;this._searchOnRoot=!0;this.fileService=this.searcher.getFileService();
if(!this.fileService)throw Error(b["Missing required argument: fileService"]);this.searchRenderer=this.options&&this.options.searchRenderer;if(!this.searchRenderer||typeof this.searchRenderer.makeRenderFunction!=="function")throw Error(b["Missing required argument: searchRenderer"]);this.favService=this.options.favoriteService;if(!this.favService)throw Error(b["Missing required argument: favService"]);},postMixInProperties:function(){this.options.title=this.options.title||b["Find File Named"];this.selectFile=
b["Type the name of a file to open (? = any character, * = any string):"];this.searchPlaceHolder=b.Search;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);f.connect(this.resourceName,"onChange",this,function(){this.time=+new Date;clearTimeout(this.timeoutId);this.timeoutId=setTimeout(f.hitch(this,this.checkSearch),0)});f.connect(this.resourceName,"onKeyPress",this,function(a){a.keyCode===f.keys.ENTER&&this.results&&(a=f.query("a",this.results),a.length>0&&(window.open(a[0].href),
this.hide()))});f.connect(this,"onKeyPress",this,function(a){var b,c,d,h,n;if(a.keyCode===f.keys.DOWN_ARROW||a.keyCode===f.keys.UP_ARROW)c=f.query("a",this.results),b=f.query("a",this.favresults),d=e.getFocus(),n=c.indexOf(d.node),h=b.indexOf(d.node),a.keyCode===f.keys.DOWN_ARROW?h>=0?e.focus(h<b.length-1?b[h+1]:c.length>0?c[0]:b[0]):n>=0?e.focus(n<c.length-1?c[n+1]:b.length>0?b[0]:c[0]):(c.length>0||b.length>0)&&e.focus(-1<b.length-1?b[0]:c[0]):h>=0?(d=this.resourceName&&this.resourceName.get("textbox"),
e.focus(h>0?b[h-1]:d)):n>=0?(d=this.resourceName&&this.resourceName.get("textbox"),e.focus(n>0?c[n-1]:b.length>0?b[b.length-1]:d)):c.length>0?e.focus(c[c.length-1]):b.length>0&&e.focus(b[b.length-1]),f.stopEvent(a)});f.connect(this,"onMouseUp",function(a){a.target.focus()});this.populateFavorites();var a=this;setTimeout(function(){if(a._forceUseCrawler||!a.fileService.getService(a.searcher.getSearchLocation()).search){var c=a._searchOnRoot?a.searcher.getSearchRootLocation():a.searcher.getChildrenLocation(),
c=new d.SearchCrawler(a.searcher.registry,a.fileService,"",{searchOnName:!0,location:c});a.searcher.setCrawler(c);c.buildSkeleton(function(){f.addClass("crawlingProgress","progressPane_running_dialog");f.byId("crawlingProgress").title=b["Building file skeleton..."]},function(){f.removeClass("crawlingProgress","progressPane_running_dialog");f.byId("crawlingProgress").title=""})}},0)},populateFavorites:function(){f.place("<div>"+b["Populating favorites&#x2026;"]+"</div>",this.favresults,"only");this.favService.getFavorites().then(this.showFavorites());
this.favService.addEventListener("favoritesChanged",this.showFavorites())},onCancel:function(){console.log("cancelled")},showFavorites:function(){var a=this;return function(b){if(b.navigator)b=b.navigator;a.searchRenderer.makeRenderFunction(a.contentTypeService,a.favresults,!1,f.hitch(a,a.decorateResult),a.showFavoritesImage)(b);b&&b.length>0&&f.place("<hr/>",a.favresults,"last")}},showFavoritesImage:function(a){var d=new Image;f.addClass(d,"modelDecorationSprite");f.addClass(d,"core-sprite-makeFavorite");
d.src=c.toUrl("images/none.png");d.title=b.Favorite;a.appendChild(d);f.style(d,"verticalAlign","middle")},checkSearch:function(){clearTimeout(this.timeoutId);var a=(new Date).getTime();a-this.time>this.SEARCH_DELAY?(this.time=a,this.doSearch()):this.timeoutId=setTimeout(f.hitch(this,"checkSearch"),50)},doSearch:function(){var a=this.resourceName&&this.resourceName.get("value"),c=this.showFavorites();this.favService.queryFavorites(a).then(function(a){c(a)});if(a){f.place("<div>"+b["Searching&#x2026;"]+
"</div>",this.results,"only");var d=this;setTimeout(function(){var b=d.searcher.createSearchQuery(null,a,d.searcher._crawler?!1:"NameLower",d._searchOnRoot,d.searcher._crawler?"":"NameLower:"),c=d.searchRenderer.makeRenderFunction(d.contentTypeService,d.results,!1,f.hitch(d,d.decorateResult));d.searcher.search(b,!1,c)},0)}},decorateResult:function(a){var b=this;f.query("a",a).forEach(function(a){f.connect(a,"onmouseup",function(a){!f.mouseButtons.isMiddle(a)&&!f.isCopyKey(a)&&b.hide()});f.connect(a,
"onkeyup",b,function(a){a.keyCode===f.keys.ENTER&&b.hide()})})},show:function(){this.inherited(arguments);this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)}})});
define("orion/extensionCommands","require,dojo,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil".split(","),function(b,d,a,c,f,e,h){var g={},b=window.location.href.split("#")[0],j=b.substring(0,b.length-window.location.pathname.length);g._cloneItemWithoutChildren=function l(a){if(a===null||typeof a!=="object")return a;var b=a.constructor(),c;for(c in a)c!=="children"&&c!=="Children"&&(b[c]=l(a[c]));return b};g._createOpenWithCommands=function(a){function b(a,c){for(var d=
a.getServiceReferences("orion.navigate.openWith"),e=[],f=0;f<d.length;f++){var g=d[f];g.getProperty("editor")===c.id&&(g=g.getProperty("contentType"),g instanceof Array?e=e.concat(g):g!==null&&typeof g!=="undefined"&&e.push(g))}return e}for(var c=function(){for(var b=a.getServiceReferences("orion.edit.editor"),c=[],d=0;d<b.length;d++){var e=b[d],f=e.getProperty("id");c.push({id:f,name:e.getProperty("name"),nameKey:e.getProperty("nameKey"),nls:e.getProperty("nls"),uriTemplate:e.getProperty("orionTemplate")||
e.getProperty("uriTemplate")})}return c}(),d=function(a){for(a=a.getServiceReferences("orion.navigate.openWith.default");0<a.length;)return{editor:a[0].getProperty("editor")};return null}(a),e=[],f=0;f<c.length;f++){var g=c[f],h=d&&d.editor===g.id,j=b(a,g);j.length&&e.push({properties:{name:g.name||g.id,nameKey:g.nameKey,id:"eclipse.openWithCommand."+g.id,tooltip:g.name,tooltipKey:g.nameKey,contentType:j,uriTemplate:g.uriTemplate,nls:g.nls,forceSingleItem:!0,isEditor:h?"default":"editor"},service:{}})}return e};
g._makeValidator=function(a,b,c,g){function h(a,b,c,d){var e=c.match,f;if(b.indexOf("|")>=0)return f=b.substring(0,b.indexOf("|")),b=b.substring(b.indexOf("|")+1),h(a,f,c,d)?!0:h(a,b,c,d);else if(b.indexOf(":")>=0)return f=b.substring(0,b.indexOf(":")),b=b.substring(b.indexOf(":")+1),a[f]?h(a[f],b,c,d):!1;else{a:{f=!1;var g;if(a[b]){if(e)if(typeof e==="string"){if(!typeof(a[b]==="string")){c=!1;break a}if(c.variableName){if(e=RegExp(e).exec(a[b]))f=e[0],g=c.variableMatchPosition==="before"?a[b].substring(0,
e.index):c.variableMatchPosition==="after"?a[b].substring(e.index+f.length):c.variableMatchPosition==="only"?f:a[b],f=!0}else{c=RegExp(e).test(a[b]);break a}}else a[b]===e&&(g=a[b],f=!0);else g=a[b],f=!0;if(f&&c.variableName&&(d[c.variableName]=g,d.itemCached=a,c.replacements))for(a=0;a<c.replacements.length;a++)b=!1,c.replacements[a].pattern?d[c.variableName]=d[c.variableName].replace(RegExp(c.replacements[a].pattern),c.replacements[a].replacement||""):b=!0,b&&window.console.log("Invalid replacements specified in validation property.  "+
c.replacements[a]);c=f}else c=!1}return c}}b={info:a};b.validationFunction=d.hitch(b,function(b){typeof g==="function"&&(b=g.call(this,b));if(b){if(d.isArray(b)){if((this.info.forceSingleItem||this.info.uriTemplate)&&b.length!==1)return!1;if(b.length<1)return!1}else b=[b];for(var e=0;e<b.length;e++){var j;a:{var m=b[e],v=c;if(this.info.validationProperties)for(j=0;j<this.info.validationProperties.length;j++){var w=this.info.validationProperties[j];if(w.source){if(!h(m,w.source,w,this)){j=!1;break a}}else{window.console.log("Invalid validationProperties in "+
a.id+".  No source property specified.");j=!1;break a}}if(this.info.contentType&&v){w=!1;if(m=f.getFilenameContentType(m.Name,v))for(j=0;j<this.info.contentType.length;j++)if(m.id===this.info.contentType[j]){w=!0;break}j=w}else j=!0}if(!j)return!1}return!0}return!1});b.generatesURI=d.hitch(b,function(){return!!this.info.uriTemplate});b.getURI=d.hitch(b,function(a){if(this.info.uriTemplate){var b={},c;for(c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);if(this.info.validationProperties)for(c=0;c<this.info.validationProperties.length;c++){var d=
this.info.validationProperties[c];d.source&&d.variableName&&(this.itemCached===a&&this[d.variableName]||h(a,d.source,d,this),a[d.variableName]?window.console.log("Variable name "+d.variableName+" in the extension "+this.info.id+" conflicts with an existing property in the item metadata."):b[d.variableName]=this[d.variableName])}b.OrionHome=j;a=new e(this.info.uriTemplate);return window.decodeURIComponent(a.expand(b))}return null});return b};g._createCommandOptions=function(a,b,c,e,f,j){function r(h,
r){var w=g._makeValidator(a,c,e,j);h.visibleWhen=w.validationFunction;if(f)w.generatesURI()?h.hrefCallback=d.hitch(w,function(a){return this.getURI(d.isArray(a.items)?a.items[0]:a.items)}):h.callback=d.hitch(a,function(a){var e;if(this.forceSingleItem)a=d.isArray(a.items)?a.items[0]:a.items,e=g._cloneItemWithoutChildren(a);else if(d.isArray(a.items)){e=[];for(var f=0;f<a.items.length;f++)e.push(g._cloneItemWithoutChildren(a.items[f]))}else e=g._cloneItemWithoutChildren(a.items);b.run?b.run(e):c&&
c.getService(b).run(e)});r.resolve(h)}var s=new d.Deferred;a.nls?h.getMessageBundle(a.nls).then(function(b){r({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},s)}):r({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor},s);return s};g.getOpenWithCommands=function(a){var b=[],c;for(c in a._commandList){var d=a._commandList[c];d.isEditor&&b.push(d)}return b};return g});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,dojo,dijit,orion/commands,dijit/Menu".split(","),function(b,d,a,c,f){a.declare("orion.widgets.UserMenu",[c.Menu],{widgetsInTemplate:!1,id:"userMenu",templateString:'<table role="menu" tabIndex="${tabIndex}" dojoAttachEvent="onkeypress:_onKeyPress" cellspacing="0"><tbody class="dijitReset" dojoAttachPoint="containerNode"></tbody></table>',postCreate:function(){this.inherited(arguments);this.label=b.test;a.style(this.domNode,"border-radius",
"3px");a.style(this.domNode,"border","1px solid #DDD")},constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};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(a){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b},
_renderAuthenticatedService:function(c,d,g){var j=this;(d=this.authenticatedServices[c].authService)&&d.logout&&this.addChild(new f.CommandMenuItem({label:g?b["Sign Out "]+g:b["Sign Out"],onClick:a.hitch(this,function(b,c){return function(){b.logout().then(a.hitch(j,function(){this.addUserItem(c,b,this.authenticatedServices[c].label);localStorage.removeItem(c);localStorage.removeItem("lastLogin");for(var a=localStorage.length-1;a>=0;a--){var d=localStorage.key(a);d&&d.indexOf("/orion/preferences/user")===
0&&localStorage.removeItem(d)}b.getAuthForm(window.location.href).then(function(a){window.location=a})}))}})(d,c)}))},_renderUnauthenticatedService:function(c,d,g){var j=this,k=this.unauthenticatedServices[c].authService;if(k)k.getAuthForm?a.hitch(j,function(a){k.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(c){c+=c.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+a:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+
"?key="+a;j.addChild(new f.CommandMenuItem({label:g?"<a target='_blank' href="+c+">"+b["Sign In To "]+g+"</a>":"<a target='_blank' href="+c+">"+b["Sign In"]+"</a>",hasLink:!0}),d)})})(c):k.login&&this.addChild(new f.CommandMenuItem({label:g?"Sign In To "+g:"Sign In",onClick:a.hitch(j,function(a){return function(){a.login(eclipse.globalCommandUtils.notifyAuthenticationSite)}})(k)}),d);else{var l=this.unauthenticatedServices[c].SignInLocation;l+=l.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+
"?key="+c:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+c;c=document.createElement("a");c.target="_blank";c.href=l;c.textContent=g?b["Sign In To "]+g:b["Sign In"];this.addChild(new f.Command.MenuItem({label:c,hasLink:!0}),d)}},renderServices:function(){for(var a=this.getChildren(),h=0;h<a.length;h++)this.removeChild(a[h]);a=document.createElement("a");a.href=d.toUrl("help/index.jsp");a.textContent=b.Help;this.addChild(new f.CommandMenuItem({label:a,hasLink:!0}));this.keyAssistFunction&&
this.addChild(new f.CommandMenuItem({label:b["Keyboard Shortcuts"],onClick:this.keyAssistFunction}));this.addChild(new c.MenuSeparator);a=document.createElement("a");a.href=d.toUrl("settings/settings.html");a.textContent=b.Settings;this.addChild(new f.CommandMenuItem({label:a,hasLink:!0}));if(this.isSingleService())for(h in this.authenticatedServices)this._renderAuthenticatedService(h,0)},getUserLabel:function(a){if(a.data){var b=a.data.Name&&a.data.Name.replace(/^\s+|\s+$/g,"")!==""?a.data.Name:
a.data.login;b.length>40&&(b=b.substring(0,30)+"...");b+=" ("+a.label+")";return b}else return a.label},setUserName:function(){},setKeyAssist:function(a){this.keyAssistFunction=a;this.renderServices()},addUserItem:function(c,h,g,j){j?(this.unauthenticatedServices[c]&&delete this.unauthenticatedServices[c],this.authenticatedServices[c]={authService:h,label:g,data:j}):(this.authenticatedServices[c]&&delete this.authenticatedServices[c],this.unauthenticatedServices[c]=this.unauthenticatedServices[c]?
{authService:h,label:g,pending:this.unauthenticatedServices[c].pending}:{authService:h,label:g});a.hitch(this,this.renderServices)();if(a.byId("userInfo"))if(this.isSingleService()&&j)g=c=j.Name&&j.Name.replace(/^\s+|\s+$/g,"")!==""?j.Name:j.login,g.length>40&&(g=g.substring(0,30)+"..."),j=a.create("a",{href:d.toUrl("profile/user-profile.html")+"#"+j.Location,style:"margin-right: 0px"},a.byId("userInfo"),"only"),j.textContent=g,j.setAttribute("aria-label",b["View profile of "]+c),new f.CommandTooltip({connectId:[j],
label:b["View profile of "]+c,position:["above","left","right","below"]});else if(this.isSingleService()&&!j)if(h.getAuthForm)a.hitch(this,function(c){h.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(d){d+=d.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+c:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+c;a.create("a",{href:d,style:"margin-right: 0px",target:"_blank"},a.byId("userInfo"),"only").textContent=
b["Sign In"]})})(c);else{if(h.login){var k=a.create("a",{style:"margin-right: 0px"},a.byId("userInfo"),"only");k.textContent=b["Sign In"];a.connect(k,"onmouseover",k,function(){k.style.cursor="pointer"});a.connect(k,"onmouseout",k,function(){k.style.cursor="default"});a.connect(k,"onclick",function(){h.login(eclipse.globalCommandUtils.notifyAuthenticationSite)})}}else a.empty(a.byId("userInfo"))}})});
define("orion/explorers/explorer","i18n!orion/nls/messages,require,dojo,orion/treetable,orion/explorers/explorerNavHandler,orion/commands".split(","),function(b,d,a,c,f,e){var h={};h.Explorer=function(){function b(a,c,d){this.registry=a;this.renderer=d;this.selection=c;this.myTree=null}b.prototype={changedItem:function(b,c){a.hitch(this.myTree,this.myTree.refresh)(b,c,!0)},updateCommands:function(b){this.myTree&&a.hitch(this.myTree._renderer,this.myTree._renderer.updateCommands(b))},makeNewItemPlaceHolder:function(b,
c,d){b=this.getRow(b);if(d&&(b=b.childNodes[d],a.place("<br><span id='"+c+"placeHolderRow'></span>",b,"last"),d=a.byId(c+"placeHolderRow")))return{tempNode:d,refNode:d};return b&&(a.place("<tr id='"+c+"placeHolderRow'><td id='"+c+"placeHolderCol'></td>",b,"after"),d=a.byId(c+"placeHolderRow"),b=a.byId(c+"placeHolderCol"),d&&b)?{tempNode:d,refNode:b}:null},getRow:function(b){if(b=this.model.getId(b))return a.byId(b)},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(b,d,e){this.selection&&this.selection.setSelections([]);
this.getNavHandler()&&this.getNavHandler()._clearSelection();var g=b+"innerTree",h=a.byId(g);h&&a.destroy(h);if(d)d.rootId=g;this.model=d;this._parentId=b;this._treeOptions=e;if(!e||e&&!e.noSelection)this.selectionPolicy=e?e.selectionPolicy:"",this._navDict=new f.ExplorerNavDict(this.model);this.myTree=new c.TableTree({id:g,model:d,showRoot:!1,parent:b,labelColumnIndex:this.renderer.getLabelColumnIndex(),renderer:this.renderer,indent:e?e.indent:void 0,onCollapse:e?e.onCollapse:void 0,tableElement:e?
e.tableElement:void 0,tableBodyElement:e?e.tableBodyElement:void 0,tableRowElement:e?e.tableRowElement:void 0});this.renderer._initializeUIState();this.selectionPolicy==="cursorOnly"&&this.initNavHandler()},getNavHandler:function(){return this._navHandler},getNavDict:function(){return this._navDict},refreshSelection:function(){if(this.selection){var a=this.getNavHandler(),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 f.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}();h.createExplorerCommands=function(a,c){function d(a){return typeof a.getItemCount==="function"?a.getItemCount()>0?c?c(a):!0:!1:!1}var f=new e.Command({tooltip:b["Expand all"],imageClass:"core-sprite-expandAll",id:"orion.explorer.expandAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return d(a)},
callback:function(a){a.items.expandAll()}}),h=new e.Command({tooltip:b["Collapse all"],imageClass:"core-sprite-collapseAll",id:"orion.explorer.collapseAll",groupId:"orion.explorerGroup",visibleWhen:function(a){return d(a)},callback:function(a){a.items.collapseAll()}});a.addCommand(f);a.addCommand(h)};h.ExplorerModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=c;this.idPrefix=d||""}b.prototype={destroy:function(){},getRoot:function(b){this.fetchItems(this.rootPath).then(a.hitch(this,
function(a){this.root=a;b(a)}))},getChildren:function(b,c){b.Children?c(b.Children):b.ChildrenLocation?this.fetchItems(b.ChildrenLocation).then(a.hitch(this,function(a){b.Children=a;c(a)})):c([])},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}();h.ExplorerFlatModel=function(){function b(a,c,d){this.rootPath=a;this.fetchItems=
c;this.root=d}b.prototype=new h.ExplorerModel;b.prototype.getRoot=function(b){this.root?b(this.root):this.fetchItems(this.rootPath).then(a.hitch(this,function(a){this.root=a;b(a)}))};b.prototype.getChildren=function(a,b){a===this.root?b(this.root):b([])};return b}();h.ExplorerRenderer=function(){function b(a,c){this.explorer=c;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;this._decorateAlternatingLines=!0;if(a.decorateAlternatingLines===!1)this._decorateAlternatingLines=!1;if(!this.actionScopeId)this.actionScopeId=
a.actionScopeId}},getLabelColumnIndex:function(){return this.explorer.checkbox?1:0},initTable:function(b,c){this.tableTree=c;a.empty(b);this._treeTableClass&&a.addClass(b,this._treeTableClass);this.renderTableHeader(b)},getActionsColumn:function(b,c,d,e,f){var d=d||"tool",g=this.explorer.registry.getService("orion.page.command"),h=document.createElement("td");h.id=c.id+"actionswrapper";e&&a.addClass(h,e);this.actionScopeId?g.renderCommands(this.actionScopeId,h,b,this.explorer,d,null,f&&this.explorer.getNavDict()?
this.explorer.getNavDict().getGridNavHolder(b,!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(b,c){if(this._useCheckboxSelection){var d=document.createElement("td"),e=document.createElement("span");e.id=this.getCheckBoxId(c.id);a.addClass(e,"core-sprite-check selectionCheckmarkSprite");e.itemId=c.id;if(this.getCheckedFunc)e.checked=
this.getCheckedFunc(b),this._highlightSelection&&a.toggleClass(c,"checkedRow",e.checked),a.toggleClass(e,"core-sprite-check_on",e.checked);d.appendChild(e);a.connect(e,"onclick",a.hitch(this,function(a){this.onCheck(c,a.target,a.target.checked?!1:!0,!0)}));return d}},getCheckBoxId:function(a){return a+"selectedState"},onCheck:function(b,c,d,e,f){c.checked=d;a.toggleClass(c,"core-sprite-check_on",d);if(this.onCheckedFunc)this.onCheckedFunc(c.itemId,d,e);this.explorer.getNavHandler()&&f&&this.explorer.getNavHandler().setSelection(this.explorer.getNavDict().getValue(b.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(b){b=window.sessionStorage[b+"selection"];typeof b==="string"&&(b=b.length>0?JSON.parse(b):null);var c;if(b&&this.explorer.getNavDict()){var d=[];for(c=0;c<b.length;c++){var e=this.explorer.getNavDict().getValue(b[c]);if(e&&e.rowDomNode&&
e.model&&(d.push(e.model),this._highlightSelection&&a.addClass(e.rowDomNode,"checkedRow"),e=a.byId(this.getCheckBoxId(e.rowDomNode.id))))e.checked=!0,a.addClass(e,"core-sprite-check_on")}this.explorer.selection&&(this.explorer.selection.setSelections(d),this.explorer.getNavHandler()&&this.explorer.getNavHandler().refreshSelection())}},_storeExpansions:function(a){window.sessionStorage[a+"expanded"]=JSON.stringify(this._expanded)},_restoreExpansions:function(b){var c=!1,d=window.sessionStorage[b+"expanded"];
typeof d==="string"&&(d=d.length>0?JSON.parse(d):null);var e;if(d)for(e=0;e<d.length;e++)a.byId(d[e])&&(this._expanded.push(d[e]),this.tableTree.expand(d[e],a.hitch(this,function(){this._restoreSelections(b)})),c=!0);return!c},_getUIStatePreferencePath:function(){if(this.explorer){var a=this.explorer.getRootPath();if(this._cachePrefix&&a)return"/"+this._cachePrefix+"/"+a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")+"/uiState"}return null},expandCollapseImageId:function(a){return a+"__expand"},updateExpandVisuals:function(b,
c){var d=a.byId(this.expandCollapseImageId(b.id));d&&(a.addClass(d,c?this._expandImageClass:this._collapseImageClass),a.removeClass(d,c?this._collapseImageClass:this._expandImageClass))},getExpandImage:function(b,c,d,e){var f=a.create("span",{id:this.expandCollapseImageId(b.id)},c,"last");a.addClass(f,this._twistieSpriteClass);a.addClass(f,this._collapseImageClass);d&&(c=a.create("span",null,c,"last"),a.addClass(c,e||"imageSprite"),a.addClass(c,d));f.onclick=a.hitch(this,function(){this.tableTree.toggle(b.id);
if(this.tableTree.isExpanded(b.id))this._expanded.push(b.id);else for(var a in this._expanded)if(this._expanded[a]===b.id){this._expanded.splice(a,1);break}(a=this._getUIStatePreferencePath())&&window.sessionStorage&&this._storeExpansions(a)});return f},render:function(b,c){a.addClass(c,"navRow");this.renderRow(b,c)},rowsChanged:function(){this._decorateAlternatingLines&&a.query(".treeTableRow").forEach(function(b,c){c%2?(a.addClass(b,"darkTreeTableRow"),a.removeClass(b,"lightTreeTableRow")):(a.addClass(b,
"lightTreeTableRow"),a.removeClass(b,"darkTreeTableRow"))});this.explorer.selectionPolicy!=="cursorOnly"&&(this.explorer.refreshSelection(),this.explorer.initNavHandler())},updateCommands:function(){var b=this.explorer.registry;a.query(".treeTableRow").forEach(function(c){var d=a.byId(c.id+"actionswrapper"),e=b.getService("orion.page.command");e.destroy(d);this.actionScopeId&&e.renderCommands(this.actionScopeId,d,c._item,this.explorer,"tool")})},_initializeUIState:function(){this._expanded=[];var a=
this._getUIStatePreferencePath();a&&window.sessionStorage&&this._restoreExpansions(a)&&this._restoreSelections(a)}};return b}();h.SelectionRenderer=function(){function b(a,c){this._init(a);this.explorer=c}b.prototype=new h.ExplorerRenderer;b.prototype.renderTableHeader=function(b){var c=document.createElement("thead"),d=document.createElement("tr");a.addClass(c,"navTableHeading");this._useCheckboxSelection&&d.appendChild(this.initCheckboxColumn(b));for(var e=0,f=this.getCellHeaderElement(e);f;)f.innerHTML.length>
0&&a.addClass(f,"navColumn"),d.appendChild(f),f=this.getCellHeaderElement(++e);c.appendChild(d);b.appendChild(c)};b.prototype.renderRow=function(b,c){a.style(c,"verticalAlign","baseline");a.addClass(c,"treeTableRow");var d=this.explorer.getNavDict();d&&(d.addRow(b,c),a.connect(c,"onclick",a.hitch(this,function(a){if(this.explorer.getNavHandler())this.explorer.getNavHandler().onClick(b,a)})));if(d=this.getCheckboxColumn(b,c))a.addClass(d,"checkColumn"),c.appendChild(d);for(var d=0,e=this.getCellElement(d,
b,c);e;)c.appendChild(e),d===0?this.getPrimColumnStyle?a.addClass(e,this.getPrimColumnStyle()):a.addClass(e,"navColumn"):this.getSecondaryColumnStyle?a.addClass(e,this.getSecondaryColumnStyle()):a.addClass(e,"secondaryColumn"),e=this.getCellElement(++d,b,c)};b.prototype.getCellHeaderElement=function(){};b.prototype.getCellElement=function(){};return b}();h.SimpleFlatModel=function(){function a(b,c,d){this.items=b;this.getKey=d;this.idPrefix=c;this.root={children:b}}a.prototype=new h.ExplorerModel;
a.prototype.getRoot=function(a){a(this.root)};a.prototype.destroy=function(){};a.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};a.prototype.getChildren=function(a,b){a===this.root?b(this.items):b([])};return a}();return h});
define("orion/git/widgets/RemotePrompterDialog","i18n!git/nls/gitmessages,dojo,dijit,orion/explorers/explorer,dijit/Dialog,dijit/form/Button,orion/widgets/ExplorerTree,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/RemotePrompterDialog.html".split(","),function(b,d,a,c){d.declare("orion.git.widgets.RemotePrompterDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:!0,templateString:d.cache("orion","git/widgets/templates/RemotePrompterDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.treeRoot=this.options.treeRoot},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||b["Choose a Folder"];this.newBranchText=b["New Branch:"];this.buttonOk=b.OK},postCreate:function(){this.inherited(arguments);this.loadRemoteChildren(this.treeRoot);d.connect(this.newBranch,"onchange",d.hitch(this,this.validate));if(this.options.hideNewBranch)this.newBranchSection.style.display="none"},
loadRemoteChildren:function(a){this.treeRoot=a;this.createTree(new f(this.gitClient,null,this.gitClient.getGitClone,this.treeRoot))},createTree:function(a){var c=this.treeWidget=new orion.widgets.ExplorerTree({style:"width:100%; height:100%",model:a,region:"center",showRoot:!1,persist:!0,openOnClick:!1,getLabel:function(a){return a.Type==="RemoteTrackingBranch"&&!a.Id?a.Name+b[" [New branch]"]:a.Name},getIconClass:function(a){return a.BranchLocation&&a.RemoteLocation?"gitRepoItem":a.GroupNode?a.Name===
"Branch"?"gitBranchesItem":"gitRemotesItem":a.Type==="Branch"||a.Type==="RemoteTrackingBranch"?"gitBranchItem":a.Type==="Remote"?"gitRemoteItem":"gitDefaultItem"}}),f=this;this.treeWidget._inheritedSelectNode=this.treeWidget._selectNode;this.treeWidget._selectNode=function(a){c._inheritedSelectNode(a);f.newBranch.disabled=a.item&&a.item.Type==="Remote"?!1:!0;d.hitch(f,f.validate)()};this.treeWidget.startup();d.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},validate:function(){var a=
this.treeWidget.getSelectedItems();if(a.length===1)if(a[0].Type==="RemoteTrackingBranch"){this.RemoteBrowserButton.disabled=!1;return}else if(a[0].Type==="Remote"&&this.newBranch.value!==""){this.RemoteBrowserButton.disabled=!1;return}this.RemoteBrowserButton.disabled=!0},execute:function(){var a=this.treeWidget.getSelectedItems();this.onHide();if(this.options.func)if(a[0].Type==="RemoteTrackingBranch")this.options.func(a[0],a[0].parent);else{var b=a[0].CloneLocation.split("/")[4],c={};c.parent=a[0];
c.FullName="refs/remotes/"+a[0].Name+"/"+this.newBranch.value;c.Name=a[0].Name+"/"+this.newBranch.value;c.Type="RemoteTrackingBranch";c.Location="/gitapi/remote/"+a[0].Name+"/"+this.newBranch.value+"/file/"+b;this.options.func(null,a[0],c)}delete this.options.func}});var f=function(){function a(b,c,d,e){this.gitClient=b;this.rootPath=c;this.fetchItems=d;this.root=e?e:null}a.prototype=new c.ExplorerModel;a.prototype.getRoot=function(a){this.root?a(this.root):this.fetchItems(this.rootPath).then(d.hitch(this,
function(b){this.root=b;a(b)}))};a.prototype.mayHaveChildren=function(a){if(a.children||a.Children)return!0;else if(a.BranchLocation&&a.RemoteLocation)return!0;else if(a.GroupNode)return!0;else if(a.Type==="Remote")return!0;return!1};a.prototype.getIdentity=function(a){a.Location?(a=a.Location,a=a.replace(/[^\.\:\-\_0-9A-Za-z]/g,"")):a="ROOT";return a};a.prototype.getChildren=function(a,b){a.children=[];if(a.Children){for(var c=0;c<a.Children.length;c++)a.Children[c].parent=a,a.children[c]=a.Children[c];
b(a.Children)}else a.BranchLocation&&a.RemoteLocation?(a.children=[{GroupNode:"true",Location:a.BranchLocation,Name:"Branches",parent:a},{GroupNode:"true",Location:a.RemoteLocation,BranchLocation:a.BranchLocation,Name:"Remotes",parent:a},{GroupNode:"true",Location:a.TagLocation,Name:"Tags",parent:a}],b(a.children)):a.GroupNode?this.gitClient.getGitBranch(a.Location).then(d.hitch(this,function(c){a.children=c.Children;for(var d=0;d<c.Children.length;d++)c.Children[d].parent=a;b(c.Children)})):a.Type===
"Remote"&&this.gitClient.getGitBranch(a.Location).then(d.hitch(this,function(c){a.children=c.Children;for(var d=0;d<c.Children.length;d++)c.Children[d].parent=a;b(c.Children)}))};return a}()});
define("orion/section",["dojo","orion/selection","orion/commands","orion/commonHTMLFragments"],function(b,d,a,c){function f(a,d){var e=this;this._expandImageClass="core-sprite-openarrow";this._collapseImageClass="core-sprite-closedarrow";this._twistieSpriteClass="modelDecorationSprite";if(!d.id)throw Error("Missing required argument: id");this.id=d.id;if(!d.title)throw Error("Missing required argument: title");this.domNode=b.create("div",{"class":(d.useAuxStyle?"sectionWrapper sectionWrapperAux":
"sectionWrapper")+" toolComposite",id:d.id},a);if(d.canHide)this.twistie=b.create("span",{"class":"modelDecorationSprite layoutLeft sectionTitle"},this.domNode),b.style(this.domNode,"cursor","pointer"),b.attr(this.domNode,"tabIndex","0"),b.connect(this.domNode,"onclick",function(a){(a.target===e.titleNode||a.target===e.twistie)&&e._changeExpandedState()}),b.connect(this.domNode,"onkeydown",function(a){a.keyCode===b.keys.ENTER&&(a.target===e.domNode||a.target===e.titleNode||a.target===e.twistie)&&
e._changeExpandedState()});if(d.iconClass){var f=b.create("span",{"class":"sectionIcon"},this.domNode);b.addClass(f,d.iconClass)}this.titleNode=b.create("div",{id:d.id+"Title","class":"sectionAnchor sectionTitle layoutLeft"},this.domNode);this.titleNode.textContent=d.title;if(typeof d.getItemCount==="function")b.create("div",{"class":"layoutLeft sectionItemCount"},this.domNode).textContent=d.getItemCount(this);this._progressNode=b.create("div",{id:d.id+"Progress","class":"sectionProgress sectionTitle layoutLeft"},
this.domNode);this._progressNode.style.visibility="hidden";this._progressNode.textContent="...";b.create("div",{id:d.id+"FilterSearchBox"},this.domNode);this._toolActionsNode=b.create("div",{id:d.id+"ToolActionsArea","class":"layoutRight sectionActions"},this.domNode);this.actionsNode=b.create("div",{id:d.id+"ActionArea","class":"layoutRight sectionActions"},this.domNode);this.selectionNode=b.create("div",{id:d.id+"SelectionArea","class":"layoutRight sectionActions"},this.domNode);if(d.slideout)this.slideout=
c.slideoutHTMLFragment(d.id),b.place(this.slideout,this.domNode);this._contentParent=b.create("div",{id:this.id+"Content",role:"region","class":"sectionTable","aria-labelledby":this.titleNode.id},a,"last");d.content&&this.setContent(d.content);this.hidden=d.hidden;if(typeof d.onExpandCollapse==="function")this._onExpandCollapse=d.onExpandCollapse;this._preferenceService=d.preferenceService;b.style(this._contentParent,"display","none");this._preferenceService?this._preferenceService.getPreferences("/window/views").then(b.hitch(this,
function(a){a=a.get(this.id);if(a!==void 0)this.hidden=!a;this.hidden||b.style(this._contentParent,"display","block");this._updateExpandedState(!this.hidden,!1)})):(this.hidden||b.style(this._contentParent,"display","block"),this._updateExpandedState(!this.hidden,!1));this._commandService=d.commandService;this._lastMonitor=0;this._loading={}}function e(a){this._section=a;this._id=++a._lastMonitor}f.prototype={setTitle:function(a){this.titleNode.textContent=a},setContent:function(a){typeof a==="string"?
this._contentParent.innerHTML=a:(this._contentParent.innerHTML="",this._contentParent.appendChild(a))},getContentElement:function(){return this._contentParent},createProgressMonitor:function(){return new e(this)},_setMonitorMessage:function(a,b){this._progressNode.style.visibility="visible";this._loading[a]=b;var c="",d;for(d in this._loading)c!==""&&(c+="\n"),c+=this._loading[d];this._progressNode.title=c},_monitorDone:function(a){delete this._loading[a];var a="",b;for(b in this._loading)a!==""&&
(a+="\n"),a+=this._loading[b];this._progressNode.title=a;if(a==="")this._progressNode.style.visibility="hidden"},_changeExpandedState:function(){var a=new b.fx.Toggler({node:this._contentParent.id,showDuration:500,hideDuration:500,showFunc:b.fx.wipeIn,hideFunc:b.fx.wipeOut});this.hidden?(a.show(),this.hidden=!1):(a.hide(),this.hidden=!0);this._updateExpandedState(!this.hidden,!0)},_updateExpandedState:function(a,c){var d=this.twistie,e=this.id;d&&(b.addClass(d,a?this._expandImageClass:this._collapseImageClass),
b.removeClass(d,a?this._collapseImageClass:this._expandImageClass));this._preferenceService&&c&&this._preferenceService.getPreferences("/window/views").then(function(b){b.put(e,a)});this._onExpandCollapse&&this._onExpandCollapse(a,this)}};f.prototype.constructor=f;e.prototype={begin:function(a){this.status=a;this._section._setMonitorMessage(this.id,a)},worked:function(a){this.status=a;this._section._setMonitorMessage(this.id,a)},done:function(a){this.status=a;this._section._monitorDone(this.id)}};
e.prototype.constructor=e;return{Section:f}});
define("orion/searchAndReplace/textSearcher","i18n!orion/search/nls/messages,require,orion/textview/annotations,dojo,dijit,orion/commands,orion/editor/regex,orion/searchUtils,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton".split(","),function(b,d,a,c,f){var e=e||{};e.TextSearcher=function(){function d(a,b,c,e){this._editor=a;this._commandService=b;this._undoStack=c;this._wrapSearch=this._ignoreCase=this._showAllOccurrence=!0;this._wholeWord=!1;this._incremental=!0;this._useRegExp=!1;this._findAfterReplace=
!0;this._reverse=!1;this.isMac=navigator.platform.indexOf("Mac")!==-1;this._timer=this._searchRange=null;this._searchOnRange=!1;this._lastSearchString="";var f=this;this._listeners={onEditorFocus:function(a){f.removeCurrentAnnotation(a)}};this.setOptions(e)}d.prototype={_createActionTable:function(){var d=this;this._commandService.openParameterCollector("pageNavigationActions",function(e){var h=document.createElement("input");h.type="text";h.name=b["Find:"];h.id="localSearchFindWith";h.placeholder=
b["Find With"];h.onkeyup=function(a){return d._handleKeyUp(a)};h.onkeydown=function(a){return d._handleKeyDown(a,!0)};e.appendChild(h);d.createButton("Next",e,function(){d.findNext(!0)});d.createButton("Previous",e,function(){d.findNext(!1)});var l=document.createElement("input");l.type="text";l.name=b["ReplaceWith:"];l.id="localSearchReplaceWith";l.placeholder=b["Replace With"];c.addClass(l,"searchCmdGroupMargin");l.onkeydown=function(a){return d._handleKeyDown(a,!1)};e.appendChild(l);d.createButton(b.Replace,
e,function(){d.replace()});d.createButton(b["Replace All"],e,function(){d.replaceAll()});(l=f.byId("searchOptMenu"))&&l.destroy();l=new f.Menu({style:"display: none;",id:"searchOptMenu"});l.addChild(new f.CheckedMenuItem({label:b["Show all"],checked:d._showAllOccurrence,onChange:function(b){d.setOptions({showAllOccurrence:b});b?d.markAllOccurrences(!0):(b=d._editor.getAnnotationModel())&&b.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH)}}));l.addChild(new f.CheckedMenuItem({label:b["Case sensitive"],
checked:!d._ignoreCase,onChange:function(a){d.setOptions({ignoreCase:!a})}}));l.addChild(new f.CheckedMenuItem({label:b["Wrap search"],checked:d._wrapSearch,onChange:function(a){d.setOptions({wrapSearch:a})}}));l.addChild(new f.CheckedMenuItem({label:b["Incremental search"],checked:d._incremental,onChange:function(a){d.setOptions({incremental:a})}}));l.addChild(new f.CheckedMenuItem({label:b["Whole Word"],checked:d._wholeWord,onChange:function(a){d.setOptions({wholeWord:a})}}));l.addChild(new f.CheckedMenuItem({label:b["Regular expression"],
checked:d._useRegExp,onChange:function(a){d.setOptions({useRegExp:a})}}));l.addChild(new f.CheckedMenuItem({label:b["Find after replace"],checked:d._findAfterReplace,onChange:function(a){d.setOptions({findAfterReplace:a})}}));l=new f.form.DropDownButton({label:b.Options,dropDown:l});c.addClass(l.domNode,"findSlideoutMenu");c.place(l.domNode,e,"last");return h},function(){d.closeUI()})},visible:function(){return document.getElementById("localSearchFindWith")?!0:!1},_handleKeyUp:function(){if(this._incremental&&
!this._keyUpHandled)this._noSelection?this._noSelection=!1:this.findNext(!0,null,!0);this._keyUpHandled=!1;return!0},_handleKeyDown:function(a,b){var c=(this.isMac?a.metaKey:a.ctrlKey)&&!a.altKey&&!a.shiftKey;if(c&&a.keyCode===70)return this._keyUpHandled=b,a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,!1;if((this.isMac?a.metaKey:a.ctrlKey)&&!a.altKey&&a.keyCode===75||a.keyCode===13)return a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,this.findNext(!a.shiftKey),this._keyUpHandled=
b,!1;if(c&&a.keyCode===82)return a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,b||this.replace(),this._keyUpHandled=b,!1;return a.keyCode===27?(this.closeUI(),this._keyUpHandled=b,!1):!0},closeUI:function(){this.visible()&&this._commandService.closeParameterCollector();this._editor.getTextView().removeEventListener("Focus",this._listeners.onEditorFocus);this._editor.getTextView().focus();var b=this._editor.getAnnotationModel();b&&(b.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH),
b.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH))},removeCurrentAnnotation:function(){var b=this._editor.getAnnotationModel();b&&b.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH)},createButton:function(a,b,d){var e=c.create("span",{tabindex:"0",role:"button"});c.connect(e,"onclick",this,d);c.connect(e,"onkeypress",this,function(a){a.keyCode===c.keys.ENTER||a.charCode===c.keys.SPACE?d():a.keyCode===c.keys.ESCAPE&&this.closeUI()});c.place(window.document.createTextNode(a),
e,"last");c.addClass(e,"findSlideoutButton");c.place(e,b,"last")},buildToolBar:function(a,b){this._keyUpHandled=!0;this._editor.getTextView().addEventListener("Focus",this._listeners.onEditorFocus);var c=document.getElementById("localSearchFindWith");if(this.visible())a.length>0?c.value=a:this._noSelection=!0;else{this._createActionTable();if(typeof b==="string")document.getElementById("localSearchReplaceWith").value=b;c=document.getElementById("localSearchFindWith");c.value=a}window.setTimeout(function(){c.select();
c.focus()},10)},setOptions:function(a){if(a){if(a.showAllOccurrence===!0||a.showAllOccurrence===!1)this._showAllOccurrence=a.showAllOccurrence;if(a.ignoreCase===!0||a.ignoreCase===!1)this._ignoreCase=a.ignoreCase;if(a.wrapSearch===!0||a.wrapSearch===!1)this._wrapSearch=a.wrapSearch;if(a.wholeWord===!0||a.wholeWord===!1)this._wholeWord=a.wholeWord;if(a.incremental===!0||a.incremental===!1)this._incremental=a.incremental;if(a.useRegExp===!0||a.useRegExp===!1)this._useRegExp=a.useRegExp;if(a.findAfterReplace===
!0||a.findAfterReplace===!1)this._findAfterReplace=a.findAfterReplace;if(a.reverse===!0||a.reverse===!1)this._reverse=a.reverse;if(a.toolBarId)this._toolBarId=a.toolBarId;if(a.searchRange)this._searchRange=a.searchRange;if(a.searchOnRange===!0||a.searchOnRange===!1)this._searchOnRange=a.searchOnRange}},getSearchStartIndex:function(a,b){var c=this._editor.getCaretOffset();if(a){var d=this._editor.getSelection(),e=d.end>d.start?d.end-d.start:0;return!b?c-e-1>0?c-e-1:0:d.end>0?d.end:0}return c>0?c:0},
findNext:function(a,b,c){this.setOptions({reverse:!a});var d=document.getElementById("localSearchFindWith"),c=this.getSearchStartIndex(c?!0:!a);b||(b=d?d.value:this._lastSearchString);return this._doFind(b,c,!a,this._wrapSearch)},startUndo:function(){this._undoStack&&this._undoStack.startCompoundChange()},endUndo:function(){this._undoStack&&this._undoStack.endCompoundChange()},replace:function(){this.startUndo();var a=document.getElementById("localSearchReplaceWith").value,b=this._editor,c=b.getSelection(),
d=document.getElementById("localSearchFindWith").value,e=c?c.start:0,c=c?c.end:0;if(d){var f=b.getModel().find({string:d,start:e,reverse:!1,wrap:this._wrapSearch,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase}).next();if(f)e=f.start,c=f.end}b.setText(a,e,c);b.setSelection(e,e+a.length,!0);this.endUndo();this._findAfterReplace&&d&&this._doFind(d,this.getSearchStartIndex(!1),!1,this._wrapSearch)},_doFind:function(c,d,e,f){var h=this._editor,n=h.getAnnotationModel();
if(!c)return n&&(n.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH),n.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH)),null;this._lastSearchString=c;var o=h.getModel().find({string:c,start:d,reverse:e,wrap:f,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase}).next();if(!this._replacingAll&&(o?this._editor.reportStatus(""):this._editor.reportStatus(b["Not found"],"error"),this.visible()&&(c=a.AnnotationType.ANNOTATION_CURRENT_SEARCH,n&&(n.removeAnnotations(c),
o&&n.addAnnotation(a.AnnotationType.createAnnotation(c,o.start,o.end))),this._showAllOccurrence))){this._timer&&window.clearTimeout(this._timer);var q=this;this._timer=window.setTimeout(function(){q.markAllOccurrences(o);q._timer=null},500)}o&&h.moveSelection(o.start,o.end,null,!1);return o},replaceAll:function(){var a=document.getElementById("localSearchFindWith").value;if(a){this._replacingAll=!0;var d=this._editor;d.reportStatus("");d.reportStatus(b["Replacing all..."],"progress");var e=document.getElementById("localSearchReplaceWith").value;
window.setTimeout(c.hitch(this,function(){for(var c=0,f=0;;){if(!this._doFind(a,c))break;f++;f===1&&this.startUndo();c=d.getSelection();d.setText(e,c.start,c.end);d.setSelection(c.start,c.start+e.length,!0);c=this.getSearchStartIndex(!0,!0)}f>0&&this.endUndo();d.reportStatus("","progress");c>0?d.reportStatus(b["Replaced "]+f+b[" matches"]):d.reportStatus(b["Nothing replaced"],"error");this._replacingAll=!1}),100)}},markAllOccurrences:function(b){var c=this._editor.getAnnotationModel();if(c){for(var d=
a.AnnotationType.ANNOTATION_MATCHING_SEARCH,e=c.getAnnotations(0,c.getTextModel().getCharCount()),f=[],h;e.hasNext();){var o=e.next();o.type===d&&f.push(o)}e=document.getElementById("localSearchFindWith").value;if(b&&e){e=this._editor.getModel().find({string:e,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase});for(h=[];e.hasNext();)b=e.next(),h.push(a.AnnotationType.createAnnotation(d,b.start,b.end))}c.replaceAnnotations(f,h)}}};return d}();return e});
define("orion/fileUtils",["i18n!orion/nls/messages","dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(){return{makeRelative:function(b){if(!b)return b;var d=window.location.protocol+"//"+window.location.host;return b.indexOf(d)===0?b.substring(d.length):b},isAtRoot:function(b){return this.makeRelative(b).indexOf("/workspace")===0}}});
define("orion/favorites",["require","dojo","orion/fileUtils","orion/EventTarget"],function(b,d,a,c){function f(a){this._favorites=[];c.attach(this);this._init(a);this._initializeFavorites()}f.prototype={_init:function(a){this._registry=a.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this.dispatchEvent({type:"favoritesChanged",navigator:this._favorites,registry:this._registry})},makeFavorites:function(b){for(var b=
d.isArray(b)?b:[b],c=0;c<b.length;c++){var f=b[c],j=f.ChildrenLocation?f.ChildrenLocation:f.Location,j=a.makeRelative(j);this.addFavorite(f.Name,j,f.Directory)}this._storeFavorites();this._notifyListeners()},addFavoriteUrl:function(a){this.addFavorite(a,a,!1,!0)},addFavorite:function(a,b,c){this._favorites.push({name:a,path:b,directory:c,isFavorite:!0});this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},removeFavorite:function(a){for(var b in this._favorites)if(this._favorites[b].path===
a){this._favorites.splice(b,1);break}this._favorites.sort(this._sorter);this._storeFavorites();this._notifyListeners()},renameFavorite:function(a,b){var c=!1,d;for(d in this._favorites)if(this._favorites[d].path===a){var f=this._favorites[d];if(f.name!==b)f.name=b,c=!0}c&&(this._favorites.sort(this._sorter),this._storeFavorites(),this._notifyListeners())},hasFavorite:function(a){for(var b in this._favorites)if(this._favorites[b].path===a)return!0;return!1},_SPECIAL_CHARS:"^$\\+[]().",queryFavorites:function(a){var b;
if(!a)return this._favorites;var c="";for(b=0;b<a.length;b++){var d=a.charAt(b);c+=d==="*"?".*":d==="?"?".?":this._SPECIAL_CHARS.indexOf(d)>=0?"\\"+d:d}c+=".*";a=RegExp(c);c=[];for(b in this._favorites)this._favorites[b].name.search(a)===0&&c.push(this._favorites[b]);return c},_initializeFavorites:function(){var a=this;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){var c,b=b.get("navigate");typeof b==="string"&&(b=JSON.parse(b));if(b)for(c in b)b[c].isFavorite=
!0,a._favorites.push(b[c]);a._favorites.sort(a._sorter);a._notifyListeners()})},_storeFavorites:function(){var a=this._favorites;this._registry.getService("orion.core.preference").getPreferences("/window/favorites").then(function(b){b.put("navigate",a)})},_sorter:function(a,b){var c=a.name.toLowerCase(),d=b.name.toLowerCase();return c>d?1:c<d?-1:0},getFavorites:function(){return{navigator:this._favorites}}};f.prototype.constructor=f;return{FavoritesService:f}});
define("orion/globalCommands","i18n!orion/nls/messages,require,dojo,dijit,orion/commonHTMLFragments,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/uiUtils,orion/textview/keyBinding,orion/breadcrumbs,orion/splitter,orion/favorites,orion/contentTypes,orion/URITemplate,orion/PageUtil,orion/widgets/themes/container/ThemeSheetWriter,orion/searchUtils,orion/inputCompletion/inputCompletion,orion/Deferred,dojo/DeferredList,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton,orion/widgets/OpenResourceDialog,orion/widgets/UserMenu,orion/widgets/UserMenuDropDown".split(","),function(b,
d,a,c,f,e,h,g,j,k,l,m,n,o,q,p,r,s,x,v){function w(b,c){if(b.getLabel)return b.getLabel();else{var d=new a.Deferred;d.callback(c.properties.name);return d}}function t(b){(b=b.getService("orion.page.progress"))&&a.hitch(b,b.init)("progressPane")}function u(a,b){var c=a.getService("orion.core.auth");c!==null&&c.getUser().then(function(a){if(a.Name)b.containerNode.textContent=a.Name;else if(a.login)b.containerNode.textContent=a.login})}function y(d){var f=d.getServiceReferences("orion.core.auth");E=[];
var g=a.byId("userMenu");if(g){if(!c.byId("logins")){var h=new orion.widgets.UserMenuDropDown({id:"logins",dropDown:F,label:b.Options,showLabel:!0});a.place(h.domNode,g,"only");h.valueNode&&a.destroy(h.valueNode);h.titleNode&&a.attr(h.titleNode,"title")&&a.removeAttr(h.titleNode,"title");new e.CommandTooltip({connectId:[h.focusNode],label:b.Options,position:["above","left","right","below"]});u(d,h)}for(g=0;g<f.length;g++){var h=f[g],j=d.getService(h);a.hitch(this,function(a,b){w(a,b).then(function(b){a.getKey().then(function(c){E.push(c);
a.getUser().then(function(d){F.addUserItem(c,a,b,d)},function(d,e){F.addUserItem(c,a,b,e)});window.addEventListener("storage",function(){N[c]!==localStorage.getItem(c)&&(N[c]=localStorage.getItem(c),a.getUser().then(function(d){F.addUserItem(c,a,b,d)},function(){F.addUserItem(c,a,b)}))},!1)})})})(j,h)}}}function z(b,d,e,f,g){var h=new c.Menu({style:"display: none;"}),d=new c.PopupMenuItem({label:d,popup:h});b.addChild(d);s.populateSearchMenu(e,h,f,function(a){return g(a)});a.connect(b,"_openPopup",
d,function(){s.populateSearchMenu(e,h,f,function(a){return g(a)})})}function A(a,b){var c=document.createElement("a");c.href=d.toUrl("search/search.html")+"#"+a;c.textContent=b;return c}function C(d,e,f,g){(e=c.byId("searchOptionsDropDown"))&&e.destroy();e=new c.Menu({style:"display: none;padding:0px;border-radius:3px;",id:"searchOptionsMenu"});a.addClass(e.domNode,"commandMenu");e.addChild(new c.CheckedMenuItem({label:b["Open in new tab"],checked:g,onChange:function(a){s.setOpenSearchPref(d,a)}}));
e.addChild(new c.MenuSeparator);e.addChild(new c.CheckedMenuItem({label:b["Regular expression"],checked:!1,onChange:function(a){f.useRegEx=a}}));e.addChild(new c.MenuSeparator);z(e,b["Recent searches"],d,"recentSearch",function(a){return A(f.createSearchQuery(a.name,!1,null,!1,null,a.regEx),a.name)});z(e,b["Saved searches"],d,"search",function(a){return A(a.query,a.name)});g=new orion.widgets.UserMenuDropDown({label:b["Search options"],showLabel:!1,id:"searchOptionsDropDown",dropDown:e});g.valueNode&&
a.destroy(g.valueNode);g.titleNode&&a.attr(g.titleNode,"title")&&a.removeAttr(g.titleNode,"title");a.addClass(g.domNode,"bannerMenu");a.addClass(g.domNode,"bannerMenuSearchOptions");a.place(g.domNode,"searchOptions","last")}function B(){if(a.byId("relatedLinks")&&H){var b=c.byId("related");b&&b.closeDropDown();H.focusedChild=null;a.forEach(H.getChildren(),function(a){H.removeChild(a);a.destroy()})}}function I(d,e){H||(H=new c.Menu({style:"display: none;padding:3px;border-radius:3px;",id:"relatedLinksMenu"}));
d._addMenuItem(H,e);var f=c.byId("related"),g=a.byId("relatedLinks");g&&!f&&(f=new orion.widgets.UserMenuDropDown({id:"related",label:b.Related,dropDown:H}),f.valueNode&&a.destroy(f.valueNode),f.titleNode&&a.attr(f.titleNode,"title")&&a.removeAttr(f.titleNode,"title"),a.addClass(f.domNode,"bannerMenu"),a.place(f.domNode,g,"only"))}function D(b,c,d,f,h){var j,k=b.getServiceReferences("orion.page.link.related");k.length<=0||a.byId("relatedLinks")&&a.when(function(){if(j)return j;var a=b.getService("orion.core.contenttypes");
a||(a=new o.ContentTypeService(b),a=b.getService("orion.core.contenttypes"));return a.getContentTypes().then(function(a){return j=a})}(),a.hitch(this,function(){var m;B();for(var l=[],o=0;o<k.length;o++){var n={},r,v=k[o].getPropertyKeys();for(r=0;r<v.length;r++)n[v[r]]=k[o].getProperty(v[r]);if(n.id){var p=function(b){if(b)if(!b.visibleWhen||b.visibleWhen(c)){var d=new e.CommandInvocation(f,c,c,null,b);I(b,d)}else typeof h==="function"&&(m||(m=h()),a.when(m,a.hitch(b,function(a){a&&c===T&&(!this.visibleWhen||
this.visibleWhen(a))&&I(this,new e.CommandInvocation(f,a,a,null,this))})))},w=null;if(a.indexOf(d,n.id)<0)if((n.nls&&n.nameKey||n.name)&&n.uriTemplate)r=g._createCommandOptions(n,k[o],b,j,!0),l.push(r),r.then(a.hitch(this,function(a){a=new e.Command(a);p(a)}));else{if(!w&&(w=f.findCommand(n.id))){p(w);continue}if(!w){var q=b.getServiceReferences("orion.navigate.command");for(r=0;r<q.length;r++)if(q[r].getProperty("id")===n.id){for(var n={},v=q[r].getPropertyKeys(),s=0;s<v.length;s++)n[v[s]]=q[r].getProperty(v[s]);
r=g._createCommandOptions(n,q[r],b,j,!0);l.push(r);r.then(a.hitch(this,function(a){w=new e.Command(a);p(w)}));break}}}}}(new a.DeferredList(l)).addBoth(a.hitch(this,function(){var b=a.byId("relatedLinks");H&&b&&(H.getChildren().length===0?a.style(b,"visibility","hidden"):a.style(b,"visibility","visible"))}))}))}function L(b){var c=a.byId("globalActions");c&&(b.destroy(c),b.renderCommands(c.id,c,{},{},"tool"))}function K(a){var c=a.getService("orion.core.favorite");c||(c=new n.FavoritesService({serviceRegistry:a}),
c=a.getService("orion.core.favorite"));Q&&Q.Location&&c.hasFavorite(Q.ChildrenLocation||Q.Location).then(function(d){d?a.getService("orion.page.message").setMessage(Q.Name+b[" is already a favorite."],2E3):(c.makeFavorites([Q]),a.getService("orion.page.message").setMessage(Q.Name+b[" has been added to the favorites list."],2E3))})}function S(c,d){var f=a.byId("pageFavorite");f&&(Q&&Q.Location?(a.addClass(f,"bannerButton"),a.connect(f,"onclick",this,function(){K(c)}),a.connect(f,"onkeypress",this,
function(b){b.keyCode===a.keys.ENTER&&K(c)}),new e.CommandTooltip({connectId:[f],label:b["Add to the favorites list"],position:["below","left","right","above"],commandService:d}),a.style(f,"visibility","visible")):a.style(f,"visibility","hidden"))}function U(a){a.getPreferences("/themes",2).then(function(a){var b=a.get("selected");if(b){var b=JSON.parse(b),a=JSON.parse(a.get("styles")),c;for(c in a)if(a[c].name===b.selected){c=a[c];c=(new r.ThemeSheetWriter).getSheet(c);a=document.createElement("STYLE");
a.appendChild(document.createTextNode(c));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(a);break}}})}function O(b){var c={},d=null;typeof b==="string"&&(b=a.byId(b));b||(b=a.byId("pageActions"));for(var e=b;e;){if(a.hasClass(e,"toolComposite")){d=e;break}e=e.parentNode}if(a.hasClass(b,"commandMarker"))c.commandNode=b;if(d&&(c.slideContainer=a.query(".slideParameters",d)[0],c.parameterArea=a.query(".parameters",d)[0],c.dismissArea=a.query(".parametersDismiss",d)[0],
c.notifications=a.query("#notificationArea",d)[0],d.parentNode&&(c.toolbarTarget=a.query(".toolbarTarget",d.parentNode)[0],c.toolbarTarget)))b=a.position(d),c.toolbarTargetY=b.h+1;return c}function M(b){if(b.toolbarTarget&&b.toolbarTargetY){var c=0,d;b.notifications&&a.hasClass(b.notifications,"slideContainerActive")&&(d=a.position(b.notifications),c+=d.h);b.slideContainer&&a.hasClass(b.slideContainer,"slideContainerActive")&&(d=a.position(b.slideContainer),c+=d.h);c>0&&(c+=8);a.style(b.toolbarTarget,
{top:b.toolbarTargetY+c+"px",bottom:0})}}var G=function(a){var b=document.createElement("a");b.href=a;return b.href}(d.toUrl("auth/NotifyAuthentication.html")),N={},F=new orion.widgets.UserMenu,E=[],H,T,P=[],Q=null,J;return{generateUserInfo:y,generateRelatedLinks:D,generateBanner:function(g,l,o,r,w,z,u,A){function B(b){a.query(".targetSelector").forEach(function(a){a.target=b})}function I(a){a.registerService("orion.cm.managedservice",{updated:function(a){B(a&&a["links.newtab"]!=="undefined"?a["links.newtab"]?
"_blank":"_self":"_self")}},{pid:"nav.config"})}var D;U(r);r=a.byId(g);if(!a.byId("staticBanner")){if(!r)throw b["could not find banner parent, id was "]+g;a.place(f.topHTMLFragment,r,"first")}if(g=a.byId("pageToolbar"))a.addClass(g,"toolbarLayout"),a.place(f.toolbarHTMLFragment,g,"only");(g=a.byId("footer"))&&a.place(f.bottomHTMLFragment,g,"only");o.setParameterCollector(new h.CommandParameterCollector(O,M));a.place('<div id="keyAssist" style="display: none" class="keyAssistFloat" role="list" aria-atomic="true" aria-live="assertive"></div>',
document.body,"last");var K=a.byId("primaryNav");if(K)for(var g=l.getServiceReferences("orion.page.link"),r=p.matchResourceParameters(window.location.href),G={OrionHome:window.location.protocol+"//"+window.location.host,Location:r.resource},r=0;r<g.length;r++){for(var E={},z=g[r].getPropertyKeys(),T=0;T<z.length;T++)E[z[T]]=g[r].getProperty(z[T]);E.uriTemplate&&E.nls&&(E.name||E.nameKey)?d(["i18n!"+E.nls],function(b){var c=new q(E.uriTemplate),c=window.decodeURIComponent(c.expand(G)),c=p.validateURLScheme(c),
c=a.create("a",{href:c,target:"_self","class":"targetSelector"},K,"last");D=document.createTextNode(E.nameKey?b[E.nameKey]:E.name);a.place(D,c,"only")}):E.uriTemplate&&E.name&&(z=new q(E.uriTemplate),z=window.decodeURIComponent(z.expand(G)),z=p.validateURLScheme(z),z=a.create("a",{href:z,target:"_self","class":"targetSelector"},K,"last"),D=document.createTextNode(E.name),a.place(D,z,"only"))}var J=a.byId("search");if(!J)throw"failed to generate HTML for banner";new x.InputCompletion(J,function(a){s.getMixedSearches(l,
!0,function(b){var c,d=[],e=!1;for(c in b)b[c].label?(e||(d.push({type:"category",label:"Saved searches"}),e=!0),d.push({type:"proposal",label:b[c].label,value:b[c].name})):d.push({type:"proposal",label:b[c].name,value:b[c].name});a(d)})},{group:"globalSearch",extendedProvider:function(a,b){var c=l.getServiceReferences("orion.search.proposal");if(!c||c.length===0)b(null);else{var d=[];c.forEach(function(b){var c=b.getProperty("filterForMe");d.push(l.getService(b).run(a).then(function(a){for(var b=
{filterForMe:c,proposals:[]},d=0;d<a.length;d++){b.proposals.push({type:"category",label:a[d].category});for(var e=0;e<a[d].datalist.length;e++)b.proposals.push({type:"proposal",label:a[d].datalist[e],value:a[d].datalist[e]})}return b}))});v.all(d).then(function(a){for(var c=[],d=0;d<a.length;d++)c.push(a[d]);b(c)})}}});J.addEventListener("keydown",function(a){if(!a.defaultPrevented&&(a.charCode||a.keyCode)===13)if(w){if(J.value.length>0){s.addRecentSearch(l,J.value,w.useRegEx);var c=w.createSearchQuery(J.value);
s.getOpenSearchPref(l,function(a){var b=d.toUrl("search/search.html")+"#"+c;a?window.open(b):window.location=b})}}else window.alert(b["Can't search: no search service is available"])});s.getOpenSearchPref(l,function(a){C(l,o,w,a)});var g=a.query(".dijitManagesLayout")[0],H;g&&g.id&&(H=c.byId(g.id));var N;if(g=a.query(".split")[0]){var r=a.query(".sidePanelLayout")[0],P=a.query(".mainPanelLayout")[0];if(r&&P&&(N=new m.Splitter({node:g,sidePanel:r,mainPanel:P}),g=new e.Command({name:"Toggle side panel",
tooltip:"Open or close the side panel",id:"orion.toggleSidePane",callback:function(){N.toggleSidePanel()}}),o.addCommand(g),o.registerCommandContribution("pageActions","orion.toggleSidePane",1,null,!0,new e.CommandKeyBinding("o",!0)),u||H))N.addResizeListener(function(a){u&&a===P&&u.getTextView().resize();H&&H.resize()}),u&&(u.getTextView().setKeyBinding(new k.KeyBinding("o",!0),"toggleOutliner"),u.getTextView().setAction("toggleOutliner",function(){N.toggleSidePanel();return!0},{name:"Toggle Outliner"}))}H&&
window.setTimeout(function(){H.layout()},10);g=new e.Command({name:b["Make Favorite"],tooltip:b["Add to the favorites list"],imageClass:"core-sprite-makeFavorite",id:"orion.makeFavorite",visibleWhen:function(b){b=a.isArray(b)?b:[b];if(b.length===0)return!1;for(var c=0;c<b.length;c++)if(!b[c].Location)return!1;return!0},callback:function(c){for(var c=a.isArray(c.items)?c.items:[c.items],d=l.getService("orion.core.favorite"),e=function(a){return function(c){c?l.getService("orion.page.message").setMessage(a.Name+
b[" is already a favorite."],2E3):d.makeFavorites(a)}},f=0;f<c.length;f++){var g=c[f];d.hasFavorite(g.ChildrenLocation||g.Location).then(e(g))}}});o.addCommand(g);var Q=function(b,c,d){var e=c.getService("orion.core.favorite");e||(e=new n.FavoritesService({serviceRegistry:c}),e=c.getService("orion.core.favorite"));var f=new orion.widgets.OpenResourceDialog({searcher:b,searchRenderer:b.defaultRenderer,favoriteService:e});d&&a.connect(f,"onHide",function(){d.getTextView().focus()});window.setTimeout(function(){f.show()},
0)},g=new e.Command({name:b["Find File Named..."],tooltip:b["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){Q(w,l,u)}});u&&(u.getTextView().setKeyBinding(new k.KeyBinding("f",!0,!0,!1),g.id),u.getTextView().setAction(g.id,function(){Q(w,l,u);return!0},g));o.addCommand(g);o.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new e.CommandKeyBinding("f",!0,!0));g=new e.Command({name:b["Toggle banner and footer"],tooltip:b["Hide or show the page banner and footer"],
id:"orion.toggleTrim",callback:function(){var b=a.byId("banner"),c=a.byId("footer"),d=a.query(".content-fixedHeight")[0];b.style.display==="none"?(b.style.display="block",c.style.display="block",a.removeClass(d,"content-fixedHeight-maximized")):(b.style.display="none",c.style.display="none",a.addClass(d,"content-fixedHeight-maximized"));u&&u.getTextView().resize();H&&window.setTimeout(function(){H.resize()},10);return!0}});o.addCommand(g);o.registerCommandContribution("globalActions","orion.toggleTrim",
100,null,!0,new e.CommandKeyBinding("m",!0,!0));u&&(u.getTextView().setKeyBinding(new e.CommandKeyBinding("m",!0,!0),g.id),u.getTextView().setAction(g.id,g.callback,g));var R=a.byId("keyAssist");a.connect(document,"onkeypress",a.hitch(this,function(b){if(b.charOrCode===a.keys.ESCAPE)R.style.display="none"}));a.connect(document,"onclick",a.hitch(this,function(a){if((a=a.target||a.originalTarget||a.srcElement)&&a.id!=="keyAssist")R.style.display="none"}));u&&u.getTextView().addEventListener("MouseDown",
function(){R.style.display="none"});A&&A.addHandler({isActive:function(){return R.style.display==="block"},cancel:function(){return this.isActive()?(R.style.display="none",!0):!1}});A=new e.Command({name:b["System Configuration Details"],tooltip:b["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return d.toUrl("help/about.html")}});o.addCommand(A);o.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new e.CommandKeyBinding(112,!0,!0));A=
new e.Command({name:b["Background Operations"],tooltip:b["Background Operations Tooltip"],id:"orion.backgroundOperations",hrefCallback:function(){return d.toUrl("operations/list.html")}});o.addCommand(A);o.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new e.CommandKeyBinding("o",!0,!0));A=new e.Command({name:b["Show Keys"],tooltip:b["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){if(R.style.display==="none"){a.empty(R);
if(u){a.place("<h2>"+b.Editor+"</h2>",R,"last");for(var c=u.getTextView().getActions(!1),d=0;d<c.length;d++){var e=c[d],f=e,g=u.getTextView(),h=g.getActionDescription(e);if(h&&h.name)f=h.name;e=g.getKeyBindings(e);for(g=0;g<e.length;g++)a.place('<span role="listitem">'+j.getUserKeyString(e[g])+" = "+f+"<br></span>",R,"last")}}a.place("<h2>"+b.Global+"</h2>",R,"last");o.showKeyBindings(R);R.style.display="block"}else R.style.display="none";return!0}});o.addCommand(A);o.registerCommandContribution("globalActions",
"eclipse.keyAssist",100,null,!0,new e.CommandKeyBinding(191,!1,!0));u&&(g=window.navigator.platform.indexOf("Mac")!==-1,u.getTextView().setKeyBinding(new e.CommandKeyBinding(191,!1,!0,!g,g),A.id),u.getTextView().setAction(A.id,A.callback,A));F.setKeyAssist(A.callback);S(l,o);L(o);y(l);t(l);a.subscribe("/dojo/hashchange",o,function(){o.processURL(window.location.href)});window.setTimeout(function(){I(l)},0)},getToolbarElements:O,layoutToolbarElements:M,setPageTarget:function(b){var c,d,e=b.breadcrumbRootName;
b.target?(b.searchService&&b.searchService.setLocationByMetaData(b.target),b.fileService&&!b.breadcrumbTarget&&(d=e?e+" ":"",d+=b.fileService.fileServiceName(b.target.Location),e=null),c=b.name||b.target.Name,T=b.target,D(b.serviceRegistry,b.target,P,b.commandService,b.makeAlternate)):(b.breadcrumbTarget||(e=e||b.task||b.name),c=b.name);(J=b.title)||(J=c?c+" - "+b.task:b.task);window.document.title=J;a.empty("location");new l.BreadCrumbs({container:"location",resource:b.breadcrumbTarget||b.target,
rootSegmentName:e,workspaceRootSegmentName:d,makeHref:b.makeBreadcrumbLink});Q=b.target&&b.isFavoriteTarget?b.target:null;S(b.serviceRegistry,b.commandService)},setDirtyIndicator:function(b){if(J)J.charAt(0)==="*"&&!b&&(J=J.substring(1)),b&&J.charAt(0)!=="*"&&(J="*"+J),window.document.title=J;var c=a.byId("dirty");if(c)c.textContent=b?"*":""},setPageCommandExclusions:function(a){P=a},notifyAuthenticationSite:G}});
define("orion/status",["require","dojo","orion/globalCommands"],function(b,d,a){function c(a,b,c,d,f){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.message",this);this._operationsClient=b;this.notificationContainerDomId=f;this.domId=c;this.progressDomId=d||c;this._hookedClose=!1}function f(a,b,c,f){this.statusService=a;this.progressId=b;if(c){this.deferred=c;this.begin(f);var k=this;c.then(function(){d.hitch(k,k.done)()},function(){d.hitch(k,k.done)()})}}c.prototype=
{_init:function(){var a=d.byId("closeNotifications");a&&!this._hookedClose&&(d.connect(a,"onclick",this,function(){this.setProgressMessage("")}),d.connect(a,"onkeypress",this,function(a){(a.keyCode===d.keys.ENTER||a.keyCode===d.keys.SPACE)&&this.setProgressMessage("")}))},_getNotifierElements:function(){if(!this._notifierElements)this._notifierElements=a.getToolbarElements(this.notificationContainerDomId);return this._notifierElements},setMessage:function(a,b,c){this._init();this.currentMessage=a;
if(typeof c==="boolean"){var f=this,k=d.byId(this.domId),l=d.attr(k,"aria-live");d.attr(k,"aria-live",c?"polite":"off");window.setTimeout(function(){a===f.currentMessage&&(d.place(window.document.createTextNode(a),f.domId,"only"),window.setTimeout(function(){d.attr(k,"aria-live",l)},100))},100)}else d.place(window.document.createTextNode(a),this.domId,"only");typeof b==="number"&&(f=this,window.setTimeout(function(){a===f.currentMessage&&d.place(window.document.createTextNode(""),f.domId,"only")},
b))},setErrorMessage:function(a){this.currentMessage=a;this._init();var b=a.responseText||a.message||a;try{b=JSON.parse(b)}catch(c){}var a=b.Message||b,f="red";if(b.Severity)switch(b.Severity){case "Warning":f="#FFCC00";break;case "Error":f="red";break;case "Info":case "Ok":f="green"}b=d.create("span",{style:{color:f}});d.place(window.document.createTextNode(a),b);d.place(b,this.domId,"only")},setProgressMessage:function(b){this._init();this.currentMessage=b;var c=d.create("span",{"class":"imageSprite core-sprite-progress"});
d.place(c,this.progressDomId,"only");d.place(window.document.createTextNode(b),this.progressDomId,"last");d.addClass(this.notificationContainerDomId,"progressNormal");if(b&&b.length>0)d.addClass(this.notificationContainerDomId,"slideContainerActive");else if(this._progressMonitors&&this._progressMonitors.length>0)return this._renderOngoingMonitors();else d.removeClass(this.notificationContainerDomId,"slideContainerActive");a.layoutToolbarElements(this._getNotifierElements())},setProgressResult:function(b){this.currentMessage=
b;b=b.responseText||b;try{b=JSON.parse(b)}catch(c){}this._init();var f=b.Message||b,j="imageSprite core-sprite-info",k="progressInfo",l="progressWarning progressError progressNormal";if(b.Severity)switch(b.Severity){case "Warning":j="imageSprite core-sprite-warning";k="progressWarning";l="progressInfo progressError progressNormal";break;case "Error":j="imageSprite core-sprite-error",k="progressError",l="progressWarning progressInfo progressNormal"}j=d.create("span",{"class":j});d.place(j,this.progressDomId,
"only");b.HTML?d.place(f,this.progressDomId,"last"):d.place(window.document.createTextNode("   "+f),this.progressDomId,"last");k&&this.progressDomId!==this.domId&&(d.addClass(this.notificationContainerDomId,k),d.removeClass(this.notificationContainerDomId,l));d.addClass(this.notificationContainerDomId,"slideContainerActive");a.layoutToolbarElements(this._getNotifierElements())},showWhile:function(a,b){var c=this;b&&(c.setProgressMessage(b),a.addBoth(function(){b===c.currentMessage&&c.setProgressMessage("")}));
return a},_lastProgressId:0,_progressMonitors:{length:0},createProgressMonitor:function(a,b){return new f(this,++this._lastProgressId,a,b)},_renderOngoingMonitors:function(){if(this._progressMonitors.length>0){var a="",b=!0,c;for(c in this._progressMonitors)this._progressMonitors[c].status&&(b||(a+=", "),a+=this._progressMonitors[c].status,b=!1);this.setProgressMessage(a)}else this.setProgressMessage("")},_beginProgressMonitor:function(a){this._progressMonitors[a.progressId]=a;this._progressMonitors.length++;
this._renderOngoingMonitors()},_workedProgressMonitor:function(a){this._progressMonitors[a.progressId]=a;this._renderOngoingMonitors()},_doneProgressMonitor:function(a){delete this._progressMonitors[a.progressId];this._progressMonitors.length--;a.status?this.setProgressResult(a.status):this._renderOngoingMonitors()}};c.prototype.constructor=c;f.prototype.begin=function(a){this.status=a;this.statusService._beginProgressMonitor(this)};f.prototype.done=function(a){this.status=a;this.statusService._doneProgressMonitor(this)};
f.prototype.worked=function(a){this.status=a;this.statusService._workedProgressMonitor(this)};f.prototype.constructor=f;return{StatusReportingService:c,ProgressMonitor:f}});
define("orion/progress",["i18n!orion/nls/messages","require","dojo","orion/globalCommands","orion/widgets/OperationsDialog"],function(b,d,a){function c(a,b){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.progress",this);this._operationsClient=b;this._initDone=!1;this._topicListeners={};this._myOperations={};this._lastIconClass=this._lastOperation=null}c.prototype={init:function(b){if(!this._progressPane){this._progressPane=a.byId(b);this._operationsDialog=new orion.widgets.OperationsDialog;
a.connect(this._progressPane,"onclick",a.hitch(this,this._openOperationsPopup));var c=this;a.connect(this._progressPane,"onkeypress",function(b){(b.charOrCode===" "||b.keyCode===a.keys.ENTER)&&a.hitch(c,c._openOperationsPopup)()});new Date-this.getLastListUpdate()>3E5?this._operationsClient.getRunningOperations().then(function(b){a.hitch(c,c._loadOperationsList)(b);window.setTimeout(function(){a.hitch(c,c._checkOperationsChanges())},5E3)},function(a){console.error(a)}):(a.hitch(c,c._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||
'{"Children": []}'))),window.setTimeout(function(){a.hitch(c,c._checkOperationsChanges())},5E3));window.addEventListener("storage",function(b){b.key==="orionOperations"&&a.hitch(c,c._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}')))})}},_loadOperationsList:function(a){a.lastClientDate=new Date;a.lastClientDate-this.getLastListUpdate()>3E5&&(localStorage.setItem("orionOperations",JSON.stringify(a)),this._generateOperationsInfo(a))},getLastListUpdate:function(){var a=
JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}');return a.lastClientDate?new Date(a.lastClientDate):new Date(0)},_markOperationAsFailed:function(a,c,d){a.Message=b["Operation status is unknown"];a.Running=!1;a.Failed=!0;a.Result={HttpCode:d?d.xhr.staus:500,Severity:c,Message:c.Message?c.Message:c};this.writeOperation(a)},_checkOperationsChanges:function(){for(var b=this,c=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),d=[],g=[],j=0;j<c.Children.length;j++){var k=
c.Children[j];if(k.Running==!0&&new Date-new Date(k.lastClientDate?k.lastClientDate:0)>5E3){var l=this._operationsClient.getOperation(k.Location);g.push(l);a.hitch(this,function(g){l.then(function(c){c.lastClientDate=new Date;a.hitch(b,b.writeOperation)(c)},function(j,k){if(j.status==404)return d.push(g),j;a.hitch(b,b._markOperationAsFailed(c.Children[g],j,k))})})(j)}!k.Running&&new Date-new Date(k.lastClientDate?k.lastClientDate:0)>3E5&&d.push(j)}(new a.DeferredList(g)).addBoth(function(){if(d.length>
0){c.lastClientDate=new Date;for(var g=d.length-1;g>=0;g--)c.Children.splice(d[g],1);localStorage.setItem("orionOperations",JSON.stringify(c));a.hitch(b,b._generateOperationsInfo)(c)}window.setTimeout(function(){a.hitch(b,b._checkOperationsChanges())},5E3)})},_openOperationsPopup:function(){try{dijit.popup.open({popup:this._operationsDialog,around:this._progressPane})}catch(a){}dijit.focus(this._operationsDialog.domNode)},_switchIconTo:function(b){this._lastIconClass&&a.removeClass(this._progressPane,
this._lastIconClass);this._lastIconClass=b;a.addClass(this._progressPane,this._lastIconClass)},_generateOperationsInfo:function(c){this._operationsDialog.setOperations(c,this._myOperations);if(!c.Children||c.Children.length==0)this._switchIconTo("progressPane_empty"),this._progressPane.title=b.Operations,this._progressPane.alt=b.Operations,a.hasAttr(this._progressPane,"aria-valuetext")&&a.removeAttr(this._progressPane,"aria-valuetext");else{for(var d="",h=0;h<c.Children.length;h++){var g=c.Children[h];
if(this._myOperations[g.Id]&&g.Running==!0){d="running";break}}if(d===""&&this._lastOperation!=null&&this._lastOperation.Result)switch(this._operationsDialog.parseProgressResult(this._lastOperation.Result).Severity){case "Warning":d!=="error"&&(d="warning");break;case "Error":d="error"}switch(d){case "running":this._progressPane.title=b["Operations running"];this._progressPane.alt=b["Operations running"];a.attr(this._progressPane,"aria-valuetext",b["Operations running"]);this._switchIconTo("progressPane_running");
break;case "warning":this._progressPane.title=b["Some operations finished with warning"];this._progressPane.alt=b["Some operations finished with warning"];a.attr(this._progressPane,"aria-valuetext",b["Some operations finished with warning"]);this._switchIconTo("progressPane_warning");break;case "error":this._progressPane.title=b["Some operations finished with error"];this._progressPane.alt=b["Some operations finished with error"];a.attr(this._progressPane,"aria-valuetext",b["Some operations finished with error"]);
this._switchIconTo("progressPane_error");break;default:this._progressPane.title=b.Operations,this._progressPane.alt=b.Operations,a.hasAttr(this._progressPane,"aria-valuetext")&&a.removeAttr(this._progressPane,"aria-valuetext"),this._switchIconTo("progressPane_operations")}}},followOperation:function(b,c,d){b.Id&&(this._myOperations[b.Id]=!0);var g=c?c:new a.Deferred;this.writeOperation(b);var j=this;if(b&&b.Location&&b.Running==!0)window.setTimeout(function(){j._operationsClient.getOperation(b.Location).then(function(c){a.hitch(j,
j.followOperation(c,g,b.Location))},function(c,d){a.hitch(j,j.setProgressResult)({Severity:"Error",Message:c});a.hitch(j,j._markOperationAsFailed(b,c,d));g.errback(c,d)})},2E3);else if(b&&b.Result)j._serviceRegistry.getService("orion.page.message").setProgressMessage(""),c=this._operationsDialog.parseProgressResult(b.Result).Severity,c=="Error"||c=="Warning"?(b.Result.failedOperation={Location:d,Id:b.Id,Name:b.Name},g.callback(b),setTimeout(function(){j._myOperations[b.Id]&&a.hitch(j,j._openOperationsPopup)()},
10)):g.callback(b),!b.Failed&&b.Idempotent==!0&&window.setTimeout(function(){a.hitch(j,j.removeOperation)(d,b.Id)},5E3);return g},removeOperation:function(b,c){that=this;if(c){if(this._lastOperation!=null&&this._lastOperation.Id===c)this._lastOperation=null;delete this._myOperations[c]}a.hitch(that._operationsClient,that._operationsClient.removeOperation)(b).then(function(){a.hitch(that,that.removeOperationFromTheList)(c)})},removeOperationFromTheList:function(a){if(this._lastOperation!=null&&this._lastOperation.Id===
a)this._lastOperation=null;delete this._myOperations[a];for(var b=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),c=0;c<b.Children.length;c++){var d=b.Children[c];if(d.Id&&d.Id===a){b.Children.splice(c,1);break}}localStorage.setItem("orionOperations",JSON.stringify(b));this._generateOperationsInfo(b)},removeCompletedOperations:function(){for(var a=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),b=a.Children.length-1;b>=0;b--)a.Children[b].Running||a.Children.splice(b,
1);localStorage.setItem("orionOperations",JSON.stringify(a));this._generateOperationsInfo(a)},setProgressResult:function(a){this._serviceRegistry.getService("orion.page.message").setProgressResult(a)},showWhile:function(b,c){c&&this._serviceRegistry.getService("orion.page.message").setProgressMessage(c);var d=this;return b.then(function(b){if(b&&b.Location&&b.Message&&b.Running)return a.hitch(d,d.followOperation)(b,null,b.Location);d._serviceRegistry.getService("orion.page.message").setProgressMessage("");
return b},function(b){a.hitch(d,d.setProgressResult)(b);return b})},followTopic:function(a,b){this._topicListeners[a]||(this._topicListeners[a]=[]);this._topicListeners[a].push(b)},writeOperation:function(a){this._lastOperation=a=JSON.parse(JSON.stringify(a));for(var b=JSON.parse(localStorage.getItem("orionOperations")||'{"Children": []}'),c=0;c<b.Children.length;c++){var d=b.Children[c];if(d.Id&&d.Id===a.Id){b.Children.splice(c,1);break}}!a.Running&&!a.Failed&&delete a.Result;a.lastClientDate=new Date;
b.Children.push(a);b.lastClientDate=new Date;localStorage.setItem("orionOperations",JSON.stringify(b));this._generateOperationsInfo(b)}};c.prototype.constructor=c;return{ProgressService:c}});
define("orion/editorCommands","i18n!orion/edit/nls/messages,dojo,orion/commands,orion/globalCommands,orion/extensionCommands,orion/contentTypes,orion/textview/keyBinding,orion/textview/undoStack,orion/searchUtils".split(","),function(b,d,a,c,f,e,h,g,j){var c={},k=null;c.EditorCommandFactory=function(){function c(a,b,d,e,f,g,h,j){this.serviceRegistry=a;this.commandService=b;this.fileClient=d;this.inputManager=e;this.toolbarId=f;this.pageNavId=h;this.isReadOnly=g;this._searcher=j}c.prototype={generateEditorCommands:function(c){function g(a){if(k)return k;
var b=a.getService("orion.core.contenttypes");b||(b=new e.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return k=a})}function l(a){var b=new h.KeyBinding;h.KeyBinding.apply(b,a);return b}function q(a){var c={Severity:"Error"};a.status===0?c.Message=b["No response from server.  Check your internet connection and try again."]:c=a;(a=serviceRegistry.getService("orion.page.message"))?a.setProgressResult(c):window.console.log(c)}if(!this.isReadOnly){c.getTextView().setKeyBinding(new h.KeyBinding("s",
!0),"save");this.inputManager.onSave?c.getTextView().setAction("save",d.hitch(this,function(){var a=c.getText();this.inputManager.onSave(this.inputManager.getInput(),a,d.hitch(this,function(){c.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&this.inputManager.afterSave()}),d.hitch(this,function(a){a.log=!0}));return!0}),{name:b.Save}):c.getTextView().setAction("save",d.hitch(this,function(){var a=c.getText(),e={ETag:this.inputManager.getFileMetadata().ETag};this.fileClient.write(this.inputManager.getInput(),
a,e).then(d.hitch(this,function(b){this.inputManager.getFileMetadata().ETag=b.ETag;c.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&this.inputManager.afterSave()}),d.hitch(this,function(e){e.status===412?confirm(b["Resource is out of sync with the server. Do you want to save it anyway?"])&&this.fileClient.write(this.inputManager.getInput(),a).then(d.hitch(this,function(b){this.inputManager.getFileMetadata().ETag=b.ETag;c.setInput(this.inputManager.getInput(),null,a,
!0);this.inputManager.afterSave&&this.inputManager.afterSave()},q)):q(e)}));return!0}),{name:b.Save});this.commandService.addCommand(new a.Command({name:b.Save,tooltip:b["Save this file"],id:"orion.save",callback:function(a){a.items.getTextView().invokeAction("save")}}));this.commandService.registerCommandContribution(this.toolbarId,"orion.save",1,null,!1,new a.CommandKeyBinding("s",!0));var p=new a.ParametersDescription([new a.CommandParameter("line","number","Line:")],{hasOptionalParameters:!1},
function(){var b=c.getModel().getLineAtOffset(c.getCaretOffset())+1;return[new a.CommandParameter("line","number","Line:",b.toString())]}),p=new a.Command({name:b["Go to Line"],tooltip:b["Go to specified line number"],id:"orion.gotoLine",parameters:p,callback:function(a){var d=c.getModel();a.parameters&&a.parameters.valueFor("line")?a=a.parameters.valueFor("line"):(a=d.getLineAtOffset(c.getCaretOffset()),(a=prompt(b["Go to line:"],a+1))&&(a=parseInt(a,10)));if(a)c.onGotoLine(a-1,0)}});this.commandService.addCommand(p);
this.commandService.registerCommandContribution(this.pageNavId,"orion.gotoLine",1,null,!0,new a.CommandKeyBinding("l",!0),new a.URLBinding("gotoLine","line"));c.getTextView().setKeyBinding(new h.KeyBinding("l",!0),"gotoLine");c.getTextView().setAction("gotoLine",d.hitch(this,function(){this.commandService.runCommand("orion.gotoLine");return!0}),p);var p=new a.ParametersDescription([new a.CommandParameter("find","text","Find:")],{clientCollect:!0},function(){var b=c.getSelection(),d="";b.end>b.start&&
(d=c.getModel().getText(b.start,b.end));return[new a.CommandParameter("find","text","Find:",d)]}),r=this,p=new a.Command({name:b.Find,tooltip:b.Find,id:"orion.editor.find",parameters:p,callback:function(a){if(r._searcher){var b="",d=null,e=c.getSelection();if(e.end>e.start)b=c.getModel().getText(e.start,e.end),fromSelection=!0;else if(a.parameters&&a.parameters.valueFor("find"))a=a.parameters.valueFor("find"),d=j.parseFindURLBinding(a),b=d.searchStr;d?(r._searcher.setOptions({useRegExp:d.useRegExp}),
d.lineNumber?(a=c.getModel().getLineStart(d.lineNumber-1),c.moveSelection(a,a,function(){r._searcher.buildToolBar(b,d?d.replaceStr:null);r._searcher.findNext(!0)},focus)):(r._searcher.buildToolBar(b,d?d.replaceStr:null),r._searcher.findNext(!0))):r._searcher.buildToolBar(b);return!0}return!1}});this.commandService.addCommand(p);this.commandService.registerCommandContribution(this.pageNavId,"orion.editor.find",2,null,!0,new a.CommandKeyBinding("f",!0),new a.URLBinding("find","find"));c.getTextView().setKeyBinding(new h.KeyBinding("f",
!0),"find");c.getTextView().setAction("find",d.hitch(this,function(){this.commandService.runCommand("orion.editor.find");return!0}),p);var s=this.serviceRegistry.getServiceReferences("orion.edit.command"),x=this.inputManager,v=function(b,e,f){f.callback=d.hitch(c,function(a){c=a?a.items||this:this;var b=c.getSelection(),a=c.getModel(),d=a.getText();e.run(a.getText(b.start,b.end),d,b,x.getInput()).then(function(a){a&&a.text?(c.setText(a.text),a.selection&&(c.setSelection(a.selection.start,a.selection.end),
c.getTextView().focus())):typeof a==="string"&&(c.setText(a,b.start,b.end),c.setSelection(b.start,b.start+a.length),c.getTextView().focus())});return!0});return new a.Command(f)};d.when(g(this.serviceRegistry),d.hitch(this,function(){for(var a=[],b=0;b<s.length;b++){for(var e=s[b],g=this.serviceRegistry.getService(s[b]),h={},j=s[b].getPropertyKeys(),n=0;n<j.length;n++)h[j[n]]=s[b].getProperty(j[n]);h.forceSingleItem=!0;e=f._createCommandOptions(h,e,this.serviceRegistry,k,!1,function(){return x.getFileMetadata()});
a.push(e);e.then(d.hitch(this,function(a){a=v(h,g,a);this.commandService.addCommand(a);this.commandService.registerCommandContribution(this.toolbarId,a.id,100+b);if(h.key){var d=c.getTextView();d.setKeyBinding(l(h.key),a.id);d.setAction(a.id,a.callback,a)}}))}(new d.DeferredList(a)).addBoth(d.hitch(this,function(){if(x.getFileMetadata()){var a=d.byId("pageActions");a&&(this.commandService.destroy(a),this.commandService.renderCommands(a.id,a,c,c,"button"));if(a=d.byId("pageNavigationActions"))this.commandService.destroy(a),
this.commandService.renderCommands(a.id,a,c,c,"button")}}))}))}}};return c}();c.UndoCommandFactory=function(){function c(a,b,d){this.serviceRegistry=a;this.commandService=b;this.toolbarId=d}c.prototype={createUndoStack:function(c){var d=new g.UndoStack(c.getTextView(),200),e=new a.Command({name:b.Undo,id:"orion.undo",callback:function(a){a.items.getTextView().invokeAction("undo")}});c.getTextView().setKeyBinding(new h.KeyBinding("z",!0),"undo");c.getTextView().setAction("undo",function(){d.undo();
return!0},e);this.commandService.addCommand(e);var e=navigator.platform.indexOf("Mac")!==-1?new h.KeyBinding("z",!0,!0):new h.KeyBinding("y",!0),f=new a.Command({name:b.Redo,id:"orion.redo",callback:function(a){a.items.getTextView().invokeAction("redo")}});c.getTextView().setKeyBinding(e,"redo");c.getTextView().setAction("redo",function(){d.redo();return!0},f);this.commandService.addCommand(f);this.commandService.registerCommandContribution(this.toolbarId,"orion.undo",400,null,!0,new a.CommandKeyBinding("z",
!0));this.commandService.registerCommandContribution(this.toolbarId,"orion.redo",401,null,!0,e);return d}};return c}();return c});
define("orion/compare/compare-container","i18n!orion/compare/nls/messages,require,dojo,dijit,orion/compare/diff-parser,orion/compare/compare-rulers,orion/editor/contentAssist,orion/editorCommands,orion/editor/editor,orion/editor/editorFeatures,orion/globalCommands,orion/commands,orion/textview/textModel,orion/textview/textView,orion/compare/compare-features,orion/compare/compareUtils,orion/compare/diff-provider,orion/compare/jsdiffAdapter,orion/highlight,orion/compare/diffTreeNavigator,orion/searchAndReplace/textSearcher,orion/fileClient".split(","),function(b,
d,a,c,f,e,h,g,j,k,l,m,n,o,q,p,r,s,x,v,w,t){var u={};u.DefaultDiffProvider=function(){function b(a){this.serviceRegistry=a;this._diffProvider=new r.DiffProvider(a)}b.prototype={_resolveComplexDiff:function(b,c,d){var e=b.indexOf(",");if(e>0){var f=b.substring(0,e),g=b.substring(e+1),h=this;(new a.DeferredList([h._getContentType(g),h._getContentType(f)])).then(function(a){var b=a[0][1],a=a[1][1];h.callBack({baseFile:{URL:g,Name:h._resolveFileName(g),Type:b},newFile:{URL:f,Name:h._resolveFileName(f),
Type:a}})},d)}else this._diffProvider?(h=this,h._diffProvider.getDiffContent(b).then(function(a){h._diffContent=h._hasConflicts?a.split("diff --git")[1]:a;c?h.callBack({diff:h._diffContent}):h._resolveComplexFileURL(b)},d)):console.log("A diff provider is needed for compound diff URL")},_resolveFileName:function(a){return a.split("?")[0]},_getContentType:function(a){a=this._resolveFileName(a);return this.serviceRegistry.getService("orion.core.contenttypes").getFilenameContentType(a)},_resolveComplexFileURL:function(b,
c){var d=this;this._diffProvider.getDiffFileURI(b).then(function(b){(new a.DeferredList([d._getContentType(b.Old),d._getContentType(b.New)])).then(function(a){var c=a[0][1],a=a[1][1];d.callBack({baseFile:{URL:b.Old,Name:d._resolveFileName(b.Old),Type:c},newFile:{URL:b.New,Name:d._resolveFileName(b.New),Type:a},diff:d._diffContent})},c)},c)},provide:function(a,b,c,d,e){this.callBack=d;this._hasConflicts=c;this._resolveComplexDiff(a,b,e)}};return b}();u.CompareStyler=function(){function a(b){this._syntaxHighlither=
new x.SyntaxHighlighter(b)}a.prototype={highlight:function(a,b,c,d,e){this._syntaxHighlither.setup(b,c.getTextView(),null,a,!1).then(function(){d&&e&&(c.setAnnotationRulerVisible(!1),d._highlighterLoaded++,d._highlighterLoaded===e&&(d._diffNavigator.renderAnnotations(),d._diffNavigator.gotoBlock(d.options.blockNumber-1,d.options.changeNumber-1)))})}};return a}();u.CompareContainer=function(){function c(){this._diffParser=new f.DiffParser}c.prototype={_clearOptions:function(){this.options={};this.options.baseFile=
{URL:"",Name:"",Type:""};this.options.newFile={URL:"",Name:"",Type:""};this.options.blockNumber=1;this.options.changeNumber=0},setOptions:function(a,b){b&&this._clearOptions();if(a)this.options.mapper=a.mapper?a.mapper:this.options.mapper,this.options.commandSpanId=typeof a.commandSpanId==="string"?a.commandSpanId:this.options.commandSpanId,this.options.generateLink=a.generateLink!==void 0&&a.generateLink!==null?a.generateLink:this.options.generateLink,this.options.editableInComparePage=a.editableInComparePage!==
void 0&&a.editableInComparePage!==null?a.editableInComparePage:this.options.editableInComparePage,this.options.gridRenderer=a.gridRenderer||this.options.gridRenderer,this.options.readonly=a.readonly!==void 0&&a.readonly!==null?a.readonly:this.options.readonly,this.options.onPage=a.onPage!==void 0&&a.onPage!==null?a.onPage:this.options.onPage,this.options.wordLevelNav=a.wordLevelNav!==void 0&&a.wordLevelNav!==null?a.wordLevelNav:this.options.wordLevelNav,this.options.charDiff=a.charDiff!==void 0&&
a.charDiff!==null?a.charDiff:this.options.charDiff,this.options.hasConflicts=a.hasConflicts!==void 0&&a.hasConflicts!==null?a.hasConflicts:this.options.hasConflicts,this.options.diffProvider=a.diffProvider?a.diffProvider:this.options.diffProvider,this.options.complexURL=a.complexURL?a.complexURL:this.options.complexURL,this.options.baseFile.URL=a.baseFile&&a.baseFile.URL?a.baseFile.URL:this.options.baseFile.URL,this.options.baseFile.Name=a.baseFile&&typeof a.baseFile.Name==="string"?a.baseFile.Name:
this.options.baseFile.Name,this.options.baseFile.Type=a.baseFile&&a.baseFile.Type?a.baseFile.Type:this.options.baseFile.Type,this.options.baseFile.Content=a.baseFile&&typeof a.baseFile.Content==="string"?a.baseFile.Content:this.options.baseFile.Content,this.options.newFile.URL=a.newFile&&a.newFile.URL?a.newFile.URL:this.options.newFile.URL,this.options.newFile.Name=a.newFile&&typeof a.newFile.Name==="string"?a.newFile.Name:this.options.newFile.Name,this.options.newFile.Type=a.newFile&&a.newFile.Type?
a.newFile.Type:this.options.newFile.Type,this.options.newFile.Content=a.newFile&&typeof a.newFile.Content==="string"?a.newFile.Content:this.options.newFile.Content,this.options.diffURL=a.diffURL?a.diffURL:this.options.diffURL,this.options.diffContent=a.diffContent?a.diffContent:this.options.diffContent,this.options.diffArray=a.diffArray?a.diffArray:this.options.diffArray,this.options.blockNumber=a.blockNumber?a.blockNumber:this.options.blockNumber,this.options.changeNumber=a.changeNumber?a.changeNumber:
this.options.changeNumber,this.options.onSave=a.onSave?a.onSave:this.options.onSave,this.options.callback=a.callback?a.callback:this.options.callback,this._errorCallback=a.errorCallback?a.errorCallback:this._errorCallback,this.options.onSetTitle=a.onSetTitle?a.onSetTitle:this.options.onSetTitle,this.options.toggler=a.toggler?a.toggler:this.options.toggler},initCommands:function(){var a=this.getCommandSpanId();if(a){var c=new m.Command({name:b["Copy current change from right to left"],tooltip:b["Copy current change from right to left"],
imageClass:"core-sprite-leftarrow",id:"orion.compare.copyToLeft",groupId:"orion.compareGroup",callback:function(a){a.items.copyToLeft()}}),d=new m.Command({tooltip:b["Switch to unified diff"],name:b.Unified,id:"orion.compare.toggle2Inline",groupId:"orion.compareGroup",visibleWhen:function(a){return a.options.toggler&&a.options.toggler.widgetType==="twoWay"},callback:function(a){a.items.options.toggler.toggle()}}),e=new m.Command({tooltip:b["Switch to side by side diff"],name:b["Side by side"],id:"orion.compare.toggle2TwoWay",
groupId:"orion.compareGroup",visibleWhen:function(a){return a.options.toggler&&a.options.toggler.widgetType==="inline"},callback:function(a){a.items.options.toggler.toggle()}}),f=new m.Command({tooltip:b["Generate link of the current diff"],name:b["Generate Link"],id:"orion.compare.generateLink",groupId:"orion.compareGroup",visibleWhen:function(a){return a.options.complexURL&&a.options.generateLink},callback:function(a){a.items.generateLink()}}),g=new m.Command({tooltip:b["Open the compare page"],
name:b.Compare,id:"orion.compare.openComparePage",groupId:"orion.compareGroup",visibleWhen:function(a){return a.options.complexURL&&!a.options.generateLink},hrefCallback:function(a){return a.items.openComparePage()}}),h=new m.Command({name:b["Next diff block"],tooltip:b["Next diff block"],imageClass:"core-sprite-move_down",id:"orion.compare.nextDiff",groupId:"orion.compareGroup",callback:function(a){a.items.nextDiff()}}),j=new m.Command({name:b["Previous diff block"],tooltip:b["Previous diff block"],
imageClass:"core-sprite-move_up",id:"orion.compare.prevDiff",groupId:"orion.compareGroup",callback:function(a){a.items.prevDiff()}}),k=new m.Command({name:b["Next diff change"],tooltip:b["Next diff change"],imageClass:"core-sprite-move_down",id:"orion.compare.nextChange",groupId:"orion.compareGroup",callback:function(a){a.items.nextChange()}}),l=new m.Command({name:b["Previous diff change"],tooltip:b["Previous diff change"],imageClass:"core-sprite-move_up",id:"orion.compare.prevChange",groupId:"orion.compareGroup",
callback:function(a){a.items.prevChange(a)}});this._commandService.addCommand(c);this._commandService.addCommand(e);this._commandService.addCommand(d);this._commandService.addCommand(f);this._commandService.addCommand(g);this._commandService.addCommand(h);this._commandService.addCommand(j);this._commandService.addCommand(k);this._commandService.addCommand(l);this._commandService.registerCommandContribution(a,"orion.compare.openComparePage",107);this._commandService.registerCommandContribution(a,"orion.compare.generateLink",
108,null,!1,new m.CommandKeyBinding("l",!0,!0));this.options.readonly||this._commandService.registerCommandContribution(a,"orion.compare.copyToLeft",109,null,!1,new m.CommandKeyBinding(37,!0,!1,!0));this._commandService.registerCommandContribution(a,"orion.compare.toggle2Inline",110);this._commandService.registerCommandContribution(a,"orion.compare.toggle2TwoWay",111);this._commandService.registerCommandContribution(a,"orion.compare.nextDiff",112,null,!1,new m.CommandKeyBinding(40,!0));this._commandService.registerCommandContribution(a,
"orion.compare.prevDiff",113,null,!1,new m.CommandKeyBinding(38,!0));this.options.wordLevelNav?(this._commandService.registerCommandContribution(a,"orion.compare.nextChange",114,null,!1,new m.CommandKeyBinding(40,!0,!0)),this._commandService.registerCommandContribution(a,"orion.compare.prevChange",115,null,!1,new m.CommandKeyBinding(38,!0,!0))):(this._commandService.registerCommandContribution(a,"orion.compare.nextChange",114,null,!0,new m.CommandKeyBinding(40,!0,!0)),this._commandService.registerCommandContribution(a,
"orion.compare.prevChange",115,null,!0,new m.CommandKeyBinding(38,!0,!0)))}},getCommandSpanId:function(){var a=this.options.commandSpanId;!a&&this.getDefaultCommandSpanId&&(a=this.getDefaultCommandSpanId());return a},renderCommands:function(){var b=this.getCommandSpanId();b&&(a.empty(b),this.options.gridRenderer&&this.options.gridRenderer.navGridHolder?(this.options.gridRenderer.navGridHolder.splice(0,this.options.gridRenderer.navGridHolder.length),this.options.gridRenderer.additionalCmdRender?this.options.gridRenderer.before?
(this.options.gridRenderer.additionalCmdRender(this.options.gridRenderer.navGridHolder),this._commandService.renderCommands(b,b,this,this,"tool",null,this.options.gridRenderer.navGridHolder)):(this._commandService.renderCommands(b,b,this,this,"tool",null,this.options.gridRenderer.navGridHolder),this.options.gridRenderer.additionalCmdRender(this.options.gridRenderer.navGridHolder)):this._commandService.renderCommands(b,b,this,this,"tool",null,this.options.gridRenderer.navGridHolder)):this._commandService.renderCommands(b,
b,this,this,"tool",null))},generateLink:function(){var a=this.getCurrentDiffPos(),a=p.generateCompareHref(this.options.complexURL,{readonly:this.options.readonly,conflict:this.options.hasConflicts,block:a.block?a.block:1,change:a.change?a.change:0});prompt(b["Copy the link URL:"],a)},openComparePage:function(){var a=this.getCurrentDiffPos();return p.generateCompareHref(this.options.complexURL,{readonly:!this.options.editableInComparePage,conflict:this.options.hasConflicts,block:a.block?a.block:1,
change:a.change?a.change:0})},getCurrentDiffPos:function(){return this._diffNavigator.getCurrentPosition()},nextDiff:function(){this._diffNavigator.nextDiff()},prevDiff:function(){this._diffNavigator.prevDiff()},nextChange:function(){this._diffNavigator.nextChange()},prevChange:function(){this._diffNavigator.prevChange()},clearContent:function(){if(this.options.baseFile)this.options.baseFile.Content=null;if(this.options.newFile)this.options.newFile.Content=null},_getLineDelim:function(){return"\n"},
resolveComplexDiff:function(a){if(this.options.diffProvider){var b=this;b.options.diffProvider.provide(b.options.complexURL,a,b.options.hasConflicts,function(c){b.options.baseFile.URL=c.baseFile&&typeof c.baseFile.URL==="string"?c.baseFile.URL:b.options.baseFile.URL;b.options.baseFile.Name=c.baseFile&&typeof c.baseFile.Name==="string"?c.baseFile.Name:b.options.baseFile.Name;b.options.baseFile.Type=c.baseFile&&typeof c.baseFile.Type==="object"?c.baseFile.Type:b.options.baseFile.Type;b.options.baseFile.Content=
c.baseFile&&typeof c.baseFile.Content==="string"?c.baseFile.Content:b.options.baseFile.Content;b.options.newFile.URL=c.newFile&&typeof c.newFile.URL==="string"?c.newFile.URL:b.options.newFile.URL;b.options.newFile.Name=c.newFile&&typeof c.newFile.Name==="string"?c.newFile.Name:b.options.newFile.Name;b.options.newFile.Type=c.newFile&&typeof c.newFile.Type==="object"?c.newFile.Type:b.options.newFile.Type;b.options.newFile.Content=c.newFile&&typeof c.newFile.Content==="string"?c.newFile.Content:b.options.newFile.Content;
b.options.diffContent=typeof c.diff==="string"?c.diff:b.options.diffContent;a||typeof b.options.baseFile.Content==="string"?b.setEditor(a):(b.options.callback&&b.options.callback(b.options.baseFile.Name,b.options.newFile.Name),b.options.diffContent?b.getFileContent([b.options.baseFile],0):b.getFileContent([b.options.baseFile,b.options.newFile],0))},b.options.errorCallback)}else console.log("A diff provider is needed for Complex diff URL")},resolveDiffByContents:function(a){if(typeof this.options.baseFile.Content===
"string"&&typeof this.options.newFile.Content==="string"){if(!this.options.diffContent&&!this._mapper)this.options.diffContent="";this.setEditor(a);return!0}else return!1},getFileContent:function(a,b){if(this._fileClient){var c=this;c._fileClient.read(a[b].URL).then(function(d){a[b].Content=d;b<a.length-1?c.getFileContent(a,b+1):(d=c.setEditor(),c._onLoadContents&&c._onLoadContents(d))},function(d,e){if(d.status===404)if(a[b].Content="",b<a.length-1)c.getFileContent(a,b+1);else{var f=c.setEditor();
c._onLoadContents&&c._onLoadContents(f)}else c.errorCallback&&c.errorCallback(d,e)})}else console.log("A file client is needed for getting file content")},parseMapper:function(a,b,c,d,e){var f=this._getLineDelim(a,c);if(this.options.mapper&&this.options.toggler)return{delim:f,mapper:this.options.mapper,output:this.options.newFile.Content,diffArray:this.options.diffArray};if(b){a=(new s.JSDiffAdapter).adapt(a,b);if(this.options.toggler)this.options.mapper=a.mapper,this.options.newFile.Content=b,this.options.diffArray=
a.changContents;return{delim:f,mapper:a.mapper,output:b,diffArray:a.changContents}}else{this._diffParser.setLineDelim(f);b=this._diffParser.parse(a,c,d,e);a=this._diffParser.getDiffArray();if(this.options.toggler)this.options.mapper=b.mapper,this.options.newFile.Content=b.outPutFile,this.options.diffArray=a;return{delim:f,mapper:b.mapper,output:b.outPutFile,diffArray:a}}},startup:function(a,b){this._onLoadContents=b;this.options.complexURL?this.resolveComplexDiff(a):this.resolveDiffByContents(a)}};
return c}();u.TwoWayCompareContainer=function(){function d(c,f,g,h){this._diffNavigator=new v.DiffTreeNavigator("word");this._registry=c;this._commandService=this._registry.getService("orion.page.command");this._fileClient=new t.FileClient(c);this._searchService=this._registry.getService("orion.core.search");this._uiFactory=g;if(!this._uiFactory)this._uiFactory=new q.TwoWayCompareUIFactory({parentDivID:f,showTitle:!1,showLineStatus:!1}),this._uiFactory.buildUI();this._viewLoadedCounter=0;this.setOptions(h,
!0);var j=this;if(!this.options.callback)this.options.callback=function(b,c){j._uiFactory.getTitleDivId(!0)&&j._uiFactory.getTitleDivId(!1)&&(a.place(document.createTextNode(c),j._uiFactory.getTitleDivId(!0),"only"),a.place(document.createTextNode(b),j._uiFactory.getTitleDivId(!1),"only"))};if(!this._errorCallback)this._errorCallback=function(b,c){if(j._uiFactory.getTitleDivId(!0)&&j._uiFactory.getTitleDivId(!1)){var d=typeof b.message==="string"?b.message:c.xhr.statusText;a.place(document.createTextNode(d),
j._uiFactory.getTitleDivId(!0),"only");a.place(document.createTextNode(d),j._uiFactory.getTitleDivId(!1),"only");a.style(g.getTitleDivId(!0),"color","red");a.style(g.getTitleDivId(!1),"color","red")}};this._leftEditorDivId=this._uiFactory.getEditorParentDivId(!0);this._rightEditorDivId=this._uiFactory.getEditorParentDivId(!1);this.initCommands();j=this;this._inputManager={filePath:"",getInput:function(){return this.filePath},setDirty:function(a){l.setDirtyIndicator(a)},getFileMetadata:function(){return this._fileMetadata},
setInput:function(b){if(this.onSetTitle)this.onSetTitle(b,a.hitch(this,function(a){this.setTitle(a)}),a.hitch(this,function(a){console.error("Error loading file metadata: "+a.message);this.setTitle(b)}));else j._fileClient.read(b,!0).then(a.hitch(this,function(a){this._fileMetadata=a;this.setTitle(a.Location,a)}),a.hitch(this,function(a){console.error("Error loading file metadata: "+a.message);this.setTitle(b)}));this.lastFilePath=b},setTitle:function(a,d){var e;if(d)e=d.Name;l.setPageTarget({task:b.Compare,
name:e,target:d,serviceRegistry:c,commandService:this._commandService,searchService:this._searchService,fileService:this._fileClient});a.charAt(0)==="*"?(l.setDirtyIndicator(!0),a.substring(1)):l.setDirtyIndicator(!1)},afterSave:function(){j.startup(!0)}};if(this.options.onSave)this._inputManager.onSave=this.options.onSave;if(this.options.onSetTitle)this._inputManager.onSetTitle=this.options.onSetTitle;this._curveRuler=new e.CompareCurveRuler(document.getElementById(this._uiFactory.getDiffCanvasDivId()));
this._highlighter=[];this._highlighter.push(new u.CompareStyler(this._registry));this._highlighter.push(new u.CompareStyler(this._registry));this.initEditorContainers("\n",b["fetching..."],b["fetching..."],[])}d.prototype=new u.CompareContainer;d.prototype.initEditorContainers=function(c,d,f,g,h){this._leftEditor=this.createEditorContainer(d,c,g,0,this._leftEditorDivId,this._uiFactory.getStatusDivId(!0),this.options.readonly,h,this.options.newFile);if(this.options.onPage&&(d=a.byId("pageActions")))this._commandService.destroy(d),
this._commandService.renderCommands(d.id,d,this._leftEditor,this._leftEditor,"button");this._leftTextView=this._leftEditor.getTextView();this._rightEditor=this.createEditorContainer(f,c,g,1,this._rightEditorDivId,this._uiFactory.getStatusDivId(!1),!0,h,this.options.baseFile);this._rightTextView=this._rightEditor.getTextView();var j=this;this._overviewRuler=new e.CompareOverviewRuler("right",{styleClass:"ruler overview"},null,function(a){j._diffNavigator.matchPositionFromOverview(a)});window.onbeforeunload=
function(){if(j._leftEditor.isDirty())return b["There are unsaved changes."]}};d.prototype.getDefaultCommandSpanId=function(){return this._uiFactory.getCommandSpanId()};d.prototype.gotoMatch=function(a,b,c,d,e,f){if(!this.onScroll)this.onScroll=e;if(!this.onLoad)this.onLoad=f;a=this._leftTextView.getModel().getLineStart(a)+c.startIndex;this._leftEditor.moveSelection(a,a)};d.prototype.copyToLeft=function(){this._curveRuler.copyToLeft()};d.prototype.createEditorContainer=function(d,e,f,h,l,m,r,v,p){var q=
a.byId(l),s=c.byId(l),t=this,x=new n.TextModel(d,e),u="",d=r?new k.UndoFactory:new g.UndoCommandFactory(t._registry,t._commandService,"pageActions"),e=new k.AnnotationFactory,y=new j.Editor({textViewFactory:function(){var b=new o.TextView({parent:q,model:x,readonly:r,tabSize:4});t._viewLoadedCounter++;t._viewLoadedCounter===2&&t._diffNavigator.matchPositionFromOverview(-1);if(t.onLoad)t.onLoad();a.connect(s,"resize",a.hitch(this,function(){b.resize()}));return b},undoStackFactory:d,annotationFactory:e,
keyBindingFactory:function(a,b,c,d){if(r)t._commandService.addCommandGroup("pageActions","orion.editorActions.unlabeled",200);else{var e=new w.TextSearcher(a,t._commandService,c);(new g.EditorCommandFactory(t._registry,t._commandService,t._fileClient,t._inputManager,"pageActions",r,"pageNavigationActions",e)).generateEditorCommands(a);e=new k.TextActions(a,c);b.push(e);a=new k.SourceCodeActions(a,c,d);b.push(a)}},statusReporter:function(c,d){if(m)u=d?b["ERROR: "]+c:c,a.byId(m).textContent=""+u},domNode:q});
y.installTextView();y.setOverviewRulerVisible(!1);if(!r){var E=this._inputManager;y.addEventListener("DirtyChanged",function(){E.setDirty(y.isDirty())})}var H=y.getTextView();v&&p&&typeof p.Name==="string"&&typeof p.Type==="string"&&(y.setInput(p.Name),this._highlighter[h].highlight(p.Name,p.Type,y));H.addEventListener("Selection",function(a){!(a.newValue&&a.newValue.start!==a.newValue.end)&&!t._diffNavigator.autoSelecting&&t._diffNavigator.editorWrapper[0].diffFeeder&&(a=H.getCaretOffset(),t._diffNavigator.gotoDiff(a,
H))});h===0?(H.getModel().addEventListener("Changed",function(a){t._curveRuler.onChanged(a)}),H.addEventListener("Scroll",function(){t._curveRuler&&(t._curveRuler.matchPositionFrom(!0),t._curveRuler.render());if(t.onScroll)t.onScroll()})):H.addEventListener("Scroll",function(){t._curveRuler&&t._curveRuler.render()});return y};d.prototype.destroy=function(){this._leftTextView&&(this._diffNavigator.destroy(),this._leftTextView.destroy(),this._rightTextView.destroy(),this._uiFactory.destroy())};d.prototype.addRulers=
function(){if(this._rightTextView&&this._leftTextView&&!this._hasRuler)this._leftTextViewRuler=new e.LineNumberCompareRuler(this._diffNavigator,0,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"}),this._rightTextViewRuler=new e.LineNumberCompareRuler(this._diffNavigator,0,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"}),this._leftTextView.addRuler(this._leftTextViewRuler),this._rightTextView.addRuler(this._rightTextViewRuler),
this._rightTextView.addRuler(this._overviewRuler),this._hasRuler=!0};d.prototype.setEditor=function(a){var b=this.options.baseFile.Content,c=this.options.newFile.Content,d=this.options.diffContent;c?d=this.parseMapper(b,c,d,this.options.hasConflicts,!0):(d=this.parseMapper(b,c,d,this.options.hasConflicts,a),c=d.output);this._highlighterLoaded=0;if(this._leftEditor)if(a)this._diffNavigator.initMapper(d.mapper),this._curveRuler.init(d.mapper,this._leftEditor,this._rightEditor,this._diffNavigator),this.renderCommands(),
this._leftTextView.redrawRange(),this._rightTextView.redrawRange();else{var a=new v.TwoWayDiffBlockFeeder(this._rightTextView.getModel(),d.mapper,1),e=new v.TwoWayDiffBlockFeeder(this._leftTextView.getModel(),d.mapper,0);this._diffNavigator.initAll(this.options.charDiff?"char":"word",this._rightEditor,this._leftEditor,a,e,this._overviewRuler,this._curveRuler);this._curveRuler.init(d.mapper,this._leftEditor,this._rightEditor,this._diffNavigator);this._inputManager.filePath=this.options.newFile.URL;
this._rightEditor.setInput(this.options.baseFile.Name,null,b);this._leftEditor.setInput(this.options.newFile.Name,null,c);this._highlighter[0].highlight(this.options.newFile.Name,this.options.newFile.Type,this._leftEditor,this,2);this._highlighter[1].highlight(this.options.baseFile.Name,this.options.baseFile.Type,this._rightEditor,this,2);this.renderCommands();this.addRulers();this.options.readonly||this._inputManager.setInput(this.options.newFile.URL,this._leftEditor)}else this.initEditorContainers(d.delim,
c,b,d.mapper,!0);this._viewLoadedCounter>1&&this._diffNavigator.gotoBlock(this.options.blockNumber-1,this.options.changeNumber-1);b=this._leftTextView.getModel().getLineCount()*this._leftTextView.getLineHeight()+5;c=this._rightTextView.getModel().getLineCount()*this._rightTextView.getLineHeight()+5;return b>c?b:c};return d}();u.InlineCompareContainer=function(){function b(d,e,f){this._diffNavigator=new v.DiffTreeNavigator("word");this._registry=d;this._commandService=this._registry.getService("orion.page.command");
this._fileClient=new t.FileClient(d);this._statusService=this._registry.getService("orion.page.message");this.setOptions(f,!0);this.setOptions({readonly:!0});var g=this;if(!this.options.callback)this.options.callback=function(){a.place(document.createTextNode(g._diffTitle),"fileNameInViewer","only");a.style("fileNameInViewer","color","#6d6d6d");g._statusService.setProgressMessage("")};if(!this._errorCallback)this._errorCallback=function(a,b){var c=[];c.Severity="Error";c.HTML=!1;try{var d=JSON.parse(a.responseText);
c.Message=d.DetailedMessage?d.DetailedMessage:d.Message}catch(e){c.Message=typeof a.message==="string"?a.message:b.xhr.statusText}this._statusService.setProgressResult(c)};this.initCommands();this._highlighter=[];this._highlighter.push(new u.CompareStyler(this._registry));this._editorDivId=e;c.byId(this._editorDivId)||(p.destroyDijit(this._editorDivId+"_dijit_inline_compare"),d=p.getDijitSizeStyle(this._editorDivId),d=new c.layout.BorderContainer({id:this._editorDivId+"_dijit_inline_compare",style:d,
region:"center",gutters:!1,design:"headline",liveSplitters:!1,persist:!1,splitter:!1}),d.placeAt(this._editorDivId),d.layout(),this._editorDivId+="_dijit_inline_compare");this.initEditorContainers("","\n",[],[]);this.hasContent=!1}b.prototype=new u.CompareContainer;b.prototype.addRulers=function(){if(this._textView&&!this._hasRuler)this._textView.addRuler(this._rulerOrigin),this._textView.addRuler(this._rulerNew),this._textView.addRuler(this._overviewRuler),this._hasRuler=!0};b.prototype.removeRulers=
function(){if(this._textView&&this._hasRuler)this._textView.removeRuler(this._rulerOrigin),this._textView.removeRuler(this._rulerNew),this._textView.removeRuler(this._overviewRuler),this._hasRuler=!1};b.prototype.destroyEditor=function(){this._textView&&(this._diffNavigator.destroy(),this._textView.setText(""),this.removeRulers());this.hasContent=!1};b.prototype.destroy=function(){this._textView&&(this._diffNavigator.destroy(),this._textView.destroy())};b.prototype.createEditorContainer=function(b,
d,f,g,h,l){var m=a.byId(this._editorDivId),r=c.byId(this._editorDivId),v=this,p=new n.TextModel(b,d),b=new k.UndoFactory,d=new k.AnnotationFactory,b=new j.Editor({textViewFactory:function(){var b=new o.TextView({parent:m,model:p,readonly:!0,tabSize:4});a.connect(r,"resize",a.hitch(this,function(){b.resize()}));return b},undoStackFactory:b,annotationFactory:d,keyBindingFactory:function(){},statusReporter:function(){},domNode:m});b.installTextView();b.setOverviewRulerVisible(!1);b.setAnnotationRulerVisible(!1);
h&&l&&b.setInput(l.Name);var q=b.getTextView();this._rulerOrigin=new e.LineNumberCompareRuler(this._diffNavigator,1,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"});this._rulerNew=new e.LineNumberCompareRuler(this._diffNavigator,0,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"});v=this;this._overviewRuler=new e.CompareOverviewRuler("right",{styleClass:"ruler overview"},null,function(a){v._diffNavigator.matchPositionFromOverview(a)});
q.addEventListener("Selection",function(a){!(a.newValue&&a.newValue.start!==a.newValue.end)&&!v._diffNavigator.autoSelecting&&v._diffNavigator.editorWrapper[0].diffFeeder&&(a=q.getCaretOffset(),v._diffNavigator.gotoDiff(a,q))});return b};b.prototype.initEditorContainers=function(a,b,c,d){this._editor=this.createEditorContainer(b,a,c,d,this.options.newFile);this._textView=this._editor.getTextView()};b.prototype._initDiffPosition=function(a){var b=a.getModel();if(b&&b.getAnnotations&&(b=b.getAnnotations(),
b.length>0)){var b=b[0][0],c=a.getLineHeight(),d=a.getClientArea(),c=Math.floor(d.height/c/3);a.setTopIndex(b-c>0?b-c:0)}};b.prototype.setDiffTitle=function(a){this._diffTitle=a};b.prototype.setEditor=function(){var a=this.options.baseFile.Content,b=this.options.newFile.Content,c=this.options.diffContent;this.hasContent=!0;b=this.parseMapper(a,b,c,this.options.hasConflicts,!this.options.toggler);this._highlighterLoaded=0;this._textView?(this._textView.getModel().setText(a),a=new v.inlineDiffBlockFeeder(b.mapper,
1),c=new v.inlineDiffBlockFeeder(b.mapper,0),p.mergeDiffBlocks(this._textView.getModel(),c.getDiffBlocks(),b.mapper,b.diffArray.array,b.diffArray.index,this._diffParser._lineDelimiter),a.setModel(this._textView.getModel()),c.setModel(this._textView.getModel()),this._diffNavigator.initAll(this.options.charDiff?"char":"word",this._editor,this._editor,a,c,this._overviewRuler),this._highlighter[0].highlight(this.options.baseFile.Name,this.options.baseFile.Type,this._editor,this,1),this.renderCommands(),
this.addRulers(),a=this._textView.getTopIndex(),this._textView.redrawLines(a,a+1,this._overviewRuler),this._textView.redrawLines(a,a+1,this._rulerOrigin),this._textView.redrawLines(a,a+1,this._rulerNew),this._diffNavigator.gotoBlock(this.options.blockNumber-1,this.options.changeNumber-1)):this.initEditorContainers(b.delim,a,b.mapper,b.diffArray,!0);return this._textView.getLineHeight()*this._textView.getModel().getLineCount()+5};b.prototype.setConflicting=function(a){this._conflcit=a};return b}();
u.toggleableCompareContainer=function(){function b(a,c,d,e){if(e)e.toggler=this;d==="inline"?(this.widgetType="inline",this._widget=new u.InlineCompareContainer(a,c,e)):(this.widgetType="twoWay",this._widget=new u.TwoWayCompareContainer(a,c,null,e));this._parentDivId=c;this._serviceRegistry=a}b.prototype={startup:function(a){this._widget.startup(!1,a)},toggle:function(){var b=this._widget.options,c=this._widget.getCurrentDiffPos();b.blockNumber=c.block;b.changeNumber=c.change;this._widget.destroy();
a.empty(this._parentDivId);this.widgetType==="inline"?(this.widgetType="twoWay",this._widget=new u.TwoWayCompareContainer(this._serviceRegistry,this._parentDivId,null,b)):(this.widgetType="inline",this._widget=new u.InlineCompareContainer(this._serviceRegistry,this._parentDivId,b));this._widget.setEditor()}};return b}();return u});
define("orion/explorers/explorer-table",["i18n!orion/navigate/nls/messages","require","dojo","orion/fileUtils","orion/explorers/explorer"],function(b,d,a,c,f){function e(a,b,c,d,e,f){this.registry=a;this.root=b;this.fileClient=c;this.idPrefix=d||"";this.excludeFiles=!!e;this.excludeFolders=!!f}function h(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.myTree=this.model=null;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"})}e.prototype=new f.ExplorerModel;e.prototype.getRoot=function(a){a(this.root)};e.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};e.prototype.getChildren=function(b,c){b.children?c(b.children):b.Directory!==void 0&&b.Directory===!1?c([]):b.Location?this.fileClient.fetchChildren(b.ChildrenLocation).then(a.hitch(this,function(a){c(this.processParent(b,
a))})):c([])};e.prototype.constructor=e;h.prototype=new f.Explorer;h.prototype.changedItem=function(b,c){var d=this;this.fileClient.fetchChildren(b.ChildrenLocation).then(function(e){e=d.model.processParent(b,e);d.getNavHandler();a.hitch(d.myTree,d.myTree.refresh)(b,e,c)})};h.prototype.isExpanded=function(a){return this.renderer.tableTree.isExpanded(this.model.getId(a))};h.prototype.getNameNode=function(b){if(b=this.model.getId(b))return a.byId(b+"NameLink")};h.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};h.prototype.loadResourceList=function(d,f,h){d=c.makeRelative(d);if(f||d!==this._lastPath){this._lastPath=d;var l=a.byId(this.parentId);this.treeRoot={};if(f||d!==this.treeRoot.Path){var m=a.byId("progress");m||(m=a.create("div",{id:"progress"},l,"only"));a.empty(m);var n=setTimeout(function(){a.empty(m);
var c=a.create("b");a.place(document.createTextNode(b["Loading "]),m,"last");a.place(document.createTextNode(d),c,"last");a.place(c,m,"last");a.place(document.createTextNode("..."),m,"last")},500);this.treeRoot.Path=d;var o=this;this.fileClient.loadWorkspace(d).then(a.hitch(o,function(a){clearTimeout(n);for(var b in a)this.treeRoot[b]=a[b];this.model=new e(this.registry,this.treeRoot,this.fileClient,this.parentId,this.excludeFiles,this.excludeFolders);this.model.processParent(this.treeRoot,a.Children);
if(typeof h==="function")try{h()}catch(c){this.registry&&this.registry.getService("orion.page.message").setErrorMessage(c)}this.createTree(this.parentId,this.model,{setFocus:!0,selectionPolicy:this.renderer.selectionPolicy,onCollapse:function(a){if(o.getNavHandler())o.getNavHandler().onCollapse(a)}});if(typeof this.onchange==="function")this.onchange(this.treeRoot)}),a.hitch(o,function(c){clearTimeout(n);if(c.status&&c.status!==401){try{c=JSON.parse(c.responseText)}catch(d){}a.place(document.createTextNode(b["Sorry, an error occurred: "]+
c.Message),m,"only")}else this.registry.getService("orion.page.message").setProgressResult(c)}))}}};h.prototype.onchange=function(){};h.prototype.constructor=h;return{FileExplorer:h}});
define("orion/widgets/DirectoryPrompterDialog","i18n!orion/widgets/nls/messages,dojo,dijit,orion/fileUtils,orion/selection,orion/explorers/navigationUtils,orion/explorers/explorer,orion/explorers/explorer-table,dijit/Dialog,dijit/form/Button,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/DirectoryPrompterDialog.html".split(","),function(b,d,a,c,f,e,h,g){function j(a,b){this.explorer=b;this._init(a)}j.prototype=new h.SelectionRenderer;j.prototype.constructor=j;j.prototype.getLabelColumnIndex=
function(){return 0};j.prototype.getCellElement=function(a,b,c){a=d.create("td",null,c,"last");a=d.create("span",{id:c.id+"navSpan"},a,"only");d.addClass(a,"mainNavColumn singleNavColumn");this.getExpandImage(c,a);d.place(window.document.createTextNode(b.Name),a,"last")};return d.declare("orion.widgets.DirectoryPrompterDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:d.cache("orion","widgets/templates/DirectoryPrompterDialog.html"),constructor:function(a){this.options=
a||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||b["Choose a Folder"];this.fileClient=this.options.fileClient;this.serviceRegistry=this.options.serviceRegistry;this.buttonOk=b.OK;this.message=this.options.message||""},postCreate:function(){this.inherited(arguments);this.loadFolderList("/");this.message||d.style(this.messageCell,{display:"none"});this.browseDirectoryExplorerTree.focus()},loadFolderList:function(a){a=c.makeRelative(a);this.selection=new f.Selection(this.serviceRegistry,
"orion.directoryPrompter.selection");this.explorer=new g.FileExplorer({treeRoot:{children:[]},selection:this.selection,serviceRegistry:this.serviceRegistry,fileClient:this.fileClient,parentId:this.id+"_browseDirectoryExplorerTree",excludeFiles:!0,rendererFactory:function(a){return new j({checkbox:!1,singleSelection:!0,decorateAlternatingLines:!1,treeTableClass:"directoryPrompter"},a)}});this.explorer.loadResourceList(a,!0,null)},execute:function(){this.selection.getSelection(function(a){this.onHide();
this.options.func(a)}.bind(this))}})});
define("orion/git/widgets/CloneGitRepositoryDialog","i18n!git/nls/gitmessages,require,dojo,dijit,dijit/Dialog,orion/widgets/_OrionDialogMixin,orion/widgets/DirectoryPrompterDialog,text!orion/git/widgets/templates/CloneGitRepositoryDialog.html".split(","),function(b,d,a,c){a.declare("orion.git.widgets.CloneGitRepositoryDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:a.cache("orion","git/widgets/templates/CloneGitRepositoryDialog.html"),constructor:function(){this.inherited(arguments);
this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title?this.options.title:b["Clone Git Repository"];this.gitUrlLabelText=b["Repository URL:"];this.gitPathLabelText=b["Existing directory:"];this.gitNameLabelText=b["New folder:"];this.advancedShown=!1;this.gitTargetLocationText=b["Choose target location"];this.gitDefaultTargetLocationText=b["Default target location"];this.gitChangeGitPathText=b["Change..."]},postCreate:function(){var b=
this;this.inherited(arguments);if(this.options.url)this.gitUrl.value=this.options.url;if(this.options.advancedOnly)this.Basic.style.display="none",this.Advanced.style.display="",setTimeout(function(){b.gitName.focus()},400);a.connect(this.changeGitPath,"onclick",null,a.hitch(this,this.openDirectoryPickerDialog));a.connect(this.isExistingProject,"onchange",null,a.hitch(this,this.showExistingFolder));a.connect(this.gitName,"onfocus",null,a.hitch(this,this.showNewProject));a.connect(this.advancedLink,
"onclick",null,a.hitch(this,this.showAdvanced));a.connect(this.advancedLinkHide,"onclick",null,a.hitch(this,this.hideAdvanced));this.options.alwaysShowAdvanced&&this.showAdvanced()},execute:function(){this.options.func&&this.options.func(this.options.advancedOnly?void 0:this.gitUrl.value,this.advancedShown&&this.isNewProject.checked?void 0:this.gitPath.value,this.advancedShown&&!this.isNewProject.checked?void 0:this.gitName.value);delete this.options.func},showAdvanced:function(){this.advancedShown=
!0;this.Advanced.style.display="";this.advancedLink.style.display="none";this.advancedLinkHide.style.display=""},hideAdvanced:function(){this.advancedShown=!1;this.Advanced.style.display="none";this.advancedLink.style.display="";this.advancedLinkHide.style.display="none"},showExistingFolder:function(){this.isExistingProject.checked?this.openDirectoryPickerDialog():this.gitName.focus()},showNewProject:function(){this.isNewProject.checked=!0},openDirectoryPickerDialog:function(){function c(a){var b=
document.createElement("a");b.href=d.toUrl("navigate/table.html")+"#"+a.ChildrenLocation;b.textContent=a.Name;return b}this.isExistingProject.checked=!0;var e=new orion.widgets.DirectoryPrompterDialog({title:b["Choose a Folder"],serviceRegistry:this.options.serviceRegistry,fileClient:this.options.fileClient,func:a.hitch(this,function(b){if(b&&b.Location){this.gitPath.value=b.Location;for(a.place(c(b),this.shownGitPath,"only");b.parent&&!b.parent.Projects;)this.shownGitPath.insertBefore(document.createTextNode("/"),
this.shownGitPath.firstChild),this.shownGitPath.insertBefore(c(b.parent),this.shownGitPath.firstChild),b=b.parent}})});e.startup();e.show()}})});
define("orion/git/util",["i18n!git/nls/gitmessages","dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(){function b(a){for(var b=0;b<c.length;b++)if(a.type===c[b])return!0;return!1}function d(b){for(var c=0;c<a.length;c++)if(b.type===a[c])return!0;return!1}var a=["Missing","Modified","Untracked","Conflicting"],c=["Added","Changed","Removed"];return{statusUILocation:"git/git-status2.html",isStaged:b,isUnstaged:d,isChange:function(a){return b(a)||d(a)},hasStagedChanges:function(a){for(var b=
0;b<c.length;b++)if(a[c[b]].length>0)return!0;return!1},hasUnstagedChanges:function(b){for(var c=0;c<a.length;c++)if(b[a[c]].length>0)return!0;return!1}}});
define("dojox/form/uploader/Base","dojo,dijit,dojox,dojox/form/uploader/Base,dijit/_Widget,dijit/_Templated".split(","),function(b,d){b.declare("dojox.form.uploader.Base",[d._Widget,d._Templated],{getForm:function(){if(!this.form)for(var a=this.domNode;a&&a.tagName&&a!==document.body;){if(a.tagName.toLowerCase()=="form"){this.form=a;break}a=a.parentNode}return this.form},getUrl:function(){if(this.uploadUrl)this.url=this.uploadUrl;if(this.url)return this.url;if(this.getForm())this.url=this.form.action;
return this.url},connectForm:function(){this.url=this.getUrl();if(!this._fcon&&this.getForm())this._fcon=!0,this.connect(this.form,"onsubmit",function(a){b.stopEvent(a);this.submit(b.formToObject(this.form))})},supports:function(a){if(!this._hascache)this._hascache={testDiv:b.create("div"),testInput:b.create("input",{type:"file"}),xhr:window.XMLHttpRequest?new XMLHttpRequest:{}},b.style(this._hascache.testDiv,"opacity",0.7);switch(a){case "FormData":return!!window.FormData;case "sendAsBinary":return!!this._hascache.xhr.sendAsBinary;
case "opacity":return b.style(this._hascache.testDiv,"opacity")==0.7;case "multiple":if(this.force=="flash"||this.force=="iframe")break;a=b.attr(this._hascache.testInput,"multiple");return a===!0||a===!1}return!1},getMimeType:function(){return"application/octet-stream"},getFileType:function(a){return a.substring(a.lastIndexOf(".")+1).toUpperCase()},convertBytes:function(a){var b=Math.round(a/1024*1E5)/1E5,d=Math.round(a/1048576*1E5)/1E5,e=Math.round(a/1073741824*1E5)/1E5,h=a;b>1&&(h=b.toFixed(1)+
" kb");d>1&&(h=d.toFixed(1)+" mb");e>1&&(h=e.toFixed(1)+" gb");return{kb:b,mb:d,gb:e,bytes:a,value:h}}})});
define("dojox/form/Uploader",["i18n!orion/widgets/nls/messages","dojo","dijit","dojox","dojox/form/uploader/Base"],function(b,d,a,c){d.declare("dojox.form.Uploader",[c.form.uploader.Base],{uploadOnSelect:!1,tabIndex:0,multiple:!1,label:b["Upload..."],url:"",name:"uploadedfile",flashFieldName:"",uploadType:"form",_nameIndex:0,widgetsInTemplate:!0,templateString:'<div class="dojoxFileInput"><div dojoType="dijit.form.Button" dojoAttachPoint="button">${label}</div></div>',postMixInProperties:function(){this._inputs=
[];this._getButtonStyle(this.srcNodeRef);this.inherited(arguments)},postCreate:function(){var a=!1,b=this._getNodePosition(this.domNode);if(!this.btnSize.w||!this.btnSize.h)d.body().appendChild(this.domNode),this._getButtonStyle(this.domNode),a=!0;this._setButtonStyle();a&&d.place(this.domNode,b.node,b.pos);this.inherited(arguments)},onChange:function(){},onBegin:function(){},onProgress:function(){},onComplete:function(){this.reset()},onCancel:function(){},onAbort:function(){},onError:function(){},
upload:function(){},submit:function(){},reset:function(){this._disconnectButton();d.forEach(this._inputs,d.destroy,d);this._inputs=[];this._nameIndex=0;this._createInput()},getFileList:function(){var a=[];this.supports("multiple")?d.forEach(this.inputNode.files,function(b,c){a.push({index:c,name:b.name,size:b.size,type:b.type})},this):d.forEach(this._inputs,function(b,c){a.push({index:c,name:b.value.substring(b.value.lastIndexOf("\\")+1),size:0,type:b.value.substring(b.value.lastIndexOf(".")+1)})},
this);return a},_getValueAttr:function(){return this.getFileList()},_setValueAttr:function(){console.error("Uploader value is read only")},_getDisabledAttr:function(){return this._disabled},_setDisabledAttr:function(a){this._disabled!=a&&(this.button.set("disabled",a),d.style(this.inputNode,"display",a?"none":"block"))},_getNodePosition:function(a){return a.previousSibling?{node:a.previousSibling,pos:"after"}:{node:a.nextSibling,pos:"before"}},_getButtonStyle:function(a){this.btnSize=a?d.marginBox(a):
{w:80,h:25}},_setButtonStyle:function(){var a=!0;if(!this.domNode.parentNode||!this.domNode.parentNode.tagName)document.body.appendChild(this.domNode),a=!1;d.style(this.domNode,{width:this.btnSize.w+"px",height:this.btnSize.h+4+"px",overflow:"hidden",position:"relative"});this.inputNodeFontSize=Math.max(2,Math.max(Math.ceil(this.btnSize.w/60),Math.ceil(this.btnSize.h/15)));this._createInput();d.style(this.button.domNode,{margin:"0px",display:"block",verticalAlign:"top"});d.style(this.button.domNode.firstChild,
{margin:"0px",display:"block"});a||document.body.removeChild(this.domNode)},_createInput:function(){this._inputs.length&&(d.style(this.inputNode,{top:"500px"}),this._disconnectButton(),this._nameIndex++);var a;a=this.supports("multiple")?this.name+"s[]":this.name+(this.multiple?this._nameIndex:"");this.inputNode=d.create("input",{type:"file",name:a,className:"dojoxInputNode"},this.domNode,"first");this.supports("multiple")&&this.multiple&&d.attr(this.inputNode,"multiple",!0);this._inputs.push(this.inputNode);
d.style(this.inputNode,{fontSize:this.inputNodeFontSize+"em"});a=d.marginBox(this.inputNode);d.style(this.inputNode,{position:"absolute",top:"-2px",left:"-"+(a.w-this.btnSize.w-2)+"px",opacity:0});this._connectButton()},_connectButton:function(){this._cons=[];var a=d.hitch(this,function(a){this._cons.push(d.connect(this.inputNode,a,this,function(){this.button._cssMouseEvent({type:a})}))});a("mouseover");a("mouseout");a("mousedown");this._cons.push(d.connect(this.inputNode,"change",this,function(a){this.onChange(this.getFileList(a));
!this.supports("multiple")&&this.multiple&&this._createInput()}));this.button.set("tabIndex",-1);if(this.tabIndex>-1){this.inputNode.tabIndex=this.tabIndex;var b=d.style(this.button.domNode.firstChild,"border");this._cons.push(d.connect(this.inputNode,"focus",this,function(){d.style(this.button.domNode.firstChild,"border","1px dashed #ccc")}));this._cons.push(d.connect(this.inputNode,"blur",this,function(){d.style(this.button.domNode.firstChild,"border",b)}))}},_disconnectButton:function(){d.forEach(this._cons,
d.disconnect,d)}});(function(){c.form.UploaderOrg=c.form.Uploader;var a=[c.form.UploaderOrg];c.form.addUploaderPlugin=function(b){a.push(b);d.declare("dojox.form.Uploader",a,{})}})()});
define("dojox/form/uploader/plugins/HTML5",["dojo","dijit","dojox","dojox/form/Uploader"],function(b,d,a){b.declare("dojox.form.uploader.plugins.HTML5",[],{errMsg:"Error uploading files. Try checking permissions",uploadType:"html5",postCreate:function(){this.connectForm();this.inherited(arguments);this.uploadOnSelect&&this.connect(this,"onChange","upload")},upload:function(a){this.onBegin(this.getFileList());this.supports("FormData")?this.uploadWithFormData(a):this.supports("sendAsBinary")&&this.sendAsBinary(a)},
submit:function(a){a=a?a.tagName?a:this.getForm():this.getForm();a=b.formToObject(a);console.log("form data:",a);this.upload(a)},sendAsBinary:function(a){if(this.getUrl()){var b="---------------------------"+(new Date).getTime(),d=this.createXhr();d.setRequestHeader("Content-Type","multipart/form-data; boundary="+b);if(a=this._buildRequestBody(a,b))d.sendAsBinary(a);else this.onError(this.errMsg)}else console.error("No upload url found.",this)},uploadWithFormData:function(a){if(this.getUrl()){var d=
new FormData;b.forEach(this.inputNode.files,function(a){d.append(this.name+"s[]",a)},this);if(a)for(var e in a)d.append(e,a[e]);this.createXhr().send(d)}else console.error("No upload url found.",this)},_xhrProgress:function(a){if(a.lengthComputable){var b={bytesLoaded:a.loaded,bytesTotal:a.total,type:a.type,timeStamp:a.timeStamp};a.type=="load"?(b.percent="100%",b.decimal=1):(b.decimal=a.loaded/a.total,b.percent=Math.ceil(a.loaded/a.total*100)+"%");this.onProgress(b)}},createXhr:function(){var a=
new XMLHttpRequest,d;a.upload.addEventListener("progress",b.hitch(this,"_xhrProgress"),!1);a.addEventListener("load",b.hitch(this,"_xhrProgress"),!1);a.addEventListener("error",b.hitch(this,function(a){this.onError(a);clearInterval(d)}),!1);a.addEventListener("abort",b.hitch(this,function(a){this.onAbort(a);clearInterval(d)}),!1);a.onreadystatechange=b.hitch(this,function(){a.readyState===4&&(console.info("COMPLETE"),clearInterval(d),this.onComplete(b.eval(a.responseText)))});a.open("POST",this.getUrl());
d=setInterval(b.hitch(this,function(){}),250);return a},_buildRequestBody:function(a,d){var e="",d="--"+d,h=[];b.forEach(this.inputNode.files,function(a,b){var c=this.name+"s[]",g=this.inputNode.files[b].fileName,n;try{n=this.inputNode.files[b].getAsBinary()+"\r\n",e+=d+"\r\n",e+="Content-Disposition: form-data; ",e+='name="'+c+'"; ',e+='filename="'+g+'"\r\n',e+="Content-Type: "+this.getMimeType()+"\r\n\r\n",e+=n}catch(o){h.push({index:b,name:g})}},this);h.length&&h.length>=this.inputNode.files.length&&
(this.onError({message:this.errMsg,filesInError:h}),e=!1);if(!e)return!1;if(a)for(var g in a)e+=d+"\r\n",e+="Content-Disposition: form-data; ",e+='name="'+g+'"\r\n\r\n',e+=a[g]+"\r\n";e+=d+"--\r\n";return e}});a.form.addUploaderPlugin(a.form.uploader.plugins.HTML5)});
define("dojox/form/uploader/plugins/IFrame","dojo,dijit,dojox,dojo/io/iframe,dojox/form/uploader/plugins/HTML5,dojox/form/Uploader".split(","),function(b,d,a){b.declare("dojox.form.uploader.plugins.IFrame",[],{force:"",postMixInProperties:function(){this.inherited(arguments);if(!this.supports("multiple"))this.uploadType="iframe"},upload:function(a){if(!this.supports("multiple")||this.force=="iframe")this.uploadIFrame(a),b.stopEvent(a)},uploadIFrame:function(){this.getUrl();b.io.iframe.send({url:this.getUrl(),
form:this.form,handleAs:"json",error:b.hitch(this,function(a){console.error("HTML Upload Error:"+a.message)}),load:b.hitch(this,function(a){this.onComplete(a)})})}});a.form.addUploaderPlugin(a.form.uploader.plugins.IFrame)});
define("dojox/form/uploader/FileList","dojo,dijit,dojox,dojox/form/uploader/Base,dijit/_Widget,dijit/_Templated".split(","),function(b,d,a){b.declare("dojox.form.uploader.FileList",[a.form.uploader.Base],{uploaderId:"",uploader:null,headerIndex:"#",headerType:"Type",headerFilename:"File Name",headerFilesize:"Size",_upCheckCnt:0,rowAmt:0,templateString:'<div class="dojoxUploaderFileList"><div dojoAttachPoint="progressNode" class="dojoxUploaderFileListProgress"><div dojoAttachPoint="percentBarNode" class="dojoxUploaderFileListProgressBar"></div><div dojoAttachPoint="percentTextNode" class="dojoxUploaderFileListPercentText">0%</div></div><table class="dojoxUploaderFileListTable"><tr class="dojoxUploaderFileListHeader"><th class="dojoxUploaderIndex">${headerIndex}</th><th class="dojoxUploaderIcon">${headerType}</th><th class="dojoxUploaderFileName">${headerFilename}</th><th class="dojoxUploaderFileSize">${headerFilesize}</th></tr><tr ><td colSpan="4" class="dojoxUploaderFileListContainer" dojoAttachPoint="containerNode"><table class="dojoxUploaderFileListContent" dojoAttachPoint="listNode"></table></td><tr></table><div>',
postCreate:function(){this.setUploader();this.hideProgress()},reset:function(){for(var a=0;a<this.rowAmt;a++)this.listNode.deleteRow(0);this.rowAmt=0},setUploader:function(){if(!this.uploaderId&&!this.uploader)console.warn("uploaderId not passed to UploaderFileList");else if(this.uploaderId&&!this.uploader)this.uploader=d.byId(this.uploaderId);else if(this._upCheckCnt>4){console.warn("uploader not found for ID ",this.uploaderId);return}this.uploader?(this.connect(this.uploader,"onChange","_onUploaderChange"),
this.connect(this.uploader,"reset","reset"),this.connect(this.uploader,"onBegin",function(){this.showProgress(!0)}),this.connect(this.uploader,"onProgress","_progress"),this.connect(this.uploader,"onComplete",function(){setTimeout(b.hitch(this,function(){this.hideProgress(!0)}),1250)})):(this._upCheckCnt++,setTimeout(b.hitch(this,"setUploader"),250))},hideProgress:function(a){this._hideShowProgress(a?{ani:!0,endDisp:"none",beg:15,end:0}:{endDisp:"none",ani:!1})},showProgress:function(a){this._hideShowProgress(a?
{ani:!0,endDisp:"block",beg:0,end:15}:{endDisp:"block",ani:!1})},_progress:function(a){this.percentTextNode.innerHTML=a.percent;b.style(this.percentBarNode,"width",a.percent)},_hideShowProgress:function(a){var d=this.progressNode,e=function(){b.style(d,"display",a.endDisp)};a.ani?(b.style(d,"display","block"),b.animateProperty({node:d,properties:{height:{start:a.beg,end:a.end,units:"px"}},onEnd:e}).play()):e()},_onUploaderChange:function(a){this.reset();b.forEach(a,function(a,b){this._addRow(b+1,
this.getFileType(a.name),a.name,a.size)},this)},_addRow:function(a,d,e,h){var g,j=this.listNode.insertRow(-1);g=j.insertCell(-1);b.addClass(g,"dojoxUploaderIndex");g.innerHTML=a;g=j.insertCell(-1);b.addClass(g,"dojoxUploaderIcon");g.innerHTML=d;g=j.insertCell(-1);b.addClass(g,"dojoxUploaderFileName");g.innerHTML=e;g=j.insertCell(-1);b.addClass(g,"dojoxUploaderSize");g.innerHTML=this.convertBytes(h).value;this.rowAmt++}})});
define("orion/git/widgets/ApplyPatchDialog","i18n!git/nls/gitmessages,dojo,dijit,dojox,dijit/Dialog,dojo/data/ItemFileReadStore,dojox/form/Uploader,dojox/form/uploader/FileList,dojox/form/uploader/plugins/IFrame,dijit/form/Button,dijit/ProgressBar,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/ApplyPatchDialog.html".split(","),function(b,d,a){d.declare("orion.git.widgets.ApplyPatchDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:d.cache("orion",
"git/widgets/templates/ApplyPatchDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=b["Apply Patch"]},postCreate:function(){function b(c){a.byId("files").set("disabled",c);a.byId("applyPatchDialog.uploader").set("disabled",c);a.byId("applyPatchDialog.url").set("disabled",!c)}this.inherited(arguments);d.byId("applyPatchDialog.myForm").action=this.options.diffLocation;d.byId("applyPatchDialog.uploader").url=
this.options.diffLocation;b(!0);d.connect(a.byId("applyPatchDialog.urlRadio"),"onclick",d.hitch(this,function(a){a.target.id==="applyPatchDialog.urlRadio"&&b(!0)}));d.connect(a.byId("applyPatchDialog.fileRadio"),"onclick",d.hitch(this,function(a){a.target.id==="applyPatchDialog.fileRadio"&&b(!1)}));d.connect(a.byId("applyPatchDialog.uploader"),"onError",d.hitch(this,function(){setTimeout(d.hitch(this,function(){this.hide()}),2E3)}));d.connect(a.byId("applyPatchDialog.uploader"),"onComplete",d.hitch(this,
function(){setTimeout(d.hitch(this,function(){this.hide()}),2E3)}));d.connect(a.byId("applyPatchDialog.uploader"),"onKeyPress",function(a){a.keyCode===d.keys.ENTER&&a.stopPropagation()})}})});
define("orion/git/widgets/ConfirmPushDialog","i18n!git/nls/gitmessages,dojo,dijit,dojox,dijit/Dialog,dojo/data/ItemFileReadStore,dojox/form/Uploader,dojox/form/uploader/FileList,dojox/form/uploader/plugins/IFrame,dijit/form/Button,dijit/ProgressBar,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/ConfirmPushDialog.html".split(","),function(b,d,a){d.declare("orion.git.widgets.ConfirmPushDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:d.cache("orion",
"git/widgets/templates/ConfirmPushDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title="Git Push"},postCreate:function(){var a=this;this.inherited(arguments);this.dialog=this.options.dialog;var b=d.byId("div1"),e=d.byId("moreButton"),h=this.options.dialog;b.appendChild(document.createTextNode("You are going to push to the following remote: "+this.options.location));b.appendChild(document.createElement("br"));
b.appendChild(document.createElement("br"));b.appendChild(document.createTextNode(" Click More to push to another remote or OK to push to default"));d.connect(e,"onclick",function(){h.startup();h.show();a.destroy()})},execute:function(){this.options.func()}})});
define("orion/git/widgets/ContentDialog","i18n!git/nls/gitmessages,dojo,dijit,dojox,dijit/Dialog,dojo/data/ItemFileReadStore,dojox/form/Uploader,dojox/form/uploader/FileList,dojox/form/uploader/plugins/IFrame,dijit/form/Button,dijit/ProgressBar,orion/widgets/_OrionDialogMixin,text!orion/git/widgets/templates/ContentDialog.html".split(","),function(b,d,a){d.declare("orion.git.widgets.ContentDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:d.cache("orion","git/widgets/templates/ContentDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=b.Content},postCreate:function(){var a=this;this.inherited(arguments);for(var f=d.byId("div1"),e=d.query(".sectionAnchor"),h=0;h<e.length;h++){var g=e[h];d.create("li",{id:g.id+"Span"},f);var j=d.create("a",{href:window.location.href,title:d.string.substitute(b["Go to ${0} section"],[g.id])},g.id+"Span");j.textContent=g.id+"\n";d.connect(j,"onclick",d.hitch(g,
function(){this.scrollIntoView(!0);a.hide();return!1}))}}})});
define("orion/git/gitCommands","i18n!git/nls/gitmessages,require,dojo,orion/commands,orion/uiUtils,orion/git/util,orion/compare/compareUtils,orion/git/gitPreferenceStorage,orion/git/widgets/CloneGitRepositoryDialog,orion/git/widgets/AddRemoteDialog,orion/git/widgets/GitCredentialsDialog,orion/widgets/NewItemDialog,orion/git/widgets/RemotePrompterDialog,orion/git/widgets/ApplyPatchDialog,orion/git/widgets/OpenCommitDialog,orion/git/widgets/ConfirmPushDialog,orion/git/widgets/ReviewRequestDialog,orion/git/widgets/ContentDialog,orion/git/widgets/CommitDialog".split(","),function(b,
d,a,c,f,e,h,g){var j={};(function(){function k(a){var b;try{b=JSON.parse(a.responseText)}catch(c){b={Result:a.responseText}}b.HttpCode=a.status;return b}var l=!1;j.updateNavTools=function(b,c,d,e,f,g){var h=a.byId(d),j=b.getService("orion.page.command");if(h)j.destroy(h);else throw"could not find toolbar "+d;j.renderCommands(d,h,f,c,"button");if(g&&(d=a.byId(g)))j.destroy(d),j.renderCommands(g,d,f,c,"button");if(e&&(f=a.byId(e)))j.destroy(e),j.renderCommands(e,f,null,c,"button");l||(l=!0,b.getService("orion.page.selection").addEventListener("selectionChanged",
function(b){var d=a.byId(e);d&&(j.destroy(d),j.renderCommands(e,d,b.selections,c,"button"))}))};j.getNewItemName=function(b,c,d,e,g,h,j,k){var l,w;if(d)l=a.byId(e);else if(c.makeNewItemPlaceHolder!=null)(b=c.makeNewItemPlaceHolder(b,e,j))?(l=b.refNode,w=b.tempNode):l=a.byId(e);l?f.getUserText(e+"EditBox",l,!1,g,a.hitch(this,function(a){a&&(w&&w.parentNode.removeChild(w),h(a))}),void 0,void 0,void 0,k):(e=window.prompt(g))&&h(e)};j.handleKnownHostsError=function(c,d,e,f){if(confirm(a.string.substitute(b["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],
[d.KeyType,d.Host,d.HostFingerprint]))){var g=c.getService("orion.net.ssh");g.addKnownHosts(d.Host+" "+d.KeyType+" "+d.HostKey).then(function(){g.getKnownHosts().then(function(a){e.knownHosts=a;f(e)});if(e.failedOperation){var b=c.getService("orion.page.progress");a.hitch(b,b.removeOperation)(e.failedOperation.Location,e.failedOperation.Id)}})}};j.handleSshAuthenticationError=function(b,c,d,e,f){var c=c.Url,h=function(){var c=new orion.git.widgets.GitCredentialsDialog({title:f,serviceRegistry:b,func:e,
errordata:d.errordata,failedOperation:d.failedOperation});c.startup();c.show();d.failedOperation&&(c=b.getService("orion.page.progress"),a.hitch(c,c.removeOperation)(d.failedOperation.Location,d.failedOperation.Id))};d.gitSshUsername&&d.gitSshUsername!==""||d.gitSshPassword&&d.gitSshPassword!==""||d.gitPrivateKey&&d.gitPrivateKey!==""?h():(new g(b)).get(c).then(function(c){if(c.gitPrivateKey!==""||c.gitSshUsername!==""||c.gitSshPassword!==""){if(d.failedOperation){var f=b.getService("orion.page.progress");
a.hitch(f,f.removeOperation)(d.failedOperation.Location,d.failedOperation.Id)}e({knownHosts:d.knownHosts,gitSshUsername:c.gitSshUsername,gitSshPassword:c.gitSshPassword,gitPrivateKey:c.gitPrivateKey,gitPassphrase:c.gitPassphrase})}else h()},h)};j.getDefaultSshOptions=function(b,c){var d=new a.Deferred,e=b.getService("orion.net.ssh"),f=c&&!c.optionsRequested?c.valueFor("sshuser"):"",g=c&&!c.optionsRequested?c.valueFor("sshpassword"):"";e.getKnownHosts().then(function(a){d.callback({knownHosts:a,gitSshUsername:f,
gitSshPassword:g,gitPrivateKey:"",gitPassphrase:""})});return d};j.handleProgressServiceResponse=function(b,c,d,e,f,g){b&&b.status&&(b=k(b));if(!b||!b.HttpCode)e&&e(b);else switch(b.HttpCode){case 200:case 201:case 202:e&&e(b.Result);break;case 401:if(b.JsonData)c.errordata=b.JsonData;if(b.failedOperation)c.failedOperation=b.failedOperation;a.hitch(this,j.handleSshAuthenticationError)(d,b.JsonData,c,f,g);break;case 400:if(b.JsonData&&b.JsonData.HostKey){if(b.failedOperation)c.failedOperation=b.failedOperation;
a.hitch(this,j.handleKnownHostsError)(d,b.JsonData,c,f);break}default:c=[];c.Severity="Error";c.HTML=!1;try{c.Message=b.DetailedMessage?b.DetailedMessage:b.Message}catch(h){c.Message=h.message}d.getService("orion.page.message").setProgressResult(c)}};j.gatherSshCredentials=function(c,d,e){var f=new a.Deferred,h;if(d.items.RemoteLocation!==void 0)h=d.items.RemoteLocation[0].GitUrl;else if(d.items.GitUrl!==void 0)h=d.items.GitUrl;else if(d.items.errorData!==void 0)h=d.items.errorData.Url;else if(d.items.toRef!==
void 0)h=d.items.toRef.RemoteLocation[0].GitUrl;var j=function(a){c.getService("orion.net.ssh").getKnownHosts().then(function(b){d.sshObject=a;f.callback({knownHosts:b,gitSshUsername:a.gitSshUsername,gitSshPassword:a.gitSshPassword,gitPrivateKey:a.gitPrivateKey,gitPassphrase:a.gitPassphrase})})},k=d.errorData;if(k&&k.HostKey)return confirm(a.string.substitute(b["Would you like to add ${0} key for host ${1} to continue operation? Key fingerpt is ${2}."],[k.KeyType,k.Host,k.HostFingerprint]))&&c.getService("orion.net.ssh").addKnownHosts(k.Host+
" "+k.KeyType+" "+k.HostKey).then(function(){d.sshObject&&(d.sshObject.gitSshUsername!==""||d.sshObject.gitSshPassword!==""||d.sshObject.gitPrivateKey!=="")?j({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""}):(new g(c)).get(h).then(function(a){j(a)},function(){j({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""})})}),f;var l=function(){if(!d.parameters&&!d.optionsRequested)j({gitSshUsername:"",gitSshPassword:"",gitPrivateKey:"",gitPassphrase:""});else if(d.parameters&&
!d.optionsRequested){var a=d.parameters?d.parameters.valueFor("sshuser"):"",b=d.parameters?d.parameters.valueFor("sshpassword"):"",f=d.parameters&&d.parameters.valueFor("saveCredentials")?d.parameters.valueFor("saveCredentials"):!1,l=new g(c);f?l.put(h,{gitSshUsername:a,gitSshPassword:b}).then(function(){j({gitSshUsername:a,gitSshPassword:b,gitPrivateKey:"",gitPassphrase:""})}):j({gitSshUsername:a,gitSshPassword:b,gitPrivateKey:"",gitPassphrase:""})}else f=new orion.git.widgets.GitCredentialsDialog({title:e,
serviceRegistry:c,func:j,errordata:k}),f.startup(),f.show()};d.sshObject&&(d.sshObject.gitSshUsername!==""||d.sshObject.gitSshPassword!==""||d.sshObject.gitPrivateKey!=="")?l():(new g(c)).get(h).then(function(a){a.gitPrivateKey!==""||a.gitSshUsername!==""||a.gitSshPassword!==""?j(a):l()},l);return f};j.handleProgressServiceResponse2=function(b,c,d,e){b&&b.status&&(b=k(b));if(!b||!b.HttpCode)d&&d(b);else switch(b.HttpCode){case 200:case 201:case 202:d&&d(b.Result);break;case 401:b.failedOperation&&
(c=c.getService("orion.page.progress"),a.hitch(c,c.removeOperation)(b.failedOperation.Location,b.failedOperation.Id));e(b);break;case 400:if(b.JsonData&&b.JsonData.HostKey){b.failedOperation&&(c=c.getService("orion.page.progress"),a.hitch(c,c.removeOperation)(b.failedOperation.Location,b.failedOperation.Id));e(b);break}default:e=[];e.Severity="Error";e.HTML=!1;try{e.Message=b.DetailedMessage?b.DetailedMessage:b.Message}catch(f){e.Message=f.message}c.getService("orion.page.message").setProgressResult(e)}};
j.createFileCommands=function(f,k,l){function q(a){if(!(a.status===401||a.status===403)){var b=[];b.Severity="Error";b.HTML=!1;try{var c=JSON.parse(a.responseText);b.Message=c.DetailedMessage?c.DetailedMessage:c.Message}catch(d){b.Message=a.message}f.getService("orion.page.message").setProgressResult(b)}}var p=new c.Command({name:b["Link Repository"],imageClass:"core-sprite-link",id:"eclipse.linkRepository",callback:function(a){var c=new orion.widgets.NewItemDialog({title:b["Link Repository"],label:b["Folder name:"],
func:function(c){var e=f.getService("orion.core.file");e.loadWorkspace("").then(function(f){e.createProject(f.Location,c,a.items.ContentLocation,!1).then(function(a){alert(b["Repository was linked to "]+a.Name);e.read(a.ContentLocation,!0).then(function(a){window.location.replace(d.toUrl("navigate/table.html")+"#"+a.ChildrenLocation)})})})},advanced:!1});c.startup();c.show()},visibleWhen:function(a){return a.ContentLocation?!0:!1}});k.addCommand(p);p=new c.ParametersDescription([new c.CommandParameter("name",
"text",b["Local Branch Name:"])]);p=new c.Command({name:b.Checkout,tooltip:b["Checkout the current tag, creating a local branch based on its contents."],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutTag",parameters:p,callback:function(c){function d(){if(e.Repository)return e.Repository.BranchLocation;for(var a in e.parent.parent.children)if(e.parent.parent.children[a].Name==="Branches")return e.parent.parent.children[a];return e.parent.parent}var e=c.items,g=
function(c,e,g){c=f.getService("orion.git.provider").checkoutTag(c,e,g);f.getService("orion.page.message").createProgressMonitor(c,a.string.substitute(b["Checking out tag ${0}"],[g]));c.then(function(){a.hitch(l,l.changedItem)(d())},q)},h=e.Repository!=null?e.Repository.Location:e.parent.parent.Location;c.parameters.valueFor("name")&&!c.parameters.optionsRequested?g(h,e.Name,c.parameters.valueFor("name")):c.parameters.valueFor("name")&&j.getNewItemName(e,l,!1,c.domNode.id,b["Local Branch Name:"],
function(a){(a||a!="")&&g(h,e.Name,a)})},visibleWhen:function(a){return a.Type==="Tag"}});k.addCommand(p);p=new c.Command({name:b.Checkout,tooltip:b["Checkout the branch or corresponding local branch and make it active. If the remote tracking branch does not have a corresponding local branch, the local branch will be created first."],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.checkoutBranch",callback:function(c){var d=c.items,e=f.getService("orion.git.provider"),g=
f.getService("orion.page.message"),h=new a.Deferred;g.createProgressMonitor(h,d.Name?a.string.substitute(b["Checking out branch ${0}..."],[d.Name]):b["Checking out branch..."]);d.Type==="Branch"?e.checkoutBranch(d.CloneLocation,d.Name).then(function(){a.hitch(l,l.changedItem)(d.parent);h.callback();g.setProgressResult(b["Branch checked out."])},function(a){h.callback();q(a)}):e.addBranch(d.Repository!=null?d.Repository.BranchLocation:d.parent.parent.BranchLocation,null,d.Name).then(function(c){e.checkoutBranch(c.CloneLocation,
c.Name).then(function(){a.hitch(l,l.changedItem)(d.Repository?d.Repository.BranchLocation:d.parent.parent.parent);g.setProgressResult(b["Branch checked out."])},function(a){h.callback();q(a)})},function(a){h.callback();q(a)})},visibleWhen:function(a){return a.Type==="Branch"||a.Type==="RemoteTrackingBranch"}});k.addCommand(p);p=new c.ParametersDescription([new c.CommandParameter("name","text","Name:")]);p=new c.Command({name:b["New Branch"],tooltip:b["Add a new local branch to the repository"],imageClass:"core-sprite-add",
id:"eclipse.addBranch",parameters:p,callback:function(c){var d=c.items,e=function(b,c){f.getService("orion.git.provider").addBranch(b,c).then(function(){a.hitch(l,l.changedItem)(d)},q)},g;g=d.Type==="Clone"?d.BranchLocation:d.Location;c.parameters.valueFor("name")&&!c.parameters.optionsRequested?e(g,c.parameters.valueFor("name")):j.getNewItemName(d,l,!1,c.domNode.id,b["Branch name"],function(a){(a||a!="")&&e(g,a)})},visibleWhen:function(a){return a.GroupNode&&a.Name==="Branches"||a.Type==="Clone"&&
l.parentId==="artifacts"}});k.addCommand(p);p=new c.Command({name:b.Delete,tooltip:b["Delete the local branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeBranch",callback:function(c){var d=c.items;confirm(a.string.substitute(b["Are you sure you want to delete branch ${0}?"],[d.Name]))&&f.getService("orion.git.provider").removeBranch(d.Location).then(function(){l.changedItem?a.hitch(l,l.changedItem)(d.parent):l.displayBranches&&a.hitch(l,l.displayBranches)(d.ParentLocation,
null)},q)},visibleWhen:function(a){return a.Type==="Branch"&&!a.Current}});k.addCommand(p);p=new c.Command({name:b.Delete,tooltip:b["Delete the remote tracking branch from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeRemoteBranch",callback:function(c){var d=c.items;confirm(a.string.substitute(b["You're going to delete remote branch ${0} and push the change."],[d.Name])+"\n\n"+b["Are you sure?"])&&j.getDefaultSshOptions(f).then(function(c){var e=arguments.callee,g=f.getService("orion.git.provider"),
h=f.getService("orion.page.message"),g=g.doPush(d.Location,"",!1,!1,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase);h.createProgressMonitor(g,b["Removing remote branch: "]+d.Name);g.then(function(g){j.handleProgressServiceResponse(g,c,f,function(b){b.Result.Severity=="Ok"&&a.hitch(l,l.changedItem)(d.parent)},e,b["Delete Remote Branch"])},function(a){j.handleProgressServiceResponse(a,c,f,function(){},e,b["Removing remote branch: "]+d.Name)})})},visibleWhen:function(a){return a.Type===
"RemoteTrackingBranch"}});k.addCommand(p);p=new c.ParametersDescription([new c.CommandParameter("name","text","Name:"),new c.CommandParameter("url","url","Url:")]);p=new c.Command({name:b["New Remote"],tooltip:b["Add a new remote to the repository"],imageClass:"core-sprite-add",id:"eclipse.addRemote",parameters:p,callback:function(b){var c=b.items,d=function(b,d,e){f.getService("orion.git.provider").addRemote(b,d,e).then(function(){a.hitch(l,l.changedItem)(c)},q)},e;e=c.Type==="Clone"?c.RemoteLocation:
c.Location;b.parameters.valueFor("name")&&b.parameters.valueFor("url")&&!b.parameters.optionsRequested?d(e,b.parameters.valueFor("name"),b.parameters.valueFor("url")):(b=new orion.git.widgets.AddRemoteDialog({func:function(a,b){d(e,a,b)}}),b.startup(),b.show())},visibleWhen:function(a){return a.GroupNode&&a.Name==="Remotes"||a.Type==="Clone"&&l.parentId==="artifacts"}});k.addCommand(p);p=new c.Command({name:b.Delete,tooltip:b["Delete the remote from the repository"],imageClass:"core-sprite-delete",
id:"eclipse.removeRemote",callback:function(c){var d=c.items;confirm(a.string.substitute(b["Are you sure you want to delete remote ${0}?"],[d.Name]))&&f.getService("orion.git.provider").removeRemote(d.Location).then(function(){a.hitch(l,l.changedItem)(d.parent)},q)},visibleWhen:function(a){return a.Type==="Remote"}});k.addCommand(p);p=new c.Command({name:b.Pull,tooltip:b["Pull from the repository"],imageClass:"git-sprite-pull",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pull",callback:function(c){var d=
c.items,e=d.Location;j.getDefaultSshOptions(f).then(function(c){var g=arguments.callee,h=f.getService("orion.git.provider"),k=f.getService("orion.page.message"),h=h.doPull(e,!1,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase);k.createProgressMonitor(h,b["Pulling : "]+e);h.then(function(b){j.handleProgressServiceResponse(b,c,f,function(){d.Type==="Clone"&&a.hitch(l,l.changedItem)(d)},g,"Pull Git Repository")},function(a){j.handleProgressServiceResponse(a,c,f,function(){},
g,b["Pull Git Repository"])})})},visibleWhen:function(a){return a.Type==="Clone"}});k.addCommand(p);p=new c.Command({name:b["Git Log"],tooltip:b["Open the log for the branch"],id:"eclipse.openGitLog",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(a){a=a.items;return d.toUrl("git/git-log.html")+"#"+a.CommitLocation+"?page=1"},visibleWhen:function(a){return a.Type==="Branch"||a.Type==="RemoteTrackingBranch"}});k.addCommand(p);p=new c.Command({name:b["Git Log"],tooltip:b["Open the log for the repository"],
id:"eclipse.openGitLogAll",imageClass:"git-sprite-log",spriteClass:"gitCommandSprite",hrefCallback:function(a){return d.toUrl("git/git-log.html")+"#"+a.items.CommitLocation+"?page=1"},visibleWhen:function(a){return!a.CommitLocation||!a.StatusLocation?!1:!0}});k.addCommand(p);p=new c.Command({name:b["Git Status"],tooltip:b["Open the status for the repository"],id:"eclipse.openGitStatus",imageClass:"git-sprite-status",spriteClass:"gitCommandSprite",hrefCallback:function(a){return d.toUrl(e.statusUILocation)+
"#"+a.items.StatusLocation},visibleWhen:function(a){return!a.StatusLocation?!1:!0}});k.addCommand(p);p=new c.Command({name:b["Show in Navigator"],tooltip:b["Show the repository folder in the file navigator"],id:"eclipse.openCloneContent",hrefCallback:function(a){return d.toUrl("navigate/table.html")+"#"+a.items.ContentLocation+"?depth=1"},visibleWhen:function(a){return!a.ContentLocation?!1:!0}});k.addCommand(p);p=new c.Command({name:b["Compare With Each Other"],imageClass:"git-sprite-open_compare",
spriteClass:"gitCommandSprite",id:"eclipse.compareGitCommits",hrefCallback:function(a){a=a.items;return f.getService("orion.git.provider").getDiff(a[1].DiffLocation,a[0].Name).then(function(a){return h.generateCompareHref(a,{readonly:!0})})},visibleWhen:function(b){return l.isDirectory?!1:a.isArray(b)&&b.length===2&&b[0].Type==="Commit"&&b[1].Type==="Commit"?!0:!1}});k.addCommand(p);p=new c.Command({name:b["Compare With Working Tree"],imageClass:"git-sprite-open_compare",spriteClass:"gitCommandSprite",
id:"eclipse.compareWithWorkingTree",hrefCallback:function(a){return h.generateCompareHref(a.items.DiffLocation,{})},visibleWhen:function(a){return a.Type==="Commit"&&a.ContentLocation!=null&&!l.isDirectory}});k.addCommand(p);p=new c.Command({name:b.Open,id:"eclipse.openGitCommit",hrefCallback:function(a){return d.toUrl("edit/edit.html")+"#"+a.items.ContentLocation},visibleWhen:function(a){return a.Type==="Commit"&&a.ContentLocation!=null&&!l.isDirectory}});k.addCommand(p);p=new c.Command({name:b.Fetch,
tooltip:b["Fetch from the remote"],imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.fetch",callback:function(d){var e=d.items,h=e.Location,p=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,k.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,k.collectParameters(d)):(new g(f)).isEnabled().then(function(e){d.parameters=e?a.JsonData.User?new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"]),
new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],{hasOptionalParameters:!0}):new c.ParametersDescription([new c.CommandParameter("sshuser","text",b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",b["SSH Password:"]),new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0}):
new c.ParametersDescription([new c.CommandParameter("sshuser","text",b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0});d.errorData=a.JsonData;k.collectParameters(d)})},w=function(){d.parameters&&d.parameters.optionsRequested?(d.parameters=null,d.optionsRequested=!0,k.collectParameters(d)):j.gatherSshCredentials(f,d).then(function(c){var g=f.getService("orion.git.provider"),k=f.getService("orion.page.message"),c=g.doFetch(h,!1,c.gitSshUsername,
c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase);k.createProgressMonitor(c,b["Fetching remote: "]+h);c.then(function(c){j.handleProgressServiceResponse2(c,f,function(){g.getGitRemote(h).then(function(c){l.parentId==="explorer-tree"&&(a.place(document.createTextNode(b["Getting git incoming changes..."]),"explorer-tree","only"),g.getLog(c.HeadLocation,c.Id).then(function(a){l.renderer.setIncomingCommits(a.Children);l.loadCommitsList(c.CommitLocation+"?page=1",c,!0)}));a.hitch(l,l.changedItem)(e)},
q)},function(a){p(a,d)})},function(a){j.handleProgressServiceResponse2(a,f,function(){},function(a){p(a,d)})})})};if(d.items.GitUrl)w();else{var t=f.getService("orion.git.provider");t.getGitRemote(h).then(function(a){t.getGitClone(a.CloneLocation).then(function(a){d.items.GitUrl=a.Children[0].GitUrl;w()})})}},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Remote"?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});k.addCommand(p);p=new c.Command({name:b["Force Fetch"],
imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",tooltip:b["Fetch from the remote branch into your remote tracking branch overriding its current content"],id:"eclipse.orion.git.fetchForce",callback:function(d){if(confirm(b["You're going to override content of the remote tracking branch. This can cause the branch to lose commits."]+"\n\n"+b["Are you sure?"])){var e=d.items,h=e.Location,p=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,k.collectParameters(d)):
d.optionsRequested?(d.errorData=a.JsonData,k.collectParameters(d)):(new g(f)).isEnabled().then(function(e){d.parameters=e?a.JsonData.User?new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"]),new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],{hasOptionalParameters:!0}):new c.ParametersDescription([new c.CommandParameter("sshuser","text",b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",b["SSH Password:"]),
new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0}):new c.ParametersDescription([new c.CommandParameter("sshuser","text",b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0});d.errorData=a.JsonData;k.collectParameters(d)})},w=function(){d.parameters&&
d.parameters.optionsRequested?(d.parameters=null,d.optionsRequested=!0,k.collectParameters(d)):j.gatherSshCredentials(f,d).then(function(c){var g=f.getService("orion.git.provider"),k=f.getService("orion.page.message"),c=g.doFetch(h,!0,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase);k.createProgressMonitor(c,b["Fetching remote: "]+h);c.then(function(c){j.handleProgressServiceResponse2(c,f,function(){g.getGitRemote(h).then(function(c){l.parentId==="explorer-tree"&&(a.place(document.createTextNode(b["Getting git incoming changes..."]),
"explorer-tree","only"),g.getLog(c.HeadLocation,c.Id).then(function(a){l.renderer.setIncomingCommits(a.Children);l.loadCommitsList(c.CommitLocation+"?page=1",c,!0)}));a.hitch(l,l.changedItem)(e)},q)},function(a){p(a,d)})},function(a){j.handleProgressServiceResponse2(a,f,function(){},function(a){p(a,d)})})})};if(d.items.GitUrl)w();else{var t=f.getService("orion.git.provider");t.getGitRemote(h).then(function(a){t.getGitClone(a.CloneLocation).then(function(a){d.items.GitUrl=a.Children[0].GitUrl;w()})})}}},
visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Remote"?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});k.addCommand(p);p=new c.Command({name:b.Merge,tooltip:b["Merge the content from the branch to your active branch"],imageClass:"git-sprite-merge",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.merge",callback:function(c){var g=c.items,c=f.getService("orion.git.provider"),h=f.getService("orion.page.message");c.doMerge(g.HeadLocation,
g.Name,!1).then(function(c){var f=[];if(c.jsonData&&(c.jsonData.Result=="FAST_FORWARD"||c.jsonData.Result=="ALREADY_UP_TO_DATE"))a.query(".treeTableRow").forEach(function(b){a.toggleClass(b,"incomingCommitsdRow",!1)}),f.Severity="Ok",f.HTML=!1,f.Message=c.jsonData.Result,a.hitch(l,l.changedItem)(g);else if(c.jsonData){var j=g.HeadLocation.replace("commit/HEAD","status");f.Severity="Warning";f.HTML=!0;f.Message="<span>"+c.jsonData.Result;if(c.jsonData.FailingPaths){var k="",m=!0,n;for(n in c.jsonData.FailingPaths)m||
(k+=", "),m=!1,k+=n;m||(f.Message+=". "+a.string.substitute(b["Failing paths: ${0}"],[k]))}f.Message+=a.string.substitute(b[". Go to ${0}."],['<a href="'+d.toUrl(e.statusUILocation)+"#"+j+'">'+b["Git Status page"]+"</a>"])+"</span>"}else if(c.error)j=g.HeadLocation.replace("commit/HEAD","status"),f.Severity="Error",c.error.responseText&&JSON.parse(c.error.responseText)?(c=JSON.parse(c.error.responseText),f.Message=c.DetailedMessage?c.DetailedMessage:c.Message):f.Message=c.error.message,f.HTML=!0,
f.Message="<span>"+f.Message+a.string.substitute(b[". Go to ${0}."],['<a href="'+d.toUrl(e.statusUILocation)+"#"+j+'">'+b["Git Status page"]+"</a>"])+"</span>";h.setProgressResult(f)},function(c,h){var j=[],k=g.HeadLocation.replace("commit/HEAD","status");j.Severity="Error";j.HTML=!0;j.Message="<span>"+a.fromJson(h.xhr.responseText).DetailedMessage+a.string.substitute(b[". Go to ${0}."],['<a href="'+d.toUrl(e.statusUILocation)+"#"+k+'">'+b["Git Status page"]+"</a>"])+".</span>";f.getService("orion.page.message").setProgressResult(j)})},
visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Branch"&&!a.Current?!0:a.Type==="Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});k.addCommand(p);p=new c.Command({name:b["Merge Squash"],tooltip:b["Squash the content of the branch to the index"],imageClass:"git-sprite-merge_squash",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.mergeSquash",callback:function(c){var g=c.items,c=f.getService("orion.git.provider"),h=f.getService("orion.page.message");
c.doMerge(g.HeadLocation,g.Name,!0).then(function(c){var f=[];if(c.jsonData&&(c.jsonData.Result=="FAST_FORWARD_SQUASHED"||c.jsonData.Result=="ALREADY_UP_TO_DATE"))a.query(".treeTableRow").forEach(function(b){a.toggleClass(b,"incomingCommitsdRow",!1)}),f.Severity="Ok",f.HTML=!1,f.Message=c.jsonData.Result,a.hitch(l,l.changedItem)(g);else if(c.jsonData){var j=g.HeadLocation.replace("commit/HEAD","status");f.Severity="Warning";f.HTML=!0;f.Message="<span>"+c.jsonData.Result+a.string.substitute(b[". Go to ${0}."],
['<a href="'+d.toUrl(e.statusUILocation)+"#"+j+'">'+b["Git Status page"]+"</a>"])+"</span>"}else if(c.error)j=g.HeadLocation.replace("commit/HEAD","status"),f.Severity="Error",c.error.responseText&&JSON.parse(c.error.responseText)?(c=JSON.parse(c.error.responseText),f.Message=c.DetailedMessage?c.DetailedMessage:c.Message):f.Message=c.error.message,f.HTML=!0,f.Message="<span>"+f.Message+a.string.substitute(b[". Go to ${0}."],['<a href="'+d.toUrl(e.statusUILocation)+"#"+j+'">'+b["Git Status page"]+
"</a>"])+"</span>";h.setProgressResult(f)},function(c,h){var j=[],k=g.HeadLocation.replace("commit/HEAD","status");j.Severity="Error";j.HTML=!0;j.Message="<span>"+a.fromJson(h.xhr.responseText).DetailedMessage+a.string.substitute(b[". Go to ${0}."],['<a href="'+d.toUrl(e.statusUILocation)+"#"+k+'">'+b["Git Status page"]+"</a>"])+".</span>";f.getService("orion.page.message").setProgressResult(j)})},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"?!0:a.Type==="Branch"&&!a.Current?!0:a.Type===
"Commit"&&a.toRef&&a.toRef.Type==="RemoteTrackingBranch"?!0:!1}});k.addCommand(p);p=new c.Command({name:b.Rebase,tooltip:b["Rebase your commits by removing them from the active branch, starting the active branch again based on the latest state of the selected branch "]+"and applying each commit again to the updated active branch.",id:"eclipse.orion.git.rebase",imageClass:"git-sprite-rebase",spriteClass:"gitCommandSprite",callback:function(c){var g=c.items,c=f.getService("orion.page.message"),h=f.getService("orion.git.provider").doRebase(g.HeadLocation,
g.Name,"BEGIN");c.createProgressMonitor(h,g.Name?b["Rebase on top of "]+g.Name:b.Rebase);h.then(function(c){var h=[],j=g.HeadLocation.replace("commit/HEAD","status");c.Result=="OK"||c.Result=="FAST_FORWARD"||c.Result=="UP_TO_DATE"?(h.Severity="Ok",h.HTML=!1,h.Message=c.Result,a.hitch(l,l.changedItem)(g)):c.Result=="STOPPED"?(h.Severity="Warning",h.HTML=!0,h.Message="<span>"+c.Result+b[". Some conflicts occurred. Please resolve them and continue, skip patch or abort rebasing"]+a.string.substitute(b[". Go to ${0}."],
['<a href="'+d.toUrl(e.statusUILocation)+"#"+j+'">'+b["Git Status page"]+"</a>"])+".</span>"):c.Result=="FAILED_WRONG_REPOSITORY_STATE"?(h.Severity="Error",h.HTML=!0,h.Message="<span>"+c.Result+b[". Repository state is invalid (i.e. already during rebasing)"]+a.string.substitute(". Go to ${0}.",['<a href="'+d.toUrl(e.statusUILocation)+"#"+j+'">'+b["Git Status page"]+"</a>"])+".</span>"):c.Result=="FAILED_UNMERGED_PATHS"?(h.Severity="Error",h.HTML=!0,h.Message="<span>"+c.Result+b[". Repository contains unmerged paths"]+
a.string.substitute(b[". Go to ${0}."],['<a href="'+d.toUrl(e.statusUILocation)+"#"+j+'">'+b["Git Status page"]+"</a>"])+".</span>"):c.Result=="FAILED_PENDING_CHANGES"?(h.Severity="Error",h.HTML=!0,h.Message="<span>"+c.Result+b[". Repository contains pending changes. Please commit or stash them"]+a.string.substitute(b[". Go to ${0}."],['<a href="'+d.toUrl(e.statusUILocation)+"#"+j+'">Git Status page</a>'])+".</span>"):(h.Severity="Warning",h.HTML=!0,h.Message="<span>"+c.Result+a.string.substitute(b[". Go to ${0}."],
['<a href="'+d.toUrl(e.statusUILocation)+"#"+j+'">'+b["Git Status page"]+"</a>"])+".</span>");f.getService("orion.page.message").setProgressResult(h)},q)},visibleWhen:function(a){this.tooltip=b["Rebase your commits by removing them from the active branch, "]+b["starting the active branch again based on the latest state of '"]+a.Name+"' "+b["and applying each commit again to the updated active branch."];return a.Type==="RemoteTrackingBranch"||a.Type==="Branch"&&!a.Current}});k.addCommand(p);p=new c.Command({name:b["Push All"],
tooltip:b["Push commits and tags from your local branch into the remote branch"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.push",callback:function(d){var e=d.targetBranch,h,p=d.items,q=a.hash();if(p.toRef)p=p.toRef;var t=p.CloneLocation.split("/"),u=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,k.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,k.collectParameters(d)):(new g(f)).isEnabled().then(function(e){d.parameters=
e?a.JsonData.User?new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"]),new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],{hasOptionalParameters:!0}):new c.ParametersDescription([new c.CommandParameter("sshuser","text",b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",b["SSH Password:"]),new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?
new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0}):new c.ParametersDescription([new c.CommandParameter("sshuser","text",b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0});d.errorData=a.JsonData;k.collectParameters(d)})};if(d.parameters&&d.parameters.optionsRequested)d.parameters=null,d.optionsRequested=!0,k.collectParameters(d);else{var y=f.getService("orion.git.provider"),
z=function(c,e,g,h,k){var n=f.getService("orion.page.message"),c=y.doPush(e,g,!0,k,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase);n.createProgressMonitor(c,b["Pushing remote: "]+h);c.then(function(b){j.handleProgressServiceResponse2(b,f,function(){l.parentId==="explorer-tree"?(!b||!b.HttpCode)&&a.query(".treeTableRow").forEach(function(b){a.toggleClass(b,"outgoingCommitsdRow",!1)}):a.hitch(l,l.changedItem)()},function(a){u(a,d)})},function(a){j.handleProgressServiceResponse2(a,
f,function(){},function(a){u(a,d)})})};y.getGitClone(p.CloneLocation).then(function(c){var g=c.Children[0].RemoteLocation,k=c.Children[0].ConfigLocation;j.gatherSshCredentials(f,d).then(function(c){var j=new a.Deferred;if(p.RemoteLocation.length===1&&p.RemoteLocation[0].Children.length===1)j=y.getGitRemote(g);else{var l={};l.Children=p.RemoteLocation;j.resolve(l)}j.then(function(g){e?z(c,e.Location,"HEAD",e.Name,!1):(g=new orion.git.widgets.RemotePrompterDialog({title:b["Choose Branch"],serviceRegistry:f,
gitClient:y,treeRoot:{Children:g.Children},hideNewBranch:!1,func:a.hitch(this,function(a,b,e){h=a===null?e:a;var f="/gitapi/config/branch."+p.Name+".remote/clone/file/"+t[4];y.addCloneConfigurationProperty(k,"branch."+p.Name+".remote",h.parent.Name).then(function(){d.targetBranch=h;z(c,h.Location,"HEAD",h.Name,!1)},function(a){a.status==409&&y.editCloneConfigurationProperty(f,h.parent.Name).then(function(){d.targetBranch=h;z(c,h.Location,"HEAD",h.Name,!1)})})})}),p.RemoteLocation.length===1&&p.RemoteLocation[0].Children.length===
1&&(g=new orion.git.widgets.ConfirmPushDialog({title:b["Choose Branch"],serviceRegistry:f,gitClient:y,dialog:g,location:p.RemoteLocation[0].Children[0].Name,func:a.hitch(this,function(){d.targetBranch=p.RemoteLocation[0].Children[0];z(c,p.RemoteLocation[0].Children[0].Location,"HEAD",q,!1)})})),g.startup(),g.show())})})})}},visibleWhen:function(a){return a.toRef?a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&a.toRef.RemoteLocation:a.Type==="Branch"&&a.Current&&a.RemoteLocation}});
k.addCommand(p);p=new c.Command({name:b["Force Push All"],tooltip:b["Push commits and tags from your local branch into the remote branch overriding its current content"],imageClass:"git-sprite-push",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.pushForce",callback:function(d){var e=d.confirmedWarnings,h=d.targetBranch;if(!e)if(confirm(b["You're going to override content of the remote branch. This can cause the remote repository to lose commits."]+"\n\n"+b["Are you sure?"]))e=d.confirmedWarnings=
!0;else return;var p,q=d.items,t=a.hash();if(q.toRef)q=q.toRef;var u=q.CloneLocation.split("/"),y=function(a,d){a.JsonData.HostKey?(d.parameters=null,d.errorData=a.JsonData,k.collectParameters(d)):d.optionsRequested?(d.errorData=a.JsonData,k.collectParameters(d)):(new g(f)).isEnabled().then(function(e){d.parameters=e?a.JsonData.User?new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"]),new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],
{hasOptionalParameters:!0}):new c.ParametersDescription([new c.CommandParameter("sshuser","text",b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",b["SSH Password:"]),new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0}):new c.ParametersDescription([new c.CommandParameter("sshuser","text",
b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0});d.errorData=a.JsonData;k.collectParameters(d)})};if(d.parameters&&d.parameters.optionsRequested)d.parameters=null,d.optionsRequested=!0,k.collectParameters(d);else{var z=f.getService("orion.git.provider"),A=function(c,e,g,h,k){var n=f.getService("orion.page.message"),c=z.doPush(e,g,!0,k,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase);n.createProgressMonitor(c,
b["Pushing remote: "]+h);c.then(function(b){j.handleProgressServiceResponse2(b,f,function(){l.parentId==="explorer-tree"?(!b||!b.HttpCode)&&a.query(".treeTableRow").forEach(function(b){a.toggleClass(b,"outgoingCommitsdRow",!1)}):a.hitch(l,l.changedItem)()},function(a){y(a,d)})},function(a){j.handleProgressServiceResponse2(a,f,function(){},function(a){y(a,d)})})};z.getGitClone(q.CloneLocation).then(function(c){var e=c.Children[0].RemoteLocation,g=c.Children[0].ConfigLocation;j.gatherSshCredentials(f,
d).then(function(c){var j=new a.Deferred;if(q.RemoteLocation.length===1&&q.RemoteLocation[0].Children.length===1)j=z.getGitRemote(e);else{var k={};k.Children=q.RemoteLocation;j.resolve(k)}j.then(function(e){h?A(c,h.Location,"HEAD",h.Name,!0):(e=new orion.git.widgets.RemotePrompterDialog({title:b["Choose Branch"],serviceRegistry:f,gitClient:z,treeRoot:{Children:e.Children},hideNewBranch:!1,func:a.hitch(this,function(a,b,e){p=a===null?e:a;var f="/gitapi/config/branch."+q.Name+".remote/clone/file/"+
u[4];z.addCloneConfigurationProperty(g,"branch."+q.Name+".remote",p.parent.Name).then(function(){d.targetBranch=p;A(c,p.Location,"HEAD",p.Name,!0)},function(a){a.status==409&&z.editCloneConfigurationProperty(f,p.parent.Name).then(function(){d.targetBranch=p;A(c,p.Location,"HEAD",p.Name,!0)})})})}),q.RemoteLocation.length===1&&q.RemoteLocation[0].Children.length===1&&(e=new orion.git.widgets.ConfirmPushDialog({title:b["Choose Branch"],serviceRegistry:f,gitClient:z,dialog:e,location:q.RemoteLocation[0].Children[0].Name,
func:a.hitch(this,function(){d.targetBranch=q.RemoteLocation[0].Children[0];A(c,q.RemoteLocation[0].Children[0].Location,"HEAD",t,!0)})})),e.startup(),e.show())})})})}},visibleWhen:function(a){if(a.toRef)return a.RepositoryPath===""&&a.toRef.Type==="Branch"&&a.toRef.Current&&a.toRef.RemoteLocation}});k.addCommand(p);p=new c.Command({name:b["< Previous Page"],tooltip:b["Show previous page of git log"],id:"eclipse.orion.git.previousLogPage",hrefCallback:function(a){return d.toUrl("git/git-log.html")+
"#"+a.items.PreviousLocation},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"||a.toRef!=null&&a.toRef.Type==="Branch"||a.RepositoryPath!=null?a.PreviousLocation!==void 0:!1}});k.addCommand(p);p=new c.Command({name:b["Next Page >"],tooltip:b["Show next page of git log"],id:"eclipse.orion.git.nextLogPage",hrefCallback:function(a){return d.toUrl("git/git-log.html")+"#"+a.items.NextLocation},visibleWhen:function(a){return a.Type==="RemoteTrackingBranch"||a.toRef!=null&&a.toRef.Type==="Branch"||
a.RepositoryPath!=null?a.NextLocation!==void 0:!1}});k.addCommand(p);p=new c.Command({name:b["< Previous Page"],tooltip:b["Show previous page of git tags"],id:"eclipse.orion.git.previousTagPage",hrefCallback:function(a){return d.toUrl("git/git-repository.html")+"#"+a.items.PreviousLocation},visibleWhen:function(a){return a.Type==="Tag"?a.PreviousLocation!==void 0:!1}});k.addCommand(p);p=new c.Command({name:b["Next Page >"],tooltip:b["Show next page of git tags"],id:"eclipse.orion.git.nextTagPage",
hrefCallback:function(a){return d.toUrl("git/git-repository.html")+"#"+a.items.NextLocation},visibleWhen:function(a){return a.Type=="Tag"?a.NextLocation!==void 0:!1}});k.addCommand(p);p=new c.Command({name:b.Reset,tooltip:b["Reset your active branch to the state of the selected branch. Discard all staged and unstaged changes."],id:"eclipse.orion.git.resetIndex",imageClass:"git-sprite-reset",spriteClass:"gitCommandSprite",callback:function(c){var d=c.items;if(confirm(b["The content of your active branch will be replaced with "]+
d.Name+". "+b["All unstaged and staged changes will be discarded and cannot be recovered. Are you sure?"])){var c=f.getService("orion.git.provider"),e=f.getService("orion.page.message"),c=c.resetIndex(d.IndexLocation,d.Name);e.createProgressMonitor(c,b["Resetting index..."]);c.then(function(){a.hitch(l,l.changedItem)(d);e.setProgressResult({Severity:"Info",HTML:!1,Message:"Ok"})},function(a){var b={Severity:"Error",HTML:!1};b.Message=a.message;e.setProgressResult(b)})}},visibleWhen:function(a){return a.Type===
"RemoteTrackingBranch"}});k.addCommand(p);p=new c.ParametersDescription([new c.CommandParameter("name","text",b["Name:"])]);p=new c.Command({name:b.Tag,tooltip:b["Create a tag for the commit"],imageClass:"git-sprite-tag",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.addTag",parameters:p,callback:function(c){var d=c.items,e=function(b,c){f.getService("orion.git.provider").doAddTag(b,c).then(function(){a.hitch(l,l.changedItem)(d)},q)},g=d.Location;c.parameters.valueFor("name")&&!c.parameters.optionsRequested?
e(g,c.parameters.valueFor("name")):j.getNewItemName(d,l,!1,c.domNode.id,b["Tag name"],function(a){(a||a!="")&&e(g,a)})},visibleWhen:function(a){return a.Type==="Commit"}});k.addCommand(p);p=new c.Command({name:b.Delete,tooltip:b["Delete the tag from the repository"],imageClass:"core-sprite-delete",id:"eclipse.removeTag",callback:function(c){var d=c.items;confirm(a.string.substitute(b["Are you sure you want to delete tag ${0}?"],[d.Name]))&&f.getService("orion.git.provider").doRemoveTag(d.Location).then(function(){a.hitch(l,
l.changedItem)(d.parent)},q)},visibleWhen:function(a){return a.Type==="Tag"}});k.addCommand(p);p=new c.ParametersDescription([new c.CommandParameter("reviewer","text",b["Reviewer name"])],{hasOptionalParameters:!0});p=new c.Command({name:b["Ask for review"],tooltip:b["Ask for review tooltip"],imageClass:"core-sprite-tag",id:"eclipse.orion.git.askForReviewCommand",parameters:p,callback:function(c){var d=function(b){if((new a._Url(b)).scheme==="ssh"){var c=b.indexOf("@");c!==-1&&(b="ssh://"+b.substr(c+
1))}return b},e=function(a){var b=c.items,e=b.Location.replace(b.Name,"HEAD"),g=b.AuthorName,h=b.Name,j=b.Message;f.getService("orion.git.provider").getGitClone(b.CloneLocation).then(function(c){var k=window.location.href.split("#")[0],k=k.substring(0,k.length-window.location.pathname.length),c=d(c.Children[0].GitUrl),c=k+"/git/reviewRequest.html#"+c+"_"+b.Name;f.getService("orion.git.provider").sendCommitReviewRequest(h,e,a,c,g,j).then(function(a){var b={Severity:"Ok",HTML:!1};b.Message=a.Result;
f.getService("orion.page.message").setProgressResult(b)},q)})};if(c.parameters.valueFor("reviewer")&&!c.parameters.optionsRequested)e(c.parameters.valueFor("reviewer"));else{var g=c.items;f.getService("orion.git.provider").getGitClone(g.CloneLocation).then(function(a){var c=window.location.href.split("#")[0],c=c.substring(0,c.length-window.location.pathname.length),a=d(a.Children[0].GitUrl),a=new orion.git.widgets.ReviewRequestDialog({title:b["Contribution Review Request"],url:c+"/git/reviewRequest.html#"+
a+"_"+g.Name,func:e});a.startup();a.show()},q)}},visibleWhen:function(a){return a.Type==="Commit"}});k.addCommand(p);p=new c.Command({name:b["Cherry-Pick"],tooltip:b["Apply the change introduced by the commit to your active branch"],id:"eclipse.orion.git.cherryPick",imageClass:"git-sprite-cherry_pick",spriteClass:"gitCommandSprite",callback:function(c){var g=c.items;a.hash();var h=f.getService("orion.git.provider"),c=g.Location.replace(g.Name,"HEAD");h.doCherryPick(c,g.Name).then(function(c){var j=
[],k=g.Location.replace("commit/"+g.Name,"status");if(c.Result=="OK")j.Severity="Ok",c.HeadUpdated?(j.HTML=!1,j.Message=c.Result,l.parentId==="explorer-tree"&&h.doGitLog(q).then(function(c){c.HeadLocation?(a.place(document.createTextNode(b["Getting git incoming changes..."]),"explorer-tree","only"),h.getLog(c.HeadLocation,c.Id).then(function(a){l.renderer.setIncomingCommits(a.Children);l.loadCommitsList(c.CommitLocation+"?page=1",c,!0)})):(a.place(document.createTextNode(b["Getting git incoming changes..."]),
"explorer-tree","only"),h.getLog(q,"HEAD").then(function(a){l.renderer.setOutgoingCommits(a.Children);l.loadCommitsList(q,c,!0)}))})):(j.HTML=!0,j.Message="<span>"+b["Nothing changed."]+"</span>");else if(c.Result=="CONFLICTING")j.Severity="Warning",j.HTML=!0,j.Message="<span>"+c.Result+b[". Some conflicts occurred"]+ +a.string.substitute(b[". Go to ${0}."],['<a href="'+d.toUrl(e.statusUILocation)+"#"+k+'">'+b["Git Status page"]+"</a>"])+".</span>";else if(c.Result=="FAILED"){j.Severity="Error";j.HTML=
!0;j.Message="<span>"+c.Result;if(c.FailingPaths){var n="",p=!0,q;for(q in c.FailingPaths)p||(n+=", "),p=!1,n+=q;p||(j.Message+=". "+a.string.substitute(b["Failing paths: ${0}"],[n]))}j.Message+=a.string.substitute(b[". Go to ${0}."],['<a href="'+d.toUrl(e.statusUILocation)+"#"+k+'">'+b["Git Status page"]+"</a>"])+".</span>"}else j.Severity="Warning",j.HTML=!1,j.Message=c.Result;f.getService("orion.page.message").setProgressResult(j)},q)},visibleWhen:function(a){return a.Type==="Commit"}});k.addCommand(p)};
j.createGitClonesCommands=function(d,e,f,h,k,l){function s(a){if(!(a.status===401||a.status===403)){var b=[];b.Severity="Error";b.HTML=!1;try{var c=JSON.parse(a.responseText);b.Message=c.DetailedMessage?c.DetailedMessage:c.Message}catch(e){b.Message=a.message}d.getService("orion.page.message").setProgressResult(b)}}function x(b){a.isArray(b)&&(b=b.length>1?{}:b[0]);return b}h=new c.ParametersDescription([new c.CommandParameter("key","text",b["Key:"]),new c.CommandParameter("value","text",b["Value:"])]);
h=new c.Command({name:b["New Configuration Entry"],tooltip:"Add a new entry to the repository configuration",imageClass:"core-sprite-add",id:"eclipse.orion.git.addConfigEntryCommand",parameters:h,callback:function(b){var c=b.items,e=d.getService("orion.git.provider");b.parameters.valueFor("key")&&b.parameters.valueFor("value")&&e.addCloneConfigurationProperty(c.ConfigLocation,b.parameters.valueFor("key"),b.parameters.valueFor("value")).then(function(){a.hitch(f,f.changedItem)(c)},s)}});e.addCommand(h);
h=new c.ParametersDescription([new c.CommandParameter("value","text",b["Value:"])]);h=new c.Command({name:b.Edit,tooltip:b["Edit the configuration entry"],imageClass:"core-sprite-edit",id:"eclipse.orion.git.editConfigEntryCommand",parameters:h,callback:function(b){var c=b.items,e=d.getService("orion.git.provider");b.parameters.valueFor("value")&&e.editCloneConfigurationProperty(c.Location,b.parameters.valueFor("value")).then(function(){a.hitch(f,f.changedItem)(c)},s)},visibleWhen:function(a){return a.Key&&
a.Value&&a.Location}});e.addCommand(h);h=new c.Command({name:b.Delete,tooltip:b["Delete the configuration entry"],imageClass:"core-sprite-delete",id:"eclipse.orion.git.deleteConfigEntryCommand",callback:a.hitch(this,function(c){var e=c.items,c=d.getService("orion.git.provider");confirm(a.string.substitute(b["Are you sure you want to delete ${0}?"],[e.Key]))&&c.deleteCloneConfigurationProperty(e.Location).then(function(){a.hitch(f,f.changedItem)(e)},s)}),visibleWhen:function(a){return a.Key&&a.Value&&
a.Location}});e.addCommand(h);h=new c.ParametersDescription([new c.CommandParameter("url","url",b["Repository URL:"])],{hasOptionalParameters:!0});h=new c.Command({name:b["Clone Repository"],tooltip:b["Clone an existing Git repository to a folder"],id:"eclipse.cloneGitRepository",parameters:h,callback:function(c){var e=d.getService("orion.git.provider"),g=function(c,g,h){j.getDefaultSshOptions(d).then(function(k){var l=arguments.callee,n=e.cloneGitRepository(h,c,g,f.defaultPath,k.gitSshUsername,k.gitSshPassword,
k.knownHosts,k.gitPrivateKey,k.gitPassphrase);d.getService("orion.page.message").createProgressMonitor(n,b["Cloning repository: "]+c);n.then(function(c){j.handleProgressServiceResponse(c,k,d,function(){f.changedItem&&a.hitch(f,f.changedItem)()},l,b["Clone Git Repository"])},function(a){j.handleProgressServiceResponse(a,k,d,function(){},l,b["Clone Git Repository"])})})};c.parameters.valueFor("url")&&!c.parameters.optionsRequested?g(c.parameters.valueFor("url")):(c=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:d,
fileClient:l,url:c.parameters.valueFor("url"),alwaysShowAdvanced:c.parameters.optionsRequested,func:g}),c.startup(),c.show())},visibleWhen:function(){return!0}});e.addCommand(h);h=new c.Command({name:b["Clone Repository"],tooltip:b["Clone an existing Git repository to a folder"],id:"eclipse.cloneGitRepositoryReviewReq",callback:function(c){var e=d.getService("orion.git.provider"),c=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:d,fileClient:l,url:c.userData,alwaysShowAdvanced:!1,
func:function(c,g,h){j.getDefaultSshOptions(d).then(function(k){var l=arguments.callee,n=e.cloneGitRepository(h,c,g,f.defaultPath,k.gitSshUsername,k.gitSshPassword,k.knownHosts,k.gitPrivateKey,k.gitPassphrase);d.getService("orion.page.message").createProgressMonitor(n,b["Cloning repository: "]+c);n.then(function(c){j.handleProgressServiceResponse(c,k,d,function(){f.changedItem&&a.hitch(f,f.changedItem)()},l,b["Clone Git Repository"])},function(a){j.handleProgressServiceResponse(a,k,d,function(){},
l,b["Clone Git Repository"])})})}});c.startup();c.show()},visibleWhen:function(){return!0}});e.addCommand(h);h=new c.Command({name:b["Add Remote"],tooltip:b["Add a new remote to the repository"],id:"eclipse.addRemoteReviewRequestCommand",imageClass:"git-sprite-fetch",spriteClass:"gitCommandSprite",callback:function(h){if(h.parameters&&h.parameters.valueFor("remoteName"))h.remoteName=h.parameters.valueFor("remoteName");var k=function(a,f){a.JsonData.HostKey?(f.parameters=null,f.errorData=a.JsonData,
e.collectParameters(f)):f.optionsRequested?(f.errorData=a.JsonData,e.collectParameters(f)):(new g(d)).isEnabled().then(function(d){f.parameters=d?a.JsonData.User?new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"]),new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],{hasOptionalParameters:!0}):new c.ParametersDescription([new c.CommandParameter("sshuser","text",b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",
b["SSH Password:"]),new c.CommandParameter("saveCredentials","boolean",b["Don't prompt me again:"])],{hasOptionalParameters:!0}):a.JsonData.User?new c.ParametersDescription([new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0}):new c.ParametersDescription([new c.CommandParameter("sshuser","text",b["SSH User Name:"]),new c.CommandParameter("sshpassword","password",b["SSH Password:"])],{hasOptionalParameters:!0});f.errorData=a.JsonData;e.collectParameters(f)})};
if(h.parameters&&h.parameters.optionsRequested)h.parameters=null,h.optionsRequested=!0,e.collectParameters(h);else{var l=function(c,e,g){d.getService("orion.git.provider").addRemote(c,e,h.userData).then(function(){j.gatherSshCredentials(d,h).then(function(c){d.getService("orion.git.provider").getGitRemote(g.RemoteLocation).then(function(l){for(var n,p=0;p<l.Children.length;p++)l.Children[p].Name===e&&(n=l.Children[p]);var q=d.getService("orion.git.provider"),l=d.getService("orion.page.message"),p=
q.doFetch(n.Location,!1,c.gitSshUsername,c.gitSshPassword,c.knownHosts,c.gitPrivateKey,c.gitPassphrase);l.createProgressMonitor(p,b["Fetching remote: "]+n.Location);p.then(function(c){j.handleProgressServiceResponse2(c,d,function(){q.getGitRemote(n.Location).then(function(c){f.parentId==="explorer-tree"&&(a.place(document.createTextNode(b["Getting git incoming changes..."]),"explorer-tree","only"),q.getLog(c.HeadLocation,c.Id).then(function(a){f.renderer.setIncomingCommits(a.Children);f.loadCommitsList(c.CommitLocation+
"?page=1",c,!0)}));a.hitch(f,f.changedItem)(g)},s)},function(a){k(a,h)})},function(a){j.handleProgressServiceResponse2(a,d,function(){},function(a){k(a,h)})})})})},s)};h.remoteName?l(h.items.RemoteLocation,h.remoteName,h.items):(h.parameters=new c.ParametersDescription([new c.CommandParameter("remoteName","text",b["Remote Name:"])],{hasOptionalParameters:!1}),e.collectParameters(h))}},visibleWhen:function(){return!0}});e.addCommand(h);h=new c.ParametersDescription([new c.CommandParameter("folderName",
"text",b["New folder:"])],{hasOptionalParameters:!0});h=new c.Command({name:b["Init Repository"],tooltip:b["Create a new Git repository in a new folder"],id:"eclipse.initGitRepository",parameters:h,callback:function(c){var e=d.getService("orion.git.provider"),g=function(c,g,h){j.getDefaultSshOptions(d).then(function(k){var l=arguments.callee,n=e.cloneGitRepository(h,c,g,f.defaultPath);d.getService("orion.page.message").createProgressMonitor(n,b["Initializing repository: "]+h);n.then(function(c){j.handleProgressServiceResponse(c,
k,d,function(){f.changedItem&&a.hitch(f,f.changedItem)()},l,b["Init Git Repository"])},function(a){j.handleProgressServiceResponse(a,k,d,function(){},l,b["Init Git Repository"])})})};c.parameters.valueFor("folderName")&&!c.parameters.optionsRequested?g(null,null,c.parameters.valueFor("folderName")):(c=new orion.git.widgets.CloneGitRepositoryDialog({serviceRegistry:d,title:b["Init Git Repository"],fileClient:l,advancedOnly:!0,func:g}),c.startup(),c.show())},visibleWhen:function(){return!0}});e.addCommand(h);
h=new c.Command({name:b.Delete,tooltip:b["Delete the repository"],imageClass:"core-sprite-delete",id:"eclipse.git.deleteClone",visibleWhen:function(a){return a.Type==="Clone"},callback:function(c){var e=c.items,c=d.getService("orion.git.provider");if(a.isArray(e)){if(confirm(a.string.substitute(b["Are you sure you want do delete ${0} repositories?"],[e.length])))for(var g=0,h=0;h<e.length;h++)c.removeGitRepository(e[h].Location).then(function(){g++;g>=e.length&&f.changedItem&&a.hitch(f,f.changedItem)()},
s)}else confirm(a.string.substitute(b["Are you sure you want to delete ${0}?"],[e.Name]))&&c.removeGitRepository(e.Location).then(function(){f.changedItem&&a.hitch(f,f.changedItem)()},s)}});e.addCommand(h);h=new c.Command({name:b["Apply Patch"],tooltip:b["Apply a patch on the selected repository"],id:"eclipse.orion.git.applyPatch",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",callback:function(a){a=x(a.items);a=new orion.git.widgets.ApplyPatchDialog({title:b["Apply Patch"],diffLocation:a.DiffLocation});
a.startup();a.show()},visibleWhen:function(a){return a.Type==="Clone"}});e.addCommand(h);h=new c.Command({name:b["Show content"],tooltip:b["Apply a patch on the selected repository"],id:"eclipse.orion.git.showContent",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",callback:function(a){a=x(a.items);a=new orion.git.widgets.ContentDialog({title:b.Content,diffLocation:a.DiffLocation});a.startup();a.show()}});e.addCommand(h);h=new c.ParametersDescription([new c.CommandParameter("commitName",
"text",b["Commit name:"])],{hasOptionalParameters:!0});h=new c.Command({name:b["Open Commit"],tooltip:b["Open the commit with the given name"],id:"eclipse.orion.git.openCommitCommand",imageClass:"git-sprite-apply_patch",spriteClass:"gitCommandSprite",parameters:h,callback:function(c){var e=function(f,g,h){h==null&&(h=new a.Deferred);f.length>0?d.getService("orion.git.provider").doGitLog("/gitapi/commit/"+c.parameters.valueFor("commitName")+f[0].ContentLocation+"?page=1&pageSize=1",null,null,b["Looking for the commit"]).then(function(a){h.callback(a.Children[0].Location)},
function(){e(f.slice(1),g,h)}):h.errback();return h},f=function(a){c.parameters.optionsRequested?(new orion.git.widgets.OpenCommitDialog({repositories:a,serviceRegistry:d,commitName:c.parameters.valueFor("commitName")})).show():(d.getService("orion.page.message").setProgressMessage(b["Looking for the commit"]),e(a,c.parameters.valueFor("commitName")).then(function(a){a!==null&&window.open("/git/git-commit.html#"+a+"?page=1&pageSize=1")},function(){var a=[];a.Severity="warning";a.HTML=!1;a.Message=
b["No commits found"];d.getService("orion.page.message").setProgressResult(a)}))};if(c.items.Type==="Clone"){var g=[c.items];f(g)}else c.items.CloneLocation?d.getService("orion.git.provider").getGitClone(c.items.CloneLocation).then(function(a){f(a.Children)}):(g=c.items,f(g))},visibleWhen:function(a){return a.Type==="Clone"||a.CloneLocation||a.length>1&&a[0].Type==="Clone"}});e.addCommand(h)};j.createGitStatusCommands=function(d,f,g){function h(a){if(!(a.status===401||a.status===403)){var b=[];b.Severity=
"Error";b.HTML=!1;try{var c=JSON.parse(a.responseText);b.Message=c.DetailedMessage?c.DetailedMessage:c.Message}catch(e){b.Message=a.message}d.getService("orion.page.message").setProgressResult(b)}}function j(b){a.isArray(b)||(b=[b]);return b}function k(c,e){var f=d.getService("orion.page.message"),j=d.getService("orion.git.provider").doRebase(c,"",e);f.createProgressMonitor(j,e);j.then(function(c){if(c.Result=="OK"||c.Result=="ABORTED"||c.Result=="FAST_FORWARD"||c.Result=="UP_TO_DATE"){var e=[];e.Severity=
"Ok";e.HTML=!1;e.Message=c.Result;d.getService("orion.page.message").setProgressResult(e);a.hitch(g,g.changedItem)({})}if(c.Result=="STOPPED")e=[],e.Severity="Warning",e.HTML=!1,e.Message=c.Result+b[". Repository still contains conflicts."],d.getService("orion.page.message").setProgressResult(e),a.hitch(g,g.changedItem)({});else if(c.Result=="FAILED_UNMERGED_PATHS")e=[],e.Severity="Error",e.HTML=!1,e.Message=c.Result+b[". Repository contains unmerged paths. Resolve conflicts first."],d.getService("orion.page.message").setProgressResult(e)},
h)}var l=new c.Command({name:b.Stage,tooltip:b["Stage the change"],imageClass:"git-sprite-stage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.stageCommand",callback:function(c){var e=j(c.items),f=d.getService("orion.page.message");if(e.length===1)c=d.getService("orion.git.provider").stage(e[0].indexURI),f.createProgressMonitor(c,b["Staging changes"]);else{for(var k=[],l=0;l<e.length;l++)k[l]=e[l].name;c=d.getService("orion.git.provider").stageMultipleFiles(c.userData.Clone.IndexLocation,k);
f.createProgressMonitor(c,"Staging changes")}c.then(function(){a.hitch(g,g.changedItem)(e)},h)},visibleWhen:function(a){a=j(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!e.isChange(a[b])||e.isStaged(a[b]))return!1;return!0}});f.addCommand(l);l=new c.Command({name:b.Unstage,tooltip:b["Unstage the change"],imageClass:"git-sprite-unstage",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.unstageCommand",callback:function(c){var e=j(c.items),f=d.getService("orion.page.message");if(e.length===
1)c=d.getService("orion.git.provider").unstage(e[0].indexURI,e[0].name);else{for(var k=[],l=0;l<e.length;l++)k[l]=e[l].name;c=d.getService("orion.git.provider").unstage(c.userData.Clone.IndexLocation,k)}f.createProgressMonitor(c,b["Staging changes"]);c.then(function(){a.hitch(g,g.changedItem)(e)},h)},visibleWhen:function(a){a=j(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!e.isChange(a[b])||!e.isStaged(a[b]))return!1;return!0}});f.addCommand(l);l=new c.ParametersDescription([new c.CommandParameter("name",
"text",b["Commit message:"],"",4),new c.CommandParameter("amend","boolean",b["Amend:"],!1)],{hasOptionalParameters:!0});l=new c.Command({name:"Commit",tooltip:"Commit",id:"eclipse.orion.git.commitCommand",parameters:l,callback:function(c){var e=c.items.status,f=function(c){var f=d.getService("orion.page.message"),c=d.getService("orion.git.provider").commitAll(e.Clone.HeadLocation,null,a.toJson(c));f.createProgressMonitor(c,b["Committing changes"]);c.then(function(){a.hitch(g,g.changedItem)(e)},h)},
j={};j.Message=c.parameters.valueFor("name");j.Amend=c.parameters.valueFor("amend");for(var k=e.Clone.Config,l=0;l<k.length;l++)if(k[l].Key==="user.name")j.CommitterName=k[l].Value,j.AuthorName=k[l].Value;else if(k[l].Key==="user.email")j.CommitterEmail=k[l].Value,j.AuthorEmail=k[l].Value;j.Message&&j.CommitterName&&j.CommitterEmail&&!c.parameters.optionsRequested?f(j):(c=new orion.git.widgets.CommitDialog({body:j,func:f}),c.startup(),c.show())},visibleWhen:function(){return!0}});f.addCommand(l);
l=new c.Command({name:b.Reset,tooltip:b["Reset the branch, discarding all staged and unstaged changes"],imageClass:"core-sprite-refresh",id:"eclipse.orion.git.resetCommand",callback:function(c){var e=c.items;d.getService("orion.page.dialog").confirm(b["All unstaged and staged changes in the working directory and index will be discarded and cannot be recovered."]+"\n"+b["Are you sure you want to continue?"],function(c){if(c){var c=d.getService("orion.page.message"),f=d.getService("orion.git.provider").unstageAll(e.IndexLocation,
"HARD");c.createProgressMonitor(f,b["Resetting local changes"]);f.then(function(){a.hitch(g,g.changedItem)(e)},h)}})},visibleWhen:function(a){return e.hasStagedChanges(a)||e.hasUnstagedChanges(a)}});f.addCommand(l);l=new c.Command({name:b.Checkout,tooltip:b["Checkout files, discarding all changes"],imageClass:"git-sprite-checkout",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.checkoutCommand",callback:function(c){var e=j(c.items);d.getService("orion.page.dialog").confirm(b["Your changes to the selected files will be discarded and cannot be recovered."]+
"\n"+b["Are you sure you want to continue?"],function(f){if(f){for(var f=d.getService("orion.page.message"),j=[],k=0;k<e.length;k++)j[k]=e[k].name;j=d.getService("orion.git.provider").checkoutPath(c.userData.Clone.Location,j);f.createProgressMonitor(j,b["Resetting local changes"]);j.then(function(){a.hitch(g,g.changedItem)(e)},h)}})},visibleWhen:function(a){a=j(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(!e.isChange(a[b])||e.isStaged(a[b]))return!1;return!0}});f.addCommand(l);l=new c.Command({name:b["Show Patch"],
tooltip:b["Show workspace changes as a patch"],imageClass:"git-sprite-diff",spriteClass:"gitCommandSprite",id:"eclipse.orion.git.showPatchCommand",hrefCallback:function(a){for(var b=j(a.items),a=a.userData.Clone.DiffLocation+"?parts=diff",c=0;c<b.length;c++)a+="&Path=",a+=b[c].name;return a},visibleWhen:function(a){a=j(a);if(a.length===0)return!1;for(var b=0;b<a.length;b++)if(e.isStaged(a[b]))return!1;return!0}});f.addCommand(l);l=new c.Command({name:b.Continue,tooltip:b["Contibue Rebase"],id:"eclipse.orion.git.rebaseContinueCommand",
callback:function(a){return k(a.items.Clone.HeadLocation,"CONTINUE")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!=-1}});f.addCommand(l);l=new c.Command({name:b["Skip Patch"],tooltip:b["Skip Patch"],id:"eclipse.orion.git.rebaseSkipPatchCommand",callback:function(a){return k(a.items.Clone.HeadLocation,"SKIP")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!=-1}});f.addCommand(l);l=new c.Command({name:b.Abort,tooltip:b["Abort Rebase"],id:"eclipse.orion.git.rebaseAbortCommand",
callback:function(a){return k(a.items.Clone.HeadLocation,"ABORT")},visibleWhen:function(a){return a.RepositoryState.indexOf("REBASING")!=-1}});f.addCommand(l)}})();return j});
define("orion/git/gitStatusExplorer","i18n!git/nls/gitmessages,dojo,orion/explorers/explorer,orion/selection,orion/section,orion/commands,orion/globalCommands,orion/compare/diff-provider,orion/compare/compare-container,orion/git/util,orion/git/gitCommands,orion/git/widgets/CommitTooltipDialog,dojo/date/locale".split(","),function(b,d,a,c,f,e,h,g,j,k,l){var e={},m=function(){function a(){this.selectedItem=this.selectedFileId=void 0;this.interestedUnstagedGroup=["Missing","Modified","Untracked","Conflicting"];
this.interestedStagedGroup=["Added","Changed","Removed"];this.conflictPatterns=[["Both","Modified","Added","Changed","Missing"],["RemoteDelete","Untracked","Removed"],["LocalDelete","Modified","Added","Missing"]];this.conflictType="Conflicting";this.statusTypeMap={Missing:["gitImageSprite git-sprite-removal",b["Unstaged removal"]],Removed:["gitImageSprite git-sprite-removal",b["Staged removal"]],Modified:["gitImageSprite git-sprite-file",b["Unstaged change"]],Changed:["gitImageSprite git-sprite-file",
b["Staged change"]],Untracked:["gitImageSprite git-sprite-addition",b["Unstaged addition"]],Added:["gitImageSprite git-sprite-addition",b["Staged addition"]],Conflicting:["gitImageSprite git-sprite-conflict-file",b.Conflicting]}}a.prototype={destroy:function(){},interestedCategory:function(){},init:function(a){this.items=a},getModelType:function(a,b){return b},_markConflict:function(a){var b=this.getGroupData(a[1]);if(b)for(var c=0;c<b.length;c++)if(!b[c].Conflicting){for(var d=b[c].Location,e=[],
f=2;f<a.length;f++){var g=this.getGroupData(a[f]);g&&(g=this._findSameFile(d,g))&&e.push(g)}if(e.length===a.length-2){b[c].Conflicting=a[0];for(d=0;d<e.length;d++)e[d].Conflicting="Hide"}}},_findSameFile:function(a,b){for(var c=0;c<b.length;c++)if(!b[c].Conflicting&&a===b[c].Location)return b[c]},getGroupData:function(a){return this.items[a]},isStaged:function(a){for(var b=0;b<this.interestedStagedGroup.length;b++)if(a===this.interestedStagedGroup[b])return!0;return!1},getClass:function(a){return this.statusTypeMap[a][0]}};
return a}();e.GitStatusExplorer=function(){function e(b,c,d,f,g,h,j,k){this.parentId=g;this.registry=b;this.commandService=c;this.linkService=d;this.selection=f;this.parentId=g;this.toolbarId=h;this.selectionToolsId=j;this.checkbox=!1;this.actionScopeId=k;a.createExplorerCommands(c)}e.prototype.handleError=function(a){var b={Severity:"Error",HTML:!1};try{var c=JSON.parse(a.responseText);b.Message=c.DetailedMessage?c.DetailedMessage:c.Message}catch(d){b.Message=a.message}this.registry.getService("orion.page.message").setProgressResult(b);
a.status===404&&(this.initTitleBar(),this.displayCommit())};e.prototype.changedItem=function(){this.redisplay()};e.prototype.redisplay=function(){this.display(d.hash())};e.prototype.display=function(a){var c=this,e=this.registry.getService("orion.page.message"),f=new d.Deferred;e.showWhile(f,b["Loading..."]);this.registry.getService("orion.git.provider").getGitStatus(a).then(function(a){if(a.Type==="Status")c._model=new m,c._model.init(a),c.registry.getService("orion.git.provider").getGitClone(a.CloneLocation).then(function(b){var e=
b.Children;c.registry.getService("orion.git.provider").getGitCloneConfig(e[0].ConfigLocation).then(function(b){f.callback();b=b.Children;a.Clone=e[0];a.Clone.Config=[];for(var g=0;g<b.length;g++)(b[g].Key==="user.name"||b[g].Key==="user.email")&&a.Clone.Config.push(b[g]);b=d.byId("table");d.empty(b);c.initTitleBar(a,e[0]);c.displayUnstaged(a,e[0]);c.displayStaged(a,e[0]);c.displayCommits(e[0]);l.updateNavTools(c.registry,c,"pageActions","selectionTools",a)},function(a){f.callback();d.hitch(c,c.handleError)(a)})},
function(a){f.callback();d.hitch(c,c.handleError)(a)});e.setProgressMessage("")},function(a){f.callback();d.hitch(c,c.handleError)(a)})};e.prototype.initTitleBar=function(a,c){var d={};d.Name=b.Status+(a.RepositoryState&&a.RepositoryState.indexOf("REBASING")!==-1?b[" (Rebase in Progress)"]:"");d.Parents=[];d.Parents[0]={};d.Parents[0].Name=c.Name;d.Parents[0].Location=c.Location;d.Parents[0].ChildrenLocation=c.Location;d.Parents[1]={};d.Parents[1].Name="Repositories";h.setPageTarget({task:b.Status,
target:c,breadcrumbTarget:d,makeBreadcrumbLink:function(a,b){a.href="/git/git-repository.html#"+(b?b:"")},serviceRegistry:this.registry,commandService:this.commandService})};e.prototype._sortBlock=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=this._model.getGroupData(d);if(e)for(var f=0;f<e.length;f++){var g=this._model.getModelType(e[f],d);g&&b.push({name:e[f].Name,type:g,location:e[f].Location,path:e[f].Path,commitURI:e[f].Git.CommitLocation,indexURI:e[f].Git.IndexLocation,diffURI:e[f].Git.DiffLocation,
CloneLocation:this._model.items.CloneLocation,conflicting:g==="Conflicting"})}}b.sort(function(a,b){var c=a.name&&a.name.toLowerCase(),d=b.name&&b.name.toLowerCase();return c<d?-1:c>d?1:0});return b};e.prototype.displayUnstaged=function(e,g){var h=this,l=this._sortBlock(this._model.interestedUnstagedGroup),m=d.byId("table"),n=new f.Section(m,{id:"unstagedSection",title:l.length>0?b.Unstaged:b["No Unstaged Changes"],content:'<div id="unstagedNode"></div>',canHide:!0,onExpandCollapse:function(a,b){h.commandService.destroy(b.selectionNode);
a&&h.commandService.renderCommands(b.selectionNode.id,b.selectionNode,null,h,"button",{Clone:g})}});this.commandService.registerCommandContribution(n.actionsNode.id,"orion.explorer.expandAll",200);this.commandService.registerCommandContribution(n.actionsNode.id,"orion.explorer.collapseAll",300);this.commandService.registerCommandContribution(n.selectionNode.id,"eclipse.orion.git.showPatchCommand",100);this.commandService.registerCommandContribution(n.selectionNode.id,"eclipse.orion.git.stageCommand",
200);this.commandService.registerCommandContribution(n.selectionNode.id,"eclipse.orion.git.checkoutCommand",300);if(!this.unstagedOnce){if(!this.unstagedSelection)this.unstagedSelection=new c.Selection(this.registry,"orion.unstagedSection.selection"),this.commandService.registerSelectionService(n.selectionNode.id,this.unstagedSelection);this.registry.getService("orion.unstagedSection.selection").addEventListener("selectionChanged",function(a){var b=d.byId(n.selectionNode.id);b&&(h.commandService.destroy(b),
h.commandService.renderCommands(n.selectionNode.id,b,a.selections,h,"button",{Clone:g}))});this.unstagedOnce=!0}this.commandService.registerCommandContribution("DefaultActionWrapper","eclipse.orion.git.stageCommand",100);UnstagedModel=function(){function a(){}a.prototype={destroy:function(){},getRoot:function(a){a(l)},getChildren:function(a,b){if(a instanceof Array&&a.length>0)b(a);else if(k.isChange(a)){if(!a.children)a.children=[],a.children.push({diffUri:a.diffURI,Type:"Diff",parent:a});b(a.children)}else b([])},
getId:function(a){return a instanceof Array&&a.length>0?"unstagedRoot":k.isChange(a)?"unstaged"+a.name:"unstaged"+a.diffUri}};return a}();UnstagedRenderer=function(){function b(a,c){this._init(a);this.options=a;this.explorer=c;this.registry=a.registry}b.prototype=new a.SelectionRenderer;b.prototype.getCellElement=function(a,b,c){switch(a){case 0:if(k.isChange(b)){var a=document.createElement("td"),e=d.create("div",{"class":"sectionTableItem"},a);this.getExpandImage(c,e);var f=this.explorer.getNavDict()?
this.explorer.getNavDict().getGridNavHolder(b,!0):null,g=d.create("span",{"class":"sectionExplorerActions",id:"unstaged"+b.name+"DiffActionWrapper"},e,"last");window.setTimeout(function(){h.commandService.renderCommands("DefaultActionWrapper",g.id,b,h,"tool",null,f)},300);d.create("span",{"class":"gitImageSprite "+h._model.getClass(b.type)},e);d.create("span",{"class":"gitMainDescription"},e).textContent=b.name}else{a=document.createElement("td");a.colSpan=2;var e=d.create("div",{"class":"sectionTableItem"},
a),l=d.create("div",{"class":"sectionExplorerActions",id:"unstaged"+b.parent.name+"CompareWidgetActionWrapper"},e,"last");d.create("div",{id:"diffArea_"+b.diffUri,style:"height:420px; border:1px solid lightgray; overflow: hidden"},e);var f=this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(b,!0):null,m=b.parent.type==="Conflicting";window.setTimeout(function(){var a=new j.DefaultDiffProvider(h.registry);(new j.toggleableCompareContainer(h.registry,"diffArea_"+b.diffUri,"inline",
{gridRenderer:{navGridHolder:f},commandSpanId:l.id,diffProvider:a,hasConflicts:m,readonly:!0,editableInComparePage:!0,complexURL:b.diffUri,callback:function(){}})).startup(function(a){var c=420;a<c&&(c=a);d.style("diffArea_"+b.diffUri,"height",c+"px")})},300)}return a}};return b}();UnstagedNavigator=function(){function b(a,c,d,e){this.registry=a;this.checkbox=!1;this.parentId=d;this.selection=c;this.actionScopeId=e;this.renderer=new UnstagedRenderer({registry:this.registry,cachePrefix:"UnstagedNavigator",
checkbox:!1},this);this.createTree(this.parentId,new UnstagedModel,{setFocus:!0})}b.prototype=new a.Explorer;b.prototype.isRowSelectable=function(a){return k.isChange(a)};b.prototype.getItemCount=function(){return l.length};return b}();m=new UnstagedNavigator(this.registry,this.unstagedSelection,"unstagedNode");this.commandService.renderCommands(n.actionsNode.id,n.actionsNode.id,m,m,"button")};e.prototype.displayStaged=function(e,g){var h=this,l=this._sortBlock(this._model.interestedStagedGroup),
m=d.byId("table"),n=new f.Section(m,{id:"stagedSection",title:l.length>0?b.Staged:b["No Staged Changes"],content:'<div id="stagedNode"></div>',slideout:!0,canHide:!0,onExpandCollapse:function(a,b){h.commandService.destroy(b.selectionNode);a&&h.commandService.renderCommands(b.selectionNode.id,b.selectionNode,null,h,"button",{Clone:g})}});this.commandService.registerCommandContribution(n.actionsNode.id,"eclipse.orion.git.commitCommand",100);this.commandService.registerCommandContribution(n.actionsNode.id,
"orion.explorer.expandAll",200);this.commandService.registerCommandContribution(n.actionsNode.id,"orion.explorer.collapseAll",300);this.commandService.registerCommandContribution(n.selectionNode.id,"eclipse.orion.git.unstageCommand",100);if(!this.stagedOnce){if(!this.stagedSelection)this.stagedSelection=new c.Selection(this.registry,"orion.stagedSection.selection"),this.commandService.registerSelectionService(n.selectionNode.id,this.stagedSelection);this.registry.getService("orion.stagedSection.selection").addEventListener("selectionChanged",
function(a){var b=d.byId(n.selectionNode.id);b&&(h.commandService.destroy(b),h.commandService.renderCommands(n.selectionNode.id,b,a.selections,h,"button",{Clone:g}))});this.stagedOnce=!0}this.commandService.registerCommandContribution("DefaultActionWrapper","eclipse.orion.git.unstageCommand",100);StagedModel=function(){function a(){}a.prototype={destroy:function(){},getRoot:function(a){a(l)},getChildren:function(a,b){if(a instanceof Array&&a.length>0)b(a);else if(k.isChange(a)){if(!a.children)a.children=
[],a.children.push({diffUri:a.diffURI,Type:"Diff",parent:a});b(a.children)}else b([])},getId:function(a){return a instanceof Array&&a.length>0?"stagedRoot":k.isChange(a)?"staged"+a.name:"staged"+a.diffUri}};return a}();StagedRenderer=function(){function b(a,c){this._init(a);this.options=a;this.explorer=c;this.registry=a.registry}b.prototype=new a.SelectionRenderer;b.prototype.getCellElement=function(a,b,c){switch(a){case 0:if(k.isChange(b)){var a=document.createElement("td"),e=d.create("div",{"class":"sectionTableItem"},
a);this.getExpandImage(c,e);var f=this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(b,!0):null,g=d.create("span",{"class":"sectionExplorerActions",id:"staged"+b.name+"DiffActionWrapper"},e,"last");window.setTimeout(function(){h.commandService.renderCommands("DefaultActionWrapper",g.id,b,h,"tool",null,f)},300);d.create("span",{"class":"gitImageSprite "+h._model.getClass(b.type)},e);d.create("span",{"class":"gitMainDescription"},e).textContent=b.name}else{a=document.createElement("td");
a.colSpan=2;var e=d.create("div",{"class":"sectionTableItem"},a),l=d.create("div",{"class":"sectionExplorerActions",id:"staged"+b.parent.name+"CompareWidgetActionWrapper"},e,"last");d.create("div",{id:"diffArea_"+b.diffUri,style:"height:420px; border:1px solid lightgray; overflow: hidden"},e);var f=this.explorer.getNavDict()?this.explorer.getNavDict().getGridNavHolder(b,!0):null,m=b.parent.type==="Conflicting";window.setTimeout(function(){var a=new j.DefaultDiffProvider(h.registry);(new j.toggleableCompareContainer(h.registry,
"diffArea_"+b.diffUri,"inline",{gridRenderer:{navGridHolder:f},commandSpanId:l.id,diffProvider:a,hasConflicts:m,readonly:!0,complexURL:b.diffUri,callback:function(){}})).startup(function(a){var c=420;a<c&&(c=a);d.style("diffArea_"+b.diffUri,"height",c+"px")})},500)}return a}};return b}();StagedNavigator=function(){function b(a,c,d,f){this.registry=a;this.checkbox=!1;this.parentId=d;this.status=e;this.selection=c;this.actionScopeId=f;this.renderer=new StagedRenderer({registry:this.registry,cachePrefix:"StagedNavigator",
checkbox:!1},this);this.createTree(this.parentId,new StagedModel)}b.prototype=new a.Explorer;b.prototype.isRowSelectable=function(a){return k.isChange(a)};b.prototype.getItemCount=function(){return l.length};return b}();m=new StagedNavigator(this.registry,this.stagedSelection,"stagedNode");this.commandService.renderCommands(n.actionsNode.id,n.actionsNode.id,m,m,"button")};e.prototype.displayCommits=function(a){var c=this,e=d.byId("table"),g=new f.Section(e,{id:"commitSection",title:b.Commits,content:'<list id="commitNode" class="mainPadding"></list>',
slideout:!0,canHide:!0,preferenceService:this.registry.getService("orion.core.preference")}),h=g.createProgressMonitor();h.begin(b["Getting current branch"]);this.registry.getService("orion.git.provider").getGitBranch(a.BranchLocation).then(function(a){for(var a=a.Children,e,f=0;f<a.length;f++)if(a[f].Current){e=a[f];break}a=e.RemoteLocation.length===1&&e.RemoteLocation[0].Children.length===1;g.setTitle(d.string.substitute(b['Commits for "${0}" branch'],[e.Name]));c.commandService.registerCommandContribution(g.actionsNode.id,
"eclipse.orion.git.repositories.viewAllCommand",10);c.commandService.renderCommands(g.actionsNode.id,g.actionsNode.id,{ViewAllLink:"/git/git-log.html#"+e.CommitLocation+"?page=1",ViewAllLabel:b["See Full Log"],ViewAllTooltip:b["See the full log"]},c,"button");a&&(c.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.fetch",100),c.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.merge",100),c.commandService.registerCommandContribution(g.actionsNode.id,
"eclipse.orion.git.rebase",100),c.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.resetIndex",100),c.commandService.renderCommands(g.actionsNode.id,g.actionsNode.id,e.RemoteLocation[0].Children[0],c,"button"));c.commandService.registerCommandContribution(g.actionsNode.id,"eclipse.orion.git.push",100);c.commandService.renderCommands(g.actionsNode.id,g.actionsNode.id,e,c,"button");e.RemoteLocation[0]===null?(h.done(),c.renderNoCommit()):(h.worked(d.string.substitute(b['Getting commits for "${0}" branch'],
[e.Name])),a&&e.RemoteLocation[0].Children[0].CommitLocation?c.registry.getService("orion.git.provider").getLog(e.RemoteLocation[0].Children[0].CommitLocation+"?page=1&pageSize=20","HEAD").then(function(a){h.worked(b["Rendering commits"]);for(var d=a.Children.length,f=0;f<a.Children.length;f++)c.renderCommit(a.Children[f],!0,f);h.worked(b["Getting outgoing commits"]);c.registry.getService("orion.git.provider").getLog(e.CommitLocation+"?page=1&pageSize=20",e.RemoteLocation[0].Children[0].Id).then(function(a){h.worked(b["Rendering commits"]);
for(var e=0;e<a.Children.length;e++)c.renderCommit(a.Children[e],!1,e+d);d+=a.Children.length;d===0&&c.renderNoCommit();h.done()},function(a){h.done(a)})},function(a){h.done(a)}):c.registry.getService("orion.git.provider").doGitLog(e.CommitLocation+"?page=1&pageSize=20").then(function(a){h.worked(b["Rendering commits"]);for(var d=0;d<a.Children.length;d++)c.renderCommit(a.Children[d],!0,d);a.Children.length===0&&c.renderNoCommit();h.done()},function(a){h.done(a)}))})};e.prototype.renderNoCommit=function(){var a=
d.create("div",{"class":"sectionTableItem"},d.byId("commitNode")),a=d.create("div",null,a),a=d.create("div",{"class":"stretch"},a);d.create("span",{"class":"gitMainDescription"},a).textContent=b["The branch is up to date."];d.create("div",null,a);d.create("span",{"class":"gitSecondaryDescription"},a).textContent=b["You have no outgoing or incoming commits."]};e.prototype.renderCommit=function(a,b,c){c=d.create("div",{"class":"sectionTableItem "+(c%2?"darkTreeTableRow":"lightTreeTableRow")},d.byId("commitNode"));
c=d.create("div",null,c);d.create("span",{"class":"sectionIcon gitImageSprite "+(b?"git-sprite-outgoing_commit":"git-sprite-incoming_commit")},c);if(a.AuthorImage){var b=d.create("span",{"class":"git-author-icon"},c),e=new Image;e.src=a.AuthorImage;e.name=a.AuthorName;e.width=30;e.height=30;d.place(e,b,"first")}var b=d.create("div",{"class":"stretch"},c),f=d.create("a",{"class":"gitMainDescription navlinkonpage",href:"/git/git-commit.html#"+a.Location+"?page=1&pageSize=1"},b);d.place(document.createTextNode(a.Message),
f);var g,h=new orion.git.widgets.CommitTooltipDialog({commit:a,onMouseLeave:function(){dijit.popup.hide&&dijit.popup.hide(h);dijit.popup.close(h)},onMouseEnter:function(){window.clearTimeout(g)}});d.connect(f,"onmouseover",f,function(){window.clearTimeout(g);g=window.setTimeout(function(){dijit.popup.open({popup:h,around:f,orient:{BR:"TL",TR:"BL"}})},600)});d.connect(f,"onmouseout",f,function(){window.clearTimeout(g);g=window.setTimeout(function(){dijit.popup.hide&&dijit.popup.hide(h);dijit.popup.close(h)},
200)});d.create("div",null,b);d.create("span",{"class":"gitSecondaryDescription"},b).textContent=" (SHA "+a.Name+") by "+a.AuthorName+" on "+d.date.locale.format(new Date(a.Time),{formatLength:"short"});this.commandService.renderCommands(this.actionScopeId,d.create("div",{id:"branchActionsArea","class":"sectionTableItemActions"},c),a,this,"tool")};return e}();return e});var eclipse;
define("git/git-status2","i18n!git/nls/gitmessages,require,dojo,orion/bootstrap,orion/status,orion/progress,orion/commands,orion/dialogs,orion/selection,orion/fileClient,orion/operationsClient,orion/searchClient,orion/globalCommands,orion/git/gitStatusExplorer,orion/git/gitCommands,orion/git/gitClient,orion/ssh/sshTools,orion/links,orion/contentTypes,dojo/hash".split(","),function(b,d,a,c,f,e,h,g,j,k,l,m,n,o,q,p,r,s,x){c.startup().then(function(c){var w=c.serviceRegistry,t=c.preferences;new g.DialogService(w);
new j.Selection(w);new r.SshService(w);var c=new h.CommandService({serviceRegistry:w}),u=new l.OperationsClient(w);new f.StatusReportingService(w,u,"statusPane","notifications","notificationArea");new e.ProgressService(w,u);u=new s.TextLinkService({serviceRegistry:w});new p.GitService(w);var y=new k.FileClient(w);new x.ContentTypeService(w);var z=new m.Searcher({serviceRegistry:w,commandService:c,fileService:y}),A=new o.GitStatusExplorer(w,c,u,null,"artifacts","pageActions",null,"itemLevelCommands");
n.setPageCommandExclusions(["eclipse.git.status2","eclipse.git.status"]);n.generateBanner("orion-git-status",w,c,t,z,A);q.createFileCommands(w,c,A,"pageActions","selectionTools");q.createGitClonesCommands(w,c,A,"pageActions","selectionTools",y);q.createGitStatusCommands(w,c,A);c.addCommandGroup("pageActions","eclipse.gitGroup",100);c.registerCommandContribution("pageActions","eclipse.orion.git.showContent",300,null,!0,new h.CommandKeyBinding("e",!0,!0));c.registerCommandContribution("pageActions",
"eclipse.orion.git.resetCommand",100,"eclipse.gitGroup");c.registerCommandContribution("pageActions","eclipse.orion.git.rebaseContinueCommand",200,"eclipse.gitGroup");c.registerCommandContribution("pageActions","eclipse.orion.git.rebaseSkipPatchCommand",300,"eclipse.gitGroup");c.registerCommandContribution("pageActions","eclipse.orion.git.rebaseAbortCommand",400,"eclipse.gitGroup");w=new h.Command({name:b["View All"],id:"eclipse.orion.git.repositories.viewAllCommand",hrefCallback:function(a){return d.toUrl(a.items.ViewAllLink)},
visibleWhen:function(a){this.name=a.ViewAllLabel;this.tooltip=a.ViewAllTooltip;return a.ViewAllLabel&&a.ViewAllTooltip&&a.ViewAllLink}});c.addCommand(w);A.display(a.hash());a.subscribe("/dojo/hashchange",A,function(){A.display(a.hash())})})});