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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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


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

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


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


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


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


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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors:
 IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

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

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

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

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2010, 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
 Alex Lakatos - fix for bug#369781

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Contributors: IBM Corporation - initial API and implementation

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

 Copyright (c) 2010, 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 IBM Corporation and others. 
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and 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 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and 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, 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 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and 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) 2010, 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 IBM Corporation and others. All rights reserved. This
 program and the accompanying materials are made available under the terms of
 the Eclipse Public License v1.0 (http://www.eclipse.org/legal/epl-v10.html),
 and 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) 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) 2010, 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 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.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,c,b){(function(){if(typeof this.loadFirebugConsole=="function")this.loadFirebugConsole();else{this.console=this.console||{};for(var d="assert,count,debug,dir,dirxml,error,group,groupEnd,info,profile,profileEnd,time,timeEnd,trace,warn,log".split(","),g=0,h;h=d[g++];)console[h]||function(){var a=h+"";console[a]="log"in console?function(){var c=Array.apply({},arguments);c.unshift(a+":");console.log(c.join(" "))}:function(){};console[a]._fake=!0}()}typeof a=="undefined"&&(a={_scopeName:"dojo",
_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}});var f=a;typeof c=="undefined"&&(c={_scopeName:"dijit"});typeof b=="undefined"&&(b={_scopeName:"dojox"});if(!f._scopeArgs)f._scopeArgs=[a,c,b];f.global=this;f.config={isDebug:!1,debugAtAllCosts:!1};if(d=typeof djConfig!="undefined"?djConfig:typeof dojoConfig!="undefined"?dojoConfig:null)for(var i in d)f.config[i]=d[i];a.locale=f.config.locale;i="$Rev: 24595 $".match(/\d+/);a.version={major:1,minor:6,patch:1,flag:"",
revision:i?+i[0]:NaN,toString:function(){with(f.version)return major+"."+minor+"."+patch+flag+" ("+revision+")"}};typeof OpenAjax!="undefined"&&OpenAjax.hub.registerLibrary(a._scopeName,"http://dojotoolkit.org",f.version.toString());var k,l,m={};for(g in{toString:1}){k=[];break}a._extraNames=k=k||"hasOwnProperty,valueOf,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,constructor".split(",");l=k.length;a._mixin=function(a,c){var b,d,e;for(b in c)if(d=c[b],!(b in a)||a[b]!==d&&(!(b in m)||
m[b]!==d))a[b]=d;if(l&&c)for(e=0;e<l;++e)if(b=k[e],d=c[b],!(b in a)||a[b]!==d&&(!(b in m)||m[b]!==d))a[b]=d;return a};a.mixin=function(a,c){a||(a={});for(var b=1,d=arguments.length;b<d;b++)f._mixin(a,arguments[b]);return a};a._getProp=function(a,c,b){for(var b=b||f.global,d=0,e;b&&(e=a[d]);d++)d==0&&f._scopeMap[e]&&(e=f._scopeMap[e]),b=e in b?b[e]:c?b[e]={}:void 0;return b};a.setObject=function(a,c,b){var d=a.split("."),a=d.pop();return(b=f._getProp(d,!0,b))&&a?b[a]=c:void 0};a.getObject=function(a,
c,b){return f._getProp(a.split("."),c,b)};a.exists=function(a,c){return f.getObject(a,!1,c)!==void 0};a.eval=function(a){return f.global.eval?f.global.eval(a):eval(a)};f.deprecated=f.experimental=function(){}})();return{dojo:a,dijit:c,dojox:b}}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 f=b();dojo=f.dojo;dijit=f.dijit;dojox=f.dojox}})();
define("domReady",[],function(){function b(a){for(var c=0,b;b=a[c];c++)b(g)}function f(){var a=h,c=j;d&&(a.length&&(h=[],b(a)),i.resourcesDone&&c.length&&(j=[],b(c)))}function a(){d||(d=!0,l&&clearInterval(l),f())}function c(a){d?a(g):h.push(a);return c}var e=typeof window!=="undefined"&&window.document,d=!e,g=e?document:null,h=[],j=[],i=requirejs||require||{},k=i.resourcesReady,l;if("resourcesReady"in i)i.resourcesReady=function(a){k&&k(a);a&&f()};e&&(document.addEventListener?(document.addEventListener("DOMContentLoaded",
a,!1),window.addEventListener("load",a,!1)):window.attachEvent&&(window.attachEvent("onload",a),self===self.top&&(l=setInterval(function(){try{document.body&&(document.documentElement.doScroll("left"),a())}catch(c){}},30))),document.readyState==="complete"&&a());c.withResources=function(a){d&&i.resourcesDone?a(g):j.push(a);return c};c.version="1.0.0";c.load=function(a,b,d,e){e.isBuild?d(null):c(d)};return c});
define("dojo/lib/backCompat",["require","dojo/_base/_loader/bootstrap","domReady"],function(b,f,a){var c="_moduleHasPrefix,_loadPath,_loadUri,_loadUriAndCheck,loaded,_callLoaded,_getModuleSymbols,_loadModule,require,provide,platformRequire,requireIf,requireAfterIf,registerModulePath".split(","),e,d;for(e=0;e<c.length;)d=c[e++],f[d]=function(a){return function(){console.warn("dojo."+a+" not available when using an AMD loader.")}}(d);var g=function(a){var c=[],b;for(b=0;b<a.length;)c.push(a[b++]);return c},
h=function(a,c){return c?typeof c=="string"?function(){a[c]()}:function(){c.call(a)}:a};f.ready=f.addOnLoad=function(c,b){a(b?h(c,b):c)};f.addOnLoad(function(){f.postLoad=f.config.afterOnLoad=!0});if(c=f.config.addOnLoad)f.addOnLoad[c instanceof Array?"apply":"call"](f,c);var j=f._loaders=[],i=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,g(arguments));a(i)};j.splice=function(){Array.prototype.splice.apply(j,
g(arguments));a(i)};var k=f._unloaders=[];f.unloaded=function(){for(;k.length;)k.pop().call()};f._onto=function(a,c,b){a.push(b?h(c,b):c)};f._modulesLoaded=function(){};f.loadInit=function(a){a()};f.getL10nName=function(a,c,b){b=b?b.toLowerCase():f.locale;a="i18n!"+a.replace(/\./g,"/");return/root/i.test(b)?a+"/nls/"+c:a+"/nls/"+b+"/"+c};f.requireLocalization=function(a,c,d){b.vendor!="altoviso.com"&&(d=!d||d.toLowerCase()===f.locale?"root":d);return b(f.getL10nName(a,c,d))};f.i18n={getLocalization:f.requireLocalization,
normalizeLocale:function(a){a=a?a.toLowerCase():f.locale;a=="root"&&(a="ROOT");return a}};var l=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/,m=/^((([^\[:]+):)?([^@]+)@)?(\[([^\]]+)\]|([^\[:]*))(:([0-9]+))?$/;f._Url=function(){for(var a=arguments,c=[a[0]],b=1;b<a.length;b++)if(a[b]){var d=new f._Url(a[b]+""),c=new f._Url(c[0]+"");if(d.path==""&&!d.scheme&&!d.authority&&!d.query){if(d.fragment!=null)c.fragment=d.fragment;d=c}else if(!d.scheme&&(d.scheme=c.scheme,!d.authority&&(d.authority=
c.authority,d.path.charAt(0)!="/"))){for(var c=(c.path.substring(0,c.path.lastIndexOf("/")+1)+d.path).split("/"),e=0;e<c.length;e++)c[e]=="."?e==c.length-1?c[e]="":(c.splice(e,1),e--):e>0&&!(e==1&&c[0]=="")&&c[e]==".."&&c[e-1]!=".."&&(e==c.length-1?(c.splice(e,1),c[e-1]=""):(c.splice(e-1,2),e-=2));d.path=c.join("/")}c=[];d.scheme&&c.push(d.scheme,":");d.authority&&c.push("//",d.authority);c.push(d.path);d.query&&c.push("?",d.query);d.fragment&&c.push("#",d.fragment)}this.uri=c.join("");a=this.uri.match(l);
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(m),this.user=a[3]||null,this.password=a[4]||null,this.host=a[6]||a[7],this.port=a[9]||null};f._Url.prototype.toString=function(){return this.uri};f.moduleUrl=function(a,c){if(!a)return null;var a=a.replace(/\./g,"/")+(c?"/"+c:""),d="",e=a.match(/(.+)(\.[^\/]*)$/);e&&(a=e[1],d=e[2]);return new f._Url(b.nameToUrl(a,
d))};return f});
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"),e=/dojo(\.xd)?\.js(\W|$)/i,d=0;d<c.length;d++){var g=c[d].getAttribute("src");if(g){var h=g.match(e);if(h){if(!a.config.baseUrl)a.config.baseUrl=g.substring(0,h.index);if(c=c[d].getAttribute("djConfig")||c[d].getAttribute("data-dojo-config")){var c=eval("({ "+
c+" })"),f;for(f in c)b.config[f]=c[f]}break}}}a.baseUrl=a.config.baseUrl;f=navigator;c=f.userAgent;e=f.appVersion;d=parseFloat(e);if(c.indexOf("Opera")>=0)a.isOpera=d;if(c.indexOf("AdobeAIR")>=0)a.isAIR=1;a.isKhtml=e.indexOf("Konqueror")>=0?d:0;a.isWebKit=parseFloat(c.split("WebKit/")[1])||void 0;a.isChrome=parseFloat(c.split("Chrome/")[1])||void 0;a.isMac=e.indexOf("Macintosh")>=0;if((g=Math.max(e.indexOf("WebKit"),e.indexOf("Safari"),0))&&!b.isChrome)if(a.isSafari=parseFloat(e.split("Version/")[1]),
!a.isSafari||parseFloat(e.substr(g+7))<=419.3)a.isSafari=2;if(c.indexOf("Gecko")>=0&&!a.isKhtml&&!a.isWebKit)a.isMozilla=a.isMoz=d;if(a.isMoz)a.isFF=parseFloat(c.split("Firefox/")[1]||c.split("Minefield/")[1])||void 0;if(document.all&&!a.isOpera&&(a.isIE=parseFloat(e.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?f.userLanguage:f.language).toLowerCase();a._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];a._xhrObj=function(){var c,d;if(!b.isIE||!b.config.ieForceActiveXXhr)try{c=new XMLHttpRequest}catch(e){}if(!c)for(var h=0;h<3;++h){var g=a._XMLHTTP_PROGIDS[h];try{c=new ActiveXObject(g)}catch(i){d=i}if(c){a._XMLHTTP_PROGIDS=[g];break}}if(!c)throw Error("XMLHTTP not available: "+d);return c};a._isDocumentOk=function(a){var a=a.status||0,c=location.protocol;return a>=200&&
a<300||a==304||a==1223||!a&&(c=="file:"||c=="chrome:"||c=="chrome-extension:"||c=="app:")};var i=window.location+"",k=(f=document.getElementsByTagName("base"))&&f.length>0;a._getText=function(c,d){var e=a._xhrObj();!k&&b._Url&&(c=(new b._Url(i,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 h=Error("Unable to load "+c+" status:"+e.status);h.status=e.status;h.responseText=
e.responseText;throw h;}}catch(g){if(d)return null;throw g;}return e.responseText};var l=window,m=function(a,c){var b=l.attachEvent||l.addEventListener,a=l.attachEvent?a:a.substring(2);b(a,function(){c.apply(l,arguments)},!1)};a._windowUnloaders=[];a.windowUnloaded=function(){for(var c=a._windowUnloaders;c.length;)c.pop()();a=null};var n=0;a.addOnWindowUnload=function(c,b){a._onto(a._windowUnloaders,c,b);n||(n=1,m("onunload",a.windowUnloaded))};var o=0;a.addOnUnload=function(c,d){a._onto(a._unloaders,
c,d);o||(o=1,m("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,e=1,d=document.createStyleSheet();if(b.isIE>=8)c=1,e=a.length;for(;c<e;++c)d.addRule("v\\:"+a[c],"behavior:url(#default#VML); display:inline-block")})()}catch(f){}}(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 f=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 f.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 d=1,e=arguments.length;d<e;d++)b._mixin(a.prototype,arguments[d]);return a};b._hitchArgs=function(a,c){var d=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,d.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,d){a.prototype=c;var e=new a;a.prototype=null;d&&b._mixin(e,d);return e}}();var a=function(a,c,b){return(b||[]).concat(Array.prototype.slice.call(a,c||0))},c=function(a,c,b){b=b||[];for(c=
c||0;c<a.length;c++)b.push(a[c]);return b};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 e=b._extraNames,d=e.length,g={};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,h,f,m;if(b.isArray(a)){c=[];for(h=0,f=a.length;h<
f;++h)h in a&&c.push(b.clone(a[h]))}else c=a.constructor?new a.constructor:{};for(m in a)if(f=a[m],!(m in c)||c[m]!==f&&(!(m in g)||g[m]!==f))c[m]=b.clone(f);if(d)for(h=0;h<d;++h)if(m=e[h],f=a[m],!(m in c)||c[m]!==f&&(!(m in g)||g[m]!==f))c[m]=f;return c};b.trim=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var h=/\{([^\}]+)\}/g;b.replace=function(a,c,d){return a.replace(d||h,b.isFunction(c)?c:function(a,d){return b.getObject(d,
!1,c)})}})();return b});
define("dojo/_base/array",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var f=function(a,e,d){return[typeof a=="string"?a.split(""):a,e||b.global,typeof d=="string"?new Function("item","index","array",d):d]},a=function(a,b,d,g){for(var d=f(b,g,d),b=d[0],g=0,h=b.length;g<h;++g){var j=!!d[2].call(d[1],b[g],g,b);if(a^j)return j}return a};b.mixin(b,{indexOf:function(a,b,d,g){var h=1,f=a.length||0,i=0;g&&(i=f-1,h=f=-1);d!=void 0&&(i=d);if(g&&i>f||i<f)for(;i!=f;i+=h)if(a[i]==b)return i;
return-1},lastIndexOf:function(a,e,d){return b.indexOf(a,e,d,!0)},forEach:function(a,b,d){if(a&&a.length)for(var b=f(a,d,b),a=b[0],d=0,g=a.length;d<g;++d)b[2].call(b[1],a[d],d,a)},every:function(c,b,d){return a(!0,c,b,d)},some:function(c,b,d){return a(!1,c,b,d)},map:function(a,b,d,g){for(var b=f(a,d,b),a=b[0],g=g?new g:[],d=0,h=a.length;d<h;++d)g.push(b[2].call(b[1],a[d],d,a));return g},filter:function(a,b,d){for(var b=f(a,d,b),a=b[0],d=[],g=0,h=a.length;g<h;++g)b[2].call(b[1],a[g],g,a)&&d.push(a[g]);
return d}})})();return b});
define("dojo/_base/declare",["dojo/lib/kernel","dojo/_base/lang","dojo/_base/array"],function(b){(function(){function f(a,c){throw Error("declare"+(c?" "+c:"")+": "+a);}function a(a,c,b){var d,e,h,g,i,j,k,l=this._inherited=this._inherited||{};typeof a=="string"&&(d=a,a=c,c=b);b=0;g=a.callee;(d=d||g.nom)||f("can't deduce a name to call inherited()",this.declaredClass);i=this.constructor._meta;h=i.bases;k=l.p;if(d!=u){if(l.c!==g&&(k=0,j=h[0],i=j._meta,i.hidden[d]!==g)){(e=i.chains)&&typeof e[d]=="string"&&
f("calling chained method with inherited: "+d,this.declaredClass);do if(i=j._meta,e=j.prototype,i&&(e[d]===g&&e.hasOwnProperty(d)||i.hidden[d]===g))break;while(j=h[++k]);k=j?k:-1}if(j=h[++k])if(e=j.prototype,j._meta&&e.hasOwnProperty(d))b=e[d];else{g=r[d];do if(e=j.prototype,(b=e[d])&&(j._meta?e.hasOwnProperty(d):b!==g))break;while(j=h[++k])}b=j&&b||r[d]}else{if(l.c!==g&&(k=0,(i=h[0]._meta)&&i.ctor!==g)){e=i.chains;for((!e||e.constructor!=="manual")&&f("calling chained constructor with inherited",
this.declaredClass);j=h[++k];)if((i=j._meta)&&i.ctor===g)break;k=j?k:-1}for(;j=h[++k];)if(b=(i=j._meta)?i.ctor:j)break;b=j&&b}l.c=b;l.p=k;if(b)return c===!0?b:b.apply(this,c||a)}function c(a,c){return typeof a=="string"?this.inherited(a,c,!0):this.inherited(a,!0)}function e(a){for(var c=this.constructor._meta.bases,b=0,d=c.length;b<d;++b)if(c[b]===a)return!0;return this instanceof a}function d(a,c){var b,d=0,e=o._extraNames.length;for(b in c)b!=u&&c.hasOwnProperty(b)&&(a[b]=c[b]);for(;d<e;++d)b=o._extraNames[d],
b!=u&&c.hasOwnProperty(b)&&(a[b]=c[b])}function g(a,c){var b,d,e=0,h=o._extraNames.length;for(b in c)if(d=c[b],(d!==r[b]||!(b in r))&&b!=u){if(q.call(d)=="[object Function]")d.nom=b;a[b]=d}for(;e<h;++e)if(b=o._extraNames[e],d=c[b],(d!==r[b]||!(b in r))&&b!=u){if(q.call(d)=="[object Function]")d.nom=b;a[b]=d}return a}function h(a){g(this.prototype,a);return this}function j(a,c){return function(){var v;var b=arguments,d=b,e=b[0],h,g;g=a.length;var i;if(!(this instanceof b.callee))return n(b);if(c&&
(e&&e.preamble||this.preamble)){i=Array(a.length);i[0]=b;for(h=0;;){if(e=b[0])(e=e.preamble)&&(b=e.apply(this,b)||b);e=a[h].prototype;(e=e.hasOwnProperty("preamble")&&e.preamble)&&(b=e.apply(this,b)||b);if(++h==g)break;i[h]=b}}for(h=g-1;h>=0;--h)e=a[h],(v=(g=e._meta)?g.ctor:e,e=v)&&e.apply(this,i?i[h]:b);(e=this.postscript)&&e.apply(this,d)}}function i(a,c){return function(){var b=arguments,d=b,e=b[0];if(!(this instanceof b.callee))return n(b);if(c){if(e)(e=e.preamble)&&(d=e.apply(this,d)||d);(e=
this.preamble)&&e.apply(this,d)}a&&a.apply(this,b);(e=this.postscript)&&e.apply(this,b)}}function k(a){return function(){var v;var c=arguments,b=0,d,e;if(!(this instanceof c.callee))return n(c);for(;d=a[b];++b)if(v=(e=d._meta)?e.ctor:d,d=v){d.apply(this,c);break}(d=this.postscript)&&d.apply(this,c)}}function l(a,c,b){return function(){var d,e,h=0,g=1;b&&(h=c.length-1,g=-1);for(;d=c[h];h+=g)e=d._meta,(d=(e?e.hidden:d.prototype)[a])&&d.apply(this,arguments)}}function m(a){t.prototype=a.prototype;a=
new t;t.prototype=null;return a}function n(a){var c=a.callee,b=m(c);c.apply(b,a);return b}var o=b,p=o._mixin,r=Object.prototype,q=r.toString,t=new Function,s=0,u="constructor";o.declare=function(b,v,C){typeof b!="string"&&(C=v,v=b,b="");var C=C||{},n,x,A,y,t,E,D,F=1,I=v;if(q.call(v)=="[object Array]"){F=b;A=[];y=[{cls:0,refs:[]}];E={};for(var G=1,z=v.length,M=0,H,L,B,J;M<z;++M){(H=v[M])?q.call(H)!="[object Function]"&&f("mixin #"+M+" is not a callable constructor.",F):f("mixin #"+M+" is unknown. Did you use dojo.require to pull it in?",
F);L=H._meta?H._meta.bases:[H];B=0;for(H=L.length-1;H>=0;--H){J=L[H].prototype;if(!J.hasOwnProperty("declaredClass"))J.declaredClass="uniqName_"+s++;J=J.declaredClass;E.hasOwnProperty(J)||(E[J]={count:0,refs:[],cls:L[H]},++G);J=E[J];B&&B!==J&&(J.refs.push(B),++B.count);B=J}++B.count;y[0].refs.push(B)}for(;y.length;){B=y.pop();A.push(B.cls);for(--G;x=B.refs,x.length==1;){B=x[0];if(!B||--B.count){B=0;break}A.push(B.cls);--G}if(B)for(M=0,z=x.length;M<z;++M)B=x[M],--B.count||y.push(B)}G&&f("can't build consistent linearization",
F);H=v[0];A[0]=H?H._meta&&H===A[A.length-H._meta.bases.length]?H._meta.bases.length:1:0;E=A;A=E[0];F=E.length-A;v=E[F]}else E=[0],v?q.call(v)=="[object Function]"?(A=v._meta,E=E.concat(A?A.bases:v)):f("base class is not a callable constructor.",b):v!==null&&f("unknown base class. Did you use dojo.require to pull it in?",b);if(v)for(x=F-1;;--x){n=m(v);if(!x)break;A=E[x];(A._meta?d:p)(n,A.prototype);y=new Function;y.superclass=v;y.prototype=n;v=n.constructor=y}else n={};g(n,C);A=C.constructor;if(A!==
r.constructor)A.nom=u,n.constructor=A;for(x=F-1;x;--x)(A=E[x]._meta)&&A.chains&&(D=p(D||{},A.chains));n["-chains-"]&&(D=p(D||{},n["-chains-"]));A=!D||!D.hasOwnProperty(u);E[0]=y=D&&D.constructor==="manual"?k(E):E.length==1?i(C.constructor,A):j(E,A);y._meta={bases:E,hidden:C,chains:D,parents:I,ctor:C.constructor};y.superclass=v&&v.prototype;y.extend=h;y.prototype=n;n.constructor=y;n.getInherited=c;n.inherited=a;n.isInstanceOf=e;if(b)n.declaredClass=b,o.setObject(b,y);if(D)for(t in D)if(n[t]&&typeof D[t]==
"string"&&t!=u)A=n[t]=l(t,E,D[t]==="after"),A.nom=t;return y};o.safeMixin=g})();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),e,c=[].concat(c);for(e in c)e in b||c[e].apply(this,arguments);return a}},add:function(f,a,c){var f=f||b.global,e=f[a];if(!e||!e._listeners){var d=b._listener.getDispatcher();d.target=e;d._listeners=[];e=f[a]=d}return e._listeners.push(c)},remove:function(f,a,c){(f=(f||b.global)[a])&&
f._listeners&&c--&&delete f._listeners[c]}};b.connect=function(f,a,c,e,d){var g=arguments,h=[],j=0;h.push(b.isString(g[0])?null:g[j++],g[j++]);var i=g[j+1];h.push(b.isString(i)||b.isFunction(i)?g[j++]:null,g[j++]);for(i=g.length;j<i;j++)h.push(g[j]);return b._connect.apply(this,h)};b._connect=function(f,a,c,e){var d=b._listener,c=d.add(f,a,b.hitch(c,e));return[f,a,c,d]};b.disconnect=function(f){f&&f[0]!==void 0&&(b._disconnect.apply(this,f),delete f[0])};b._disconnect=function(b,a,c,e){e.remove(b,
a,c)};b._topics={};b.subscribe=function(f,a,c){return[f,b._listener.add(b._topics,f,b.hitch(a,c))]};b.unsubscribe=function(f){f&&b._listener.remove(b._topics,f[0],f[1])};b.publish=function(f,a){var c=b._topics[f];c&&c.apply(this,a||[])};b.connectPublisher=function(f,a,c){var e=function(){b.publish(f,arguments)};return c?b.connect(a,c,e):b.connect(a,e)};return b.connect});
define("dojo/_base/Deferred",["dojo/lib/kernel","dojo/_base/lang"],function(b){(function(){var f=function(){},a=Object.freeze||function(){},c=function(){var a,c,b,h,f=!1,i=function(){};return function(k){if(f)a?(c.next={task:k,next:null},c=c.next):c=a={task:k,next:null};else{f=!0;do try{for(;k;){k();if(b)a?c.next=b:a=b,c=h;a?(b=a.next,h=c,k=a.task,a=c=null):k=null}f=!1}catch(l){k=i,console.error(l)}while(f)}}}();b.Deferred=function(e){function d(a){if(j)throw Error("This deferred has already been resolved");
h=a;j=!0;c(g)}function g(){for(var a;!a&&l;){var c=l;l=l.next;if(a=c.progress==f)j=!1;var d=i?c.error:c.resolved;if(d)try{var e=d(h);e&&typeof e.then==="function"?e.then(b.hitch(c.deferred,"resolve"),b.hitch(c.deferred,"reject"),b.hitch(c.deferred,"progress")):(d=a&&e===void 0,a&&!d&&(i=e instanceof Error),c.deferred[d&&i?"reject":"resolve"](d?h:e))}catch(g){c.deferred.reject(g)}else i?c.deferred.reject(h):c.deferred.resolve(h)}}var h,j,i,k,l,m=this.promise={};this.resolve=this.callback=function(a){this.fired=
0;this.results=[a,null];d(a)};this.reject=this.errback=function(a){i=!0;this.fired=1;d(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 c=l;c;){var b=c.progress;b&&b(a);c=c.next}};this.addCallbacks=function(a,c){this.then(a,c,f);return this};this.then=m.then=function(a,d,e){var h=e==f?this:new b.Deferred(m.cancel),a={resolved:a,error:d,progress:e,deferred:h};l?k=k.next=a:l=k=a;j&&c(g);return h.promise};var n=
this;this.cancel=m.cancel=function(){if(!j){var a=e&&e(n);if(!j)a instanceof Error||(a=Error(a)),a.log=!1,n.reject(a)}};a(m)};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,e){return b&&typeof b.then==="function"?b.then(a,c,e):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(f,a,c){if(f===void 0)return"undefined";var e=typeof f;if(e=="number"||e=="boolean")return f+"";if(f===null)return"null";if(b.isString(f))return b._escapeString(f);var d=
arguments.callee,g,c=c||"",h=a?c+b.toJsonIndentStr:"";g=f.__json__||f.json;if(b.isFunction(g)&&(g=g.call(f),f!==g))return d(g,a,h);if(f.nodeType&&f.cloneNode)throw Error("Can't serialize DOM nodes");g=a?" ":"";var j=a?"\n":"";if(b.isArray(f))return"["+b.map(f,function(c){c=d(c,a,h);typeof c!="string"&&(c="undefined");return j+h+c}).join(","+g)+j+c+"]";if(e=="function")return null;var e=[],i;for(i in f){var k,l;if(typeof i=="number")k='"'+i+'"';else if(typeof i=="string")k=b._escapeString(i);else continue;
l=d(f[i],a,h);typeof l=="string"&&e.push(j+h+k+":"+g+l)}return"{"+e.join(","+g)+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,e){this.r=b;this.g=a;this.b=c;this.a=e},setColor:function(f){b.isString(f)?b.colorFromString(f,this):b.isArray(f)?b.colorFromArray(f,this):(this._set(f.r,f.g,f.b,f.a),f 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(f,a,c,e){var d=e||new b.Color;b.forEach(["r","g","b","a"],function(b){d[b]=f[b]+(a[b]-f[b])*c;b!="a"&&(d[b]=Math.round(d[b]))});return d.sanitize()};b.colorFromRgb=function(f,a){var c=f.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return c&&b.colorFromArray(c[1].split(/\s*,\s*/),a)};b.colorFromHex=function(f,
a){var c=a||new b.Color,e=f.length==4?4:8,d=(1<<e)-1,f=Number("0x"+f.substr(1));if(isNaN(f))return null;b.forEach(["b","g","r"],function(a){var b=f&d;f>>=e;c[a]=e==4?17*b:b});c.a=1;return c};b.colorFromArray=function(f,a){var c=a||new b.Color;c._set(Number(f[0]),Number(f[1]),Number(f[2]),Number(f[3]));if(isNaN(c.a))c.a=1;return c.sanitize()};b.colorFromString=function(f,a){var c=b.Color.named[f];return c&&b.colorFromArray(c,a)||b.colorFromRgb(f,a)||b.colorFromHex(f,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(f,a){b.global=f;b.doc=a};b.withGlobal=function(f,a,c,e){var d=b.global;try{return b.global=f,b.withDoc.call(null,f.document,a,c,e)}finally{b.global=d}};b.withDoc=function(f,a,c,e){var d=b.doc,g=b._bodyLtr,h=b.isQuirks;try{return b.doc=f,delete b._bodyLtr,b.isQuirks=b.doc.compatMode=="BackCompat",c&&typeof a=="string"&&
(a=c[a]),a.apply(c,e||[])}finally{b.doc=d;delete b._bodyLtr;if(g!==void 0)b._bodyLtr=g;b.isQuirks=h}};return b});
define("dojo/_base/event",["dojo/lib/kernel","dojo/_base/connect"],function(b){(function(){var f=b._event_listener={add:function(a,c,d){if(a){c=f._normalizeEventName(c);d=f._fixCallback(c,d);if(!b.isIE&&(c=="mouseenter"||c=="mouseleave"))var e=d,c=c=="mouseenter"?"mouseover":"mouseout",d=function(c){if(!b.isDescendant(c.relatedTarget,a))return e.call(this,c)};a.addEventListener(c,d,!1);return d}},remove:function(a,c,d){if(a){c=f._normalizeEventName(c);if(!b.isIE&&(c=="mouseenter"||c=="mouseleave"))c=
c=="mouseenter"?"mouseover":"mouseout";a.removeEventListener(c,d,!1)}},_normalizeEventName:function(a){return a.slice(0,2)=="on"?a.slice(2):a},_fixCallback:function(a,c){return a!="keypress"?c:function(a){return c.call(this,f._fixEvent(a,this))}},_fixEvent:function(a){switch(a.type){case "keypress":f._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,c){return f._fixEvent(a,c)};b.stopEvent=function(a){a.preventDefault();a.stopPropagation()};var a=b._listener;b._connect=function(c,d,e,h,g){g=c&&(c.nodeType||c.attachEvent||c.addEventListener)?g?2:1:0;e=[b._listener,f,a][g].add(c,d,b.hitch(e,h));return[c,d,e,g]};b._disconnect=function(c,d,e,h){[b._listener,f,a][h].remove(c,d,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,c){return a.button&c},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,c){return a.button==c},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 e=function(a,c){try{return a.keyCode=c}catch(b){return 0}},d=b._listener,g=b._ieListenersName="_"+b._scopeName+"_listeners";if(!b.config._allow_leaks)var a=d=b._ie_listener={handlers:[],add:function(a,c,d){var a=a||b.global,e=a[c];if(!e||!e[g]){var f=b._getIeDispatcher();f.target=e&&h.push(e)-1;f[g]=[];e=a[c]=f}return e[g].push(h.push(d)-1)},remove:function(a,c,d){var i;i=(a=(a||b.global)[c])&&a[g],
c=i;a&&c&&d--&&(delete h[c[d]],delete c[d])}},h=d.handlers;b.mixin(f,{add:function(a,c,b){if(a){c=f._normalizeEventName(c);if(c=="onkeypress"){var e=a.onkeydown;if(!e||!e[g]||!e._stealthKeydownHandle){var h=f.add(a,"onkeydown",f._stealthKeyDown),e=a.onkeydown;e._stealthKeydownHandle=h;e._stealthKeydownRefs=1}else e._stealthKeydownRefs++}return d.add(a,c,f._fixCallback(b))}},remove:function(a,c,b){c=f._normalizeEventName(c);d.remove(a,c,b);if(c=="onkeypress")c=a.onkeydown,--c._stealthKeydownRefs<=
0&&(d.remove(a,"onkeydown",c._stealthKeydownHandle),delete c._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 d=a.srcElement,d=d&&d.ownerDocument||document,d=b.isIE<6||d.compatMode=="BackCompat"?d.body:d.documentElement,e=b._getIeDocumentElementOffset();
a.pageX=a.clientX+b._fixIeBiDiScrollLeft(d.scrollLeft||0)-e.x;a.pageY=a.clientY+(d.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=f._stopPropagation,a.preventDefault=f._preventDefault;return f._fixKeys(a)},_fixKeys:function(a){switch(a.type){case "keypress":var c="charCode"in a?a.charCode:a.keyCode;c==10?(c=0,a.keyCode=13):c==13||c==27?c=0:c==3&&(c=99);a.charCode=c;f._setKeyChar(a)}return a},
_stealthKeyDown:function(a){var c=a.currentTarget.onkeypress;if(c&&c[g]){var d=a.keyCode,h=(d!=13||b.isIE>=9&&!b.isQuirks)&&d!=32&&d!=27&&(d<48||d>90)&&(d<96||d>111)&&(d<186||d>192)&&(d<219||d>222);if(h||a.ctrlKey){h=h?0:d;if(a.ctrlKey)if(d==3||d==13)return;else h>95&&h<106?h-=48:!a.shiftKey&&h>=65&&h<=90?h+=32:h=f._punctMap[h]||h;d=f._synthesizeEvent(a,{type:"keypress",faux:!0,charCode:h});c.call(a.currentTarget,d);if(b.isIE<9||b.isIE&&b.isQuirks)a.cancelBubble=d.cancelBubble;a.returnValue=d.returnValue;
e(a,d.keyCode)}}},_stopPropagation:function(){this.cancelBubble=!0},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;this.ctrlKey&&e(this,0);this.returnValue=!1}});b.stopEvent=b.isIE<9||b.isQuirks?function(a){a=a||window.event;f._stopPropagation.call(a);f._preventDefault.call(a)}:b.stopEvent}f._synthesizeEvent=function(a,c){var d=b.mixin({},a,c);f._setKeyChar(d);d.preventDefault=function(){a.preventDefault()};d.stopPropagation=function(){a.stopPropagation()};return d};b.isOpera&&b.mixin(f,
{_fixEvent:function(a){switch(a.type){case "keypress":var c=a.which;c==3&&(c=99);c=c<41&&!a.shiftKey?0:c;a.ctrlKey&&!a.shiftKey&&c>=65&&c<=90&&(c+=32);return f._synthesizeEvent(a,{charCode:c})}return a}});if(b.isWebKit)f._add=f.add,f._remove=f.remove,b.mixin(f,{add:function(a,c,b){if(a){var d=f._add(a,c,b);if(f._normalizeEventName(c)=="keypress")d._stealthKeyDownHandle=f._add(a,"keydown",function(a){var c=a.keyCode,d=c!=13&&c!=32&&(c<48||c>90)&&(c<96||c>111)&&(c<186||c>192)&&(c<219||c>222);if(d||
a.ctrlKey){d=d?0:c;if(a.ctrlKey)if(c==3||c==13)return;else d>95&&d<106?d-=48:!a.shiftKey&&d>=65&&d<=90?d+=32:d=f._punctMap[d]||d;c=f._synthesizeEvent(a,{type:"keypress",faux:!0,charCode:d});b.call(a.currentTarget,c)}});return d}},remove:function(a,c,b){a&&(b._stealthKeyDownHandle&&f._remove(a,"keydown",b._stealthKeyDownHandle),f._remove(a,c,b))},_fixEvent:function(a){switch(a.type){case "keypress":if(a.faux)break;var c=a.charCode;return f._synthesizeEvent(a,{charCode:c>=32?c:0,faux:!0})}return a}})})();
if(b.isIE)b._ieDispatcher=function(f,a){var c=Array.prototype,e=b._ie_listener.handlers,d=f.callee,g=d[b._ieListenersName],d=(d=e[d.target])&&d.apply(a,f),g=[].concat(g),h;for(h in g){var j=e[g[h]];!(h in c)&&j&&j.apply(a,f)}return d},b._getIeDispatcher=function(){return new Function(b._scopeName+"._ieDispatcher(arguments, this)")},b._event_listener._fixCallback=function(f){var a=b._event_listener._fixEvent;return function(c){return f.call(this,a(c,this))}};return b.connect});
define("dojo/_base/html",["dojo/lib/kernel","dojo/_base/lang"],function(b){try{document.execCommand("BackgroundImageCache",!1,!0)}catch(f){}b.byId=b.isIE?function(a,c){if(typeof a!="string")return a;var e=c||b.doc,d=e.getElementById(a);if(d&&(d.attributes.id.value==a||d.id==a))return d;else{e=e.all[a];if(!e||e.nodeName)e=[e];for(var g=0;d=e[g++];)if(d.attributes&&d.attributes.id&&d.attributes.id.value==a||d.id==a)return d}}:function(a,c){return(typeof a=="string"?(c||b.doc).getElementById(a):a)||
null};(function(){var a=b.byId,c=null,e;b.addOnWindowUnload(function(){c=null});b._destroyElement=b.destroy=function(b){b=a(b);try{var d=b.ownerDocument;if(!c||e!=d)c=d.createElement("div"),e=d;c.appendChild(b.parentNode?b.parentNode.removeChild(b):b);c.innerHTML=""}catch(h){}};b.isDescendant=function(c,b){try{c=a(c);for(b=a(b);c;){if(c==b)return!0;c=c.parentNode}}catch(d){}return!1};b.setSelectable=function(c,d){c=a(c);if(b.isMozilla)c.style.MozUserSelect=d?"":"none";else if(b.isKhtml||b.isWebKit)c.style.KhtmlUserSelect=
d?"auto":"none";else if(b.isIE){var e=c.unselectable=d?"":"on";b.query("*",c).forEach("item.unselectable = '"+e+"'")}};var d=function(a,c){var b=c.parentNode;b&&b.insertBefore(a,c)};b.place=function(c,e,h){e=a(e);typeof c=="string"&&(c=/^\s*</.test(c)?b._toDom(c,e.ownerDocument):a(c));if(typeof h=="number"){var g=e.childNodes;!g.length||g.length<=h?e.appendChild(c):d(c,g[h<0?0:h])}else switch(h){case "before":d(c,e);break;case "after":h=c;(g=e.parentNode)&&(g.lastChild==e?g.appendChild(h):g.insertBefore(h,
e.nextSibling));break;case "replace":e.parentNode.replaceChild(c,e);break;case "only":b.empty(e);e.appendChild(c);break;case "first":if(e.firstChild){d(c,e.firstChild);break}default:e.appendChild(c)}return c};b.boxModel="content-box";if(b.isIE)b.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";var g;g=b.isWebKit?function(a){var c;if(a.nodeType==1){var b=a.ownerDocument.defaultView;c=b.getComputedStyle(a,null);if(!c&&a.style)a.style.display="",c=b.getComputedStyle(a,null)}return c||
{}}:b.isIE?function(a){return a.nodeType==1?a.currentStyle:{}}:function(a){return a.nodeType==1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}};b.getComputedStyle=g;b._toPixelValue=b.isIE?function(a,c){if(!c)return 0;if(c=="medium")return 4;if(c.slice&&c.slice(-2)=="px")return parseFloat(c);with(a){var b=style.left,d=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=c,c=style.pixelLeft}catch(e){c=0}style.left=b;runtimeStyle.left=d}return c}:function(a,c){return parseFloat(c)||
0};var h=b._toPixelValue,f=function(a,c){try{return a.filters.item("DXImageTransform.Microsoft.Alpha")}catch(b){return c?{}:null}};b._getOpacity=b.isIE<9?function(a){try{return f(a).Opacity/100}catch(c){return 1}}:function(a){return g(a).opacity};b._setOpacity=b.isIE<9?function(a,c){var d=c*100,e=c==1;a.style.zoom=e?"":1;if(f(a))f(a,1).Opacity=d;else{if(e)return c;a.style.filter+=" progid:DXImageTransform.Microsoft.Alpha(Opacity="+d+")"}f(a,1).Enabled=!e;a.nodeName.toLowerCase()=="tr"&&b.query("> td",
a).forEach(function(a){b._setOpacity(a,c)});return c}:function(a,c){return a.style.opacity=c};var i={left:!0,top:!0},k=/margin|padding|width|height|max|min|offset/,l=function(a,c,d){c=c.toLowerCase();if(b.isIE){if(d=="auto"){if(c=="height")return a.offsetHeight;if(c=="width")return a.offsetWidth}if(c=="fontweight")switch(d){case 700:return"bold";default:return"normal"}}c in i||(i[c]=k.test(c));return i[c]?h(a,d):d},m=b.isIE?"styleFloat":"cssFloat",n={cssFloat:m,styleFloat:m,"float":m};b.style=function(c,
d,e){var h=a(c),f=arguments.length,i=d=="opacity",d=n[d]||d;if(f==3)return i?b._setOpacity(h,e):h.style[d]=e;if(f==2&&i)return b._getOpacity(h);i=g(h);if(f==2&&typeof d!="string"){for(var u in d)b.style(c,u,d[u]);return i}return f==1?i:l(h,d,i[d]||h.style[d])};b._getPadExtents=function(a,c){var b=c||g(a),d=h(a,b.paddingLeft),e=h(a,b.paddingTop);return{l:d,t:e,w:d+h(a,b.paddingRight),h:e+h(a,b.paddingBottom)}};b._getBorderExtents=function(a,c){var b=c||g(a),d=b.borderLeftStyle!="none"?h(a,b.borderLeftWidth):
0,e=b.borderTopStyle!="none"?h(a,b.borderTopWidth):0;return{l:d,t:e,w:d+(b.borderRightStyle!="none"?h(a,b.borderRightWidth):0),h:e+(b.borderBottomStyle!="none"?h(a,b.borderBottomWidth):0)}};b._getPadBorderExtents=function(a,c){var d=c||g(a),e=b._getPadExtents(a,d),d=b._getBorderExtents(a,d);return{l:e.l+d.l,t:e.t+d.t,w:e.w+d.w,h:e.h+d.h}};b._getMarginExtents=function(a,c){var d=c||g(a),e=h(a,d.marginLeft),f=h(a,d.marginTop),i=h(a,d.marginRight),u=h(a,d.marginBottom);b.isWebKit&&d.position!="absolute"&&
(i=e);return{l:e,t:f,w:e+i,h:f+u}};b._getMarginBox=function(a,c){var d=c||g(a),e=b._getMarginExtents(a,d),h=a.offsetLeft-e.l,f=a.offsetTop-e.t,i=a.parentNode;if(b.isMoz){var u=parseFloat(d.left),d=parseFloat(d.top);!isNaN(u)&&!isNaN(d)?(h=u,f=d):i&&i.style&&(u=g(i),u.overflow!="visible"&&(i=b._getBorderExtents(i,u),h+=i.l,f+=i.t))}else if((b.isOpera||b.isIE>7&&!b.isQuirks)&&i)i=b._getBorderExtents(i),h-=i.l,f-=i.t;return{l:h,t:f,w:a.offsetWidth+e.w,h:a.offsetHeight+e.h}};b._getMarginSize=function(c,
d){var c=a(c),e=b._getMarginExtents(c,d||g(c)),h=c.getBoundingClientRect();return{w:h.right-h.left+e.w,h:h.bottom-h.top+e.h}};b._getContentBox=function(a,c){var d=c||g(a),e=b._getPadExtents(a,d),d=b._getBorderExtents(a,d),h=a.clientWidth,f;h?(f=a.clientHeight,d.w=d.h=0):(h=a.offsetWidth,f=a.offsetHeight);b.isOpera&&(e.l+=d.l,e.t+=d.t);return{l:e.l,t:e.t,w:h-e.w-d.w,h:f-e.h-d.h}};b._getBorderBox=function(a,c){var d=c||g(a),e=b._getPadExtents(a,d),d=b._getContentBox(a,d);return{l:d.l-e.l,t:d.t-e.t,
w:d.w+e.w,h:d.h+e.h}};b._setBox=function(a,c,b,d,e,h){h=h||"px";a=a.style;if(!isNaN(c))a.left=c+h;if(!isNaN(b))a.top=b+h;if(d>=0)a.width=d+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,d,e){b._usesBorderBox(a)&&(e=b._getPadBorderExtents(a,e),c>=0&&(c+=e.w),
d>=0&&(d+=e.h));b._setBox(a,NaN,NaN,c,d)};b._setMarginBox=function(a,c,d,e,h,f){var i=f||g(a),f=b._usesBorderBox(a)?o:b._getPadBorderExtents(a,i);if(b.isWebKit&&b._isButtonTag(a)){var u=a.style;if(e>=0&&!u.width)u.width="4px";if(h>=0&&!u.height)u.height="4px"}i=b._getMarginExtents(a,i);e>=0&&(e=Math.max(e-f.w-i.w,0));h>=0&&(h=Math.max(h-f.h-i.h,0));b._setBox(a,c,d,e,h)};var o={l:0,t:0,w:0,h:0};b.marginBox=function(c,d){var e=a(c),h=g(e);return!d?b._getMarginBox(e,h):b._setMarginBox(e,d.l,d.t,d.w,
d.h,h)};b.contentBox=function(c,d){var e=a(c),h=g(e);return!d?b._getContentBox(e,h):b._setContentSize(e,d.w,d.h,h)};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(),d=c.left,c=c.top;b.isIE<7&&(d+=a.clientLeft,c+=a.clientTop);return{x:d<0?0:d,y:c<0?0:c}}else return{x:0,y:0}};b._fixIeBiDiScrollLeft=function(a){var c=b.isIE;if(c&&!b._isBodyLtr()){var d=b.isQuirks,e=d?b.doc.body:b.doc.documentElement;c==6&&!d&&b.global.frameElement&&e.scrollHeight>e.clientHeight&&(a+=e.clientLeft);return c<8||d?a+e.clientWidth-e.scrollWidth:-a}return a};b._abs=b.position=function(c,d){var c=a(c),e=b.body(),f=e.parentNode,
i=c.getBoundingClientRect(),i={x:i.left,y:i.top,w:i.right-i.left,h:i.bottom-i.top};b.isIE?(f=b._getIeDocumentElementOffset(),i.x-=f.x+(b.isQuirks?e.clientLeft+e.offsetLeft:0),i.y-=f.y+(b.isQuirks?e.clientTop+e.offsetTop:0)):b.isFF==3&&(e=g(f),i.x-=h(f,e.marginLeft)+h(f,e.borderLeftWidth),i.y-=h(f,e.marginTop)+h(f,e.borderTopWidth));d&&(e=b._docScroll(),i.x+=e.x,i.y+=e.y);return i};b.coords=function(c,d){var e=a(c),h=g(e),h=b._getMarginBox(e,h),e=b.position(e,d);h.x=e.x;h.y=e.y;return h};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"},q={innerHTML:1,className:1,htmlFor:b.isIE,value:1},t=function(a,c){var b=a.getAttributeNode&&a.getAttributeNode(c);return b&&b.specified};b.hasAttr=function(c,b){var d=b.toLowerCase();return q[p[d]||b]||t(a(c),r[d]||b)};var s={},u=0,w=b._scopeName+"attrid",v={col:1,colgroup:1,table:1,
tbody:1,tfoot:1,thead:1,tr:1,title:1};b.attr=function(c,d,e){var c=a(c),h=arguments.length;if(h==2&&typeof d!="string"){for(var g in d)b.attr(c,g,d[g]);return c}var f=d.toLowerCase();g=p[f]||d;var i=q[g],f=r[f]||d;if(h==3){if(g=="style"&&typeof e!="string")b.style(c,e);else if(g=="innerHTML")b.isIE&&c.tagName.toLowerCase()in v?(b.empty(c),c.appendChild(b._toDom(e,c.ownerDocument))):c[g]=e;else if(b.isFunction(e)){h=b.attr(c,w);h||(h=u++,b.attr(c,w,h));s[h]||(s[h]={});if(i=s[h][g])b.disconnect(i);
else try{delete c[g]}catch(k){}s[h][g]=b.connect(c,g,e)}else i||typeof e=="boolean"?c[g]=e:c.setAttribute(f,e);return c}e=c[g];return i&&typeof e!="undefined"?e:g!="href"&&(typeof e=="boolean"||b.isFunction(e))?e:t(c,f)?c.getAttribute(f):null};b.removeAttr=function(c,b){a(c).removeAttribute(r[b.toLowerCase()]||b)};b.getNodeProp=function(c,b){var c=a(c),d=b.toLowerCase(),e=p[d]||b;if(e in c&&e!="href")return c[e];d=r[d]||b;return t(c,d)?c.getAttribute(d):null};b.create=function(c,d,e,h){var g=b.doc;
if(e)e=a(e),g=e.ownerDocument;typeof c=="string"&&(c=g.createElement(c));d&&b.attr(c,d);e&&b.place(c,e,h);return c};b.empty=b.isIE?function(c){for(var c=a(c),d;d=c.lastChild;)b.destroy(d)}:function(c){a(c).innerHTML=""};var C={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"]},K=/<\s*([\w\:]+)/,x={},A=0,y="__"+b._scopeName+
"ToDomId",O;for(O in C)if(C.hasOwnProperty(O))m=C[O],m.pre=O=="option"?'<select multiple="multiple">':"<"+m.join("><")+">",m.post="</"+m.reverse().join("></")+">";b._toDom=function(a,c){var c=c||b.doc,d=c[y];d||(c[y]=d=++A+"",x[d]=c.createElement("div"));a+="";var e=a.match(K),h=e?e[1].toLowerCase():"",d=x[d];if(e&&C[h]){e=C[h];d.innerHTML=e.pre+a+e.post;for(e=e.length;e;--e)d=d.firstChild}else d.innerHTML=a;if(d.childNodes.length==1)return d.removeChild(d.firstChild);for(h=c.createDocumentFragment();e=
d.firstChild;)h.appendChild(e);return h};b.hasClass=function(c,b){return(" "+a(c).className+" ").indexOf(" "+b+" ")>=0};var E=/\s+/,D=[""],F={},I=function(a){return typeof a=="string"||a instanceof String?a.indexOf(" ")<0?(D[0]=a,D):a.split(E):a||""};b.addClass=function(c,b){var c=a(c),b=I(b),d=c.className,e,d=d?" "+d+" ":" ";e=d.length;for(var h=0,g=b.length,f;h<g;++h)(f=b[h])&&d.indexOf(" "+f+" ")<0&&(d+=f+" ");e<d.length&&(c.className=d.substr(1,d.length-2))};b.removeClass=function(c,d){var c=
a(c),e;if(d!==void 0){d=I(d);e=" "+c.className+" ";for(var h=0,g=d.length;h<g;++h)e=e.replace(" "+d[h]+" "," ");e=b.trim(e)}else e="";c.className!=e&&(c.className=e)};b.replaceClass=function(c,d,e){c=a(c);F.className=c.className;b.removeClass(F,e);b.addClass(F,d);if(c.className!==F.className)c.className=F.className};b.toggleClass=function(a,c,d){d===void 0&&(d=!b.hasClass(a,c));b[d?"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 f=Array.prototype,a=f.slice,c=f.concat,e=function(c,d,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 d?c._stash(d):c},d=function(c,d,e){d=[0].concat(a.call(d,0));e=e||b.global;return function(a){d[0]=a;return c.apply(e,d)}},g=function(a,c){return function(){this.forEach(d(a,
arguments,c));return this}},h=function(a,c){return function(){return this.map(d(a,arguments,c))}},j=function(a,c,e){return function(){var h=arguments,g=d(a,h,e);if(c.call(e||b.global,h))return this.map(g);this.forEach(g);return this}},i=function(a){return a.length==1&&typeof a[0]=="string"},k=function(a){var c=a.parentNode;c&&c.removeChild(a)};b.NodeList=function(){return e(Array.apply(null,arguments))};var l=b._NodeListCtor=b.NodeList,m=l.prototype;l._wrap=m._wrap=e;l._adaptAsMap=h;l._adaptAsForEach=
g;l._adaptAsFilter=function(a,c){return function(){return this.filter(d(a,arguments,c))}};l._adaptWithCondition=j;b.forEach(["slice","splice"],function(a){var c=f[a];m[a]=function(){return this._wrap(c.apply(this,arguments),a=="slice"?this:null)}});b.forEach(["indexOf","lastIndexOf","every","some"],function(c){var d=b[c];m[c]=function(){return d.apply(b,[this].concat(a.call(arguments,0)))}});b.forEach(["attr","style"],function(a){m[a]=j(b[a],i)});b.forEach("connect,addClass,removeClass,replaceClass,toggleClass,empty,removeAttr".split(","),
function(a){m[a]=g(b[a])});b.extend(b.NodeList,{_normalize:function(a,c){var d=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(d)a._runParse=!0;return a},_cloneNode:function(a){return a.cloneNode(!0)},_place:function(a,c,d,e){if(!(c.nodeType!=1&&d=="only"))for(var h,
g=a.length,f=g-1;f>=0;f--){var i=e?this._cloneNode(a[f]):a[f];if(a._runParse&&b.parser&&b.parser.parse){h||(h=c.ownerDocument.createElement("div"));h.appendChild(i);b.parser.parse(h);for(i=h.firstChild;h.firstChild;)h.removeChild(h.firstChild)}f==g-1?b.place(i,c,d):c.parentNode.insertBefore(i,c);c=i}},_stash:function(a){this._parent=a;return this},end:function(){return this._parent?this._parent:new this._NodeListCtor},concat:function(d){var e=b.isArray(this)?this:a.call(this,0),h=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,h),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:h(b.coords),position:h(b.position),place:function(a,c){var d=b.query(a)[0];return this.forEach(function(a){b.place(a,d,c)})},orphan:function(a){return(a?b._filterQueryResult(this,a):this).forEach(k)},
adopt:function(a,c){return b.query(a).place(this[0],c)._stash(this)},query:function(a){if(!a)return this;var d=this.map(function(c){return b.query(a,c).filter(function(a){return a!==void 0})});return this._wrap(c.apply([],d),this)},filter:function(a){var c=arguments,d=this,e=0;if(typeof a=="string"){d=b._filterQueryResult(this,c[0]);if(c.length==1)return d._stash(this);e=1}return this._wrap(b.filter(d,c[e],c[e+1]),this)},addContent:function(a,c){for(var a=this._normalize(a,this[0]),b=0,d;d=this[b];b++)this._place(a,
d,c,b>0);return this},instantiate:function(a,c){var d=b.isFunction(a)?a:b.getObject(a),c=c||{};return this.forEach(function(a){new d(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)}});l.events="blur,focus,change,click,error,keydown,keypress,keyup,load,mousedown,mouseenter,mouseleave,mousemove,mouseout,mouseover,mouseup,submit".split(",");b.forEach(l.events,function(a){var c="on"+a;m[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,d=a._NodeListCtor=a.NodeList,g=(a.isWebKit||a.isMozilla)&&a.doc.compatMode=="BackCompat",h=a.doc.firstChild.children?"children":"childNodes",f=!1,i=function(){return!0},k=function(a){a+=">~+".indexOf(a.slice(-1))>=0?" * ":" ";for(var b=function(b,d){return c(a.slice(b,d))},d=[],e=-1,h=-1,g=-1,i=-1,u=-1,w=-1,k=-1,v="",l="",C,m=0,K=a.length,n=null,o=null,s=function(){if(w>=0)n.id=b(w,m).replace(/\\/g,""),w=-1;if(k>=0){var a=k==m?null:b(k,m);n[">~+".indexOf(a)<
0?"tag":"oper"]=a;k=-1}u>=0&&(n.classes.push(b(u+1,m).replace(/\\/g,"")),u=-1)};v=l,l=a.charAt(m),m<K;m++)if(v!="\\")if(n||(C=m,n={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return f?this.otag:this.tag}},k=m),e>=0)if(l=="]"){o.attr?o.matchFor=b(g||e+1,m):o.attr=b(e+1,m);if((e=o.matchFor)&&(e.charAt(0)=='"'||e.charAt(0)=="'"))o.matchFor=e.slice(1,-1);n.attrs.push(o);o=null;e=g=-1}else{if(l=="=")g="|~^$*".indexOf(v)>=0?v:"",o.type=g+l,o.attr=b(e+1,m-g.length),
g=m+1}else if(h>=0){if(l==")"){if(i>=0)o.value=b(h+1,m);i=h=-1}}else if(l=="#")s(),w=m+1;else if(l==".")s(),u=m;else if(l==":")s(),i=m;else if(l=="[")s(),e=m,o={};else if(l=="(")i>=0&&(o={name:b(i+1,m),value:null},n.pseudos.push(o)),h=m;else if(l==" "&&v!=l){s();i>=0&&n.pseudos.push({name:b(i+1,m)});n.loops=n.pseudos.length||n.attrs.length||n.classes.length;n.oquery=n.query=b(C,m);n.otag=n.tag=n.oper?null:n.tag||"*";if(n.tag)n.tag=n.tag.toUpperCase();if(d.length&&d[d.length-1].oper)n.infixOper=d.pop(),
n.query=n.infixOper.query+" "+n.query;d.push(n);n=null}return d},l=function(a,c){return!a?c:!c?a:function(){return a.apply(window,arguments)&&c.apply(window,arguments)}},m=function(a,c){var b=c||[];a&&b.push(a);return b},n=function(a){return 1==a.nodeType},o=function(a,c){return!a?"":c=="class"?a.className||"":c=="for"?a.htmlFor||"":c=="style"?a.style.cssText||"":(f?a.getAttribute(c):a.getAttribute(c,2))||""},p={"*=":function(a,c){return function(b){return o(b,a).indexOf(c)>=0}},"^=":function(a,c){return function(b){return o(b,
a).indexOf(c)==0}},"$=":function(a,c){return function(b){b=" "+o(b,a);return b.lastIndexOf(c)==b.length-c.length}},"~=":function(a,c){var b=" "+c+" ";return function(c){return(" "+o(c,a)+" ").indexOf(b)>=0}},"|=":function(a,c){var b=" "+c+"-";return function(d){d=" "+o(d,a);return d==c||d.indexOf(b)==0}},"=":function(a,c){return function(b){return o(b,a)==c}}},r=typeof a.doc.firstChild.nextElementSibling=="undefined",q=!r?"nextElementSibling":"nextSibling",t=!r?"previousElementSibling":"previousSibling",
s=r?n:i,u=function(a){for(;a=a[t];)if(s(a))return!1;return!0},w=function(a){for(;a=a[q];)if(s(a))return!1;return!0},v=function(a){var c=a.parentNode,b=0,d=c[h],e=a._i||-1,g=c._l||-1;if(!d)return-1;d=d.length;if(g==d&&e>=0&&g>=0)return e;c._l=d;e=-1;for(c=c.firstElementChild||c.firstChild;c;c=c[q])if(s(c))c._i=++b,a===c&&(e=b);return e},C=function(a){return!(v(a)%2)},K=function(a){return v(a)%2},x={checked:function(){return function(a){return!!("checked"in a?a.checked:a.selected)}},"first-child":function(){return u},
"last-child":function(){return w},"only-child":function(){return function(a){return!u(a)?!1:!w(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=k(c)[0],d={el:1};if(b.tag!="*")d.tag=1;if(!b.classes.length)d.classes=1;var e=y(b,d);return function(a){return!e(a)}},
"nth-child":function(a,c){var b=parseInt;if(c=="odd")return K;else if(c=="even")return C;if(c.indexOf("n")!=-1){var d=c.split("n",2),e=d[0]?d[0]=="-"?-1:b(d[0]):1,h=d[1]?b(d[1]):0,g=0,f=-1;e>0?h<0?h=h%e&&e+h%e:h>0&&(h>=e&&(g=h-h%e),h%=e):e<0&&(e*=-1,h>0&&(f=h,h%=e));if(e>0)return function(a){a=v(a);return a>=g&&(f<0||a<=f)&&a%e==h};else c=h}var i=b(c);return function(a){return v(a)==i}}},A=a.isIE<9||dojo.isIE&&dojo.isQuirks?function(a){var c=a.toLowerCase();c=="class"&&(a="className");return function(b){return f?
b.getAttribute(a):b[a]||b[c]}}:function(a){return function(c){return c&&c.getAttribute&&c.hasAttribute(a)}},y=function(a,c){if(!a)return i;var c=c||{},d=null;"el"in c||(d=l(d,n));"tag"in c||a.tag!="*"&&(d=l(d,function(c){return c&&c.tagName==a.getTag()}));"classes"in c||b(a.classes,function(a,c){var b=RegExp("(?:^|\\s)"+a+"(?:\\s|$)");d=l(d,function(a){return b.test(a.className)});d.count=c});"pseudos"in c||b(a.pseudos,function(a){var c=a.name;x[c]&&(d=l(d,x[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=A(b));c&&(d=l(d,c))});"id"in c||a.id&&(d=l(d,function(c){return!!c&&c.id==a.id}));d||"default"in c||(d=i);return d},O=function(a){return function(c,b,d){for(;c=c[q];)if(!r||n(c)){(!d||R(c,d))&&a(c)&&b.push(c);break}return b}},E=function(a){return function(c,b,d){for(c=c[q];c;){if(s(c)){if(d&&!R(c,d))break;a(c)&&b.push(c)}c=c[q]}return b}},D=function(a){a=a||i;return function(c,b,d){for(var e=0,g=c[h];c=g[e++];)s(c)&&
(!d||R(c,d))&&a(c,e)&&b.push(c);return b}},F={},I=function(c){var b=F[c.query];if(b)return b;var d=c.infixOper,d=d?d.oper:"",e=y(c,{el:1}),h="*"==c.tag,f=a.doc.getElementsByClassName;if(d){f={el:1};if(h)f.tag=1;e=y(c,f);"+"==d?b=O(e):"~"==d?b=E(e):">"==d&&(b=D(e))}else if(c.id)e=!c.loops&&h?i:y(c,{el:1,id:1}),b=function(b,d){var h=a.byId(c.id,b.ownerDocument||b);if(h&&e(h))if(9==b.nodeType)return m(h,d);else{for(var g=h.parentNode;g;){if(g==b)break;g=g.parentNode}if(g)return m(h,d)}};else if(f&&/\{\s*\[native code\]\s*\}/.test(String(f))&&
c.classes.length&&!g)var e=y(c,{el:1,classes:1,id:1}),u=c.classes.join(" "),b=function(a,c,b){for(var c=m(0,c),d,h=0,g=a.getElementsByClassName(u);d=g[h++];)e(d,a)&&R(d,b)&&c.push(d);return c};else!h&&!c.loops?b=function(a,b,d){for(var b=m(0,b),e=0,h=a.getElementsByTagName(c.getTag());a=h[e++];)R(a,d)&&b.push(a);return b}:(e=y(c,{el:1,tag:1,id:1}),b=function(a,b,d){for(var b=m(0,b),h,g=0,f=a.getElementsByTagName(c.getTag());h=f[g++];)e(h,a)&&R(h,d)&&b.push(h);return b});return F[c.query]=b},G={},
z={},M=function(a){var b=k(c(a));if(b.length==1){var e=I(b[0]);return function(a){if(a=e(a,new d))a.nozip=!0;return a}}return function(a){for(var a=m(a),c,d,e=b.length,h,g,f=0;f<e;f++){g=[];c=b[f];d=a.length-1;if(d>0)h={},g.nozip=!0;d=I(c);for(var i=0;c=a[i];i++)d(c,g,h);if(!g.length)break;a=g}return g}},H=navigator.userAgent,H=a.isWebKit&&H.indexOf("WebKit/")>0&&parseFloat(H.split("WebKit/")[1])>528,L=a.isIE?"commentStrip":"nozip",B=!!a.doc.querySelectorAll&&(!a.isSafari||a.isSafari>3.1||H),J=/n\+\d|([^ ])?([>~+])([^ =])?/g,
N=function(a,c,b,d){return b?(c?c+" ":"")+b+(d?" "+d:""):a},S=function(c,b){c=c.replace(J,N);if(B){var d=z[c];if(d&&!b)return d}if(d=G[c])return d;var d=c.charAt(0),e=-1==c.indexOf(" ");c.indexOf("#")>=0&&e&&(b=!0);if(B&&!b&&">~+".indexOf(d)==-1&&(!a.isIE||c.indexOf(":")==-1)&&!(g&&c.indexOf(".")>=0)&&c.indexOf(":contains")==-1&&c.indexOf(":checked")==-1&&c.indexOf("|=")==-1){var h=">~+".indexOf(c.charAt(c.length-1))>=0?c+" *":c;return z[c]=function(a){try{if(!(9==a.nodeType||e))throw"";var b=a.querySelectorAll(h);
b[L]=!0;return b}catch(d){return S(c,!0)(a)}}}else{var f=c.split(/\s*,\s*/);return G[c]=f.length<2?M(c):function(a){for(var c=0,b=[],d;d=f[c++];)b=b.concat(M(d)(a));return b}}},Q=0,T=a.isIE?function(a){return f?a.getAttribute("_uid")||a.setAttribute("_uid",++Q)||Q:a.uniqueID}:function(a){return a._uid||(a._uid=++Q)},R=function(a,c){if(!c)return 1;var b=T(a);return!c[b]?c[b]=1:0},V=function(c){if(c&&c.nozip)return d._wrap?d._wrap(c):c;var b=new d;if(!c||!c.length)return b;c[0]&&b.push(c[0]);if(c.length<
2)return b;Q++;if(a.isIE&&f){var e=Q+"";c[0].setAttribute("_zipIdx",e);for(var h=1,g;g=c[h];h++)c[h].getAttribute("_zipIdx")!=e&&b.push(g),g.setAttribute("_zipIdx",e)}else if(a.isIE&&c.commentStrip)try{for(h=1;g=c[h];h++)n(g)&&b.push(g)}catch(i){}else{c[0]&&(c[0]._zipIdx=Q);for(h=1;g=c[h];h++)c[h]._zipIdx!=Q&&b.push(g),g._zipIdx=Q}return b};a.query=function(c,b){d=a._NodeListCtor;if(!c)return new d;if(c.constructor==d)return c;if(typeof c!="string")return new d(c);if(typeof b=="string"&&(b=a.byId(b),
!b))return new d;var b=b||a.doc,e=b.ownerDocument||b.documentElement;f=b.contentType&&b.contentType=="application/xml"||a.isOpera&&(b.doctype||e.toString()=="[object XMLDocument]")||!!e&&(a.isIE?e.xml:b.xmlVersion||e.xmlVersion);return(e=S(c)(b))&&e.nozip&&!d._wrap?e:V(e)};a.query.pseudos=x;a._filterQueryResult=function(c,b,d){for(var e=new a._NodeListCtor,h=k(b),h=h.length==1&&!/[^\w#\.]/.test(b)?y(h[0]):function(a){return dojo.query(b,d).indexOf(a)!=-1},g=0,f;f=c[g];g++)h(f)&&e.push(f);return e}},
f=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 e=0,f=a.length;e<f;++e)c.call(b||window,a[e],e,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||f()))})();
define("dojo/_base/xhr",["dojo/lib/kernel","dojo/_base/Deferred","dojo/_base/json","dojo/_base/lang","dojo/_base/query"],function(b){(function(){var f=b.config;b.fieldToObject=function(a){var c=null;if(a=b.byId(a)){var d=a.name,e=(a.type||"").toLowerCase();if(d&&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 d=a.name,e=(a.type||"").toLowerCase();if(d&&e&&"file|submit|image|reset|button|".indexOf(e)==-1&&!a.disabled){a=b.fieldToObject(a);if(a!==null){var h=c[d];typeof h=="string"?c[d]=[h,a]:b.isArray(h)?h.push(a):c[d]=a}if(e=="image")c[d+".x"]=c[d+".y"]=c[d].x=c[d].y=0}});return c};b.objectToQuery=function(a){var c=encodeURIComponent,d=[],e={},h;for(h in a){var g=a[h];if(g!=e[h]){var f=c(h)+"=";if(b.isArray(g))for(var i=0;i<g.length;i++)d.push(f+c(g[i]));else d.push(f+c(g))}}return d.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("&"),d=decodeURIComponent;b.forEach(a,function(a){if(a.length){var e=a.split("="),a=d(e.shift()),e=d(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("/*"),d=a.lastIndexOf("*/");if(c==-1||d==-1)throw Error("JSON was not comment filtered");return b.fromJson(a.substring(c+
2,d))},javascript:function(a){return b.eval(a.responseText)},xml:function(a){var c=a.responseXML;if(b.isIE&&(!c||!c.documentElement)){var d=function(a){return"MSXML"+a+".DOMDocument"},d=["Microsoft.XMLDOM",d(6),d(4),d(3),d(2)];b.some(d,function(b){try{var d=new ActiveXObject(b);d.async=!1;d.loadXML(a.responseText);c=d}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,d,e){var h={args:a,url:a.url},g=null;if(a.form){var g=b.byId(a.form),i=g.getAttributeNode("action");h.url=h.url||(i?i.value:null);g=b.formToObject(g)}i=[{}];g&&i.push(g);a.content&&i.push(a.content);a.preventCache&&i.push({"dojo.preventCache":(new Date).valueOf()});h.query=b.objectToQuery(b.mixin.apply(null,i));h.handleAs=a.handleAs||"text";var w=new b.Deferred(c);w.addCallbacks(d,function(a){return e(a,w)});var k=a.load;k&&b.isFunction(k)&&w.addCallback(function(c){return k.call(a,c,
h)});var j=a.error;j&&b.isFunction(j)&&w.addErrback(function(c){return j.call(a,c,h)});var l=a.handle;l&&b.isFunction(l)&&w.addBoth(function(c){return l.call(a,c,h)});f.ioPublish&&b.publish&&h.args.ioPublish!==!1&&(w.addCallbacks(function(a){b.publish("/dojo/io/load",[w,a]);return a},function(a){b.publish("/dojo/io/error",[w,a]);return a}),w.addBoth(function(a){b.publish("/dojo/io/done",[w,a]);return a}));w.ioArgs=h;return w};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},e=function(c){c=a[c.ioArgs.handleAs](c.ioArgs.xhr);return c===void 0?null:c},d=function(a,c){c.ioArgs.args.failOk||console.error(a);return a},g=null,h=[],j=0,i=function(a){j<=0&&(j=0,f.ioPublish&&b.publish&&(!a||a&&a.ioArgs.args.ioPublish!==!1)&&b.publish("/dojo/io/stop"))},k=function(){var a=(new Date).getTime();if(!b._blockAsync)for(var c=0,d;c<h.length&&(d=h[c]);c++){var e=
d.dfd,f=function(){if(!e||e.canceled||!d.validCheck(e))h.splice(c--,1),j-=1;else if(d.ioCheck(e))h.splice(c--,1),d.resHandle(e),j-=1;else if(e.startTime&&e.startTime+(e.ioArgs.args.timeout||0)<a){h.splice(c--,1);var b=Error("timeout exceeded");b.dojoType="timeout";e.errback(b);e.cancel();j-=1}};if(b.config.debugAtAllCosts)f.call(this);else try{f.call(this)}catch(k){e.errback(k)}}i(e);h.length||(clearInterval(g),g=null)};b._ioCancelAll=function(){try{b.forEach(h,function(a){try{a.dfd.cancel()}catch(c){}})}catch(a){}};
b.isIE&&b.addOnWindowUnload(b._ioCancelAll);b._ioNotifyStart=function(a){f.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,d){var e=a.ioArgs.args;if(e.timeout)a.startTime=(new Date).getTime();h.push({dfd:a,validCheck:c,ioCheck:b,resHandle:d});g||(g=setInterval(k,50));e.sync&&k()};var l=function(a){return a.ioArgs.xhr.readyState},m=function(a){return 4==a.ioArgs.xhr.readyState},n=function(a){var c=a.ioArgs.xhr;
if(b._isDocumentOk(c))a.callback(a);else{var d=Error("Unable to load "+a.ioArgs.url+" status:"+c.status);d.status=c.status;d.responseText=c.responseText;a.errback(d)}};b._ioAddQueryToUrl=function(a){if(a.query.length)a.url+=(a.url.indexOf("?")==-1?"?":"&")+a.query,a.query=null};b.xhr=function(a,h,g){var f=b._ioSetArgs(h,c,e,d),i=f.ioArgs,k=i.xhr=b._xhrObj(i.args);if(!k)return f.cancel(),f;"postData"in h?i.query=h.postData:"putData"in h?i.query=h.putData:"rawBody"in h?i.query=h.rawBody:(arguments.length>
2&&!g||"POST|PUT".indexOf(a.toUpperCase())==-1)&&b._ioAddQueryToUrl(i);k.open(a,i.url,h.sync!==!0,h.user||void 0,h.password||void 0);if(h.headers)for(var u in h.headers)u.toLowerCase()==="content-type"&&!h.contentType?h.contentType=h.headers[u]:h.headers[u]&&k.setRequestHeader(u,h.headers[u]);k.setRequestHeader("Content-Type",h.contentType||"application/x-www-form-urlencoded");(!h.headers||!("X-Requested-With"in h.headers))&&k.setRequestHeader("X-Requested-With","XMLHttpRequest");b._ioNotifyStart(f);
if(b.config.debugAtAllCosts)k.send(i.query);else try{k.send(i.query)}catch(w){i.error=w,f.cancel()}b._ioWatch(f,l,m,n);return f};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 f=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){f(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 d=c||[];if(this[a])if(b.config.debugAtAllCosts)this[a].apply(this,d);else try{this[a].apply(this,d)}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 d=
a||this.delay,e=b.hitch(this,"_play",c);if(d>0)return this._delayTimer=setTimeout(e,d),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,e={run:function(){}};b.extend(b.Animation,{_startTimer:function(){if(!this._timer)this._timer=b.connect(e,"run",this,"_cycle"),a++;c||(c=setInterval(b.hitch(e,"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 d=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=f({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(d,c.node));return a};b.fadeIn=function(a){return b._fade(f({end:1},a))};b.fadeOut=function(a){return b._fade(f({end:0},a))};b._defaultEasing=function(a){return 0.5+Math.sin((a+
1.5)*Math.PI)/2};var g=function(a){this._properties=a;for(var c in a){var d=a[c];if(d.start instanceof b.Color)d.tempColor=new b.Color}};g.prototype.getValue=function(a){var c={},d;for(d in this._properties){var e=this._properties[d],g=e.start;g instanceof b.Color?c[d]=b.blendColors(g,e.end,a,e.tempColor).toCss():b.isArray(g)||(c[d]=(e.end-g)*a+g+(d!="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={},d;for(d in this.properties){if(d=="width"||d=="height")this.node.display="block";var e=this.properties[d];b.isFunction(e)&&(e=e(c));e=a[d]=f({},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 h=d.toLowerCase().indexOf("color")>=0,n=function(a,c){var d={height:a.offsetHeight,width:a.offsetWidth}[c];if(d!==void 0)return d;d=b.style(a,c);return c=="opacity"?+d:h?d:parseFloat(d)};if("end"in e){if(!("start"in
e))e.start=n(c,d)}else e.end=n(c,d);h?(e.start=new b.Color(e.start),e.end=new b.Color(e.end)):e.start=d=="opacity"?+e.start:parseFloat(e.start)}this.curve=new g(a)});b.connect(a,"onAnimate",b.hitch(b,"style",a.node));return a};b.anim=function(a,c,d,e,g,f){return b.animateProperty({node:a,duration:d||b.Animation.prototype.duration,properties:c,easing:e,onEnd:g}).play(f||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(){var b=this;if(!b.define)b.define=function(f){b.orion=b.orion||{};b.orion.Deferred=f();delete b.define}})();
define("orion/Deferred",[],function(){function b(b){if(g)a?(c.next={notify:b,next:null},c=c.next):c=a={notify:b,next:null};else{g=!0;do{for(;b;){b();if(e)a?c.next=e:a=e,c=d;a?(e=a.next,d=c,b=a.notify,a=c=null):b=null}g=!1}while(g)}}function f(){function a(){for(;e;){var b=e;e=e.next;var h=b.deferred;if(b[d])try{var f=b[d](c);f&&typeof f.then==="function"?f.then(h.resolve,h.reject,h.update):h.resolve(f)}catch(p){h.reject(p)}else h[d](c)}e=g=null}var c,d,e,g;this.resolve=function(e){if(d)throw Error("'"+
d+"' already called");d="resolve";c=e;b(a)};this.reject=function(e){if(d)throw Error("'"+d+"' already called");d="reject";c=e;b(a)};this.update=this.progress=this.notify=function(a){for(var c=e;c;){if(c.update)try{c.update(a)}catch(b){}c=c.next}};this.then=function(c,j,o){c={resolve:c,reject:j,update:o,deferred:new f};e?g.next=c:e=c;g=c;d&&b(a);return c.deferred.promise};this.promise={then:this.then};this.state=function(){return d||"wait"};this.all=function(a,c){function b(a,c){d||(g[a]=c,--h===0&&
f.resolve(g))}function e(a,h){if(!d){if(c)try{b(a,c(h));return}catch(g){h=g}f.reject(h)}}var h=a.length,g=[],f=this;h===0?this.resolve(g):a.forEach(function(a,c){a.then(b.bind(null,c),e.bind(null,c))});return this.promise}}var a,c,e,d,g=!1;f.when=function(a,c,b,d){var e;if(!(a&&typeof a.then==="function"))e=new f,e.resolve(a),a=e.promise;return a.then(c,b,d)};return f});
define("orion/serviceregistry",["orion/Deferred"],function(b){function f(a,c,b){this.serviceId=a;this.name=c;this.properties=b}function a(a,c,b){this.serviceId=a;this.serviceReference=c;this.internalRegistry=b}function c(a,c,d,e){return function(){var g;if(a.isRegistered(c)){try{var f=d[e].apply(d,Array.prototype.slice.call(arguments));if(f&&typeof f.then==="function")return f;else g=new b,g.resolve(f)}catch(n){g=new b,g.reject(n)}return g.promise}throw Error("Service was unregistered");}}function e(a,
b,d){this.serviceId=a;this.implementation=b;this.internalRegistry=d;for(var e in b)typeof b[e]==="function"&&(this[e]=c(d,a,b,e))}function d(){this._namedlisteners={}}function g(){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){for(var d=b.reference,e=a._namedReferences[d.getName()],g=0;g<e.length;g++)if(e[g]===d){e.length===1?delete a._namedReferences[d.getName()]:
e.splice(g,1);break}a._entries[c]=null;a._serviceEventTarget.dispatchEvent("serviceRemoved",d,b.service)}},dispatchEvent:function(c,b){var d=a._entries[c];d&&d.eventTarget.dispatchEvent.apply(d.eventTarget,[b].concat(Array.prototype.slice.call(arguments,2)))},addEventListener:function(c,b,d){(c=a._entries[c])&&c.eventTarget.addEventListener(b,d)},removeEventListener:function(c,b,d){(c=a._entries[c])&&c.eventTarget.removeEventListener(b,d)}}}f.prototype={getServiceId:function(){return this.serviceId},
getName:function(){return this.name},getPropertyNames: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]}};f.prototype.constructor=f;a.prototype={unregister:function(){this.internalRegistry.unregisterService(this.serviceId)},dispatchEvent:function(a){this.internalRegistry.dispatchEvent.apply(this.internalRegistry,[this.serviceId,a].concat(Array.prototype.slice.call(arguments,1)))},getServiceReference:function(){return this.serviceReference}};
a.prototype.constructor=a;e.prototype={addEventListener:function(a,c){this.internalRegistry.addEventListener(this.serviceId,a,c)},removeEventListener:function(a,c){this.internalRegistry.removeEventListener(this.serviceId,a,c)}};e.prototype.constructor=e;d.prototype={dispatchEvent:function(a){var c=this._namedlisteners[a];if(c)for(var b=0;b<c.length;b++)try{var d=Array.prototype.slice.call(arguments,1);c[b].apply(null,d)}catch(e){console.log(e)}},addEventListener:function(a,c){this._namedlisteners[a]=
this._namedlisteners[a]||[];this._namedlisteners[a].push(c)},removeEventListener:function(a,c){var b=this._namedlisteners[a];if(b)for(var d=0;d<b.length;d++)if(b[d]===c){b.length===1?delete this._namedlisteners[a]:b.splice(d,1);break}}};d.prototype.constructor=d;g.prototype={getService:function(a){var c;if(typeof a==="string"){if(this._namedReferences[a])for(var b=0;b<this._namedReferences[a].length;b++)if(c=this._entries[this._namedReferences[a][b].getServiceId()].service)break}else c=this._entries[a.getServiceId()].service;
return c},getServiceReferences:function(a){if(a)return this._namedReferences[a]?this._namedReferences[a]:[];for(var a=[],c=0;c<this._entries.length;c++)this._entries[c]&&a.push(this._entries[c].reference);return a},registerService:function(c,b,g){var k=this._entries.length,g=new f(k,c,g),b=new e(k,b,this.internalRegistry);this._namedReferences[c]=this._namedReferences[c]||[];this._namedReferences[c].push(g);this._entries.push({reference:g,service:b,eventTarget:new d});this._serviceEventTarget.dispatchEvent("serviceAdded",
g,b);return new a(k,g,this.internalRegistry)},addEventListener:function(a,c){this._serviceEventTarget.addEventListener(a,c)},removeEventListener:function(a,c){this._serviceEventTarget.removeEventListener(a,c)}};g.prototype.constructor=g;return{ServiceReference:f,ServiceRegistration:a,Service:e,EventTarget:d,ServiceRegistry:g}});
define("orion/xhr",["orion/Deferred"],function(b){function f(a){return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()})}return function(a,c,e){var e=e||{},d=arguments.length>3&&arguments[3]?arguments[3]:new XMLHttpRequest,g=new b,h=e.headers||{},j=e.log||!1,i,k;typeof h["X-Requested-With"]==="undefined"&&(h["X-Requested-With"]="XMLHttpRequest");if(e.query&&typeof e.query==="object"){var l=e.query,m=Object.keys(l),n=[];for(k=0;k<m.length;k++){var o=
m[k],p=l[o];n.push(f(o)+"="+f(p))}n.length&&(l=c.split("#"),l[0]+=(l[0].indexOf("?")===-1?"?":"&")+n.join("&"),c=l.join("#"))}if(typeof e.data!=="undefined"&&(a==="POST"||a==="PUT"))i=e.data;if(typeof e.responseType==="string")d.responseType=e.responseType;d.onreadystatechange=function(){if(d.readyState===4){var a=d.status,b=typeof d.response!=="undefined"?d.response:d.responseText,b={args:e,response:b,responseText:typeof b==="string"?b:null,status:a,url:c,xhr:d};200<=a&&a<400?g.resolve(b):(j&&console&&
console.log(Error(d.statusText)),g.reject(b))}};try{d.open(a,c,!0);if(typeof e.timeout==="number")d.timeout=e.timeout,d.addEventListener("timeout",function(a){g.reject("Timeout exceeded: "+a)});var r=Object.keys(h);for(k=0;k<r.length;k++){var q=r[k];d.setRequestHeader(q,h[q])}d.send(i)}catch(t){g.reject(t)}return g}});
define("orion/es5shim",[],function(){if(!Function.prototype.bind)Function.prototype.bind=function(b){var f=this,a=Array.prototype.slice.call(arguments,1);return a.length?function(){return arguments.length?f.apply(b,a.concat(Array.prototype.slice.call(arguments))):f.apply(b,a)}:function(){return arguments.length?f.apply(b,arguments):f.call(b)}}});
define("orion/preferences",["require","orion/Deferred","orion/xhr","orion/es5shim"],function(b,f,a){function c(a,c){this._name=a;this._providers=c;this._flushPending=!1;this._cached=null;this._stores=[];this._dirty=[]}function e(a,c){return{get:function(b,d){if(c===0)return null;var e=localStorage.getItem(a+b);if(e===null)return null;e=JSON.parse(e);return d||c===-1||e._expires&&e._expires>(new Date).getTime()?(delete e._expires,e):null},set:function(b,d){if(c!==0){if(c!==-1)d._expires=(new Date).getTime()+
1E3*c;if(Object.keys(d).length===0)localStorage.removeItem(a+b);else{var e=JSON.stringify(d);localStorage.setItem(a+b,e);delete d._expires}}},remove:function(c){localStorage.removeItem(a+c)}}}function d(a){this._currentPromises={};this._cache=new e("/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 g(a){this._location=
a;this._currentPromise=null;this._cache=new e("/orion/preferences/default",3600)}function h(){this._cache=new e("/orion/preferences/local",-1)}function j(a,c){this._userProvider=new d(a);this._localProvider=new h;c=c||"defaults.pref";c.indexOf("://")===-1&&(c=b.toUrl(c));this._defaultsProvider=new g(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(new f).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=[],d=0;d<this._providers.length;++d)b.push(this._providers[d].get(this._name,a).then(function(a){return function(b){c._stores[a]=b}}(d)));return(new f).all(b).then(function(){c._cached=null;c._getCached()})},flush:function(){this._flush()}};d.prototype={get:function(a,c){if(this._currentPromises[a])return this._currentPromises[a];var b=new f,
d=null;c?this._cache.remove(a):d=this._cache.get(a);if(d!==null)b.resolve(d);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)}};g.prototype={get:function(c,b){if(this._currentPromise)return this._currentPromise;
var d=new f,e=null;b?this._cache.remove(c):e=this._cache.get(c);if(e!==null)d.resolve(e);else{this._currentPromise=d;var g=this;a("GET",this._location,{headers:{"Orion-Version":"1"},timeout:15E3}).then(function(a){a=JSON.parse(a.response);g._cache.set(c,a[c]||{});g._currentPromise=null;d.resolve(a[c]||{})},function(a){a.xhr.status===401||a.xhr.status===404?(g._cache.set(c,{}),g._currentPromise=null,d.resolve({})):(g._currentPromise=null,a=g._cache.get(c,!0),a!==null?d.resolve(a[c]||{}):d.resolve({}))})}return d},
put:function(){var a=new f;a.resolve();return a}};h.prototype={get:function(a){var c=new f,a=this._cache.get(a);a!==null?c.resolve(a):c.resolve({});return c},put:function(a,c){var b=new f;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 d=[];j.USER_SCOPE&b&&this._userProvider.available()&&d.push(this._userProvider);j.LOCAL_SCOPE&b&&d.push(this._localProvider);j.DEFAULT_SCOPE&b&&d.push(this._defaultsProvider);var e=new c(a,d);return e.sync().then(function(){return e})},getSetting:function(a,c,b){for(var d,e=0;e<a.length;e++)if(a[e].label===c)for(var g=0;g<a[e].data.length;g++)if(a[e].data[g].label===b){d=a[e].data[g].value;break}return d}};return{PreferencesService:j}});
define("orion/pluginregistry",["orion/Deferred","orion/serviceregistry","orion/es5shim"],function(b,f){var a=a||{};a.Plugin=function(a,e,d){function g(a,c,e){if(!l)throw Error("plugin not connected");var g=p++,h=new b;r[String(g)]=h;d.postMessage({id:g,serviceId:a,method:c,params:e},l);return h.promise}function h(a){var c={};a.methods&&a.methods.forEach(function(b){c[b]=function(){var c=Array.prototype.slice.call(arguments);return o?g(a.serviceId,b,c):k._load().then(function(){return g(a.serviceId,
b,c)})}});return c}function f(){var a=e.services;a&&a.forEach(function(a){var c=h(a);q[a.serviceId]=d.registerService(a.type,c,a.properties)})}function i(b){var g,h;try{if(b.method)if("plugin"===b.method){if(e){if(JSON.stringify(e)!==JSON.stringify(b.params[0])){for(var i in q)q.hasOwnProperty(i)&&(q[i].unregister(),delete q[i]);e=b.params[0];f();d.updatePlugin(k)}}else e=b.params[0],f();o||(o=!0,d.dispatchEvent("pluginLoaded",k),m.resolve(k));n&&(n.resolve(k),n=null)}else"dispatchEvent"===b.method?
(g=q[b.serviceId],g.dispatchEvent.apply(g,b.params)):"progress"===b.method?(h=r[String(b.requestId)],h.update.apply(h,b.params)):(o||m.reject(Error("Load timeout for plugin: "+a)),n&&(n.reject(Error("Load timeout for plugin: "+a)),n=null));else h=r[String(b.id)],delete r[String(b.id)],b.error?h.reject(b.error):h.resolve(b.result)}catch(v){console.log(v)}}var k=this,l=null,m=new b,n=null,o=!1,p=0,r={},q={};this.getLocation=function(){return a};this.getData=function(){return e};this.uninstall=function(){for(var a in q)q.hasOwnProperty(a)&&
(q[a].unregister(),delete q[a]);l&&(d.disconnect(l),l=null);d.uninstallPlugin(this)};this.getServiceReferences=function(){var a=[],c;for(c in q)q.hasOwnProperty(c)&&a.push(q[c].getServiceReference());return a};this.update=function(){if(!o)return this._load();n===null&&(n=new b,d.disconnect(l),l=d.connect(a,i));return n.promise};this._load=function(b,g){l||(l=d.connect(a,i,g),m.then(null,function(){b||(e={},d.updatePlugin(k))}));return m.promise};if(typeof a!=="string")throw Error("invalid url:"+a);
e&&f()};a.PluginRegistry=function(c,e,d){function g(a){if(a.indexOf("://")===-1){var c=document.createElement("a");c.href=a;return c.href}return a}function h(a){a.getData()._expires=(new Date).getTime()+36E5;i["plugin."+a.getLocation()]=JSON.stringify(a.getData())}function j(a){var c=null,a=g(a);k.some(function(b){if(a===b.getLocation())return c=b,!0});return c}var i=e||localStorage||{},k=[],l=[],m=new f.EventTarget;addEventListener("message",function(a){var c=a.source;l.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}})},!1);var n={registerService:c.registerService.bind(c),connect:function(a,c,b){function e(){c({method:"timeout"})}var g={handler:c,url:a},h=setTimeout(e,b||15E3);if(a.match(/\.js$/)&&typeof Worker!=="undefined"){var f=new Worker(a);f.onmessage=function(a){if(typeof g.useStructuredClone==="undefined")g.useStructuredClone=typeof a.data!=="string";g.handler(g.useStructuredClone?
a.data:JSON.parse(a.data))};g.target=f;g.close=function(){f.terminate()}}else{var i=document.createElement("iframe");i.id=a;i.name=a;if(!d)i.style.display="none",i.style.visibility="hidden";i.src=a;i.onload=function(){clearTimeout(h);setTimeout(e,5E3)};i.sandbox="allow-scripts allow-same-origin";document.body.appendChild(i);g.target=i.contentWindow;g.close=function(){document.body.removeChild(i)}}l.push(g);return g},disconnect:function(a){for(var c=0;c<l.length;c++)if(a===l[c]){l.splice(c,1);try{a.close()}catch(b){}break}},
uninstallPlugin:function(a){delete i["plugin."+a.getLocation()];for(var c=0;c<k.length;c++)if(a===k[c]){k.splice(c,1);m.dispatchEvent("pluginRemoved",a);break}},updatePlugin:function(a){h(a);m.dispatchEvent("pluginUpdated",a)},postMessage:function(a,c){c.target.postMessage(c.useStructuredClone?a:JSON.stringify(a),c.url)},dispatchEvent:function(a,c){try{m.dispatchEvent(a,c)}catch(b){console&&console.log(b)}}};this.startup=function(c){var d=[];c.forEach(function(c){var c=g(c),b="plugin."+c,e=i[b]?JSON.parse(i[b]):
null;e&&e._expires&&e._expires>(new Date).getTime()?j(c)===null&&(delete e._expires,k.push(new a.Plugin(c,e,n))):(i[b]="{}",c=new a.Plugin(c,{},n),k.push(c),d.push(c._load(!1,5E3)))});return(new b).all(d,function(){})};this.shutdown=function(){l.forEach(function(a){try{a.close()}catch(c){}})};this.installPlugin=function(c,d){var c=g(c),e=new b,f=j(c);if(f)if(f.getData())e.resolve(f);else{var i=function(a){a.getLocation()===c&&(e.resolve(a),m.removeEventListener("pluginAdded",i))};m.addEventListener("pluginAdded",
i)}else f=new a.Plugin(c,d,n),k.push(f),f.getData()?(h(f),m.dispatchEvent("pluginAdded",f),e.resolve(f)):f._load(!0).then(function(){h(f);m.dispatchEvent("pluginAdded",f);e.resolve(f)},function(a){e.reject(a)});return e.promise};this.getPlugins=function(){var a=[];k.forEach(function(c){c.getData()&&a.push(c)});return a};this.getPlugin=function(a){return(a=j(a))&&a.getData()?a:null};this.addEventListener=function(a,c){m.addEventListener(a,c)};this.removeEventListener=function(a,c){m.removeEventListener(a,
c)}};return a});
define("orion/bootstrap",["require","orion/Deferred","orion/serviceregistry","orion/preferences","orion/pluginregistry"],function(b,f,a,c,e){var d;return{startup:function(){if(d)return d;d=new f;var g=new a.ServiceRegistry,h=new c.PreferencesService(g),j=new e.PluginRegistry(g);return h.getPreferences("/plugins").then(function(a){for(var a=a.keys(),c=0;c<a.length;++c)a[c].indexOf("://")===-1&&(a[c]=b.toUrl(a[c]));return j.startup(a)}).then(function(){if(g.getServiceReferences("orion.core.preference.provider").length>0)return h.getPreferences("/plugins",
h.USER_SCOPE).then(function(a){for(var a=a.keys(),c=0;c<a.length;++c)a[c].indexOf("://")===-1&&(a[c]=b.toUrl(a[c]));return j.startup(a)})}).then(function(){var a=g.getService("orion.core.auth");a&&a.getUser().then(function(c){c||a.getAuthForm(window.location.href).then(function(a){window.location=a})})}).then(function(){var a={serviceRegistry:g,preferences:h,pluginRegistry:j};d.resolve(a);return a})}}});
(function(){function b(a,c,b,h,f,i){c[a]&&(b.push(a),(c[a]===!0||c[a]===1)&&h.push(f+a+"/"+i))}function f(a,c,b,h,f){c=h+c+"/"+f;require._fileExists(a.toUrl(c))&&b.push(c)}var a=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/,c={};define("i18n",{version:"1.0.0",load:function(e,d,g,h){var h=h||{},j=a.exec(e),i=j[1],k=j[4],l=j[5],m=k.split("-"),n=[],o={},p,r,q="";j[5]?(i=j[1],e=i+l):(l=j[4],k=h.locale||(h.locale=typeof navigator==="undefined"?"root":(navigator.language||navigator.userLanguage||"root").toLowerCase()),
m=k.split("-"));if(h.isBuild){n.push(e);f(d,"root",n,i,l);for(p=0;r=m[p];p++)q+=(q?"-":"")+r,f(d,q,n,i,l);d(n,function(){g()})}else d([e],function(a){var e=[];b("root",a,e,n,i,l);for(p=0;r=m[p];p++)q+=(q?"-":"")+r,b(q,a,e,n,i,l);d(n,function(){var b,h;for(b=e.length-1;b>-1&&(r=e[b]);b--){h=a[r];if(h===!0||h===1)h=d(i+r+"/"+l);var f=o,k=void 0;for(k in h)!(k in c)&&!(k in f)&&(f[k]=h[k])}g(o)})})}})})();
define("orion/i18n",[],function(){return{load:function(b,f,a,c){var c=c||{},e=/(^.*(?:^|\/)nls(?:\/|$))([^\/]*)\/?([^\/]*)/,d=e.exec(b);if(d)if(f.defined(b))a(f(b));else if(c.isBuild||c.isTest)a({});else{var g=d[1],h=d[3]?d[2]:"",j=d[3]||d[2];f(["orion/bootstrap"],function(i){i.startup().then(function(i){var l=i.serviceRegistry,i=l.getServiceReferences("orion.i18n.message");if(h)i.some(function(c){return b===c.getProperty("name")?(l.getService(c).getMessageBundle().then(function(c){a(c)},function(){a({})}),
!0):!1})||a({});else{var m={},n;i.forEach(function(a){var b=a.getProperty("name");if((d=e.exec(b))&&g===d[1]&&j===(d[3]||d[2]))if(h=d[3]?d[2]:""){if((a=c.locale||(typeof navigator!=="undefined"?navigator.language||navigator.userLanguage:null))&&a.indexOf(h)===0)m[h]=!0,f.specified(b)||define(b,["orion/i18n!"+b],function(a){return a})}else n=a});f.specified(b)?a(m):n?l.getService(n).getMessageBundle().then(function(c){Object.keys(m).forEach(function(a){typeof c[a]==="undefined"&&(c[a]=m[a])});define(b,
[],c);a(c)},function(){define(b,[],m);a(m)}):(define(b,[],m),a(m))}})})}else a(null)}}});define("orion/nls/messages",["orion/i18n!orion/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/nls/root/messages",{Navigator:"Navigator",Sites:"Sites",Repositories:"Repositories",Console:"Console","Get Plugins":"Get Plugins",Global:"Global",Editor:"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.":"Beta build I20120622-1139. Please try it out but BEWARE your data may be lost.","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"});define("dijit",["dojo"],function(b){return dijit=b._dijit||{}});
(function(){var b=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],f=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,c=typeof location!=="undefined"&&location.href,e=c&&location.protocol&&location.protocol.replace(/\:/,""),d=c&&location.hostname,g=c&&(location.port||void 0),h=[];define("text",[],function(){var j,i,k;typeof window!=="undefined"&&window.navigator&&window.document?i=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?(k=require.nodeRequire("fs"),i=function(a,c){var b=k.readFileSync(a,"utf8");b.indexOf("\ufeff")===0&&(b=b.substring(1));c(b)}):typeof Packages!=="undefined"&&(i=function(a,c){var b=new java.io.File(a),d=java.lang.System.getProperty("line.separator"),b=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(b),"utf-8")),e,g,h="";try{e=new java.lang.StringBuffer;
(g=b.readLine())&&g.length()&&g.charAt(0)===65279&&(g=g.substring(1));for(e.append(g);(g=b.readLine())!==null;)e.append(d),e.append(g);h=String(e.toString())}finally{b.close()}c(h)});return j={version:"1.0.7",strip:function(c){if(c){var c=c.replace(f,""),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,
d;if(typeof XMLHttpRequest!=="undefined")return new XMLHttpRequest;else for(c=0;c<3;c++){d=b[c];try{a=new ActiveXObject(d)}catch(e){}if(a){b=[d];break}}if(!a)throw Error("createXhr(): XMLHttpRequest not available");return a},get:i,parseName:function(a){var c=!1,b=a.indexOf("."),d=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:d,ext:a,strip:c}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(a,
c,b,d){var e=j.xdRegExp.exec(a),g;if(!e)return!0;a=e[2];e=e[3];e=e.split(":");g=e[1];e=e[0];return(!a||a===c)&&(!e||e===b)&&(!g&&!e||g===d)},finishLoad:function(a,c,b,d,e){b=c?j.strip(b):b;e.isBuild&&(h[a]=b);d(b)},load:function(a,b,h,f){if(f.isBuild&&!f.inlineText)h();else{var i=j.parseName(a),k=i.moduleName+"."+i.ext,q=b.toUrl(k),t=f&&f.text&&f.text.useXhr||j.useXhr;!c||t(q,e,d,g)?j.get(q,function(c){j.finishLoad(a,i.strip,c,h,f)}):b([k],function(a){j.finishLoad(i.moduleName+"."+i.ext,i.strip,a,
h,f)})}},write:function(a,c,b){if(c in h){var d=j.jsEscape(h[c]);b.asModule(a+"!"+c,"define(function () { return '"+d+"';});\n")}},writeFile:function(a,c,b,d,e){var c=j.parseName(c),g=c.moduleName+"."+c.ext,h=b.toUrl(c.moduleName+"."+c.ext)+".js";j.load(g,b,function(){var c=function(a){return d(h,a)};c.asModule=function(a,c){return d.asModule(a,h,c)};j.write(a,g,c,e)},e)}}})})();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,f){f.getObject("i18n",!0,f);f.i18n.getLocalization=f.i18n.getLocalization||function(a,c,e){var e=f.i18n.normalizeLocale(e),d=e.split("-"),g=[a,"nls",c].join(".");if(typeof f.global.require!=="undefined"){var h=b("i18n!"+[a.replace(/\./g,"/"),"nls",c].join("/"));(f._loadedModules[g]=f._loadedModules[g]||{})[d.join("_")]=h.root||h}if(g=f._loadedModules[g]){for(var j,h=d.length;h>0;h--){var i=d.slice(0,h).join("_");if(g[i]){j=g[i];break}}if(!j)j=g.ROOT;
if(j)return a=function(){},a.prototype=j,new a}throw Error("Bundle not found: "+c+" in "+a+" , locale="+e);};f.i18n.normalizeLocale=function(a){a=a?a.toLowerCase():f.locale;a=="root"&&(a="ROOT");return a};f.i18n._requireLocalization=function(a,c,b,d){var b=f.i18n.normalizeLocale(b),g=[a,"nls",c].join("."),h="";if(d){for(var j=d.split(","),i=0;i<j.length;i++)b.indexOf(j[i])==0&&j[i].length>h.length&&(h=j[i]);h||(h="ROOT")}var j=d?h:b,k=f._loadedModules[g],i=null;if(k){if(f.config.localizationComplete&&
k._built)return;i=j.replace(/-/g,"_");i=f._loadedModules[g+"."+i]}if(!i){var k=f.provide(g),l=f._getModuleSymbols(a).concat("nls").join("/"),m;f.i18n._searchLocalePath(j,d,function(a){var b=a.replace(/-/g,"_"),e=g+"."+b,h=!1;f._loadedModules[e]?h=!0:(f.provide(e),e=[l],a!="ROOT"&&e.push(a),e.push(c),a=e.join("/")+".js",h=f._loadPath(a,null,function(a){var a=a.root||a,c=function(){};c.prototype=m;k[b]=new c;for(var d in a)k[b][d]=a[d]}));h&&k[b]?m=k[b]:k[b]=m;if(d)return!0})}d&&b!=h&&(k[b.replace(/-/g,
"_")]=k[h.replace(/-/g,"_")])};(function(){var a=f.config.extraLocale;if(a){!a instanceof Array&&(a=[a]);var c=f.i18n._requireLocalization;f.i18n._requireLocalization=function(b,d,g,h){c(b,d,g,h);if(!g)for(g=0;g<a.length;g++)c(b,d,a[g],h)}}})();f.i18n._searchLocalePath=function(a,c,b){for(var a=f.i18n.normalizeLocale(a),d=a.split("-"),a=[],g=d.length;g>0;g--)a.push(d.slice(0,g).join("-"));a.push(!1);c&&a.reverse();for(c=a.length-1;c>=0;c--)if(b(a[c]||"ROOT"))break};f.i18n._preloadLocalizations=function(a,
c){function b(d){d=f.i18n.normalizeLocale(d);f.i18n._searchLocalePath(d,!0,function(b){for(var d=0;d<c.length;d++)if(c[d]==b)return f.require(a+"_"+b),!0;return!1})}b();for(var d=f.config.extraLocale||[],g=0;g<d.length;g++)b(d[g])};return f.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("dojo/window",["dojo"],function(b){b.getObject("window",!0,b);b.window.getBox=function(){var f=b.doc.compatMode=="BackCompat"?b.body():b.doc.documentElement,a=b._docScroll();return{w:f.clientWidth,h:f.clientHeight,l:a.x,t:a.y}};b.window.get=function(f){if(b.isIE&&window!==document.parentWindow){f.parentWindow.execScript("document._parentWindow = window;","Javascript");var a=f._parentWindow;f._parentWindow=null;return a}return f.parentWindow||f.defaultView};b.window.scrollIntoView=function(f,
a){try{var f=b.byId(f),c=f.ownerDocument||b.doc,e=c.body||b.body(),d=c.documentElement||e.parentNode,g=b.isIE,h=b.isWebKit;if((!b.isMoz&&!g&&!h&&!b.isOpera||f==e||f==d)&&typeof f.scrollIntoView!="undefined")f.scrollIntoView(!1);else{var j=c.compatMode=="BackCompat",i=g>=9&&f.ownerDocument.parentWindow.frameElement?d.clientHeight>0&&d.clientWidth>0&&(e.clientHeight==0||e.clientWidth==0||e.clientHeight>d.clientHeight||e.clientWidth>d.clientWidth)?d:e:j?e:d,c=h?e:i,k=i.clientWidth,l=i.clientHeight,m=
!b._isBodyLtr(),n=a||b.position(f),o=f.parentNode,i=function(a){return g<=6||g&&j?!1:b.style(a,"position").toLowerCase()=="fixed"};if(!i(f))for(;o;){o==e&&(o=c);var p=b.position(o),r=i(o);if(o==c){p.w=k;p.h=l;c==d&&g&&m&&(p.x+=c.offsetWidth-p.w);if(p.x<0||!g)p.x=0;if(p.y<0||!g)p.y=0}else{var q=b._getPadBorderExtents(o);p.w-=q.w;p.h-=q.h;p.x+=q.l;p.y+=q.t;var t=o.clientWidth,s=p.w-t;if(t>0&&s>0)p.w=t,p.x+=m&&(g||o.clientLeft>q.l)?s:0;t=o.clientHeight;s=p.h-t;if(t>0&&s>0)p.h=t}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>l)p.h=l-p.y;if(p.x+p.w>k)p.w=k-p.x}var u=n.x-p.x,w=n.y-Math.max(p.y,0),v=u+n.w-p.w,C=w+n.h-p.h;if(v*u>0){var K=Math[u<0?"max":"min"](u,v);if(m&&(g==8&&!j||g>=9))K=-K;n.x+=o.scrollLeft;o.scrollLeft+=K;n.x-=o.scrollLeft}C*w>0&&(n.y+=o.scrollTop,o.scrollTop+=Math[w<0?"max":"min"](w,C),n.y-=o.scrollTop);o=o!=c&&!r&&o.parentNode}}}catch(x){console.error("scrollIntoView: "+x),f.scrollIntoView(!1)}};return b.window});
define("dijit/_base/manager",["dojo","dijit"],function(b,f){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,e=0,d;for(d in this._hash)a.call(c,this._hash[d],e++,this._hash);return this},filter:function(a,
c){var c=c||b.global,e=new f.WidgetSet,d=0,g;for(g in this._hash){var h=this._hash[g];a.call(c,h,d++,this._hash)&&e.add(h)}return e},byId:function(a){return this._hash[a]},byClass:function(a){var c=new f.WidgetSet,b,d;for(b in this._hash)d=this._hash[b],d.declaredClass==a&&c.add(d);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,e=0,d;for(d in this._hash)if(!a.call(c,
this._hash[d],e++,this._hash))return!1;return!0},some:function(a,c){var c=c||b.global,e=0,d;for(d in this._hash)if(a.call(c,this._hash[d],e++,this._hash))return!0;return!1}});(function(){f.registry=new f.WidgetSet;var a=f.registry._hash,c=b.attr,e=b.hasAttr,d=b.style;f.byId=function(c){return typeof c=="string"?a[c]:c};var g={};f.getUniqueId=function(c){var b;do b=c+"_"+(c in g?++g[c]:g[c]=0);while(a[b]);return f._scopeName=="dijit"?b:f._scopeName+"_"+b};f.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])&&d.push(e):b(c)}}var d=[];b(c);return d};f._destroyAll=function(){f._curFocus=null;f._prevFocus=null;f._activeStack=[];b.forEach(f.findWidgets(b.body()),function(a){a._destroyed||(a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy())})};b.isIE&&b.addOnWindowUnload(function(){f._destroyAll()});f.byNode=function(c){return a[c.getAttribute("widgetId")]};f.getEnclosingWidget=function(c){for(;c;){var b=
c.getAttribute&&c.getAttribute("widgetId");if(b)return a[b];c=c.parentNode}return null};var h=f._isElementShown=function(a){var b=d(a);return b.visibility!="hidden"&&b.visibility!="collapsed"&&b.display!="none"&&c(a,"type")!="hidden"};f.hasDefaultTabStop=function(a){switch(a.nodeName.toLowerCase()){case "a":return e(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(d){try{c=a.contentWindow.document.body}catch(g){return!1}}return c.contentEditable=="true"||c.firstChild&&c.firstChild.contentEditable=="true";default:return a.contentEditable=="true"}};var j=f.isTabNavigable=function(a){return c(a,"disabled")?!1:e(a,"tabIndex")?c(a,"tabIndex")>=0:f.hasDefaultTabStop(a)};f._getTabNavigable=function(a){function d(a){return a&&a.tagName.toLowerCase()=="input"&&a.type&&a.type.toLowerCase()=="radio"&&a.name&&a.name.toLowerCase()}var g,f,n,
o,p,r,q={},t=function(a){b.query("> *",a).forEach(function(a){if(!(b.isIE&&a.scopeName!=="HTML")&&h(a)){if(j(a)){var i=c(a,"tabIndex");if(!e(a,"tabIndex")||i==0)g||(g=a),f=a;else if(i>0){if(!n||i<o)o=i,n=a;if(!p||i>=r)r=i,p=a}i=d(a);b.attr(a,"checked")&&i&&(q[i]=a)}a.nodeName.toUpperCase()!="SELECT"&&t(a)}})};h(a)&&t(a);return{first:q[d(g)]||g,last:q[d(f)]||f,lowest:q[d(n)]||n,highest:q[d(p)]||p}};f.getFirstInTabbingOrder=function(a){a=f._getTabNavigable(b.byId(a));return a.lowest?a.lowest:a.first};
f.getLastInTabbingOrder=function(a){a=f._getTabNavigable(b.byId(a));return a.last?a.last:a.highest};f.defaultDuration=b.config.defaultDuration||200})();return f});
define("dojo/Stateful",["dojo"],function(b){b.declare("dojo.Stateful",null,{postscript:function(f){f&&b.mixin(this,f)},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(f,a){var c=this._watchCallbacks;if(!c)var e=this,c=this._watchCallbacks=function(a,b,d,f){var k=function(c){if(c)for(var c=c.slice(),f=0,i=c.length;f<i;f++)try{c[f].call(e,
a,b,d)}catch(k){console.error(k)}};k(c["_"+a]);f||k(c["*"])};!a&&typeof f==="function"?(a=f,f="*"):f="_"+f;var d=c[f];typeof d!=="object"&&(d=c[f]=[]);d.push(a);return{unwatch:function(){d.splice(b.indexOf(d,a),1)}}}});return b.Stateful});
define("dijit/_WidgetBase",["dojo","dijit","dijit/_base/manager","dojo/Stateful"],function(b,f){(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=f.getUniqueId(this.declaredClass.replace(/\./g,"_"));f.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var e=this.srcNodeRef;e&&e.parentNode&&this.domNode!==e&&e.parentNode.replaceChild(this.domNode,e)}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=[],e,d=a.prototype,g;for(g in d)b.isFunction(d[g])&&(e=g.match(/^_set([a-zA-Z]*)Attr$/))&&
e[1]&&c.push(e[1].charAt(0).toLowerCase()+e[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,e=b.unsubscribe;c(this._connects,function(a){c(a,b.disconnect)});c(this._subscribes,function(a){e(a)});c(this._supportingWidgets||[],function(a){a.destroyRecursive?a.destroyRecursive():a.destroy&&a.destroy()});this.destroyRendering(a);f.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 e=this.attributeMap[a];b.forEach(b.isArray(e)?e:[e],function(d){var e=this[d.node||d||"domNode"];switch(d.type||"attribute"){case "attribute":b.isFunction(c)&&(c=b.hitch(this,c));d=d.attribute?d.attribute:/^on[A-Z][a-zA-Z]*$/.test(a)?a.toLowerCase():a;b.attr(e,d,c);break;case "innerText":e.innerHTML="";e.appendChild(b.doc.createTextNode(c));break;case "innerHTML":e.innerHTML=c;break;case "class":b.replaceClass(e,
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 d=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 d||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(f.byNode):[]},getChildren:function(){return this.containerNode?f.findWidgets(this.containerNode):[]},connect:function(a,c,e){a=[b._connect(a,
c,this,e)];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 e=b.subscribe(a,this,c);this._subscribes.push(e);return e},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 f._WidgetBase});
define("dijit/_base/focus",["dojo","dijit","dojo/window","dijit/_base/manager"],function(b,f){b.mixin(f,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return f.getBookmark().isCollapsed},getBookmark:function(){var a,c,e=b.doc.selection,d=f._curFocus;if(b.global.getSelection){if(e=b.global.getSelection())if(e.isCollapsed){if(a=d?d.tagName:"")if(a=a.toLowerCase(),a=="textarea"||a=="input"&&(!d.type||d.type.toLowerCase()=="text"))return e={start:d.selectionStart,end:d.selectionEnd,node:d,pRange:!0},
{isCollapsed:e.end<=e.start,mark:e};a={isCollapsed:!0};if(e.rangeCount)a.mark=e.getRangeAt(0).cloneRange()}else c=e.getRangeAt(0),a={isCollapsed:!1,mark:c.cloneRange()}}else if(e){a=d?d.tagName:"";a=a.toLowerCase();if(d&&a&&(a=="button"||a=="textarea"||a=="input"))return e.type&&e.type.toLowerCase()=="none"?{isCollapsed:!0,mark:null}:(c=e.createRange(),{isCollapsed:c.text&&c.text.length?!1:!0,mark:{range:c,pRange:!0}});a={};try{c=e.createRange(),a.isCollapsed=!(e.type=="Text"?c.htmlText.length:c.length)}catch(g){return a.isCollapsed=
!0,a}if(e.type.toUpperCase()=="CONTROL")if(c.length){a.mark=[];e=0;for(d=c.length;e<d;)a.mark.push(c.item(e++))}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 e;a.pRange?e=a.range:b.isArray(a)?(e=c.body.createControlRange(),b.forEach(a,function(a){e.addElement(a)})):(e=c.body.createTextRange(),e.moveToBookmark(a));e.select()}},getFocus:function(a,c){var e=!f._curFocus||a&&b.isDescendant(f._curFocus,a.domNode)?f._prevFocus:f._curFocus;return{node:e,bookmark:e==f._curFocus&&b.withGlobal(c||b.global,f.getBookmark),openedForWindow:c}},focus:function(a){if(a){var c="node"in a?a.node:a,e=a.bookmark,a=a.openedForWindow,d=e?e.isCollapsed:
!1;if(c){var g=c.tagName.toLowerCase()=="iframe"?c.contentWindow:c;if(g&&g.focus)try{g.focus()}catch(h){}f._onFocusNode(c)}if(e&&b.withGlobal(a||b.global,f.isCollapsed)&&!d){a&&a.focus();try{b.withGlobal(a||b.global,f.moveToBookmark,null,[e])}catch(j){}}}},_activeStack:[],registerIframe:function(a){return f.registerWin(a.contentWindow,a)},unregisterIframe:function(a){f.unregisterWin(a)},registerWin:function(a,c){var e=function(a){f._justMouseDowned=!0;setTimeout(function(){f._justMouseDowned=!1},
0);if(!b.isIE||!a||!(a.srcElement&&a.srcElement.parentNode==null))f._onTouchNode(c||a.target||a.srcElement,"mouse")},d=b.isIE?a.document.documentElement:a.document;if(d)if(b.isIE){a.document.body.attachEvent("onmousedown",e);var g=function(a){a.srcElement.tagName.toLowerCase()!="#document"&&f.isTabNavigable(a.srcElement)?f._onFocusNode(c||a.srcElement):f._onTouchNode(c||a.srcElement)};d.attachEvent("onactivate",g);var h=function(a){f._onBlurNode(c||a.srcElement)};d.attachEvent("ondeactivate",h);return function(){a.document.detachEvent("onmousedown",
e);d.detachEvent("onactivate",g);d.detachEvent("ondeactivate",h);d=null}}else{d.body.addEventListener("mousedown",e,!0);var j=function(a){f._onFocusNode(c||a.target)};d.addEventListener("focus",j,!0);var i=function(a){f._onBlurNode(c||a.target)};d.addEventListener("blur",i,!0);return function(){d.body.removeEventListener("mousedown",e,!0);d.removeEventListener("focus",j,!0);d.removeEventListener("blur",i,!0);d=null}}},unregisterWin:function(a){a&&a()},_onBlurNode:function(){f._prevFocus=f._curFocus;
f._curFocus=null;if(!f._justMouseDowned)f._clearActiveWidgetsTimer&&clearTimeout(f._clearActiveWidgetsTimer),f._clearActiveWidgetsTimer=setTimeout(function(){delete f._clearActiveWidgetsTimer;f._setStack([]);f._prevFocus=null},100)},_onTouchNode:function(a,c){f._clearActiveWidgetsTimer&&(clearTimeout(f._clearActiveWidgetsTimer),delete f._clearActiveWidgetsTimer);var e=[];try{for(;a;){var d=b.attr(a,"dijitPopupParent");if(d)a=f.byId(d).domNode;else if(a.tagName&&a.tagName.toLowerCase()=="body"){if(a===
b.body())break;a=b.window.get(a.ownerDocument).frameElement}else{var g=a.getAttribute&&a.getAttribute("widgetId"),h=g&&f.byId(g);h&&!(c=="mouse"&&h.get("disabled"))&&e.unshift(g);a=a.parentNode}}}catch(j){}f._setStack(e,c)},_onFocusNode:function(a){if(a&&a.nodeType!=9&&(f._onTouchNode(a),a!=f._curFocus)){if(f._curFocus)f._prevFocus=f._curFocus;f._curFocus=a;b.publish("focusNode",[a])}},_setStack:function(a,c){var e=f._activeStack;f._activeStack=a;for(var d=0;d<Math.min(e.length,a.length);d++)if(e[d]!=
a[d])break;for(var g,h=e.length-1;h>=d;h--)if(g=f.byId(e[h]))g._focused=!1,g.set("focused",!1),g._hasBeenBlurred=!0,g._onBlur&&g._onBlur(c),b.publish("widgetBlur",[g,c]);for(h=d;h<a.length;h++)if(g=f.byId(a[h]))g._focused=!0,g.set("focused",!0),g._onFocus&&g._onFocus(c),b.publish("widgetFocus",[g,c])}});b.addOnLoad(function(){var a=f.registerWin(window);b.isIE&&b.addOnWindowUnload(function(){f.unregisterWin(a);a=null})});return f});
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,e,d){this.pairs[d?"unshift":"push"]([b,a,c,e])},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,f){f.getViewport=function(){return b.window.getBox()};f.placeOnScreen=function(a,c,e,d){e=b.map(e,function(a){var b={corner:a,pos:{x:c.x,y:c.y}};d&&(b.pos.x+=a.charAt(1)=="L"?d.x:-d.x,b.pos.y+=a.charAt(0)=="T"?d.y:-d.y);return b});return f._place(a,e)};f._place=function(a,c,e,d){var g=b.window.getBox();(!a.parentNode||String(a.parentNode.tagName).toLowerCase()!="body")&&b.body().appendChild(a);var h=null;b.some(c,
function(c){var f=c.corner,j=c.pos,m=0,n={w:f.charAt(1)=="L"?g.l+g.w-j.x:j.x-g.l,h:f.charAt(1)=="T"?g.t+g.h-j.y:j.y-g.t};e&&(m=e(a,c.aroundCorner,f,n,d),m=typeof m=="undefined"?0:m);var o=a.style,p=o.display,r=o.visibility;o.visibility="hidden";o.display="";var q=b.marginBox(a);o.display=p;o.visibility=r;o=Math.max(g.l,f.charAt(1)=="L"?j.x:j.x-q.w);p=Math.max(g.t,f.charAt(0)=="T"?j.y:j.y-q.h);r=Math.min(g.l+g.w,f.charAt(1)=="L"?o+q.w:j.x);j=Math.min(g.t+g.h,f.charAt(0)=="T"?p+q.h:j.y);r-=o;j-=p;m+=
q.w-r+(q.h-j);if(h==null||m<h.overflow)h={corner:f,aroundCorner:c.aroundCorner,x:o,y:p,w:r,h:j,overflow:m,spaceAvailable:n};return!m});h.overflow&&e&&e(a,h.aroundCorner,h.corner,h.spaceAvailable,d);var c=b._isBodyLtr(),f=a.style;f.top=h.y+"px";f[c?"left":"right"]=(c?h.x:g.w-h.x-h.w)+"px";return h};f.placeOnScreenAroundNode=function(a,c,e,d){c=b.byId(c);c=b.position(c,!0);return f._placeOnScreenAroundRect(a,c.x,c.y,c.w,c.h,e,d)};f.placeOnScreenAroundRectangle=function(a,c,b,d){return f._placeOnScreenAroundRect(a,
c.x,c.y,c.width,c.height,b,d)};f._placeOnScreenAroundRect=function(a,c,b,d,g,h,j){var i=[],k;for(k in h)i.push({aroundCorner:k,corner:h[k],pos:{x:c+(k.charAt(1)=="L"?0:d),y:b+(k.charAt(0)=="T"?0:g)}});return f._place(a,i,j,{w:d,h:g})};f.placementRegistry=new b.AdapterRegistry;f.placementRegistry.register("node",function(a,c){return typeof c=="object"&&typeof c.offsetWidth!="undefined"&&typeof c.offsetHeight!="undefined"},f.placeOnScreenAroundNode);f.placementRegistry.register("rect",function(a,c){return typeof c==
"object"&&"x"in c&&"y"in c&&"width"in c&&"height"in c},f.placeOnScreenAroundRectangle);f.placeOnScreenAroundElement=function(a,c,b,d){return f.placementRegistry.match.apply(f.placementRegistry,arguments)};f.getPopupAroundAlignment=function(a,c){var e={};b.forEach(a,function(a){switch(a){case "after":e[c?"BR":"BL"]=c?"BL":"BR";break;case "before":e[c?"BL":"BR"]=c?"BR":"BL";break;case "below-alt":c=!c;case "below":e[c?"BL":"BR"]=c?"TL":"TR";e[c?"BR":"BL"]=c?"TR":"TL";break;case "above-alt":c=!c;default:e[c?
"TL":"TR"]=c?"BL":"BR",e[c?"TR":"TL"]=c?"BR":"BL"}});return e};return f});define("dijit/_base/scroll",["dojo","dijit","dojo/window"],function(b,f){f.scrollIntoView=function(a,c){b.window.scrollIntoView(a,c)};return f.scrollIntoView});
define("dojo/uacss",["dojo"],function(b){(function(){var f=b.doc.documentElement,a=b.isIE,c=b.isOpera,e=Math.floor,d=b.isFF,g=b.boxModel.replace(/-/,""),a={dj_ie:a,dj_ie6:e(a)==6,dj_ie7:e(a)==7,dj_ie8:e(a)==8,dj_ie9:e(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:e(d)==3};a["dj_"+g]=!0;var h="",j;for(j in a)a[j]&&(h+=j+" ");f.className=b.trim(f.className+" "+h);b._loaders.unshift(function(){if(!b._isBodyLtr()){var a=
"dj_rtl dijitRtl "+h.replace(/ /g,"-rtl ");f.className=b.trim(f.className+" "+a)}})})();return b});define("dijit/_base/sniff",["dojo","dijit","dojo/uacss"],function(b,f){return f});
define("dijit/_base/typematic",["dojo","dijit"],function(b,f){f.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,e,d,g,h,f,i){if(g!=this._obj)this.stop(),
this._initialDelay=f||500,this._subsequentDelay=h||0.9,this._minDelay=i||10,this._obj=g,this._evt=a,this._node=e,this._count=this._currentTimeout=-1,this._callback=b.hitch(c,d),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,e,d,g,h,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(i){i.charOrCode==c.charOrCode&&(c.ctrlKey===void 0||c.ctrlKey==i.ctrlKey)&&(c.altKey===void 0||c.altKey==i.altKey)&&(c.metaKey===void 0||c.metaKey==(i.metaKey||!1))&&(c.shiftKey===void 0||c.shiftKey==i.shiftKey)?(b.stopEvent(i),f.typematic.trigger(i,e,a,
d,c,g,h,j)):f.typematic._obj==c&&f.typematic.stop()}),b.connect(a,"onkeyup",this,function(){f.typematic._obj==c&&f.typematic.stop()})]},addMouseListener:function(a,c,e,d,g,h){var j=b.connect;return[j(a,"mousedown",this,function(i){b.stopEvent(i);f.typematic.trigger(i,c,a,e,a,d,g,h)}),j(a,"mouseup",this,function(a){b.stopEvent(a);f.typematic.stop()}),j(a,"mouseout",this,function(a){b.stopEvent(a);f.typematic.stop()}),j(a,"mousemove",this,function(a){a.preventDefault()}),j(a,"dblclick",this,function(i){b.stopEvent(i);
b.isIE&&(f.typematic.trigger(i,c,a,e,a,d,g,h),setTimeout(b.hitch(this,f.typematic.stop),50))})]},addListener:function(a,c,b,d,g,h,f,i){return this.addKeyListener(c,b,d,g,h,f,i).concat(this.addMouseListener(a,d,g,h,f,i))}};return f.typematic});
define("dijit/_base/wai",["dojo","dijit"],function(b,f){f.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 e=c.backgroundImage;b[c.borderTopColor==c.borderRightColor||e!=null&&(e=="none"||e=="url(invalid-url:)")?"addClass":"removeClass"](b.body(),
"dijit_a11y");b.isIE?a.outerHTML="":b.body().removeChild(a)}}};(b.isIE||b.isMoz)&&b._loaders.unshift(f.wai.onload);b.mixin(f,{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 e=b.attr(a,"role");e&&(c?(e=b.trim((" "+e+" ").replace(" "+c+" "," ")),b.attr(a,"role",e)):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 f});define("dijit/_base/window",["dojo","dijit","dojo/window"],function(b,f){f.getDocumentWindow=function(a){return b.window.get(a)};return f});
define("dijit/_base/popup",["dojo","dijit","dijit/_base/focus","dijit/_base/place","dijit/_base/window"],function(b,f){f.popup={_stack:[],_beginZIndex:1E3,_idGen:1,_createWrapper:function(a){var c=a.declaredClass?a._popupWrapper:a.parentNode&&b.hasClass(a.parentNode,"dijitPopup"),e=a.domNode||a;if(!c&&(c=b.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},b.body()),c.appendChild(e),e=e.style,e.display="",e.visibility="",e.position="",e.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,e=a.popup,d=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"}),g=a.around,h=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));)f.popup.close(c[c.length-1].widget);var j=this._createWrapper(e);b.attr(j,{id:h,style:{zIndex:this._beginZIndex+c.length},"class":"dijitPopup "+(e.baseClass||e["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:a.parent?a.parent.id:""});if((b.isIE||b.isMoz)&&!e.bgIframe)e.bgIframe=
new f.BackgroundIframe(j);d=g?f.placeOnScreenAroundElement(j,g,d,e.orient?b.hitch(e,"orient"):null):f.placeOnScreen(j,a,d=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],a.padding);j.style.display="";j.style.visibility="visible";e.domNode.style.visibility="visible";g=[];g.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()}));e.onCancel&&
g.push(b.connect(e,"onCancel",a.onCancel));g.push(b.connect(e,e.onExecute?"onExecute":"onChange",this,function(){var a=this.getTopPopup();if(a&&a.onExecute)a.onExecute()}));c.push({widget:e,parent:a.parent,onExecute:a.onExecute,onCancel:a.onCancel,onClose:a.onClose,handlers:g});if(e.onOpen)e.onOpen(d);return d},close:function(a){for(var c=this._stack;a&&b.some(c,function(c){return c.widget==a})||!a&&c.length;){var e=c.pop(),d=e.widget,g=e.onClose;if(d.onClose)d.onClose();b.forEach(e.handlers,b.disconnect);
d&&d.domNode&&this.hide(d);g&&g()}}};f._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,f.setWaiRole(c,
"presentation"));return c};this.push=function(c){c.style.display="none";a.push(c)}};f.BackgroundIframe=function(a){if(!a.id)throw Error("no id");if(b.isIE||b.isMoz){var c=this.iframe=f._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(f.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&&(f._frames.push(this.iframe),delete this.iframe)}});return f.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,f){return f._base});
define("dijit/_Widget",["dojo","dijit","dijit/_WidgetBase","dijit/_base"],function(b,f){b.connect(b,"_connect",function(a,c){a&&b.isFunction(a._onConnect)&&a._onConnect(c)});f._connectOnUseEventHandler=function(){};f._lastKeyDownNode=null;b.isIE?function(){var a=function(a){f._lastKeyDownNode=a.srcElement};b.doc.attachEvent("onkeydown",a);b.addOnWindowUnload(function(){b.doc.detachEvent("onkeydown",a)})}():b.doc.addEventListener("keydown",function(a){f._lastKeyDownNode=a.target},!0);(function(){b.declare("dijit._Widget",
f._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:f._connectOnUseEventHandler,onDblClick:f._connectOnUseEventHandler,onKeyDown:f._connectOnUseEventHandler,onKeyPress:f._connectOnUseEventHandler,onKeyUp:f._connectOnUseEventHandler,onMouseDown:f._connectOnUseEventHandler,onMouseMove:f._connectOnUseEventHandler,onMouseOut:f._connectOnUseEventHandler,
onMouseOver:f._connectOnUseEventHandler,onMouseLeave:f._connectOnUseEventHandler,onMouseEnter:f._connectOnUseEventHandler,onMouseUp:f._connectOnUseEventHandler,create:function(a,c){this._deferredConnects=b.clone(this._deferredConnects);for(var e in this.attributeMap)delete this._deferredConnects[e];for(e in this._deferredConnects)this[e]!==f._connectOnUseEventHandler&&delete this._deferredConnects[e];this.inherited(arguments);if(this.domNode)for(e in this.params)this._onConnect(e)},_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 e=arguments.callee._ach||(arguments.callee._ach={}),d=(arguments.callee.caller||"unknown caller").toString();e[d]||(b.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+d,"","2.0"),e[d]=!0)}return arguments.length>=2||typeof a==="object"?this.set.apply(this,arguments):this.get(a)},nodesWithKeyClick:["input","button"],connect:function(a,c,e){var d=b._connect,g=this.inherited(arguments,[a,c=="ondijitclick"?"onclick":c,e]);if(c==
"ondijitclick"&&b.indexOf(this.nodesWithKeyClick,a.nodeName.toLowerCase())==-1){var h=b.hitch(this,e);g.push(d(a,"onkeydown",this,function(c){if((c.keyCode==b.keys.ENTER||c.keyCode==b.keys.SPACE)&&!c.ctrlKey&&!c.shiftKey&&!c.altKey&&!c.metaKey)f._lastKeyDownNode=c.target,"openDropDown"in this&&a==this._buttonNode||c.preventDefault()}),d(a,"onkeyup",this,function(a){if((a.keyCode==b.keys.ENTER||a.keyCode==b.keys.SPACE)&&a.target==f._lastKeyDownNode&&!a.ctrlKey&&!a.shiftKey&&!a.altKey&&!a.metaKey)return f._lastKeyDownNode=
null,h(a)}))}return g},_onShow:function(){this.onShow()},onShow:function(){},onHide:function(){},onClose:function(){return!0}})})();return f._Widget});
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(f,a,c,e){c||(c="0");f=String(f);a=b.string.rep(c,Math.ceil((a-f.length)/c.length));return e?f+a:a+f};b.string.substitute=function(f,a,c,e){e=e||b.global;c=c?b.hitch(e,c):function(a){return a};return f.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(d,g,h){d=b.getObject(g,!1,a);h&&
(d=b.getObject(h,!1,e).call(e,d,g));return c(d,g).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/cache",["dojo"],function(b){var f={};b.cache=function(a,c,e){if(typeof a=="string")var d=b.moduleUrl(a,c);else d=a,e=c;var d=d.toString(),g=e;e!=void 0&&!b.isString(e)&&(g="value"in e?e.value:void 0);e=e&&e.sanitize?!0:!1;if(typeof g=="string")g=f[d]=e?b.cache._sanitize(g):g;else if(g===null)delete f[d];else{if(!(d in f)){g=void 0;if(b.isFunction(require)&&b.isString(a))try{var h=(a?a.replace(/\./g,"/")+"/":"")+c,g=require("text!"+h)}catch(j){}typeof g==="undefined"&&(g=b._getText(d));
f[d]=e?b.cache._sanitize(g):g}g=f[d]}return g};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/_CssStateMixin",["dojo","dijit"],function(b,f){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 e=this.stateNode||this.domNode,d={};b.forEach(e.className.split(" "),function(a){d[a]=!0});"_stateClasses"in this&&b.forEach(this._stateClasses,function(a){delete d[a]});
b.forEach(c,function(a){d[a]=!0});var g=[],h;for(h in d)g.push(h);e.className=g.join(" ");this._stateClasses=c},_trackMouseState:function(a,c){function e(){var e="disabled"in f&&f.disabled||"readonly"in f&&f.readonly;b.toggleClass(a,c+"Hover",d&&!g&&!e);b.toggleClass(a,c+"Active",g&&!e);b.toggleClass(a,c+"Focused",h&&!e)}var d=!1,g=!1,h=!1,f=this,i=b.hitch(this,"connect",a);i("onmouseenter",function(){d=!0;e()});i("onmouseleave",function(){g=d=!1;e()});i("onmousedown",function(){g=!0;e()});i("onmouseup",
function(){g=!1;e()});i("onfocus",function(){h=!0;e()});i("onblur",function(){h=!1;e()});this.watch("disabled",e);this.watch("readOnly",e)}});return f._CssStateMixin});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/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/operations/nls/messages",["orion/i18n!orion/operations/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
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("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/form/_FormMixin",["dojo","dijit","dojo/window"],function(b,f){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 e=c.disabled||!c.validate||c.validate();!e&&!a&&(b.window.scrollIntoView(c.containerNode||c.domNode),c.focus(),a=!0);return e}),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 e in c)if(c.hasOwnProperty(e)){var d=c[e],g=b.getObject(e,!1,a);g!==void 0&&(b.isArray(g)||(g=[g]),typeof d[0].checked=="boolean"?b.forEach(d,function(a){a.set("value",b.indexOf(g,a.value)!=-1)}):d[0].multiple?d[0].set("value",g):b.forEach(d,function(a,c){a.set("value",
g[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 e=c.name;if(e&&!c.disabled){var d=c.get("value");typeof c.checked=="boolean"?/Radio/.test(c.declaredClass)?d!==!1?b.setObject(e,d,a):(d=b.getObject(e,!1,a),d===void 0&&b.setObject(e,null,a)):(c=b.getObject(e,!1,a),c||(c=[],b.setObject(e,c,a)),d!==!1&&c.push(d)):
(c=b.getObject(e,!1,a),typeof c!="undefined"?b.isArray(c)?c.push(d):b.setObject(e,[c,d],a):b.setObject(e,d,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 e=this._childConnections=[],d=this._childWatches=[];b.forEach(b.filter(this._descendants,function(a){return a.validate}),function(a){b.forEach(["state","disabled"],function(b){d.push(a.watch(b,function(){c.set("state",c._getState())}))})});var g=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){e.push(c.connect(a,"onChange",g));d.push(a.watch("disabled",g))})},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 f.form._FormMixin});
define("dijit/_DialogMixin",["dojo","dijit","dijit/_Widget"],function(b,f){b.declare("dijit._DialogMixin",null,{attributeMap:f._Widget.prototype.attributeMap,execute:function(){},onCancel:function(){},onExecute:function(){},_onSubmit:function(){this.onExecute();this.execute(this.get("value"))},_getFocusItems:function(){var a=f._getTabNavigable(this.containerNode);this._firstFocusItem=a.lowest||a.first||this.closeButtonNode||this.domNode;this._lastFocusItem=a.last||a.highest||this._firstFocusItem}});
return f._DialogMixin});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("dojo/date",["dojo"],function(b){b.getObject("date",!0,b);b.date.getDaysInMonth=function(f){var a=f.getMonth(),c=[31,28,31,30,31,30,31,31,30,31,30,31];return a==1&&b.date.isLeapYear(f)?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="",e=a.indexOf("(");if(e>-1)c=a.substring(++e,a.indexOf(")"));else if(e=/([A-Z\/]+) \d{4}$/,a=a.match(e))c=a[1];else if(a=b.toLocaleString(),e=/ ([A-Z\/]+)$/,a=a.match(e))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 e=new Date(+b),d=!1,g="Date";switch(a){case "day":break;case "weekday":var h;(a=c%5)?h=parseInt(c/5):(a=c>0?5:-5,h=c>0?(c-5)/5:(c+5)/5);var j=b.getDay(),i=0;j==6&&c>0?i=1:j==0&&c<0&&(i=-1);j+=a;if(j==0||j==6)i=c>0?2:-2;c=7*h+a+i;break;
case "year":g="FullYear";d=!0;break;case "week":c*=7;break;case "quarter":c*=3;case "month":d=!0;g="Month";break;default:g="UTC"+a.charAt(0).toUpperCase()+a.substring(1)+"s"}if(g)e["set"+g](e["get"+g]()+c);d&&e.getDate()<b.getDate()&&e.setDate(0);return e};b.date.difference=function(f,a,c){var a=a||new Date,c=c||"day",e=a.getFullYear()-f.getFullYear(),d=1;switch(c){case "quarter":f=f.getMonth();a=a.getMonth();f=Math.floor(f/3)+1;a=Math.floor(a/3)+1;a+=e*4;d=a-f;break;case "weekday":e=Math.round(b.date.difference(f,
a,"day"));c=parseInt(b.date.difference(f,a,"week"));if(e%7==0)e=c*5;else{var d=0,g=f.getDay(),h=a.getDay(),c=parseInt(e/7),a=e%7,f=new Date(f);f.setDate(f.getDate()+c*7);f=f.getDay();if(e>0)switch(!0){case g==6:d=-1;break;case g==0:d=0;break;case h==6:d=-1;break;case h==0:d=-2;break;case f+a>5:d=-2}else if(e<0)switch(!0){case g==6:d=0;break;case g==0:d=1;break;case h==6:d=2;break;case h==0:d=1;break;case f+a<0:d=2}e+=d;e-=c*2}d=e;break;case "year":d=e;break;case "month":d=a.getMonth()-f.getMonth()+
e*12;break;case "week":d=parseInt(b.date.difference(f,a,"day")/7);break;case "day":d/=24;case "hour":d/=60;case "minute":d/=60;case "second":d/=1E3;case "millisecond":d*=a.getTime()-f.getTime()}return Math.round(d)};return b.date});
define("dojo/cldr/supplemental",["dojo","dojo/i18n"],function(b){b.getObject("cldr.supplemental",!0,b);b.cldr.supplemental.getFirstDayOfWeek=function(f){f={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(f)];return f===void 0?
1:f};b.cldr.supplemental._region=function(f){var f=b.i18n.normalizeLocale(f),f=f.split("-"),a=f[1];a?a.length==4&&(a=f[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"}[f[0]];return a};b.cldr.supplemental.getWeekend=function(f){var a=b.cldr.supplemental._region(f),f={"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];f===void 0&&(f=6);a===void 0&&(a=0);return{start:f,end:a}};return b.cldr.supplemental});
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(f,a,c){if(!(f instanceof Array))return a(f);for(var e=[],d=0;d<f.length;d++)e.push(a(f[d]));return b.regexp.group(e.join("|"),c)};b.regexp.group=function(b,a){return"("+(a?"?:":"")+b+")"};return b.regexp});
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 f(a,c,g,h){return h.replace(/([a-z])\1*/ig,function(f){var i,k,l=f.charAt(0),f=f.length,m=["abbr","wide","narrow"];switch(l){case "G":i=c[f<4?"eraAbbr":"eraNames"][a.getFullYear()<0?0:1];break;case "y":i=a.getFullYear();switch(f){case 1:break;case 2:if(!g.fullYear){i=String(i);i=i.substr(i.length-
2);break}default:k=!0}break;case "Q":case "q":i=Math.ceil((a.getMonth()+1)/3);k=!0;break;case "M":i=a.getMonth();f<3?(i+=1,k=!0):(l=["months-format",m[f-3]].join("-"),i=c[l][i]);break;case "w":i=b.date.locale._getWeekOfYear(a,0);k=!0;break;case "d":i=a.getDate();k=!0;break;case "D":i=b.date.locale._getDayOfYear(a);k=!0;break;case "E":i=a.getDay();f<3?(i+=1,k=!0):(l=["days-format",m[f-3]].join("-"),i=c[l][i]);break;case "a":i=a.getHours()<12?"am":"pm";i=g[i]||c["dayPeriods-format-wide-"+i];break;case "h":case "H":case "K":case "k":k=
a.getHours();switch(l){case "h":i=k%12||12;break;case "H":i=k;break;case "K":i=k%12;break;case "k":i=k||24}k=!0;break;case "m":i=a.getMinutes();k=!0;break;case "s":i=a.getSeconds();k=!0;break;case "S":i=Math.round(a.getMilliseconds()*Math.pow(10,f-3));k=!0;break;case "v":case "z":if(i=b.date.locale._getZone(a,!0,g))break;f=4;case "Z":i=b.date.locale._getZone(a,!1,g);i=[i<=0?"+":"-",b.string.pad(Math.floor(Math.abs(i)/60),2),b.string.pad(Math.abs(i)%60,2)];f==4&&(i.splice(0,0,"GMT"),i.splice(3,0,":"));
i=i.join("");break;default:throw Error("dojo.date.locale.format: invalid pattern char: "+h);}k&&(i=b.string.pad(i,f));return i})}function a(a,c,g,h){var f=function(a){return a},c=c||f,g=g||f,h=h||f,i=a.match(/(''|[^'])+/g),k=a.charAt(0)=="'";b.forEach(i,function(a,b){a?(i[b]=(k?g:c)(a.replace(/''/g,"'")),k=!k):i[b]=""});return h(i.join(""))}function c(a,c,g,h){h=b.regexp.escapeString(h);g.strict||(h=h.replace(" a"," ?a"));return h.replace(/([a-z])\1*/ig,function(b){var h;h=b.charAt(0);var f=b.length,
l="",m="";g.strict?(f>1&&(l="0{"+(f-1)+"}"),f>2&&(m="0{"+(f-2)+"}")):(l="0?",m="0{0,2}");switch(h){case "y":h="\\d{2,4}";break;case "M":h=f>2?"\\S+?":"1[0-2]|"+l+"[1-9]";break;case "D":h="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+m+"[1-9][0-9]|"+l+"[1-9]";break;case "d":h="3[01]|[12]\\d|"+l+"[1-9]";break;case "w":h="[1-4][0-9]|5[0-3]|"+l+"[1-9]";break;case "E":h="\\S+";break;case "h":h="1[0-2]|"+l+"[1-9]";break;case "k":h="1[01]|"+l+"\\d";break;case "H":h="1\\d|2[0-3]|"+l+"\\d";break;case "K":h="1\\d|2[0-4]|"+
l+"[1-9]";break;case "m":case "s":h="[0-5]\\d";break;case "S":h="\\d{"+f+"}";break;case "a":f=g.am||c["dayPeriods-format-wide-am"];l=g.pm||c["dayPeriods-format-wide-pm"];h=f+"|"+l;g.strict||(f!=f.toLowerCase()&&(h+="|"+f.toLowerCase()),l!=l.toLowerCase()&&(h+="|"+l.toLowerCase()),h.indexOf(".")!=-1&&(h+="|"+h.replace(/\./g,"")));h=h.replace(/\./g,"\\.");break;default:h=".*"}a&&a.push(b);return"("+h+")"}).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,d){var d=d||{},g=b.i18n.normalizeLocale(d.locale),h=d.formatLength||"short",g=b.date.locale._getGregorianBundle(g),j=[],i=b.hitch(this,f,c,g,d);if(d.selector=="year")return a(g["dateFormatItem-yyyy"]||"yyyy",i);var k;d.selector!="date"&&(k=d.timePattern||g["timeFormat-"+h])&&j.push(a(k,i));d.selector!="time"&&(k=d.datePattern||g["dateFormat-"+h])&&j.push(a(k,i));return j.length==1?j[0]:g["dateTimeFormat-"+h].replace(/\{(\d+)\}/g,function(a,c){return j[c]})};
b.date.locale.regexp=function(a){return b.date.locale._parseInfo(a).regexp};b.date.locale._parseInfo=function(e){var e=e||{},d=b.i18n.normalizeLocale(e.locale),d=b.date.locale._getGregorianBundle(d),g=e.formatLength||"short",h=e.datePattern||d["dateFormat-"+g],f=e.timePattern||d["timeFormat-"+g],g=e.selector=="date"?h:e.selector=="time"?f:d["dateTimeFormat-"+g].replace(/\{(\d+)\}/g,function(a,c){return[f,h][c]}),i=[];return{regexp:a(g,b.hitch(this,c,i,d,e)),tokens:i,bundle:d}};b.date.locale.parse=
function(a,c){var g=/[\u200E\u200F\u202A\u202E]/g,h=b.date.locale._parseInfo(c),f=h.tokens,i=h.bundle,g=RegExp("^"+h.regexp.replace(g,"")+"$",h.strict?"":"i").exec(a&&a.replace(g,""));if(!g)return null;var k=["abbr","wide","narrow"],l=[1970,0,1,0,0,0,0],m="",g=b.every(g,function(a,e){if(!e)return!0;var g=f[e-1],h=g.length;switch(g.charAt(0)){case "y":if(h!=2&&c.strict)l[0]=a;else if(a<100)a=Number(a),h=""+(new Date).getFullYear(),g=h.substring(0,2)*100,h=Math.min(Number(h.substring(2,4))+20,99),l[0]=
a<h?g+a:g-100+a;else{if(c.strict)return!1;l[0]=a}break;case "M":if(h>2){if(g=i["months-format-"+k[h-3]].concat(),c.strict||(a=a.replace(".","").toLowerCase(),g=b.map(g,function(a){return a.replace(".","").toLowerCase()})),a=b.indexOf(g,a),a==-1)return!1}else a--;l[1]=a;break;case "E":case "e":g=i["days-format-"+k[h-3]].concat();c.strict||(a=a.toLowerCase(),g=b.map(g,function(a){return a.toLowerCase()}));a=b.indexOf(g,a);if(a==-1)return!1;break;case "D":l[1]=0;case "d":l[2]=a;break;case "a":g=c.am||
i["dayPeriods-format-wide-am"];h=c.pm||i["dayPeriods-format-wide-pm"];if(!c.strict)var n=/\./g,a=a.replace(n,"").toLowerCase(),g=g.replace(n,"").toLowerCase(),h=h.replace(n,"").toLowerCase();if(c.strict&&a!=g&&a!=h)return!1;m=a==h?"p":a==g?"a":"";break;case "K":a==24&&(a=0);case "h":case "H":case "k":if(a>23)return!1;l[3]=a;break;case "m":l[4]=a;break;case "s":l[5]=a;break;case "S":l[6]=a}return!0}),h=+l[3];m==="p"&&h<12?l[3]=h+12:m==="a"&&h==12&&(l[3]=0);h=new Date(l[0],l[1],l[2],l[3],l[4],l[5],
l[6]);c.strict&&h.setFullYear(l[0]);var n=f.join(""),o=n.indexOf("d")!=-1,n=n.indexOf("M")!=-1;if(!g||n&&h.getMonth()>l[1]||o&&h.getDate()>l[2])return null;if(n&&h.getMonth()<l[1]||o&&h.getDate()<l[2])h=b.date.add(h,"hour",1);return h}})();(function(){var f=[];b.date.locale.addCustomFormats=function(a,c){f.push({pkg:a,name:c})};b.date.locale._getGregorianBundle=function(a){var c={};b.forEach(f,function(e){e=b.i18n.getLocalization(e.pkg,e.name,a);c=b.mixin(c,e)},this);return c}})();b.date.locale.addCustomFormats("dojo.cldr",
"gregorian");b.date.locale.getNames=function(f,a,c,e){var d,e=b.date.locale._getGregorianBundle(e),f=[f,c,a];c=="standAlone"&&(c=f.join("-"),d=e[c],d[0]==1&&(d=void 0));f[1]="format";return(d||e[f.join("-")]).concat()};b.date.locale.isWeekend=function(f,a){var c=b.cldr.supplemental.getWeekend(a),e=(f||new Date).getDay();c.end<c.start&&(c.end+=7,e<c.start&&(e+=7));return e>=c.start&&e<=c.end};b.date.locale._getDayOfYear=function(f){return b.date.difference(new Date(f.getFullYear(),0,1,f.getHours()),
f)+1};b.date.locale._getWeekOfYear=function(f,a){arguments.length==1&&(a=0);var c=(new Date(f.getFullYear(),0,1)).getDay(),e=Math.floor((b.date.locale._getDayOfYear(f)+(c-a+7)%7-1)/7);c==a&&e++;return e};return b.date.locale});define("text!orion/widgets/templates/LoginDialog.html",[],function(){return'\n<div>\n\t<div class="dijitTooltipContainer" role="presentation" style="width: 300px; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0.45em">\n\t\t<div class="dijitTooltipContents dijitTooltipFocusNode" role="dialog"\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 style="text-align: left; vertical-align: top;">\n\t\t\t\t\t\t<h2 dojoAttachPoint="emptyListInfo" class="LoginWindowLeft">No authentication required.</h2>\n\t\t\t\t\t\t<table dojoAttachPoint="authenticated" style="display: none; width: 100%;">\n\t\t\t\t\t\t\t<tbody dojoAttachPoint="authenticatedList">\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<table dojoAttachPoint="otherUnauthenticated" style="display: none; width: 100%;">\n\t\t\t\t\t\t\t<tbody dojoAttachPoint="otherUnauthenticatedList">\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style="text-align: right; vertical-align: top; padding-right: 2px; margin: 0">\n\t\t\t\t\t\t<span dojoAttachPoint="closeLink" role="button" title="Close"></span>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t</div>\n\t<div class="dijitTooltipConnector" role="presentation"></div>\n\n</div>'});
define("orion/widgets/nls/messages",["orion/i18n!orion/widgets/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/widgets/nls/root/messages",{"no input":"no input","no output":"no output","Choose a Folder":"Choose a Folder",OK:"OK",Profile:"Profile","Sign out":"Sign out","N/A":"N/A","logged in since ":"logged in since ","Sign in":"Sign in","Authentication required!":"Authentication required!","Name:":"Name:","Plug-ins":"Plug-ins"," <No available services or timed out, check URL and try reloading>":" <No available services or timed out, check URL and try reloading>",Properties:"Properties"," (Service Id: ":" (Service Id: ",
Services:"Services","SFTP Transfer":"SFTP Transfer","Remote host:":"Remote host:","Remote path:":"Remote path:","User name:":"User name:","Password:":"Password:","Start Transfer":"Start Transfer","Location:":"Location:","orion.sftpConnections":"orion.sftpConnections","Drag a File or Zip here":"Drag a File or Zip here","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","Sorry, the Console is not supported on your browser.":"Sorry, the Console is not supported on your browser."});
define("orion/PageUtil",[],function(){return{matchResourceParameters:function(b){var b=b||window.location.toString(),f={resource:""},a=b.indexOf("#");if(a!==-1&&(b=b.substring(a+1),b.length!==0)){b=b.split(",");f.resource=decodeURIComponent(b[0]);for(a=1;a<b.length;a++){var c=b[a].split("="),e=decodeURIComponent(c[0]),c=c.length===2?decodeURIComponent(c[1]):null;c!==null&&e!=="resource"&&(f[e]=c)}}return f}}});
define("orion/navigationUtils",["dojo"],function(b){function f(c,e,d,g){!a&&c&&(d?(c.push({domNode:e,widget:d,onClick:g}),b.attr(d,"tabIndex",-1)):(c.push({domNode:e}),b.attr(e,"tabIndex",-1),b.style(e,"outline","none")))}var a=navigator.userAgent.indexOf("iPad")!==-1;return{addNavGrid:function(a,b,d,g,h){a&&(a=a.getGridNavHolder(b,!0))&&f(a,d,g,h)},generateNavGrid:f,removeNavGrid:function(a,b){if(a)for(var d=0;d<a.length;d++)if(a[d].domNode===b){a.splice(d,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/_Container",["dojo","dijit"],function(b,f){b.declare("dijit._Container",null,{isContainer:!0,buildRendering:function(){this.inherited(arguments);if(!this.containerNode)this.containerNode=this.domNode},addChild:function(a,c){var e=this.containerNode;if(c&&typeof c=="number"){var d=this.getChildren();if(d&&d.length>=c)e=d[c-1].domNode,c="after"}b.place(a.domNode,e,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,d=c>0?"nextSibling":"previousSibling";do b=b[d];while(b&&(b.nodeType!=1||!f.byNode(b)));return b&&f.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 f._Container});
define("dijit/_KeyNavContainer",["dojo","dijit","dijit/_Container"],function(b,f){b.declare("dijit._KeyNavContainer",f._Container,{tabIndex:"0",_keyNavCodes:{},connectKeyNavHandlers:function(a,c){var e=this._keyNavCodes={},d=b.hitch(this,this.focusPrev),g=b.hitch(this,this.focusNext);b.forEach(a,function(a){e[a]=d});b.forEach(c,function(a){e[a]=g});e[b.keys.HOME]=b.hitch(this,"focusFirstChild");e[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){f._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(),d=0;d<b.length;d++){a||(a=b[c>0?0:b.length-1]);if(a.isFocusable())return a;a=this._getSiblingOfChild(a,c)}return null}});return f._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,f){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,e=!1;if(a&&this._opened){var d=b.position(this._buttonNode,!0);if(!(a.pageX>=d.x&&a.pageX<=d.x+d.w)||!(a.pageY>=d.y&&a.pageY<=d.y+d.h)){for(d=a.target;d&&!e;)b.hasClass(d,"dijitPopup")?e=!0:d=d.parentNode;if(e){d=a.target;if(c.onItemClick){for(var g;d&&!(g=f.byNode(d));)d=d.parentNode;if(g&&g.onClick&&g.getParent)g.getParent().onItemClick(g,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,e=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==" ")&&((e.tagName||"").toLowerCase()!=="input"||e.type&&e.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(f._curFocus&&this.dropDown&&b.isDescendant(f._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,e=this._aroundNode||this.domNode,d=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 g={display:"",visibility:"hidden"};if(!this._explicitDDWidth)g.width="";if(!this._explicitDDHeight)g.height="";b.style(c,g);g=this.maxHeight;if(g==-1)var g=b.window.getBox(),h=b.position(e,!1),g=Math.floor(Math.max(h.y,g.h-(h.y+h.h)));a.startup&&!a._started&&
a.startup();f.popup.moveOffScreen(a);var h=b._getMarginSize(c),j=g&&h.h>g;b.style(c,{overflowX:"hidden",overflowY:j?"auto":"hidden"});j?(h.h=g,"w"in h&&(h.w+=16)):delete h.h;this.forceWidth?h.w=e.offsetWidth:this.autoWidth?h.w=Math.max(h.w,e.offsetWidth):delete h.w;b.isFunction(a.resize)?a.resize(h):b.marginBox(c,h)}a=f.popup.open({parent:this,popup:a,around:e,orient:f.getPopupAroundAlignment(this.dropDownPosition&&this.dropDownPosition.length?this.dropDownPosition:["below"],this.isLeftToRight()),
onExecute:function(){d.closeDropDown(!0)},onCancel:function(){d.closeDropDown(!0)},onClose:function(){b.attr(d._popupStateNode,"popupActive",!1);b.removeClass(d._popupStateNode,"dijitHasDropDownOpen");d._opened=!1}});b.attr(this._popupStateNode,"popupActive","true");b.addClass(d._popupStateNode,"dijitHasDropDownOpen");this._opened=!0;return a},closeDropDown:function(a){if(this._opened)a&&this.focus(),f.popup.close(this.dropDown),this._opened=!1}});return f._HasDropDown});
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/_Contained",["dojo","dijit"],function(b,f){b.declare("dijit._Contained",null,{getParent:function(){var a=f.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&&f.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 f._Contained});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("orion/navigate/nls/messages",["orion/i18n!orion/navigate/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
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","could not find toolbar ":"could not find toolbar ","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",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","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 ":"Importing from ","SFTP to...":"SFTP to...","Copy files and folders to a specified SFTP location":"Copy files and folders to a specified SFTP location","Exporting from ":"Exporting from ","Copy to":"Copy to","Move to":"Move to","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"});
define("orion/search/nls/messages",["orion/i18n!orion/search/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/search/nls/root/messages",{"Find:":"Find:","Find With":"Find With","ReplaceWith:":"ReplaceWith:","Replace With":"Replace With","Show all":"Show all","Case sensitive":"Case sensitive","Wrap search":"Wrap search","Incremental search":"Incremental search","Whole Word":"Whole Word","Regular expression":"Regular expression","Find after replace":"Find after replace",Options:"Options","Find next match":"Find next match","Find previous match":"Find previous match",Replace:"Replace","Replace All":"Replace All",
"Not found":"Not found","Replacing all...":"Replacing all..."," matches":" matches","Replaced ":"Replaced ","Nothing replaced":"Nothing replaced","Search ":"Search ","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 ":"No matches found for ","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/commonHTMLFragments",["i18n!orion/nls/messages","require"],function(b,f){function a(a){return'<div id="'+a+'slideContainer" class="layoutBlock slideParameters slideContainer"><span id="'+a+'pageParameterArea" class="slide"><span id="'+a+'pageCommandParameters" class="layoutLeft parameters"></span><span id="'+a+'pageCommandDismiss" class="layoutRight parametersDismiss"></span></span></div>'}var c='<header role="banner"><div id="staticBanner" class="layoutBlock topRowBanner"><a id="home" class="layoutLeft logo" href="'+
f.toUrl("navigate/table.html")+'" aria-label="'+b["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" placeholder="Search" title="'+b["Type a keyword or wild card to search in root"]+'" class="layoutLeft spacingLeft searchbox" role="search"><div id="userMenu" class="spacingLeft layoutLeft"></div></div></div><div id="titleArea" class="layoutBlock titleArea"><div class="layoutLeft pageTitle"></div><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="'+
b["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" role="contentinfo"><div class="footerBlock">'+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">'+b.FAQ+'</a> | <a href="https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Orion&version=0.5" target="_blank">'+
b["Report a Bug"]+'</a> | <a href="http://www.eclipse.org/legal/privacy.php" target="_blank">'+b["Privacy Policy"]+'</a> | <a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">'+b["Terms of Use"]+'</a> | <a href="http://www.eclipse.org/legal/copyright.php" target="_blank">'+b["Copyright Agent"]+"</a></div></footer>",d='<ul class="layoutLeft commandList pageActions" id="pageActions"></ul><ul class="layoutLeft commandList pageActions" id="selectionTools"></ul><img class="layoutRight progressPane" src="'+
f.toUrl("images/none.png")+'" id="progressPane" tabindex="0" role="progressbar" aria-label="'+b["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>'+
a("mainToolbar");return{topHTMLFragment:c,bottomHTMLFragment:e,toolbarHTMLFragment:d,slideoutHTMLFragment:a}});
define("orion/i18nUtil",["require","orion/Deferred"],function(b,f){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(e){function d(){b(["i18n!"+e],function(a){if(a){var c=e;a._expires=(new Date).getTime()+9E5;localStorage.setItem("orion/messageBundle/"+c,JSON.stringify(a));delete a._expires}g.resolve(a)})}if(c[e])return c[e];var g=new f;c[e]=
g;var h=a(e);if(h)return g.resolve(h),g;try{b([e],d)}catch(j){b(["orion/i18n!"+e],d)}return g},formatMessage:function(a){var c=arguments;return a.replace(/\$\{([^\}]+)\}/g,function(a,b){return c[(b<<0)+1]})}}});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 f;do f=b._scopeName+"Unique"+ ++b.dnd._uniqueId;while(b.byId(f));return f};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(f){var a=b.window.getBox(),c=0,e=0;if(f.clientX<b.dnd.H_TRIGGER_AUTOSCROLL)c=-b.dnd.H_AUTOSCROLL_VALUE;else if(f.clientX>a.w-b.dnd.H_TRIGGER_AUTOSCROLL)c=b.dnd.H_AUTOSCROLL_VALUE;if(f.clientY<b.dnd.V_TRIGGER_AUTOSCROLL)e=-b.dnd.V_AUTOSCROLL_VALUE;
else if(f.clientY>a.h-b.dnd.V_TRIGGER_AUTOSCROLL)e=b.dnd.V_AUTOSCROLL_VALUE;window.scrollBy(c,e)};b.dnd._validNodes={div:1,p:1,td:1};b.dnd._validOverflow={auto:1,scroll:1};b.dnd.autoScrollNodes=function(f){for(var a=f.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 e=b._getContentBox(a,c),c=b.position(a,!0),d=Math.min(b.dnd.H_TRIGGER_AUTOSCROLL,e.w/2),g=Math.min(b.dnd.V_TRIGGER_AUTOSCROLL,
e.h/2),h=f.pageX-c.x,j=f.pageY-c.y,i=c=0;if(b.isWebKit||b.isOpera)h+=b.body().scrollLeft,j+=b.body().scrollTop;h>0&&h<e.w&&(h<d?c=-d:h>e.w-d&&(c=d));j>0&&j<e.h&&(j<g?i=-g:j>e.h-g&&(i=g));e=a.scrollLeft;d=a.scrollTop;a.scrollLeft+=c;a.scrollTop+=i;if(e!=a.scrollLeft||d!=a.scrollTop)return}}try{a=a.parentNode}catch(k){a=null}}b.dnd.autoScroll(f)};return b.dnd});
define("dojo/dnd/Mover",["dojo","dojo/dnd/common","dojo/dnd/autoscroll"],function(b){b.declare("dojo.dnd.Mover",null,{constructor:function(f,a,c){this.node=b.byId(f);var e=a.touches?a.touches[0]:a;this.marginBox={l:e.pageX,t:e.pageY};this.mouseButton=a.button;a=this.host=c;f=f.ownerDocument;this.events=[b.connect(f,"onmousemove",this,"onFirstMove"),b.connect(f,"ontouchmove",this,"onFirstMove"),b.connect(f,"onmousemove",this,"onMouseMove"),b.connect(f,"ontouchmove",this,"onMouseMove"),b.connect(f,
"onmouseup",this,"onMouseUp"),b.connect(f,"ontouchend",this,"onMouseUp"),b.connect(f,"ondragstart",b.stopEvent),b.connect(f.body,"onselectstart",b.stopEvent)];if(a&&a.onMoveStart)a.onMoveStart(this)},onMouseMove:function(f){b.dnd.autoScroll(f);var a=this.marginBox,c=f.touches?f.touches[0]:f;this.host.onMove(this,{l:a.l+c.pageX,t:a.t+c.pageY},f);b.stopEvent(f)},onMouseUp:function(f){(b.isWebKit&&b.isMac&&this.mouseButton==2?f.button==0:this.mouseButton==f.button)&&this.destroy();b.stopEvent(f)},onFirstMove:function(f){var a=
this.node.style,c,e=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 d=b.getComputedStyle(c),g=b._getMarginBox(c,d),d=b._getContentBox(c,d);c=a.l-(d.l-g.l);a=a.t-(d.t-g.t)}this.marginBox.l=c-this.marginBox.l;this.marginBox.t=a-this.marginBox.t;if(e&&e.onFirstMove)e.onFirstMove(this,f);b.disconnect(this.events.shift());b.disconnect(this.events.shift())},
destroy:function(){b.forEach(this.events,b.disconnect);var f=this.host;if(f&&f.onMoveStop)f.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(f,a){this.node=b.byId(f);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(f,a){return new b.dnd.Moveable(a,f)},destroy:function(){b.forEach(this.events,b.disconnect);this.events=this.node=this.handle=null},onMouseDown:function(f){if(!this.skip||!b.dnd.isFormElement(f)){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=f.touches?f.touches[0]:f;this._lastX=a.pageX;this._lastY=a.pageY}else this.onDragDetected(f);b.stopEvent(f)}},onMouseMove:function(f){var a=f.touches?f.touches[0]:f;if(Math.abs(a.pageX-this._lastX)>this.delay||Math.abs(a.pageY-this._lastY)>this.delay)this.onMouseUp(f),this.onDragDetected(f);b.stopEvent(f)},onMouseUp:function(f){for(var a=0;a<2;++a)b.disconnect(this.events.pop());b.stopEvent(f)},onSelectStart:function(f){(!this.skip||!b.dnd.isFormElement(f))&&
b.stopEvent(f)},onDragDetected:function(b){new this.mover(this.node,b,this)},onMoveStart:function(f){b.publish("/dnd/move/start",[f]);b.addClass(b.body(),"dojoMove");b.addClass(this.node,"dojoMoveItem")},onMoveStop:function(f){b.publish("/dnd/move/stop",[f]);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(f,a){return new b.dnd.move.constrainedMoveable(a,f)},constructor:function(b,a){a||(a={});this.constraints=a.constraints;this.within=a.within},onFirstMove:function(f){var a=this.constraintBox=this.constraints.call(this,f);a.r=a.l+a.w;a.b=a.t+a.h;this.within&&(f=b._getMarginSize(f.node),a.r-=f.w,a.b-=
f.h)},onMove:function(b,a){var c=this.constraintBox,e=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;e.left=a.l+"px";e.top=a.t+"px";this.onMoved(b,a)}});b.declare("dojo.dnd.move.boxConstrainedMoveable",b.dnd.move.constrainedMoveable,{box:{},markupFactory:function(f,a){return new b.dnd.move.boxConstrainedMoveable(a,f)},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(f,a){return new b.dnd.move.parentConstrainedMoveable(a,f)},constructor:function(f,a){var c=a&&a.area;this.constraints=function(){var a=this.node.parentNode,d=b.getComputedStyle(a),g=b._getMarginBox(a,d);if(c=="margin")return g;var h=b._getMarginExtents(a,d);g.l+=h.l;g.t+=h.t;g.w-=h.w;g.h-=h.h;if(c=="border")return g;h=b._getBorderExtents(a,d);g.l+=h.l;g.t+=h.t;g.w-=h.w;g.h-=h.h;if(c=="padding")return g;h=b._getPadExtents(a,d);g.l+=
h.l;g.t+=h.t;g.w-=h.w;g.h-=h.h;return g}}});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 f=b.dnd.Moveable.prototype.onMove;b.declare("dojo.dnd.TimedMoveable",b.dnd.Moveable,{timeout:40,constructor:function(a,c){c||(c={});if(c.timeout&&typeof c.timeout=="number"&&c.timeout>=0)this.timeout=c.timeout},markupFactory:function(a,c){return new b.dnd.TimedMoveable(c,a)},onMoveStop:function(a){a._timer&&(clearTimeout(a._timer),f.call(this,a,a._leftTop));b.dnd.Moveable.prototype.onMoveStop.apply(this,arguments)},
onMove:function(a,c){a._leftTop=c;if(!a._timer){var b=this;a._timer=setTimeout(function(){a._timer=null;f.call(b,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(f){b.mixin(this,f);this.node=f.node;this._showArgs=b.mixin({},f);this._showArgs.node=this.node;this._showArgs.duration=this.showDuration;this.showAnim=this.showFunc(this._showArgs);this._hideArgs=b.mixin({},f);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 f={_fire:function(a,c){this[a]&&this[a].apply(this,c||[]);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 g=b.connect(this._current,"beforeBegin",this,function(){this._fire("beforeBegin")}),
h=b.connect(this._current,"onBegin",this,function(a){this._fire("onBegin",arguments)}),f=b.connect(this._current,"onPlay",this,function(a){this._fire("onPlay",arguments);b.disconnect(g);b.disconnect(h);b.disconnect(f)});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 g=this.duration*a;this._current=null;b.some(this._animations,function(a){if(a.duration<=g)return this._current=a,!0;g-=a.duration;return!1});this._current&&this._current.gotoPercent(g/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,f);b.fx.chain=function(c){return new a(c)};
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,c){var b=this._pseudoAnimation;b[a].apply(b,c)},play:function(a,c){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 g=this.duration*
a;b.forEach(this._animations,function(a){a.gotoPercent(a.duration<g?1:g/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,f);b.fx.combine=function(a){return new c(a)};b.fx.wipeIn=function(a){var c=a.node=b.byId(a.node),g=c.style,h,a=b.animateProperty(b.mixin({properties:{height:{start:function(){h=
g.overflow;g.overflow="hidden";if(g.visibility=="hidden"||g.display=="none")return g.height="1px",g.display="",g.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(){g.height="auto";g.overflow=h});return a};b.fx.wipeOut=function(a){var c=(a.node=b.byId(a.node)).style,g,a=b.animateProperty(b.mixin({properties:{height:{end:1}}},a));b.connect(a,"beforeBegin",function(){g=c.overflow;c.overflow="hidden";c.display=
""});b.connect(a,"onEnd",function(){c.overflow=g;c.height="auto";c.display="none"});return a};b.fx.slideTo=function(a){var c=null,g=null,h=function(a){return function(){var e=b.getComputedStyle(a),h=e.position;c=h=="absolute"?a.offsetTop:parseInt(e.top)||0;g=h=="absolute"?a.offsetLeft:parseInt(e.left)||0;if(h!="absolute"&&h!="relative")e=b.position(a,!0),c=e.y,g=e.x,a.style.position="absolute",a.style.top=c+"px",a.style.left=g+"px"}}(a.node=b.byId(a.node));h();a=b.animateProperty(b.mixin({properties:{top:a.top||
0,left:a.left||0}},a));b.connect(a,"beforeBegin",a,h);return a}})();return b.fx});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("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/layout/_LayoutWidget",["dojo","dijit","dijit/_Widget","dijit/_Container","dijit/_Contained"],function(b,f){b.declare("dijit.layout._LayoutWidget",[f._Widget,f._Container,f._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 e=this.domNode;if(a){b.marginBox(e,a);if(a.t)e.style.top=a.t+"px";if(a.l)e.style.left=a.l+"px"}var d=c||{};b.mixin(d,a||{});if(!("h"in d)||!("w"in d))d=b.mixin(b.marginBox(e),d);var g=b.getComputedStyle(e),h=b._getMarginExtents(e,g),f=b._getBorderExtents(e,g),d=this._borderBox={w:d.w-(h.w+f.w),h:d.h-(h.h+f.h)},h=b._getPadExtents(e,g);this._contentBox={l:b._toPixelValue(e,g.paddingLeft),t:b._toPixelValue(e,g.paddingTop),
w:d.w-h.w,h:d.h-h.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)}});f.layout.marginBox2contentBox=function(a,c){var e=b.getComputedStyle(a),d=b._getMarginExtents(a,
e),g=b._getPadBorderExtents(a,e);return{l:b._toPixelValue(a,e.paddingLeft),t:b._toPixelValue(a,e.paddingTop),w:c.w-(d.w+g.w),h:c.h-(d.h+g.h)}};(function(){var a=function(a,e){var d=a.resize?a.resize(e):b.marginBox(a.domNode,e);d?b.mixin(a,d):(b.mixin(a,b.marginBox(a.domNode)),b.mixin(a,e))};f.layout.layoutChildren=function(c,e,d,g,h){e=b.mixin({},e);b.addClass(c,"dijitLayoutContainer");d=b.filter(d,function(a){return a.region!="center"&&a.layoutAlign!="client"}).concat(b.filter(d,function(a){return a.region==
"center"||a.layoutAlign=="client"}));b.forEach(d,function(c){var d=c.domNode,f=c.region||c.layoutAlign,l=d.style;l.left=e.l+"px";l.top=e.t+"px";l.position="absolute";b.addClass(d,"dijitAlign"+(f.substring(0,1).toUpperCase()+f.substring(1)));d={};g&&g==c.id&&(d[c.region=="top"||c.region=="bottom"?"h":"w"]=h);f=="top"||f=="bottom"?(d.w=e.w,a(c,d),e.h-=c.h,f=="top"?e.t+=c.h:l.top=e.t+e.h+"px"):f=="left"||f=="right"?(d.h=e.h,a(c,d),e.w-=c.w,f=="left"?e.l+=c.w:l.left=e.l+e.w+"px"):(f=="client"||f=="center")&&
a(c,e)})}})();return f.layout._LayoutWidget});
define("dijit/layout/_ContentPaneResizeMixin",["dojo","dijit","dijit/_Contained","dijit/layout/_LayoutWidget"],function(b,f){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=f._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")}),e=b.filter(c.map(f.byNode),function(a){return a&&
a.domNode&&a.resize});a.length==c.length&&e.length==1?this._singleChild=e[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 e=this.containerNode;
if(e===this.domNode){var d=c||{};b.mixin(d,a||{});if(!("h"in d)||!("w"in d))d=b.mixin(b.marginBox(e),d);this._contentBox=f.layout.marginBox2contentBox(e,d)}else this._contentBox=b.contentBox(e);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 f.layout._ContentPaneResizeMixin});
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="^",e=null,d=0;d<b.length;d++)switch(e=b.charAt(d),e){case "\\":c+=e;d++;c+=b.charAt(d);break;case "*":c+=".*";break;case "?":c+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":c+="\\";default:c+=e}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(f,a){function c(a,c,b,d){return function(e,g){var h=d.getValue(e,a),f=d.getValue(g,a);return c*b(h,f)}}for(var e=[],d,g=a.comparatorMap,h=b.data.util.sorter.basicComparator,j=0;j<f.length;j++){d=f[j];var i=d.attribute;
if(i){d=d.descending?-1:1;var k=h;g&&(typeof i!=="string"&&"toString"in i&&(i=i.toString()),k=g[i]||h);e.push(c(i,d,k,a))}}return function(a,c){for(var b=0;b<e.length;){var d=e[b++](a,c);if(d!==0)return d}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(f){f=f||{};if(!f.store)f.store=this;var a=this;this._fetchItems(f,function(c,e){var d=e.abort||null,g=!1,h=e.start?e.start:0,f=e.count&&e.count!==Infinity?h+e.count:c.length;e.abort=function(){g=!0;d&&d.call(e)};var i=e.scope||b.global;if(!e.store)e.store=a;e.onBegin&&e.onBegin.call(i,c.length,e);e.sort&&c.sort(b.data.util.sorter.createSortFunction(e.sort,
a));if(e.onItem)for(var k=h;k<c.length&&k<f;++k){var l=c[k];g||e.onItem.call(i,l,e)}e.onComplete&&!g&&(k=null,e.onItem||(k=c.slice(h,f)),e.onComplete.call(i,k,e))},function(a,e){e.onError&&e.onError.call(e.scope||b.global,a,e)});return f};return b.data.util.simpleFetch});
define("dojo/date/stamp",["dojo"],function(b){b.getObject("date.stamp",!0,b);b.date.stamp.fromISOString=function(f,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(f),e=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}));e=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&&e.setFullYear(c[0]||1970);var d=0,g=c[7]&&c[7].charAt(0);g!="Z"&&(d=(c[8]||0)*60+(Number(c[9])||0),g!="-"&&(d*=-1));g&&(d-=e.getTimezoneOffset());d&&e.setTime(e.getTime()+d*6E4)}return e};b.date.stamp.toISOString=function(b,a){var c=function(a){return a<10?"0"+a:a},a=a||{},e=[],d=a.zulu?"getUTC":"get",g="";a.selector!="time"&&(g=b[d+"FullYear"](),g=["0000".substr((g+"").length)+g,
c(b[d+"Month"]()+1),c(b[d+"Date"]())].join("-"));e.push(g);if(a.selector!="date"){g=[c(b[d+"Hours"]()),c(b[d+"Minutes"]()),c(b[d+"Seconds"]())].join(":");d=b[d+"Milliseconds"]();a.milliseconds&&(g+="."+(d<100?"0":"")+c(d));if(a.zulu)g+="Z";else if(a.selector!="time"){var d=b.getTimezoneOffset(),h=Math.abs(d);g+=(d>0?"-":"+")+c(Math.floor(h/60))+":"+c(h%60)}e.push(g)}return e.join("T")};return b.date.stamp});
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(f){this._arrayOfAllItems=[];this._arrayOfTopLevelItems=[];this._loadFinished=!1;this.url=this._ccUrl=this._jsonFileUrl=f.url;this._jsonData=f.data;this.data=null;this._datatypeMap=f.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(f.urlPreventCache!==void 0)this.urlPreventCache=f.urlPreventCache?!0:!1;if(f.hierarchical!==void 0)this.hierarchical=f.hierarchical?!0:!1;if(f.clearOnClose)this.clearOnClose=!0;if("failOk"in f)this.failOk=f.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(f,a,c){var e=void 0;typeof c==="string"&&(e=b.data.util.filter.patternToRegExp(c,!1));return this._containsValue(f,a,c,e)},_containsValue:function(f,a,c,e){return b.some(this.getValues(f,a),function(a){if(a!==null&&!b.isObject(a)&&e){if(a.toString().match(e))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(f,a,c){var e=this,d=function(c,
d){var g=[],h,f;if(c.query){var j;h=c.queryOptions?c.queryOptions.ignoreCase:!1;var p={};for(f in c.query)j=c.query[f],typeof j==="string"?p[f]=b.data.util.filter.patternToRegExp(j,h):j instanceof RegExp&&(p[f]=j);for(h=0;h<d.length;++h){var r=!0,q=d[h];if(q===null)r=!1;else for(f in c.query)j=c.query[f],e._containsValue(q,f,j,p[f])||(r=!1);r&&g.push(q)}}else for(h=0;h<d.length;++h)f=d[h],f!==null&&g.push(f);a(g,c)};if(this._loadFinished)d(f,this._getItemsArray(f.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:f,filter:d});else{this._loadInProgress=!0;var g=b.xhrGet({url:e._jsonFileUrl,handleAs:"json-comment-optional",
preventCache:this.urlPreventCache,failOk:this.failOk});g.addCallback(function(a){try{e._getItemsFromLoadedData(a),e._loadFinished=!0,e._loadInProgress=!1,d(f,e._getItemsArray(f.queryOptions)),e._handleQueuedFetches()}catch(b){e._loadFinished=!0,e._loadInProgress=!1,c(b,f)}});g.addErrback(function(a){e._loadInProgress=!1;c(a,f)});var h=null;if(f.abort)h=f.abort;f.abort=function(){g&&g.fired===-1&&g.cancel();h&&h.call(f)}}else if(this._jsonData)try{this._loadFinished=!0,this._getItemsFromLoadedData(this._jsonData),
this._jsonData=null,d(f,this._getItemsArray(f.queryOptions))}catch(j){c(j,f)}else c(Error("dojo.data.ItemFileReadStore: No JSON source data was provided as either URL or a nested Javascript object."),f)}},_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(f){function a(a){return a!==null&&typeof a==="object"&&(!b.isArray(a)||e)&&!b.isFunction(a)&&(a.constructor==Object||b.isArray(a))&&typeof a._reference==="undefined"&&typeof a._type==="undefined"&&typeof a._value==="undefined"&&d.hierarchical}function c(e){d._arrayOfAllItems.push(e);for(var g in e){var h=e[g];if(h)if(b.isArray(h))for(var f=0;f<h.length;++f){var i=h[f];a(i)&&c(i)}else a(h)&&c(h)}}var e=!1,d=this;
this._labelAttr=f.label;var g,h;this._arrayOfAllItems=[];this._arrayOfTopLevelItems=f.items;for(g=0;g<this._arrayOfTopLevelItems.length;++g)h=this._arrayOfTopLevelItems[g],b.isArray(h)&&(e=!0),c(h),h[this._rootItemPropName]=!0;var j={},i;for(g=0;g<this._arrayOfAllItems.length;++g)for(i in h=this._arrayOfAllItems[g],h){if(i!==this._rootItemPropName){var k=h[i];k!==null?b.isArray(k)||(h[i]=[k]):h[i]=[null]}j[i]=i}for(;j[this._storeRefPropName];)this._storeRefPropName+="_";for(;j[this._itemNumPropName];)this._itemNumPropName+=
"_";for(;j[this._reverseRefMap];)this._reverseRefMap+="_";if(j=f.identifier){this._itemsByIdentity={};this._features["dojo.data.api.Identity"]=j;for(g=0;g<this._arrayOfAllItems.length;++g)if(h=this._arrayOfAllItems[g],f=h[j],f=f[0],Object.hasOwnProperty.call(this._itemsByIdentity,f))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: ["+f+"]");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: ["+f+"]");}else this._itemsByIdentity[f]=h}else this._features["dojo.data.api.Identity"]=Number;for(g=0;g<this._arrayOfAllItems.length;++g)h=this._arrayOfAllItems[g],h[this._storeRefPropName]=this,h[this._itemNumPropName]=g;for(g=0;g<this._arrayOfAllItems.length;++g)for(i in h=this._arrayOfAllItems[g],h){f=h[i];for(j=0;j<f.length;++j)if(k=f[j],k!==null&&typeof k=="object"){if("_type"in k&&"_value"in k){var l=k._type,m=this._datatypeMap[l];if(m)if(b.isFunction(m))f[j]=new m(k._value);
else if(b.isFunction(m.deserialize))f[j]=m.deserialize(k._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 '"+l+"'");}if(k._reference){k=k._reference;if(b.isObject(k))for(l=0;l<this._arrayOfAllItems.length;++l){var m=this._arrayOfAllItems[l],n=!0,o;for(o in k)m[o]!=k[o]&&
(n=!1);n&&(f[j]=m)}else f[j]=this._getItemByIdentity(k);this.referenceIntegrity&&(k=f[j],this.isItem(k)&&this._addReferenceToMap(k,h,i))}else this.isItem(k)&&this.referenceIntegrity&&this._addReferenceToMap(k,h,i)}}},_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(f){var a,c;if(this._loadFinished)a=this._getItemByIdentity(f.identity),
f.onItem&&(c=f.scope?f.scope:b.global,f.onItem.call(c,a));else{var e=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:f}):(this._loadInProgress=!0,c=b.xhrGet({url:e._jsonFileUrl,handleAs:"json-comment-optional",preventCache:this.urlPreventCache,failOk:this.failOk}),c.addCallback(function(c){var g=f.scope?f.scope:b.global;try{e._getItemsFromLoadedData(c),e._loadFinished=!0,e._loadInProgress=!1,a=e._getItemByIdentity(f.identity),f.onItem&&f.onItem.call(g,a),e._handleQueuedFetches()}catch(h){e._loadInProgress=!1,f.onError&&f.onError.call(g,h)}}),c.addErrback(function(a){e._loadInProgress=
!1;f.onError&&f.onError.call(f.scope?f.scope:b.global,a)}));else if(this._jsonData)e._getItemsFromLoadedData(e._jsonData),e._jsonData=null,e._loadFinished=!0,a=e._getItemByIdentity(f.identity),f.onItem&&(c=f.scope?f.scope:b.global,f.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 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=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(f._loadInProgress!==!0&&!f._loadFinished)f._getItemsFromLoadedData(a),f._loadFinished=!0;else if(f._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)f._getItemsFromLoadedData(f._jsonData),
f._jsonData=null,f._loadFinished=!0}});b.extend(b.data.ItemFileReadStore,b.data.util.simpleFetch);return b.data.ItemFileReadStore});
define("orion/widgets/_OrionDialogMixin",["i18n!orion/widgets/nls/messages","dojo","dijit"],function(b,f,a){f.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);f.connect(this,"onKeyPress",f.hitch(this,function(a){a.keyCode===f.keys.ENTER&&this._onSubmit()}))},onHide:function(){this.inherited(arguments);setTimeout(f.hitch(this,
function(){if(f.isDescendant(a._curFocus,this.domNode))a._curFocus=null;if(f.isDescendant(a._prevFocus,this.domNode))a._prevFocus=null;this.destroyRecursive()}),this.duration)}})});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("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("dojo/DeferredList",["dojo"],function(b){b.DeferredList=function(f,a,c,e){var d=[];b.Deferred.call(this);var g=this;f.length===0&&!a&&this.resolve([0,[]]);var h=0;b.forEach(f,function(b,i){function k(a,c){d[i]=[a,c];h++;h===f.length&&g.resolve(d)}b.then(function(c){a?g.resolve([i,c]):k(!0,c)},function(a){c?g.reject(a):k(!1,a);if(e)return null;throw a;})})};b.DeferredList.prototype=new b.Deferred;b.DeferredList.prototype.gatherResults=function(f){f=new b.DeferredList(f,!1,!0,!1);f.addCallback(function(a){var c=
[];b.forEach(a,function(a){c.push(a[1])});return c});return f};return b.DeferredList});
define("dojo/cookie",["dojo","dojo/regexp"],function(b){b.cookie=function(f,a,c){var e=document.cookie;if(arguments.length==1){var d=e.match(RegExp("(?:^|; )"+b.regexp.escapeString(f)+"=([^;]*)"));return d?decodeURIComponent(d[1]):void 0}else{c=c||{};e=c.expires;if(typeof e=="number"){var g=new Date;g.setTime(g.getTime()+e*864E5);e=c.expires=g}if(e&&e.toUTCString)c.expires=e.toUTCString();a=encodeURIComponent(a);e=f+"="+a;for(d in c)e+="; "+d,g=c[d],g!==!0&&(e+="="+g);document.cookie=e}};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/tree/TreeStoreModel",["dojo","dijit"],function(b,f){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(c){return this.store.hasAttribute(a,c)},this)},getChildren:function(a,c,e){var d=this.store;if(d.isItemLoaded(a)){for(var g=[],h=0;h<this.childrenAttrs.length;h++)var f=d.getValues(a,this.childrenAttrs[h]),g=g.concat(f);var i=0;this.deferItemLoadingUntilExpand||b.forEach(g,function(a){d.isItemLoaded(a)||i++});i==0?c(g):b.forEach(g,function(a,b){d.isItemLoaded(a)||d.loadItem({item:a,onItem:function(a){g[b]=a;--i==0&&c(g)},onError:e})})}else{var k=b.hitch(this,arguments.callee);d.loadItem({item:a,
onItem:function(a){k(a,c,e)},onError:e})}},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,c,b){var d={parent:c,attribute:this.childrenAttrs[0]},g;this.newItemIdAttr&&a[this.newItemIdAttr]?this.fetchItemByIdentity({identity:a[this.newItemIdAttr],scope:this,
onItem:function(h){h?this.pasteItem(h,null,c,!0,b):(g=this.store.newItem(a,d))&&b!=void 0&&this.pasteItem(g,c,c,!1,b)}}):(g=this.store.newItem(a,d))&&b!=void 0&&this.pasteItem(g,c,c,!1,b)},pasteItem:function(a,c,e,d,g){var h=this.store,f=this.childrenAttrs[0];c&&b.forEach(this.childrenAttrs,function(e){if(h.containsValue(c,e,a)){if(!d){var g=b.filter(h.getValues(c,e),function(c){return c!=a});h.setValues(c,e,g)}f=e}});if(e)if(typeof g=="number"){var i=h.getValues(e,f).slice();i.splice(g,0,a);h.setValues(e,
f,i)}else h.setValues(e,f,h.getValues(e,f).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(c){this.onChildrenChange(a,c)}));else this.onChange(a)}});return f.tree.TreeStoreModel});
define("dijit/tree/ForestStoreModel",["dojo","dijit","dijit/tree/TreeStoreModel"],function(b,f){b.declare("dijit.tree.ForestStoreModel",f.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,e){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:e}):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,c,b){return c===this.root?(this.onNewRootItem(a),this.store.newItem(a)):this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(a,c,b,d,g){if(c===this.root&&!d)this.onLeaveRoot(a);f.tree.TreeStoreModel.prototype.pasteItem.call(this,a,c===this.root?null:c,b===this.root?null:b,d,g);if(b===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,c){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(a){b.indexOf(this.root.children,a)!=-1&&this._requeryTop();this.inherited(arguments)},onSetItem:function(a,c,b,d){this._requeryTop();this.inherited(arguments)}});
return f.tree.ForestStoreModel});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("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\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="browseDirectoryExplorerTree" class="explorerTreeClass" id="${id}_browseDirectoryExplorerTree" 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<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="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("dojox",["dojo"],function(b){return dojox=b._dojox||{}});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(f,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(f)||Math.abs(f)==Infinity?null:b.number._applyPattern(f,c,a)};b.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;b.number._applyPattern=function(f,a,c){var c=
c||{},e=c.customs.group,d=c.customs.decimal,a=a.split(";"),g=a[0],a=a[f<0?1:0]||"-"+g;if(a.indexOf("%")!=-1)f*=100;else if(a.indexOf("\u2030")!=-1)f*=1E3;else if(a.indexOf("\u00a4")!=-1)e=c.customs.currencyGroup||e,d=c.customs.currencyDecimal||d,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 h=b.number._numberPatternRE,g=g.match(h);if(!g)throw Error("unable to find a number expression in pattern: "+
a);if(c.fractional===!1)c.places=0;return a.replace(h,b.number._formatAbsolute(f,g[0],{decimal:d,group:e,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 f=b.number.round;b.number.round=function(a,c,b){var d=Math.pow(10,-c||0),g=Math.abs(a);if(!a||g>=d||g*Math.pow(10,c+1)<5)d=0;return f(a,c,b)+(a>0?d:-d)}}();b.number._formatAbsolute=function(f,a,c){c=c||{};if(c.places===!0)c.places=0;if(c.places===Infinity)c.places=
6;var a=a.split("."),e=typeof c.places=="string"&&c.places.indexOf(","),d=c.places;if(e)d=c.places.substring(e+1);else if(!(d>=0))d=(a[1]||[]).length;c.round<0||(f=b.number.round(f,d,c.round));var f=String(Math.abs(f)).split("."),g=f[1]||"";if(a[1]||c.places){if(e)c.places=c.places.substring(0,e);e=c.places!==void 0?c.places:a[1]&&a[1].lastIndexOf("0")+1;e>g.length&&(f[1]=b.string.pad(g,e,"0",!0));d<g.length&&(f[1]=g.substr(0,d))}else f[1]&&f.pop();d=a[0].replace(",","");e=d.indexOf("0");e!=-1&&(e=
d.length-e,e>f[0].length&&(f[0]=b.string.pad(f[0],e)),d.indexOf("#")==-1&&(f[0]=f[0].substr(f[0].length-e)));var d=a[0].lastIndexOf(","),h,j;d!=-1&&(h=a[0].length-d-1,a=a[0].substr(0,d),d=a.lastIndexOf(","),d!=-1&&(j=a.length-d-1));a=[];for(d=f[0];d;)e=d.length-h,a.push(e>0?d.substr(e):d),d=e>0?d.slice(0,e):"",j&&(h=j,delete j);f[0]=a.reverse().join(c.group||",");return f.join(c.decimal||".")};b.number.regexp=function(f){return b.number._parseInfo(f).regexp};b.number._parseInfo=function(f){var f=
f||{},a=b.i18n.normalizeLocale(f.locale),a=b.i18n.getLocalization("dojo.cldr","number",a),c=f.pattern||a[(f.type||"decimal")+"Format"],e=a.group,d=a.decimal,g=1;if(c.indexOf("%")!=-1)g/=100;else if(c.indexOf("\u2030")!=-1)g/=1E3;else{var h=c.indexOf("\u00a4")!=-1;h&&(e=a.currencyGroup||e,d=a.currencyDecimal||d)}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:f.strict?e:[e,""],fractional:f.fractional,decimal:d,exponent:!1},a=a.split("."),h=f.places;a.length==1&&g!=1&&(a[1]="###");if(a.length==1||h===0)c.fractional=!1;else{h===void 0&&(h=f.pattern?a[1].lastIndexOf("0")+1:Infinity);if(h&&f.fractional==void 0)c.fractional=!0;!f.places&&h<a[1].length&&(h+=","+a[1].length);c.places=h}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);h&&(a=a.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,
function(a,c,d,e){a=b.regexp.escapeString(f[["symbol","currency","displayName"][d.length-1]]||f.currency||"");c=c?"[\\s\\xa0]":"";e=e?"[\\s\\xa0]":"";return!f.strict?(c&&(c+="*"),e&&(e+="*"),"(?:"+c+a+e+")?"):c+a+e}));return{regexp:a.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:e,decimal:d,factor:g}};b.number.parse=function(f,a){var c=b.number._parseInfo(a),e=RegExp("^"+c.regexp+"$").exec(f);if(!e)return NaN;var d=e[1];if(!e[1]){if(!e[2])return NaN;d=e[2];c.factor*=-1}d=d.replace(RegExp("["+c.group+"\\s\\xa0]",
"g"),"").replace(c.decimal,".");return d*c.factor};b.number._realNumberRegexp=function(f){f=f||{};if(!("places"in f))f.places=Infinity;if(typeof f.decimal!="string")f.decimal=".";if(!("fractional"in f)||/^0/.test(f.places))f.fractional=[!0,!1];if(!("exponent"in f))f.exponent=[!0,!1];if(!("eSigned"in f))f.eSigned=[!0,!1];var a=b.number._integerRegexp(f),c=b.regexp.buildGroupRE(f.fractional,function(a){var c="";a&&f.places!==0&&(c="\\"+f.decimal,f.places==Infinity?c="(?:"+c+"\\d+)?":c+="\\d{"+f.places+
"}");return c},!0),e=b.regexp.buildGroupRE(f.exponent,function(a){return a?"([eE]"+b.number._integerRegexp({signed:f.eSigned})+")":""});a+=c;c&&(a="(?:(?:"+a+")|(?:"+c+"))");return a+e};b.number._integerRegexp=function(f){f=f||{};if(!("signed"in f))f.signed=[!0,!1];if("separator"in f){if(!("groupSize"in f))f.groupSize=3}else f.separator="";var a=b.regexp.buildGroupRE(f.signed,function(a){return a?"[-+]":""},!0),c=b.regexp.buildGroupRE(f.separator,function(a){if(!a)return"(?:\\d+)";a=b.regexp.escapeString(a);
a==" "?a="\\s":a=="\u00a0"&&(a="\\s\\xa0");var c=f.groupSize,g=f.groupSize2;return g?(a="(?:0|[1-9]\\d{0,"+(g-1)+"}(?:["+a+"]\\d{"+g+"})*["+a+"]\\d{"+c+"})",c-g>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("text!orion/widgets/templates/ImportDialog.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="importDialog.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\tFile:\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="importDialog.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="importDialog.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>\t\n\t\t\t</fieldset>\n\t\t</form>\n\t</div>\n</div>'});
define("dojo/io/iframe",["dojo"],function(b){b.getObject("io",!0,b);b.io.iframe={create:function(f,a,c){if(window[f])return window[f];if(window.frames[f])return window.frames[f];var e=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"));
e=b.place('<iframe id="'+f+'" name="'+f+'" src="'+c+'" onload="'+a+'" style="position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden">',b.body());return window[f]=e},setSrc:function(f,a,c){try{if(c){var e;(e=b.isIE||b.isWebKit?f.contentWindow.document:f.contentWindow)?e.location.replace(a):f.location=a}else b.isWebKit?f.location=a:frames[f.name].location=a}catch(d){console.log("dojo.io.iframe.setSrc: ",d)}},doc:function(f){return f.contentDocument||f.name&&f.document&&
b.doc.getElementsByTagName("iframe")[f.name].contentWindow&&b.doc.getElementsByTagName("iframe")[f.name].contentWindow.document||f.name&&b.doc.frames[f.name]&&b.doc.frames[f.name].document||null},send:function(f){if(!this._frame)this._frame=this.create(this._iframeName,b._scopeName+".io.iframe._iframeOnload();");f=b._ioSetArgs(f,function(a){a.canceled=!0;a.ioArgs._callNext()},function(a){var c=null;try{var e=a.ioArgs,d=b.io.iframe,g=d.doc(d._frame),h=e.handleAs,c=g;if(h!="html")if(h=="xml"){if(b.isIE<
9||b.isIE&&b.isQuirks){b.query("a",d._frame.contentWindow.document.documentElement).orphan();var f=d._frame.contentWindow.document.documentElement.innerText,f=f.replace(/>\s+</g,"><"),f=b.trim(f),c=b._contentHandlers.xml({responseText:f})}}else c=g.getElementsByTagName("textarea")[0].value,h=="json"?c=b.fromJson(c):h=="javascript"&&(c=b.eval(c))}catch(i){c=i}finally{e._callNext()}return c},function(a,c){c.ioArgs._hasError=!0;c.ioArgs._callNext();return a});f.ioArgs._callNext=function(){if(!this._calledNext)this._calledNext=
!0,b.io.iframe._currentDfd=null,b.io.iframe._fireNextRequest()};this._dfdQueue.push(f);this._fireNextRequest();b._ioWatch(f,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 f},_currentDfd:null,_dfdQueue:[],_iframeName:b._scopeName+"IoIframe",_fireNextRequest:function(){try{if(!(this._currentDfd||this._dfdQueue.length==0)){do var f=this._currentDfd=this._dfdQueue.shift();
while(f&&f.canceled&&this._dfdQueue.length);if(!f||f.canceled)this._currentDfd=null;else{var a=f.ioArgs,c=a.args;a._contentToClean=[];var e=b.byId(c.form),d=c.content||{};if(e){if(d){var g=function(c,d){b.create("input",{type:"hidden",name:c,value:d},e);a._contentToClean.push(c)},h;for(h in d){var j=d[h];if(b.isArray(j)&&j.length>1){var i;for(i=0;i<j.length;i++)g(h,j[i])}else e[h]?e[h].value=j:g(h,j)}}var k=e.getAttributeNode("action"),l=e.getAttributeNode("method"),m=e.getAttributeNode("target");
if(c.url)a._originalAction=k?k.value:null,k?k.value=c.url:e.setAttribute("action",c.url);if(!l||!l.value)l?l.value=c.method?c.method:"post":e.setAttribute("method",c.method?c.method:"post");a._originalTarget=m?m.value:null;m?m.value=this._iframeName:e.setAttribute("target",this._iframeName);e.target=this._iframeName;b._ioNotifyStart(f);e.submit()}else g=c.url+(c.url.indexOf("?")>-1?"&":"?")+a.query,b._ioNotifyStart(f),this.setSrc(this._frame,g,!0)}}}catch(n){f.errback(n)}},_iframeOnload:function(){var f=
this._currentDfd;if(f){var f=f.ioArgs,a=b.byId(f.args.form);if(a){for(var c=f._contentToClean,e=0;e<c.length;e++)for(var d=c[e],g=0;g<a.childNodes.length;g++){var h=a.childNodes[g];if(h.name==d){b.destroy(h);break}}f._originalAction&&a.setAttribute("action",f._originalAction);if(f._originalTarget)a.setAttribute("target",f._originalTarget),a.target=f._originalTarget}f._finished=!0}else this._fireNextRequest()}};return b.io.iframe});define("text!dijit/form/templates/DropDownBox.html",[],function(){return'<div class="dijit dijitReset dijitInlineTable dijitLeft"\n\tid="widget_${id}"\n\trole="combobox"\n\t><div class=\'dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer\'\n\t\tdojoAttachPoint="_buttonNode, _popupStateNode" role="presentation"\n\t\t><input class="dijitReset dijitInputField dijitArrowButtonInner" value="&#9660; " type="text" tabIndex="-1" readonly="readonly" role="presentation"\n\t\t\t${_buttonInputDisabled}\n\t/></div\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\' ${!nameAttrSetting} type="text" autocomplete="off"\n\t\t\tdojoAttachPoint="textbox,focusNode" role="textbox" aria-haspopup="true"\n\t/></div\n></div>'});
define("dijit/form/nls/ComboBox",{root:{previousMessage:"Previous choices",nextMessage:"More choices"},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("text!orion/widgets/templates/SFTPConnectionDialog.html",[],function(){return'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title">\n\t<div dojoType="dojo.data.ItemFileReadStore" data="sftpConnectionStoreData" jsId="sftpConnectionStore">\n\t</div>\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="locationLabel" for="${id}_sftpPath" style="padding-right: 10">${locationLabelText}</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<div dojoType="dijit.form.ComboBox" store="sftpConnectionStore" style="display: inline-block; width: 88%;" dojoAttachPoint="sftpConnectionList" searchAttr="name">\n\t\t\t\t\t</div>\n\t\t\t\t\t<div dojoType="dijit.form.DropDownButton">\n\t\t\t\t\t    <span>New</span>\n\t\t\t    \t\t<div dojoType="dijit.TooltipDialog">\n\t\t\t\t\t\t\t<div style="display: table">\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<label dojoAttachPoint="sftpHostLabel" for="${id}_sftpHost" style="padding-right: 10">${sftpHostLabelText}</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t\t\t\t\t\t<input dojoAttachPoint="sftpHost" id="${id}_sftpHost" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<label dojoAttachPoint="sftpPathLabel" for="${id}_sftpPath" style="padding-right: 10">${sftpPathLabelText}</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t\t\t\t\t\t<input dojoAttachPoint="sftpPath" id="${id}_sftpPath" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\t\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<label dojoAttachPoint="sftpUserLabel" for="${id}_sftpUser" style="padding-right: 10">${sftpUserLabelText}</label>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">\n\t\t\t\t\t\t\t\t\t\t<input dojoAttachPoint="sftpUser" id="${id}_sftpUser" style="display: inline-block; width: 98%;" value="">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div style="display: table-row">\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5"></div>\n\t\t\t\t\t\t\t\t\t<div style="display: table-cell; padding: 5">\n\t\t\t\t\t\t\t\t\t\t<button dojoAttachPoint="addSFTPConnection" type="submit" dojoType="dijit.form.Button" style="padding: 20 0 10 0; float: right; clear: both;">Add</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div><\!-- End inner table--\>\n\t\t\t    \t\t</div><\!-- End TooltipDialog --\>\n\t\t\t    \t</div><\!-- End DropDownButton --\>\n\t\t\t\t</div><\!-- End table cell --\>\n\t\t\t</div><\!-- End table row --\>\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="sftpPasswordLabel" for="${id}_sftpPassword" style="padding-right: 10">${sftpPasswordLabelText}</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 type="password" dojoAttachPoint="sftpPassword" id="${id}_sftpPassword" 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">\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<p>If the same file exists in both the source and destination:</p>\n\t\t\t\t    <input type="radio" dojoAttachPoint="overwriteCancel" dojoType="dijit.form.RadioButton" name="overwriteOption" id="overwriteCancel" checked value="overwriteCancel" />\n\t\t\t\t    <label for="radioOne">Cancel the transfer</label>\n\t\t\t\t    <br />\n\t\t\t\t    <input type="radio" dojoAttachPoint="overwriteAll" dojoType="dijit.form.RadioButton" name="overwriteOption" id="overwriteAll"/>\n\t\t\t\t    <label for="radioOne">Always overwrite destination</label>\n\t\t\t\t    <br />\n\t\t\t\t    <input type="radio" dojoAttachPoint="overwriteOlder" dojoType="dijit.form.RadioButton" name="overwriteOption" id="overwriteOlder"/>\n\t\t\t\t    <label for="radioOne">Overwrite if source is newer</label>\n\t\t\t\t</div>\n\t\t\t</div><\!-- End table row --\>\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="sftpConnectionButton" 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</button>\n\t\t\t\t</div>\n\t\t\t</div><\!-- End table row --\>\n\t\t</div><\!-- End table --\>\n\t</div><\!-- End dijitDialogPaneContent --\>\n</div>'});
define("orion/textview/keyBinding",[],function(){function b(a,c,b,d,g){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=d!==void 0&&d!==null?d:!1;this.mod4=g!==void 0&&g!==null?g:!1}var f=window.navigator.platform.indexOf("Mac")!==-1;b.prototype={match:function(a){return this.keyCode===a.keyCode?this.mod1!==(f?a.metaKey:a.ctrlKey)?!1:this.mod2!==a.shiftKey?!1:this.mod3!==a.altKey?!1:f&&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/URITemplate",[],function(){function b(a){this._text=a}function f(a,c){if(c==="U")return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16).toUpperCase()});if(c==="U+R")return encodeURI(a).replace(/%5B/g,"[").replace(/%5D/g,"]");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 d=[],e=0;e<a.length;e++)typeof a[e]!=="undefined"&&
d.push(f(a[e],c));return d.join(b)}function c(a,c,b,d){for(var e=Object.keys(a),h=[],g=0;g<e.length;g++)typeof a[e[g]]!=="undefined"&&h.push(f(e[g],c)+b+f(a[e[g]],c));return h.join(d)}function e(a){if(a.length===0)throw Error("Invalid Expression: 0 length expression");(this._operator=g[a[0]])?a=a.substring(1):this._operator=g.NUL;for(var c=[],b=a.split(","),d=0;d<b.length;d++){var e=b[d].match(h);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 d(a){for(var c=[],d=0,h=a.indexOf("{",d);h!==-1;){c.push(new b(a.substring(d,h)));d=a.indexOf("}",h+1);if(d===-1)throw Error("Invalid template: "+a);c.push(new e(a.substring(h+1,d)));d+=1;h=a.indexOf("{",d)}c.push(new b(a.substring(d)));this._templateComponents=c}var g={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-,"}},h=/^((?:(?:[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)}};e.prototype={expand:function(b){for(var d=[],e=
0;e<this._varSpecList.length;e++){var h=this._varSpecList[e],g=h.name,n=b[g],o=typeof n;if(o!=="undefined"&&n!==null){var p=d.length===0?this._operator.first:this._operator.sep;if(o==="string")this._operator.named&&(p+=f(g,"U+R"),p+=n.length===0?this._operator.ifemp:"="),h.prefix!==-1&&h.prefix<n.length&&(n=n.substring(0,h.prefix)),p+=f(n,this._operator.allow);else if(Array.isArray(n))h.explode?p+=a(n,this._operator.allow,this._operator.sep):(this._operator.named&&(p+=f(g,"U+R"),p+=n.length===0?this._operator.ifemp:
"="),p+=a(n,this._operator.allow,","));else if(o==="object")h.explode?p+=c(n,this._operator.allow,"=",this._operator.sep):(this._operator.named&&(p+=f(g,"U+R"),p+=Object.keys(n).length===0?this._operator.ifemp:"="),p+=c(n,this._operator.allow,",",","));else throw Error("bad param type: "+g+" : "+o);d.push(p)}}return d.join("")}};d.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 d});
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: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="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/compare/nls/messages",["orion/i18n!orion/compare/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
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...","Line 0 : Col 0":"Line 0 : Col 0","No Matching DiffService for location:":"No Matching DiffService for location:"});
define("orion/compare/diff-parser",[],function(){var b=b||{};b.DiffParser=function(){function b(c,e){this._lineDelimiter=c?c:a?"\r\n":"\n";this._diffLineDelimiter=e?e: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,d,g){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 h=0;h<b;h++){var f=this._parseHunkRange(h);f&&this._hunkRanges.push(f)}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(d);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));(g===void 0||!g)&&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,d,g){g===d&&a===" "||(d=[d,g-d,"s"],a==="-"?d[2]="r":a==="+"?d[2]="a":a==="c"&&(d[2]="c"),b.push(d))},_createMinusBlock:function(a,b,d){var g=this._oBlocks.length;g===0||a!==this._oBlocks[g-
1][0]?(this._oBlocks.push([a===0?1:a,d]),this._nBlocks.push([b,0,-2])):this._oBlocks[g-1][1]+=d},_createPlusBlock:function(a,b,d,g){var h=this._nBlocks.length;h===0||b!==this._nBlocks[h-1][0]?(this._oBlocks.push([a===0?1:a,0]),this._nBlocks.push([b,d,g])):(this._nBlocks[h-1][1]+=d,this._nBlocks[h-1][2]=g)},_parseHunkBlock:function(a){for(var b=" ",d=this._hunkRanges[a][0]+1,g=a===this._hunkRanges.length-1?this._diffContents.length:this._hunkRanges[a+1][0],h=0,f=0,i=this._hunkRanges[a][1],k=this._hunkRanges[a][3],
l=d,m=d;m<g;m++)if(0!==this._diffContents[m].length){var n=this._diffContents[m][0];if(n==="\\"&&("\\ No newline at end of file"===this._diffContents[m].substring(0,this._diffContents[m].length-1)||"\\ No newline at end of file"===this._diffContents[m]))b==="-"?this._oNewLineAtEnd=!1:b===" "?this._oNewLineAtEnd=this._nNewLineAtEnd=!1:this._nNewLineAtEnd=!1,m>d&&this._diffContents[m-1][this._diffContents[m-1].length-1]==="\r"&&(this._diffContents[m-1]=this._diffContents[m-1].substring(0,this._diffContents[m-
1].length-1));else{switch(n){case "-":case "+":case " ":break;default:continue}if(b!==n){n==="+"&&(l=m);switch(b){case " ":i=this._hunkRanges[a][1]+h;k=this._hunkRanges[a][3]+f;break;case "-":this._createMinusBlock(i,k,this._hunkRanges[a][1]+h-i);break;case "+":this._createPlusBlock(i,k,this._hunkRanges[a][3]+f-k,l)}b=n}switch(n){case "-":h++;break;case "+":f++;break;case " ":h++,f++}}}switch(b){case "-":this._createMinusBlock(i,k,this._hunkRanges[a][1]+h-i);break;case "+":this._createPlusBlock(i,
k,this._hunkRanges[a][3]+f-k,l)}},_detectConflictes:function(a,b){if(a<0)return!1;for(var d=a+b,g=a;g<d;g++){var h=this._diffContents[g];if(h.indexOf("<<<<<")>-1||h.indexOf(">>>>>")>-1)return!0}return!1},_buildMap:function(a){for(var b=this._oBlocks.length,d=this._oFileContents.length,g=0,h=1,f=0;f<b;f++)h=this._oBlocks[f][0]-h,h>0&&(this._deltaMap.push([h,h,0]),g+=h),a&&this._detectConflictes(this._nBlocks[f][2],this._nBlocks[f][1])?this._deltaMap.push([this._nBlocks[f][1],this._oBlocks[f][1],this._nBlocks[f][2]+
1,1]):this._deltaMap.push([this._nBlocks[f][1],this._oBlocks[f][1],this._nBlocks[f][2]+1]),g+=this._oBlocks[f][1],h=this._oBlocks[f][0]+this._oBlocks[f][1];0<d-h&&(this._deltaMap.push([d-h+1,d-h+1,0]),g+=d-h+1);g<d&&(h=d-g,a=this._deltaMap[this._deltaMap.length-1],a[2]===0?(a[0]+=h,a[1]+=h):a[2]===-1?this._deltaMap.push([h,h,0]):this._nNewLineAtEnd===this._oNewLineAtEnd?this._deltaMap.push([h,h,0]):(this._nNewLineAtEnd&&(a[0]+=h),this._oNewLineAtEnd&&(a[1]+=h)))},_buildNewFile:function(){for(var a=
1,b=!1,d=this._deltaMap.length,g=0;g<d;g++){b=!1;if(this._deltaMap[g][2]===0){for(var h=0;h<this._deltaMap[g][0];h++)this._nFileContents.push(this._oFileContents[a+h-1]);b=!0}else if(this._deltaMap[g][2]>0)for(h=0;h<this._deltaMap[g][0];h++)this._nFileContents.push(this._diffContents[this._deltaMap[g][2]+h-1].substring(1));a+=this._deltaMap[g][1]}this._nNewLineAtEnd&&!b&&this._nFileContents.push("")},_parseHRangeBody:function(a,b){if(0<a.indexOf(",")){var d=a.split(","),g=parseInt(d[0]),d=parseInt(d[1]);
b.push(g>=0?g:1);b.push(d>=0?d:1)}else g=parseInt(a),b.push(g>=0?g: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),d=b.indexOf("@@");if(!(d<0)){var b=b.substring(0,d),d=b.indexOf("-"),g=b.indexOf("+");if(!(d<0||g<0))return a=[a],d<g?(b=b.substring(d+1).split("+"),this._parseHRangeBody(b[0],a),this._parseHRangeBody(b[1],a)):(b=b.substring(g+1).split("-"),this._parseHRangeBody(b[1],a),this._parseHRangeBody(b[0],a)),
a}}}};return b}();return b});
define("orion/textview/eventTarget",[],function(){function b(){}b.addMixin=function(f){var a=b.prototype,c;for(c in a)a.hasOwnProperty(c)&&(f[c]=a[c])};b.prototype={addEventListener:function(b,a,c){if(!this._eventTypes)this._eventTypes={};var e=this._eventTypes[b];e||(e=this._eventTypes[b]={level:0,listeners:[]});e.listeners.push({listener:a,useCapture:c})},dispatchEvent:function(b){if(this._eventTypes){var a=b.type,c=this._eventTypes[a];if(c){var e=c.listeners;try{if(c.level++,e)for(var d=0,g=e.length;d<
g;d++)if(e[d]){var h=e[d].listener;typeof h==="function"?h.call(this,b):h.handleEvent&&typeof h.handleEvent==="function"&&h.handleEvent(b)}}finally{if(c.level--,c.compact&&c.level===0){for(b=e.length-1;b>=0;b--)e[b]||e.splice(b,1);e.length===0&&delete this._eventTypes[a];c.compact=!1}}}}},isListening:function(b){return!this._eventTypes?!1:this._eventTypes[b]!==void 0},removeEventListener:function(b,a,c){if(this._eventTypes){var e=this._eventTypes[b];if(e){for(var d=e.listeners,g=0,h=d.length;g<h;g++){var j=
d[g];if(j&&j.listener===a&&j.useCapture===c){e.level!==0?(d[g]=null,e.compact=!0):d.splice(g,1);break}}d.length===0&&delete this._eventTypes[b]}}}};return{EventTarget:b}});define("orion/textview/i18n",{load:function(b,f,a){f.specified("orion/bootstrap")?f(["orion/i18n!"+b],function(c){a(c)}):a({})}});define("orion/editor/nls/messages",["orion/textview/i18n!orion/editor/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
define("orion/editor/nls/root/messages",{Comment:"Comment",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",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"],function(b,f,a){var c,e,d;function g(a){this.textView=a;this.state=c;this.providers=[];var h=this;this.contentAssistListener={onModelChanging:function(a){h.isDeactivatingChange(a)?h.setState(c):h.state===e&&h.setState(d)},onScroll:function(){h.setState(c)},onSelection:function(){var a=h.state;if(a===e||a===d)h.computeProposals(),h.setState(d)}};var g=navigator.platform.indexOf("Mac")!==
-1;a.setKeyBinding(g?new f.KeyBinding(" ",!1,!1,!1,!0):new f.KeyBinding(" ",!0),"contentAssist");a.setAction("contentAssist",function(){h.activate();return!0},{name:b.contentAssist})}function h(a,c){this.contentAssist=a;this.widget=c;this.proposals=[];var b=this;this.contentAssist.addEventListener("ProposalsComputed",function(a){b.proposals=a.data.proposals;b.selectedIndex=b.proposals.length?0:-1})}function j(a,c){this.contentAssist=a;this.parentNode=typeof c==="string"?document.getElementById(c):
c;this.textView=this.contentAssist.getTextView();this.textViewListenerAdded=!1;var b=this;this.textViewListener={onMouseDown:function(a){a.event.target.parentElement!==b.parentNode&&b.contentAssist.deactivate()}};this.contentAssist.addEventListener("ProposalsComputed",function(a){b.setProposals(a.data.proposals);b.show();if(!b.textViewListenerAdded)b.textView.addEventListener("MouseDown",b.textViewListener.onMouseDown),b.textViewListenerAdded=!0});this.contentAssist.addEventListener("Deactivating",
function(){b.setProposals([]);b.hide();if(b.textViewListenerAdded)b.textView.removeEventListener("MouseDown",b.textViewListener.onMouseDown),b.textViewListenerAdded=!1;b.textViewListenerAdded=!1})}var i=function(){function a(){}a.prototype.then=function(a){this.callback=a;if(this.result){var c=this;setTimeout(function(){c.callback(c.result)},0)}};a.prototype.done=function(a){this.result=a;this.callback&&this.callback(this.result)};return a}();c=1;e=2;d=3;g.prototype={apply:function(a){if(!a)return!1;
var b=this.textView.getCaretOffset(),d={proposal:a,start:b,end:b};this.setState(c);this.textView.setText(a.proposal||a,b,b);this.dispatchEvent({type:"ProposalApplied",data:d});return!0},activate:function(){this.state===c&&this.setState(e)},deactivate:function(){this.setState(c)},getTextView:function(){return this.textView},isActive:function(){return this.state===e||this.state===d},isDeactivatingChange:function(a){var c=a.removedCharCount>0&&a.addedCharCount===0,b=this.textView,b=a.start+1<=b.getModel().getCharCount()&&
/^\s*$/.test(b.getText(a.start,a.start+1));return a.removedLineCount>0||c&&b},setState:function(a){var b;a===e?b="Activating":a===c&&(b="Deactivating");b&&this.dispatchEvent({type:b});this.state=a;this.onStateChange(a)},onStateChange:function(a){if(a===c){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(c){a.dispatchEvent({type:"ProposalsComputed",
data:{proposals:c}})})},getPrefixStart:function(a){for(;a>0&&/[A-Za-z0-9_]/.test(this.textView.getText(a-1,a));)a--;return a},_computeProposals:function(a){function c(a){a&&(d=d.concat(a));++e===g.length&&h.done(d)}function b(){++e===g.length&&h.done(d)}for(var d=[],e=0,h=new i,g=this.providers,f=this.textView,j=f.getModel(),s=f.getText(),f={line:j.getLine(j.getLineAtOffset(a)),prefix:f.getText(this.getPrefixStart(a),a),selection:f.getSelection()},j=0;j<g.length;j++){var u=g[j],w=u.getProposals;if(typeof u.computeProposals===
"function")w=u.computeProposals;(u=w.apply(u,[s,a,f]))&&u.then?u.then(c,b):c(u)}return h},setProviders:function(a){this.providers=a.slice(0)}};a.EventTarget.addMixin(g.prototype);h.prototype={cancel:function(){this.getContentAssist().deactivate()},getContentAssist:function(){return this.contentAssist},isActive:function(){return this.getContentAssist().isActive()},lineUp:function(){this.selectedIndex=this.selectedIndex===0?this.proposals.length-1:this.selectedIndex-1;this.widget&&this.widget.setSelectedIndex(this.selectedIndex);
return!0},lineDown:function(){this.selectedIndex=this.selectedIndex===this.proposals.length-1?0:this.selectedIndex+1;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}};j.prototype={onClick:function(a){this.contentAssist.apply(this.getProposal(a.target));this.textView.focus()},createDiv:function(a,
c,b,d){var e=document.createElement("div");e.id="contentoption"+d;e.setAttribute("role","option");if(c)e.className="selected",this.parentNode.setAttribute("aria-activedescendant",e.id);a=document.createTextNode(a);e.appendChild(a,e);b.appendChild(e)},createAccessible:function(a){this._isAccessible||this.parentNode.addEventListener("keydown",function(c){c.preventDefault();if(c.keyCode===27)return a.cancel();else if(c.keyCode===38)return a.lineUp();else if(c.keyCode===40)return a.lineDown();else if(c.keyCode===
13)return a.enter();return!1});this._isAccessible=!0},getDisplayString:function(a){return typeof a==="string"?a:a.description&&typeof a.description==="string"?a.description:a.proposal},getProposal:function(a){for(var c=0,b=this.parentNode.firstChild;b!==null;b=b.nextSibling){if(b===a)return this.proposals[c]||null;c++}return null},setSelectedIndex:function(a){this.selectedIndex=a;this.selectNode(this.parentNode.childNodes[this.selectedIndex])},selectNode:function(a){for(var c=this.parentNode.childNodes,
b=0;b<c.length;b++){var d=c[b];if(d.className==="selected")d.className="";if(d===a)d.className="selected",this.parentNode.setAttribute("aria-activedescendant",d.id),d.focus(),d.offsetTop<this.parentNode.scrollTop?d.scrollIntoView(!0):d.offsetTop+d.offsetHeight>this.parentNode.scrollTop+this.parentNode.clientHeight&&d.scrollIntoView(!1)}},setProposals:function(a){this.proposals=a},show:function(){if(this.proposals.length===0)this.hide();else{var a=this.textView.getLocationAtOffset(this.textView.getCaretOffset());
a.y+=this.textView.getLineHeight();this.parentNode.innerHTML="";for(var c=0;c<this.proposals.length;c++)this.createDiv(this.getDisplayString(this.proposals[c]),c===0,this.parentNode,c);this.textView.convert(a,"document","page");this.parentNode.style.position="absolute";this.parentNode.style.left=a.x+"px";this.parentNode.style.top=a.y+"px";this.parentNode.style.display="block";this.parentNode.scrollTop=0;c=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>c)this.parentNode.style.left=c-this.parentNode.offsetWidth+"px";this.parentNode.onclick=this.onClick.bind(this)}},hide:function(){document.activeElement===this.parentNode&&this.textView.focus();this.parentNode.style.display="none";this.parentNode.onclick=null}};return{ContentAssist:g,ContentAssistMode:h,ContentAssistWidget:j}});
define("orion/textview/undoStack",[],function(){function b(a,b,d){this.offset=a;this.text=b;this.previousText=d}function f(){this.changes=[]}function a(a,b){this.view=a;this.size=b!==void 0?b:100;this.reset();var d=a.getModel();d.getBaseModel&&(d=d.getBaseModel());this.model=d;var g=this;this._listener={onChanging:function(a){g._onChanging(a)},onDestroy:function(a){g._onDestroy(a)}};d.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,d,g,h){var f=g.getModel();if(f.mapOffset&&g.annotationModel){var i=f.mapOffset(a,!0);if(i<0)for(var k=g.annotationModel.getAnnotations(a,a+1);k.hasNext();){var l=k.next();if(l.type==="orion.annotation.folding"){l.expand();i=f.mapOffset(a,!0);break}}if(i<0)return;a=i}g.setText(b,a,a+d.length);h&&g.setSelection(a,
a+b.length)}};f.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 d=this.changes.length-1;d>=0;d--)this.changes[d].undo(a,!1);if(b){var d=this.startSelection.start,g=this.startSelection.end;a.setSelection(this.startCaret?d:g,this.startCaret?g:d)}},redo:function(a,b){for(var d=0;d<this.changes.length;d++)this.changes[d].redo(a,!1);if(b){var d=this.endSelection.start,g=this.endSelection.end;
a.setSelection(this.endCaret?d:g,this.endCaret?g:d)}},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 f;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 e=a.text,d=a.start,g=a.removedCharCount,a=a.addedCharCount;if(!this._ignoreUndo){this._undoStart!==void 0&&!(a===1&&g===0&&this._undoType===
1&&d===this._undoStart+this._undoText.length||a===0&&g===1&&this._undoType===-1&&(d+1===this._undoStart||d===this._undoStart))&&this._commitUndo();if(!this.compoundChange)if(a===1&&g===0){if(this._undoStart===void 0)this._undoStart=d;this._undoText+=e;this._undoType=1;return}else if(a===0&&g===1){e=this._undoText.length>0&&this._undoStart===d;this._undoStart=d;this._undoType=-1;e?this._undoText+=this.model.getText(d,d+g):this._undoText=this.model.getText(d,d+g)+this._undoText;return}this.add(new b(d,
e,this.model.getText(d,d+g)))}}};return{UndoStack:a}});define("orion/edit/nls/messages",["orion/i18n!orion/edit/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
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"});
define("orion/textview/nls/messages",["orion/textview/i18n!orion/textview/nls/messages"],function(b){var f={root:!0};Object.keys(b).forEach(function(a){typeof f[a]==="undefined"&&(f[a]=b[a])});return f});
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,f){function a(a,c,b){this.start=a;this.end=c;this._projectionModel=b;this.html=this._expandedHTML;this.style=this._expandedStyle;this.expanded=!0}function c(){}function e(a,d){var e=a.lastIndexOf("."),e=a.substring(e+1),h={title:b[e],style:{styleClass:"annotation "+e},html:"<div class='annotationHTML "+e+"'></div>",overviewStyle:{styleClass:"annotationOverview "+e}};d?h.lineStyle={styleClass:"annotationLine "+
e}:h.rangeStyle={styleClass:"annotationRange "+e};c.registerType(a,h)}function d(){}function g(a){this._annotations=[];var c=this;this._listener={onChanged:function(a){c._onChanged(a)}};this.setTextModel(a)}function h(a,c){this._view=a;this._annotationModel=c;var b=this;this._listener={onDestroy:function(a){b._onDestroy(a)},onLineStyle:function(a){b._onLineStyle(a)},onChanged:function(a){b._onAnnotationModelChanged(a)}};a.addEventListener("Destroy",this._listener.onDestroy);a.addEventListener("LineStyle",
this._listener.onLineStyle);c.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,c=a.getBaseModel();this._projection=
{start:c.getLineStart(c.getLineAtOffset(this.start)+1),end:c.getLineEnd(c.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,c){var b=c;if(typeof b!=="function")b=function(a,c,b){this.start=
a;this.end=c;if(b)this.title=b},b.prototype=c;b.prototype.type=a;j[a]=b;return a};c.createAnnotation=function(a,c,b,d){return new (this.getType(a))(c,b,d)};c.getType=function(a){return j[a]};e(c.ANNOTATION_ERROR);e(c.ANNOTATION_WARNING);e(c.ANNOTATION_TASK);e(c.ANNOTATION_BREAKPOINT);e(c.ANNOTATION_BOOKMARK);e(c.ANNOTATION_CURRENT_BRACKET);e(c.ANNOTATION_MATCHING_BRACKET);e(c.ANNOTATION_CURRENT_SEARCH);e(c.ANNOTATION_MATCHING_SEARCH);e(c.ANNOTATION_CURRENT_LINE,!0);c.registerType(c.ANNOTATION_FOLDING,
a);d.addMixin=function(a){var c=d.prototype,b;for(b in c)c.hasOwnProperty(b)&&(a[b]=c[b])};d.prototype={addAnnotationType:function(a){if(!this._annotationTypes)this._annotationTypes=[];this._annotationTypes.push(a)},getAnnotationTypePriority:function(a){if(this._annotationTypes)for(var c=0;c<this._annotationTypes.length;c++)if(this._annotationTypes[c]===a)return c+1;return 0},getAnnotationsByType:function(a,c,b){a=a.getAnnotations(c,b);for(b=[];a.hasNext();)c=a.next(),this.getAnnotationTypePriority(c.type)!==
0&&b.push(c);var d=this;b.sort(function(a,c){return d.getAnnotationTypePriority(a.type)-d.getAnnotationTypePriority(c.type)});return b},isAnnotationTypeVisible:function(a){return this.getAnnotationTypePriority(a)!==0},removeAnnotationType:function(a){if(this._annotationTypes)for(var c=0;c<this._annotationTypes.length;c++)if(this._annotationTypes[c]===a){this._annotationTypes.splice(c,1);break}}};g.prototype={addAnnotation:function(a){if(a){var c=this._annotations,b=this._binarySearch(c,a.start);c.splice(b,
0,a);this.onChanged({type:"Changed",added:[a],removed:[],changed:[]})}},getTextModel:function(){return this._model},getAnnotations:function(a,c){var b=this._annotations,d,e=0,h=function(){for(;e<b.length;){var d=b[e++];if(a===d.start||(a>d.start?a<d.end:d.start<c))return d;if(d.start>=c)break}return null};d=h();return{next:function(){var a=d;a&&(d=h());return a},hasNext:function(){return d!==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 c=this._annotations,b,d;if(a){b=[];for(d=c.length-1;d>=0;d--){var e=c[d];e.type===a&&c.splice(d,1);b.splice(0,0,e)}}else b=c;this.onChanged({type:"Changed",removed:b,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,
c){var b=this._annotations,d,e,h,g=[];if(a)for(d=a.length-1;d>=0;d--)h=a[d],e=this._getAnnotationIndex(h),e<0||(b.splice(e,1),g.splice(0,0,h));c||(c=[]);for(d=0;d<c.length;d++)h=c[d],e=this._binarySearch(b,h.start),b.splice(e,0,h);this.onChanged({type:"Changed",removed:g,added:c,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,
c){for(var b=a.length,d=-1,e;b-d>1;)e=Math.floor((b+d)/2),c<=a[e].start?b=e:d=e;return b},_getAnnotationIndex:function(a){for(var c=this._annotations,b=this._binarySearch(c,a.start);b<c.length&&c[b].start===a.start;){if(c[b]===a)return b;b++}return-1},_onChanged:function(a){var c=a.start,b=a.removedCharCount,d=this._annotations,e=c+b;if(0<d.length){for(var h={type:"Changed",added:[],removed:[],changed:[],textModelChangedEvent:a},a=a.addedCharCount-b,b=0;b<d.length;b++){var g=d[b];g.start>=e?(g.start+=
a,g.end+=a,h.changed.push(g)):g.end<=c||(g.start<c&&e<g.end?(g.end+=a,h.changed.push(g)):(d.splice(b,1),h.removed.push(g),b--))}if(h.added.length>0||h.removed.length>0||h.changed.length>0)this.onChanged(h)}}};f.EventTarget.addMixin(g.prototype);h.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,c){if(c){a||(a={});a.styleClass&&c.styleClass&&a.styleClass!==c.styleClass?a.styleClass+=" "+c.styleClass:a.styleClass=c.styleClass;var b;if(c.style){if(!a.style)a.style={};for(b in c.style)a.style[b]||(a.style[b]=c.style[b])}if(c.attributes){if(!a.attributes)a.attributes={};for(b in c.attributes)a.attributes[b]||(a.attributes[b]=c.attributes[b])}}return a},_mergeStyleRanges:function(a,c){a||(a=[]);var b,d;for(d=0;d<a.length&&c;d++){var e=a[d];if(c.end<=e.start)break;if(!(c.start>=
e.end)){b=this._mergeStyle({},e.style);b=this._mergeStyle(b,c.style);var h=[];h.push(d,1);c.start<e.start&&h.push({start:c.start,end:e.start,style:c.style});c.start>e.start&&h.push({start:e.start,end:c.start,style:e.style});h.push({start:Math.max(e.start,c.start),end:Math.min(e.end,c.end),style:b});c.end<e.end&&h.push({start:c.end,end:e.end,style:e.style});c=c.end>e.end?{start:e.end,end:c.end,style:c.style}:null;Array.prototype.splice.apply(a,h)}}c&&(b=this._mergeStyle({},c.style),a.splice(d,0,{start:c.start,
end:c.end,style:b}));return a},_onAnnotationModelChanged:function(a){function c(a){for(var h=0;h<a.length;h++)if(d.isAnnotationTypeVisible(a[h].type)){var g=a[h].start,f=a[h].end;e.getBaseModel&&(g=e.mapOffset(g,!0),f=e.mapOffset(f,!0));g!==-1&&f!==-1&&b.redrawRange(g,f)}}if(!a.textModelChangedEvent){var b=this._view;if(b){var d=this,e=b.getModel();c(a.added);c(a.removed);c(a.changed)}}},_onDestroy:function(){this.destroy()},_onLineStyle:function(a){var c=this._annotationModel,b=a.textView.getModel(),
d=c.getTextModel(),e=a.lineStart,h=a.lineStart+a.lineText.length;d!==b&&(e=b.mapOffset(e),h=b.mapOffset(h));for(c=c.getAnnotations(e,h);c.hasNext();)if(e=c.next(),this.isAnnotationTypeVisible(e.type)){if(e.rangeStyle){var h=e.start,g=e.end;d!==b&&(h=b.mapOffset(h,!0),g=b.mapOffset(g,!0));a.ranges=this._mergeStyleRanges(a.ranges,{start:h,end:g,style:e.rangeStyle})}if(e.lineStyle)a.style=this._mergeStyle({},a.style),a.style=this._mergeStyle(a.style,e.lineStyle)}}};d.addMixin(h.prototype);return{FoldingAnnotation:a,
AnnotationType:c,AnnotationTypeList:d,AnnotationModel:g,AnnotationStyler:h}});define("orion/textview/i18nUtil",[],function(){return{formatMessage:function(b){var f=arguments;return b.replace(/\$\{([^\}]+)\}/g,function(a,c){return f[(c<<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,e=this._dropOffset;if(b)if(e>=this._dragSelection.end)e-=this._dragSelection.end-this._dragSelection.start;else if(e>=this._dragSelection.start)e=this._dragSelection.start;a.setText(c,e,e);a.setSelection(e,e+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&&!(a.contains?a.contains("text/plain"):a.indexOf("text/plain")!==-1))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 f(a,b){this._lastLineIndex=-1;this._text=[""];this._lineOffsets=[0];this.setText(a);this.setLineDelimiter(b)}var a=window.navigator.platform.indexOf("Win")!==-1;f.prototype={find:function(a){if(this._text.length>1)this._text=[this._text.join("")];var b=a.string,d=b;!a.regex&&b&&(d=b.replace(/([\\$\^*\/+?\.\(\)|{}\[\]])/g,"\\$&"));var g=null,h;if(d){var b=a.reverse,f=a.wrap,i=a.wholeWord,k=a.caseInsensitive,l=a.start||
0,m=a.end,a=a.end!==void 0,n="";n.indexOf("g")===-1&&(n+="g");k&&n.indexOf("i")===-1&&(n+="i");i&&(d="\\b"+d+"\\b");var o=this._text[0],p,r,q=0;a&&(o=o.substring(l,m),q=l);var t=RegExp(d,n);if(b)h=function(){var a=null;for(t.lastIndex=0;;){r=t.lastIndex;p=t.exec(o);if(r===t.lastIndex)return null;if(p){if(!(p.index<l)){if(!f||a)break;l=o.length}a={start:p.index+q,end:t.lastIndex+q}}else break}if(a)l=a.start;return a};else{if(!a)t.lastIndex=l;h=function(){for(;;){r=t.lastIndex;p=t.exec(o);if(r===t.lastIndex)break;
if(p)return{start:p.index+q,end:t.lastIndex+q};if(!(r!==0&&f))break}return null}}g=h()}return{next:function(){var a=g;a&&(g=h());return a},hasNext:function(){return g!==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 d=this.getLineCount();if(!(0<=a&&a<d))return null;var g=this._lineOffsets[a];if(a+1<d){d=this.getText(g,this._lineOffsets[a+1]);if(b)return d;for(var g=d.length,h;(h=d.charCodeAt(g-1))===10||h===13;)g--;
return d.substring(0,g)}else return this.getText(g)},getLineAtOffset:function(a){var b=this.getCharCount();if(!(0<=a&&a<=b))return-1;var d=this.getLineCount();if(a===b)return d-1;var g,h,f=this._lastLineIndex;if(0<=f&&f<d&&(g=this._lineOffsets[f],h=f+1<d?this._lineOffsets[f+1]:b,g<=a&&a<h))return f;for(var i=d,k=-1;i-k>1;)if(f=Math.floor((i+k)/2),g=this._lineOffsets[f],h=f+1<d?this._lineOffsets[f+1]:b,a<=g)i=f;else if(a<h){i=f;break}else k=f;return this._lastLineIndex=i},getLineCount:function(){return this._lineOffsets.length},
getLineDelimiter:function(){return this._lineDelimiter},getLineEnd:function(a,b){var d=this.getLineCount();if(!(0<=a&&a<d))return-1;if(a+1<d){d=this._lineOffsets[a+1];if(b)return d;for(var g=this.getText(Math.max(this._lineOffsets[a],d-2),d),h=g.length,f;(f=g.charCodeAt(h-1))===10||f===13;)h--;return d-(g.length-h)}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 d=0,g=0,h;g<this._text.length;){h=this._text[g].length;if(a<=d+h)break;d+=h;g++}for(var f=d,i=g;g<this._text.length;){h=this._text[g].length;if(b<=d+h)break;d+=h;g++}if(i===g)return this._text[i].substring(a-f,b-d);f=this._text[i].substring(a-f);d=this._text[g].substring(0,b-d);return f+this._text.slice(i+1,g).join("")+d},onChanging:function(a){return this.dispatchEvent(a)},onChanged:function(a){return this.dispatchEvent(a)},setLineDelimiter:function(c){c==="auto"&&(c=void 0,
this.getLineCount()>1&&(c=this.getText(this.getLineEnd(0),this.getLineEnd(0,!0))));this._lineDelimiter=c?c:a?"\r\n":"\n"},setText:function(a,b,d){a===void 0&&(a="");b===void 0&&(b=0);d===void 0&&(d=this.getCharCount());if(!(b===d&&a==="")){for(var g=this.getLineAtOffset(b),h=this.getLineAtOffset(d),f=b,i=d-b,k=h-g,l=a.length,m=0,n=this.getLineCount(),o=0,p=0,r=0,q=[];;){o!==-1&&o<=r&&(o=a.indexOf("\r",r));p!==-1&&p<=r&&(p=a.indexOf("\n",r));if(p===-1&&o===-1)break;r=o!==-1&&p!==-1?o+1===p?p+1:(o<
p?o:p)+1:o!==-1?o+1:p+1;q.push(b+r);m++}this.onChanging({type:"Changing",text:a,start:f,removedCharCount:i,addedCharCount:l,removedLineCount:k,addedLineCount:m});q.length===0&&(o=this.getLineStart(g),h=h+1<n?this.getLineStart(h+1):this.getCharCount(),b!==o&&(a=this.getText(o,b)+a,b=o),d!==h&&(a+=this.getText(d,h),d=h));h=l-i;for(o=g+k+1;o<n;o++)this._lineOffsets[o]+=h;g=[g+1,k].concat(q);Array.prototype.splice.apply(this._lineOffsets,g);for(h=q=0;h<this._text.length;){o=this._text[h].length;if(b<=
q+o)break;q+=o;h++}n=q;for(g=h;h<this._text.length;){o=this._text[h].length;if(d<=q+o)break;q+=o;h++}o=this._text[h];b=this._text[g].substring(0,b-n);d=o.substring(d-q);g=[g,h-g+1];b&&g.push(b);a&&g.push(a);d&&g.push(d);Array.prototype.splice.apply(this._text,g);if(this._text.length===0)this._text=[""];this.onChanged({type:"Changed",start:f,removedCharCount:i,addedCharCount:l,removedLineCount:k,addedLineCount:m})}}};b.EventTarget.addMixin(f.prototype);return{TextModel:f}});
define("orion/textview/projectionTextModel",["orion/textview/textModel","orion/textview/eventTarget"],function(b,f){function a(a){this._model=a;this._projections=[]}a.prototype={addProjection:function(a){if(a){var e=this._model,d=this._projections;a._lineIndex=e.getLineAtOffset(a.start);a._lineCount=e.getLineAtOffset(a.end)-a._lineIndex;var g=a.text;g||(g="");a._model=typeof g==="string"?new b.TextModel(g,e.getLineDelimiter()):g;var e=this.mapOffset(a.start,!0),g=a.end-a.start,h=a._lineCount,f=a._model.getCharCount(),
i=a._model.getLineCount()-1;this.onChanging({type:"Changing",text:a._model.getText(),start:e,removedCharCount:g,addedCharCount:f,removedLineCount:h,addedLineCount:i});var k=this._binarySearch(d,a.start);d.splice(k,0,a);this.onChanged({type:"Changed",start:e,removedCharCount:g,addedCharCount:f,removedLineCount:h,addedLineCount:i})}},getProjections:function(){return this._projections.slice(0)},getBaseModel:function(){return this._model},mapOffset:function(a,b){var d=this._projections,g=0,h,f;if(b){for(h=
0;h<d.length;h++){f=d[h];if(f.start>a)break;if(f.end>a)return-1;g+=f._model.getCharCount()-(f.end-f.start)}return a+g}for(h=0;h<d.length;h++){f=d[h];if(f.start>a-g)break;var i=f._model.getCharCount();if(f.start+i>a-g)return-1;g+=i-(f.end-f.start)}return a-g},removeProjection:function(a){var b,d=0;for(b=0;b<this._projections.length;b++){var g=this._projections[b];if(g===a){a=g;break}d+=g._model.getCharCount()-(g.end-g.start)}if(b<this._projections.length){var g=this._model,d=a.start+d,h=a.end-a.start,
f=a._lineCount,i=a._model.getCharCount(),k=a._model.getLineCount()-1;this.onChanging({type:"Changing",text:g.getText(a.start,a.end),start:d,removedCharCount:i,addedCharCount:h,removedLineCount:k,addedLineCount:f});this._projections.splice(b,1);this.onChanged({type:"Changed",start:d,removedCharCount:i,addedCharCount:h,removedLineCount:k,addedLineCount:f})}},_binarySearch:function(a,b){for(var d=a.length,g=-1,h;d-g>1;)h=Math.floor((d+g)/2),b<=a[h].start?d=h:g=h;return d},getCharCount:function(){for(var a=
this._model.getCharCount(),b=this._projections,d=0;d<b.length;d++){var g=b[d];a+=g._model.getCharCount()-(g.end-g.start)}return a},getLine:function(a,b){if(a<0)return null;var d=this._model,g=this._projections,h=0,f=[],i=0,k,l,m;for(k=0;k<g.length;k++){m=g[k];if(m._lineIndex>=a-h)break;l=m._model.getLineCount()-1;if(m._lineIndex+l>=a-h)if(i=a-(m._lineIndex+h),i<l)return m._model.getLine(i,b);else f.push(m._model.getLine(l));i=m.end;h+=l-m._lineCount}for(i=Math.max(i,d.getLineStart(a-h));k<g.length;k++){m=
g[k];if(m._lineIndex>a-h)break;f.push(d.getText(i,m.start));l=m._model.getLineCount()-1;if(m._lineIndex+l>a-h)return f.push(m._model.getLine(0,b)),f.join("");f.push(m._model.getText());i=m.end;h+=l-m._lineCount}g=d.getLineEnd(a-h,b);i<g&&f.push(d.getText(i,g));return f.join("")},getLineAtOffset:function(a){for(var b=this._model,d=this._projections,g=0,h=0,f=0;f<d.length;f++){var i=d[f];if(i.start>a-g)break;var k=i._model.getCharCount();if(i.start+k>a-g){d=a-(i.start+g);h+=i._model.getLineAtOffset(d);
g+=d;break}h+=i._model.getLineCount()-1-i._lineCount;g+=k-(i.end-i.start)}return b.getLineAtOffset(a-g)+h},getLineCount:function(){for(var a=this._projections,b=this._model.getLineCount(),d=0;d<a.length;d++){var g=a[d];b+=g._model.getLineCount()-1-g._lineCount}return b},getLineDelimiter:function(){return this._model.getLineDelimiter()},getLineEnd:function(a,b){if(a<0)return-1;for(var d=this._model,g=this._projections,h=0,f=0,i=0;i<g.length;i++){var k=g[i];if(k._lineIndex>a-h)break;var l=k._model.getLineCount()-
1;if(k._lineIndex+l>a-h)return k._model.getLineEnd(a-(k._lineIndex+h),b)+k.start+f;f+=k._model.getCharCount()-(k.end-k.start);h+=l-k._lineCount}return d.getLineEnd(a-h,b)+f},getLineStart:function(a){if(a<0)return-1;for(var b=this._model,d=this._projections,g=0,h=0,f=0;f<d.length;f++){var i=d[f];if(i._lineIndex>=a-g)break;var k=i._model.getLineCount()-1;if(i._lineIndex+k>=a-g)return i._model.getLineStart(a-(i._lineIndex+g))+i.start+h;h+=i._model.getCharCount()-(i.end-i.start);g+=k-i._lineCount}return b.getLineStart(a-
g)+h},getText:function(a,b){a===void 0&&(a=0);var d=this._model,g=this._projections,h=0,f=[],i,k,l;for(i=0;i<g.length;i++){k=g[i];if(k.start>a-h)break;l=k._model.getCharCount();if(k.start+l>a-h)if(b!==void 0&&k.start+l>b-h)return k._model.getText(a-(k.start+h),b-(k.start+h));else f.push(k._model.getText(a-(k.start+h))),a=k.end+h+l-(k.end-k.start);h+=l-(k.end-k.start)}var m=a-h;if(b!==void 0){for(;i<g.length;i++){k=g[i];if(k.start>b-h)break;f.push(d.getText(m,k.start));l=k._model.getCharCount();if(k.start+
l>b-h)return f.push(k._model.getText(0,b-(k.start+h))),f.join("");f.push(k._model.getText());m=k.end;h+=l-(k.end-k.start)}f.push(d.getText(m,b-h))}else{for(;i<g.length;i++)k=g[i],f.push(d.getText(m,k.start)),f.push(k._model.getText()),m=k.end;f.push(d.getText(m))}return f.join("")},_onChanging:function(a,b,d,g,h,f){for(var i=this._model,k=this._projections,l,m=0,n,o=b+d;l<k.length;l++){d=k[l];if(d.start>b)break;m+=d._model.getCharCount()-(d.end-d.start)}b+=m;for(var p=l;l<k.length;l++){d=k[l];if(d.start>
o)break;m+=d._model.getCharCount()-(d.end-d.start);n+=d._model.getLineCount()-1-d._lineCount}d=o+m;m=l;this.onChanging(b,d-b,g,h+n,f);k.splice(k,m-p);for(a=a.length-(d-b);l<k.length;l++)d=k[l],d.start+=a,d.end+=a,d._lineIndex=i.getLineAtOffset(d.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,d){a===void 0&&(a="");b===void 0&&(b=0);var g=b,h=d,f=this._model,
i=this._projections,k=0,l=0,m,n,o,p,r,q=0;for(m=0;m<i.length;m++){n=i[m];if(n.start>b-k)break;o=n._model.getCharCount();if(n.start+o>b-k)if(d!==void 0&&n.start+o>d-k){n._model.setText(a,b-(n.start+k),d-(n.start+k));return}else q=n._model.getLineCount()-1-n._model.getLineAtOffset(b-(n.start+k)),p={projection:n,start:b-(n.start+k)},b=n.end+k+o-(n.end-n.start);l+=n._model.getLineCount()-1-n._lineCount;k+=o-(n.end-n.start)}b-=k;var t=m,q=f.getLineAtOffset(b)+l-q;if(d!==void 0)for(;m<i.length;m++){n=i[m];
if(n.start>d-k)break;o=n._model.getCharCount();if(n.start+o>d-k){l+=n._model.getLineAtOffset(d-(n.start+k));o=d-(n.start+k);d=n.end+k;r={projection:n,end:o};break}l+=n._model.getLineCount()-1-n._lineCount;k+=o-(n.end-n.start)}else{for(;m<i.length;m++)n=i[m],l+=n._model.getLineCount()-1-n._lineCount,k+=n._model.getCharCount()-(n.end-n.start);d=h=f.getCharCount()+k}d-=k;n=f.getLineAtOffset(d)+l;h-=g;for(var l=n-q,q=a.length,s=o=n=k=0;;){n!==-1&&n<=s&&(n=a.indexOf("\r",s));o!==-1&&o<=s&&(o=a.indexOf("\n",
s));if(o===-1&&n===-1)break;s=n!==-1&&o!==-1?n+1===o?o+1:(n<o?n:o)+1:n!==-1?n+1:o+1;k++}this.onChanging({type:"Changing",text:a,start:g,removedCharCount:h,addedCharCount:q,removedLineCount:l,addedLineCount:k});f.setText(a,b,d);if(p)n=p.projection,n._model.setText("",p.start);if(r)n=r.projection,n._model.setText("",0,r.end),n.start=n.end,n._lineCount=0;i.splice(t,m-t);for(a=a.length-(d-b);m<i.length;m++)n=i[m],n.start+=a,n.end+=a,n._lineIndex=f.getLineAtOffset(n.start);this.onChanged({type:"Changed",
start:g,removedCharCount:h,addedCharCount:q,removedLineCount:l,addedLineCount:k})}};f.EventTarget.addMixin(a.prototype);return{ProjectionTextModel:a}});
define("orion/textview/textView",["orion/textview/textModel","orion/textview/keyBinding","orion/textview/eventTarget"],function(b,f,a){function c(a,b,c,d){typeof a.addEventListener==="function"?a.addEventListener(b,c,d===!0):a.attachEvent("on"+b,c)}function e(a,b,c){this.start=a;this.end=b;this.caret=c}function d(a){this._init(a)}var g=navigator.userAgent,h;document.selection&&window.ActiveXObject&&/MSIE/.test(g)&&(h=document.documentMode?document.documentMode:7);var j=parseFloat(g.split("Firefox/")[1]||
g.split("Minefield/")[1])||void 0,i=g.indexOf("Opera")!==-1,k=g.indexOf("Chrome")!==-1,l=g.indexOf("Safari")!==-1&&!k,m=g.indexOf("WebKit")!==-1,n=g.indexOf("iPad")!==-1,o=navigator.platform.indexOf("Mac")!==-1,p=navigator.platform.indexOf("Win")!==-1,r=navigator.platform.indexOf("Linux")!==-1,q=typeof window.document.documentElement.addEventListener==="function",t=(!h||h>=9)&&typeof window.document.createRange().getBoundingClientRect==="function",s=p?"\r\n":"\n";e.prototype={clone:function(){return new e(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}};d.prototype={addRuler:function(a,b){a.setView(this);var c=this._rulers;if(b!==void 0){var d,e;for(d=0,e=0;d<c.length&&e<b;d++)a.getLocation()===c[d].getLocation()&&e++;c.splice(e,0,a);b=e}else c.push(a);this._createRuler(a,b);this._updatePage()},computeSize:function(){var a=0,b=0,c=this._model,d=this._clientDiv;if(!d)return{width:a,height:b};var e=d.style.width;if(m)d.style.width=(524287).toString()+
"px";for(var h=c.getLineCount(),g=0;g<h;g++){var f=this._getLineNode(g),i=null;if(!f||f.lineChanged||f.lineRemoved)f=i=this._createLine(d,null,document,g,c);f=this._getLineBoundingClientRect(f);a=Math.max(a,f.right-f.left);b+=f.bottom-f.top;i&&d.removeChild(i)}if(m)d.style.width=e;c=this._getViewPadding();a+=c.right+c.left;b+=c.bottom+c.top;return{width:a,height:b}},convert:function(a,b,c){if(this._clientDiv){var d=this._getScroll(),e=this._getViewPadding(),h=this._viewDiv.getBoundingClientRect();
b==="document"&&(a.x!==void 0&&(a.x+=-d.x+h.left+e.left),a.y!==void 0&&(a.y+=-d.y+h.top+e.top));c==="document"&&(a.x!==void 0&&(a.x+=d.x-h.left-e.left),a.y!==void 0&&(a.y+=d.y-h.top-e.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(),
i&&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,d;for(d in c)c.hasOwnProperty(d)&&(a||!c[d].defaultHandler)&&b.push(d);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,d=0;d<c.length;d++)c[d].actionID===a&&b.push(c[d].keyBinding);return b},getLineHeight:function(){return!this._clientDiv?
0:this._getLineHeight()},getLinePixel:function(a){if(!this._clientDiv)return 0;a=Math.min(Math.max(0,a),this._model.getLineCount());return this._getLineHeight()*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._getScroll(),d=this._viewDiv.getBoundingClientRect(),e=this._getViewPadding(),a=this._getOffsetToX(a)+c.x-d.left-e.left,b=this.getLinePixel(b);return{x:a,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 this._clone(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]=this._clone(this["_"+c]));return a},getModel:function(){return this._model},getOffsetAtLocation:function(a,b){if(!this._clientDiv)return 0;var c=this._getScroll(),d=this._viewDiv.getBoundingClientRect(),e=this._getViewPadding(),
h=this._getYToLine(b-c.y+d.top+e.top);a+=-c.x+d.left+e.left;return this._getXToOffset(h,a)},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)){for(var a=this._model.getLineCount(),b=this.getRulers(),c=0;c<b.length;c++)this.redrawLines(0,a,b[c]);this.redrawLines(0,a)}},redrawLines:function(a,
b,c){if(!(this._redrawCount>0)&&(a===void 0&&(a=0),b===void 0&&(b=this._model.getLineCount()),a!==b)){var d=this._clientDiv;if(d){if(c)for(var e=(c.getLocation()==="left"?this._leftDiv:this._rightDiv).firstChild.rows[0].cells,h=0;h<e.length;h++)if(e[h].firstChild._ruler===c){d=e[h].firstChild;break}if(c)d.rulerChanged=!0;if(!c||c.getOverview()==="page")for(d=d.firstChild;d;){e=d.lineIndex;if(a<=e&&e<b)d.lineChanged=!0;d=d.nextSibling}if(!c&&a<=this._maxLineIndex&&this._maxLineIndex<b)this._checkMaxLineIndex=
this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._queueUpdatePage()}}},redrawRange:function(a,c){if(!(this._redrawCount>0)){var b=this._model;a===void 0&&(a=0);c===void 0&&(c=b.getCharCount());var d=b.getLineAtOffset(a),b=b.getLineAtOffset(Math.max(a,c-1))+1;this.redrawLines(d,b)}},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._updatePage();break}},resize:function(){this._clientDiv&&this._handleResize(null)},
setAction:function(a,b,c){if(a){var d=this._actions,e=d[a];e||(e=d[a]={});e.handler=b;e.actionDescription=c}},setKeyBinding:function(a,b){for(var c=this._keyBindings,d=0;d<c.length;d++){var e=c[d];if(e.keyBinding.equals(a)){b?e.actionID=b:e.predefined?e.actionID=null:c.splice(d,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 e(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("Changing",this._modelListener.onChanging);this._model.removeEventListener("Changed",this._modelListener.onChanged);var b=this._model.getLineCount(),c=this._model.getCharCount(),d=a.getLineCount(),e=a.getCharCount(),h={type:"ModelChanging",text:a.getText(),start:0,removedCharCount:c,
addedCharCount:e,removedLineCount:b,addedLineCount:d};this.onModelChanging(h);this._model=a;h={type:"ModelChanged",start:0,removedCharCount:c,addedCharCount:e,removedLineCount:b,addedLineCount:d};this.onModelChanged(h);this._model.addEventListener("Changing",this._modelListener.onChanging);this._model.addEventListener("Changed",this._modelListener.onChanged);this._reset();this._updatePage()}},setOptions:function(a){var b=this._defaultOptions(),c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!this._compare(this["_"+
c],d)){var e=b[c]?b[c].update:null;e?e.call(this,d):this["_"+c]=this._clone(d)}}},setSelection:function(a,c,b){var d=a>c;if(d)var h=a,a=c,c=h;h=this._model.getCharCount();a=Math.max(0,Math.min(a,h));c=Math.max(0,Math.min(c,h));this._setSelection(new e(a,c,d),b===void 0||b)},setText:function(a,c,b){var d=c===void 0&&b===void 0;c===void 0&&(c=0);b===void 0&&(b=this._model.getCharCount());this._modifyContent({text:a,start:c,end:b,_code:!0},!d);if(d)this._columnX=-1,this._setSelection(new e(0,0,!1),!0),
j&&this._fixCaret()},setTopIndex:function(a){if(this._clientDiv){var c=this._model;if(c.getCharCount()!==0){var c=c.getLineCount(),b=this._getLineHeight(),d=Math.max(1,Math.min(c,Math.floor(this._getClientHeight()/b)));a<0?a=0:a>c-d&&(a=c-d);this._scrollView(0,a*b-this._getScroll().y)}}},setTopPixel:function(a){if(this._clientDiv){var c=this._getLineHeight(),b=this._getClientHeight(),d=this._model.getLineCount(),a=Math.min(Math.max(0,a),c*d-b);this._scrollView(0,a-this._getScroll().y)}},showSelection:function(){return this._showCaret(!0)},
update:function(a,c){this._clientDiv&&(a&&this._updateStyle(),c===void 0||c?this._updatePage():this._queueUpdatePage())},_handleRootMouseDown:function(a){if(!a)a=window.event;if(j&&a.which===1)this._clientDiv.contentEditable=!1,this._ignoreBlur=(this._overlayDiv||this._clientDiv).draggable=!0;var c=this._overlayDiv||this._clientDiv;if(h<9)c=this._viewDiv;for(var b=a.target?a.target:a.srcElement;b;){if(c===b)return;b=b.parentNode}a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();
if(!q){var d=this;setTimeout(function(){d._clientDiv.focus()},0)}},_handleRootMouseUp:function(a){if(!a)a=window.event;if(j&&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(h<9&&!this._getSelection().isEmpty()){var a=document.createElement("DIV"),c=this._rootDiv;c.appendChild(a);c.removeChild(a)}if((j||h)&&this._selDiv1)this._selDiv1.style.background=
"transparent",this._selDiv2.style.background="transparent",this._selDiv3.style.background="transparent",window.getSelection&&(a=window.getSelection(),a.rangeCount>0&&a.removeAllRanges());if(!this._ignoreFocus)this.onBlur({type:"Blur"})}},_handleContextMenu:function(a){if(!a)a=window.event;h&&this._lastMouseButton===3&&this._updateDOMSelection();if(this.isListening("ContextMenu")){var c=this._createMouseEvent("ContextMenu",a);c.screenX=a.screenX;c.screenY=a.screenY;this.onContextMenu(c)}a.preventDefault&&
a.preventDefault();return!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(j){var c=this;setTimeout(function(){c._clientDiv.contentEditable=!0;c._clientDiv.draggable=!1;c._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));j&&(this._fixCaret(),a.dataTransfer.dropEffect==="none"&&!a.dataTransfer.mozUserCancelled&&this._fixCaret())},_handleDragEnter:function(a){if(!a)a=window.event;var c=!0;this._dropTarget=!0;this.isListening("DragEnter")&&(c=!1,this.onDragEnter(this._createMouseEvent("DragEnter",a)));if(m||c)return a.preventDefault&&a.preventDefault(),!1},_handleDragOver:function(a){if(!a)a=
window.event;var c=!0;this.isListening("DragOver")&&(c=!1,this.onDragOver(this._createMouseEvent("DragOver",a)));if(m||c){if(c)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;n&&this._lastTouchOffset!==void 0?(this.setCaretOffset(this._lastTouchOffset,!0),this._lastTouchOffset=void 0):this._updateDOMSelection();if((j||h)&&this._selDiv1){var a=this._hightlightRGB;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 c=!1;switch(a.keyCode){case 16:case 17:case 18:case 91:c=
!0;break;default:this._setLinksVisible(!1)}if(a.keyCode===229){if(this._readonly)return a.preventDefault&&a.preventDefault(),!1;c=!0;l&&o&&a.ctrlKey&&(c=!1);c&&this._startIME()}else c||this._commitIME();if((o||r)&&j<4||i)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(o&&m&&(63232<=a.keyCode&&a.keyCode<=63487||a.keyCode===13||
a.keyCode===8))return a.preventDefault&&a.preventDefault(),!1;if(((o||r)&&j<4||i)&&this._doAction(this._keyDownEvent))return a.preventDefault&&a.preventDefault(),!1;var c=o?a.metaKey:a.ctrlKey;if(a.charCode!==void 0&&c)switch(a.charCode){case 99:case 118:case 120:return!0}c=!1;if(o){if(a.ctrlKey||a.metaKey)c=!0}else if(j){if(a.ctrlKey||a.altKey)c=!0}else a.ctrlKey^a.altKey&&(c=!0);if(!c&&(c=i?a.which:a.charCode!==void 0?a.charCode:a.keyCode,c>31))return this._doContent(String.fromCharCode(c)),a.preventDefault&&
a.preventDefault(),!1},_handleKeyUp:function(a){if(!a)a=window.event;(o?a.metaKey:a.ctrlKey)||this._setLinksVisible(!1);a.keyCode===13&&this._commitIME()},_handleLinkClick:function(a){if(!a)a=window.event;if(!(o?a.metaKey:a.ctrlKey))return a.preventDefault&&a.preventDefault(),!1},_handleMouse:function(a){var c=!0,b=window;if(h||j&&!this._overlayDiv)b=this._clientDiv;if(this._overlayDiv){if(this._hasFocus)this._ignoreFocus=!0;var d=this;setTimeout(function(){d.focus();d._ignoreFocus=!1},0)}this._clickCount===
1?(c=this._setSelectionTo(a.clientX,a.clientY,a.shiftKey,!i&&this.isListening("DragStart")))&&this._setGrab(b):(q&&this._setGrab(b),this._doubleClickSelection=null,this._setSelectionTo(a.clientX,a.clientY,a.shiftKey),this._doubleClickSelection=this._getSelection());return c},_handleMouseDown:function(a){if(!a)a=window.event;if(this.isListening("MouseDown"))this.onMouseDown(this._createMouseEvent("MouseDown",a));if(this._linksVisible)if((a.target||a.srcElement).tagName!=="A")this._setLinksVisible(!1);
else return;this._commitIME();var c=a.which;c||(a.button===4&&(c=2),a.button===2&&(c=3),a.button===1&&(c=1));var b=c!==2&&a.timeStamp?a.timeStamp:(new Date).getTime(),d=b-this._lastMouseTime,e=Math.abs(this._lastMouseX-a.clientX),g=Math.abs(this._lastMouseY-a.clientY),f=this._lastMouseButton===c;this._lastMouseX=a.clientX;this._lastMouseY=a.clientY;this._lastMouseTime=b;this._lastMouseButton=c;if(c===1&&(this._isMouseDown=!0,f&&d<=this._clickTime&&e<=this._clickDist&&g<=this._clickDist?this._clickCount++:
this._clickCount=1,this._handleMouse(a)&&(h>=9||i||k||j&&!this._overlayDiv)))this._hasFocus||this.focus(),a.preventDefault();j&&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 c=this._isClientDiv(a);if(this.isListening("MouseMove")&&c)this.onMouseMove(this._createMouseEvent("MouseMove",a));if(!this._dropTarget){var b=this._linksVisible||this._lastMouseMoveX!==a.clientX||this._lastMouseMoveY!==a.clientY;this._lastMouseMoveX=a.clientX;this._lastMouseMoveY=a.clientY;this._setLinksVisible(b&&!this._isMouseDown&&(o?a.metaKey:a.ctrlKey));if(!q){if(a.button===0)return this._setGrab(null),!0;if(!this._isMouseDown&&a.button===1&&(this._clickCount&1)!==0&&c)return this._clickCount=
2,this._handleMouse(a,this._clickCount)}if(this._isMouseDown&&this._dragOffset===-1){var c=a.clientX,a=a.clientY,d=this._getViewPadding(),e=this._viewDiv.getBoundingClientRect(),h=this._getClientWidth(),g=this._getClientHeight(),b=e.left+d.left,f=e.top+d.top,h=e.left+d.left+h,d=e.top+d.top+g,e=this._model,g=e.getLineAtOffset(this._getSelection().getCaret());a<f&&g!==0?this._doAutoScroll("up",c,a-f):a>d&&g!==e.getLineCount()-1?this._doAutoScroll("down",c,a-d):c<b?this._doAutoScroll("left",c-b,a):c>
h?this._doAutoScroll("right",c-h,a):(this._endAutoScroll(),this._setSelectionTo(c,a,!0))}}},_isClientDiv:function(a){for(var c=this._overlayDiv||this._clientDiv,a=a.target?a.target:a.srcElement;a;){if(c===a)return!0;a=a.parentNode}return!1},_createMouseEvent:function(a,c){var b=this._getScroll(),d=this._viewDiv.getBoundingClientRect(),e=this._getViewPadding();return{type:a,event:c,x:c.clientX+b.x-d.left-e.left,y:c.clientY+b.y-d.top-e.top}},_handleMouseUp:function(a){if(!a)a=window.event;var c=a.which?
a.button===0:a.button===1;if(this.isListening("MouseUp")&&(this._isClientDiv(a)||c&&this._isMouseDown))this.onMouseUp(this._createMouseEvent("MouseUp",a));if(!this._linksVisible&&c&&this._isMouseDown){if(this._dragOffset!==-1)c=this._getSelection(),c.extend(this._dragOffset),c.collapse(),this._setSelection(c,!0,!0),this._dragOffset=-1;this._isMouseDown=!1;this._endAutoScroll();q&&this._setGrab(null);j&&a.preventDefault()}},_handleMouseWheel:function(a){if(!a)a=window.event;var c=this._getLineHeight(),
b=0,d=0;h||i?d=-a.wheelDelta/40*c:j?(c=o?a.detail*3:Math.max(-256,Math.min(256,a.detail))*c,a.axis===a.HORIZONTAL_AXIS?b=c:d=c):o?(d=b=40,a.wheelDeltaX%120!==0&&(b=1),a.wheelDeltaY%120!==0&&(d=1),b=-a.wheelDeltaX/b,-1<b&&b<0&&(b=-1),0<b&&b<1&&(b=1),d=-a.wheelDeltaY/d,-1<d&&d<0&&(d=-1),0<d&&d<1&&(d=1)):(b=-a.wheelDeltaX,d=-a.wheelDeltaY/120*8*c);if(l){for(c=a.target;c&&c.lineIndex===void 0;)c=c.parentNode;this._mouseWheelLine=c}c=this._getScroll();this._scrollView(b,d);b=this._getScroll();if(c.x!==
b.x||c.y!==b.y)return a.preventDefault&&a.preventDefault(),!1},_handlePaste:function(a){if(!this._ignorePaste){if(!a)a=window.event;if(this._doPaste(a)){if(h){var c=this;this._ignoreFocus=!0;setTimeout(function(){c._updateDOMSelection();this._ignoreFocus=!1},0)}a.preventDefault&&a.preventDefault();return!1}}},_handleResize:function(){var a=this._parent.clientWidth,c=this._parent.clientHeight;if(this._parentWidth!==a||this._parentHeight!==c)this._parentWidth=a,this._parentHeight=c,h<9?this._queueUpdatePage():
this._updatePage()},_handleRulerEvent:function(a){if(!a)a=window.event;for(var c=a.target?a.target:a.srcElement,b=c.lineIndex;c&&!c._ruler;){if(b===void 0&&c.lineIndex!==void 0)b=c.lineIndex;c=c.parentNode}c=c?c._ruler:null;if(b===void 0&&c&&c.getOverview()==="document"){var b=this._getClientHeight(),d=this._model.getLineCount(),e=this._getViewPadding(),h=this._viewDiv.getBoundingClientRect(),b=Math.floor((a.clientY-h.top-this._metrics.scrollWidth)*d/(b+e.top+e.bottom-2*this._metrics.scrollWidth));
0<=b&&b<d||(b=void 0)}if(c)switch(a.type){case "click":if(c.onClick)c.onClick(b,a);break;case "dblclick":if(c.onDblClick)c.onDblClick(b,a);break;case "mousemove":if(c.onMouseMove)c.onMouseMove(b,a);break;case "mouseover":if(c.onMouseOver)c.onMouseOver(b,a);break;case "mouseout":if(c.onMouseOut)c.onMouseOut(b,a)}},_handleScroll:function(){var a=this._getScroll(),c=this._hScroll,b=this._vScroll;if(c!==a.x||b!==a.y)this._hScroll=a.x,this._vScroll=a.y,this._commitIME(),this._updatePage(b===a.y),this.onScroll({type:"Scroll",
oldValue:{x:c,y:b},newValue:a})},_handleSelectStart:function(a){if(!a)a=window.event;if(this._ignoreSelect)return a&&a.preventDefault&&a.preventDefault(),!1},_getModelOffset:function(a,c){if(a){var b;b=a.tagName==="DIV"?a:a.parentNode.parentNode;var d=0,e=b.lineIndex;if(a.tagName!=="DIV")for(b=b.firstChild;b;){var h=b.firstChild;if(h===a){b.ignoreChars&&(d-=b.ignoreChars);d+=c;break}b.ignoreChars&&(d-=b.ignoreChars);d+=h.data.length;b=b.nextSibling}return Math.max(0,d)+this._model.getLineStart(e)}},
_handleSelectionChange:function(){var a=window.getSelection(),c=this._getModelOffset(a.anchorNode,a.anchorOffset),a=this._getModelOffset(a.focusNode,a.focusOffset);c===void 0||a===void 0||this._setSelection(new e(c,a),!1,!1,!1)},_handleTouchStart:function(a){if(this._touchScrollTimer)this._vScrollDiv.style.display="none",this._hScrollDiv.style.display="none",clearInterval(this._touchScrollTimer),this._touchScrollTimer=null;var c=a.touches;if(c.length===1)c=c[0],this._touchStartX=c.clientX,this._touchStartY=
c.clientY,this._lastTouchOffset=this._getXToOffset(this._getYToLine(c.clientY),c.clientX),this._touchStartTime=a.timeStamp,this._touching=!0},_handleTouchMove:function(a){var c=a.touches;if(c.length===1){c=c[0];this._touchCurrentX=c.clientX;this._touchCurrentY=c.clientY;if(!this._touchScrollTimer&&a.timeStamp-this._touchStartTime<200){this._vScrollDiv.style.display="block";this._hScrollDiv.style.display="block";var b=this;this._touchScrollTimer=setInterval(function(){var a=0,c=0;if(b._touching)a=
b._touchStartX-b._touchCurrentX,c=b._touchStartY-b._touchCurrentY,b._touchSpeedX=a/10,b._touchSpeedY=c/10,b._touchStartX=b._touchCurrentX,b._touchStartY=b._touchCurrentY;else if(Math.abs(b._touchSpeedX)<0.1&&Math.abs(b._touchSpeedY)<0.1){b._vScrollDiv.style.display="none";b._hScrollDiv.style.display="none";clearInterval(b._touchScrollTimer);b._touchScrollTimer=null;return}else a=b._touchSpeedX*10,c=b._touchSpeedY*10,b._touchSpeedX*=0.95,b._touchSpeedY*=0.95;b._scrollView(a,c)},10)}this._touchScrollTimer&&
a.preventDefault()}},_handleTouchEnd:function(a){if(a.touches.length===0)this._touching=!1},_doAction:function(a){for(var c=this._keyBindings,b=0;b<c.length;b++){var d=c[b];if(d.keyBinding.match(a)){if(d.actionID&&(a=this._actions[d.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 c=this._getSelection();if(c.isEmpty()){var b=
this._model,d=c.getCaret(),e=b.getLineAtOffset(d),h=b.getLineStart(e);d===h?e>0&&c.extend(b.getLineEnd(e-1)):(e=!1,this._expandTab&&a.unit==="character"&&(d-h)%this._tabSize===0&&(e=!/[^ ]/.test(b.getText(h,d))),e?c.extend(d-this._tabSize):c.extend(this._getOffset(d,a.unit,-1)))}this._modifyContent({text:"",start:c.start,end:c.end},!0);return!0},_doContent:function(a){var c=this._getSelection();this._modifyContent({text:a,start:c.start,end:c.end,_ignoreDOMSelection:!0},!0)},_doCopy:function(a){var c=
this._getSelection();return!c.isEmpty()?this._setClipboardText(this._getBaseText(c.start,c.end),a):!0},_doCursorNext:function(a){if(!a.select&&this._clearSelection("next"))return!0;var c=this._model,b=this._getSelection(),d=b.getCaret(),e=c.getLineAtOffset(d);d===c.getLineEnd(e)?e+1<c.getLineCount()&&b.extend(c.getLineStart(e+1)):b.extend(this._getOffset(d,a.unit,1));a.select||b.collapse();this._setSelection(b,!0);return!0},_doCursorPrevious:function(a){if(!a.select&&this._clearSelection("previous"))return!0;
var c=this._model,b=this._getSelection(),d=b.getCaret(),e=c.getLineAtOffset(d);d===c.getLineStart(e)?e>0&&b.extend(c.getLineEnd(e-1)):b.extend(this._getOffset(d,a.unit,-1));a.select||b.collapse();this._setSelection(b,!0);return!0},_doCut:function(a){var c=this._getSelection();return!c.isEmpty()?(c=this._getBaseText(c.start,c.end),this._doContent(""),this._setClipboardText(c,a)):!0},_doDelete:function(a){var c=this._getSelection();if(c.isEmpty()){var b=this._model,d=c.getCaret(),e=b.getLineAtOffset(d);
d===b.getLineEnd(e)?e+1<b.getLineCount()&&c.extend(b.getLineStart(e+1)):c.extend(this._getOffset(d,a.unit,1))}this._modifyContent({text:"",start:c.start,end:c.end},!0);return!0},_doEnd:function(a){var c=this._getSelection(),b=this._model;if(a.ctrl)c.extend(b.getCharCount());else{var d=b.getLineAtOffset(c.getCaret());c.extend(b.getLineEnd(d))}a.select||c.collapse();this._setSelection(c,!0);return!0},_doEnter:function(a){var c=this._model,b=this._getSelection();this._doContent(c.getLineDelimiter());
if(a&&a.noCursor)b.end=b.start,this._setSelection(b);return!0},_doHome:function(a){var c=this._getSelection(),b=this._model;if(a.ctrl)c.extend(0);else{var d=b.getLineAtOffset(c.getCaret());c.extend(b.getLineStart(d))}a.select||c.collapse();this._setSelection(c,!0);return!0},_doLineDown:function(a){var c=this._model,b=this._getSelection(),d=b.getCaret(),e=c.getLineAtOffset(d),g=this._columnX,f=this._getScroll().x;if(g===-1||a.wholeLine||a.select&&h)g=this._getOffsetToX(a.wholeLine?c.getLineEnd(e+1):
d)+f;e+1<c.getLineCount()?(b.extend(this._getXToOffset(e+1,g-f)),a.select||b.collapse(),this._setSelection(b,!0,!0)):a.select&&(b.extend(c.getCharCount()),this._setSelection(b,!0,!0));this._columnX=g;return!0},_doLineUp:function(a){var c=this._model,b=this._getSelection(),d=b.getCaret(),e=c.getLineAtOffset(d),g=this._columnX,f=this._getScroll().x;if(g===-1||a.wholeLine||a.select&&h)g=this._getOffsetToX(a.wholeLine?c.getLineStart(e-1):d)+f;e>0?(b.extend(this._getXToOffset(e-1,g-f)),a.select||b.collapse(),
this._setSelection(b,!0,!0)):a.select&&(b.extend(0),this._setSelection(b,!0,!0));this._columnX=g;return!0},_doPageDown:function(a){var c=this._model,b=this._getSelection(),d=b.getCaret(),e=c.getLineAtOffset(d),g=c.getLineCount();if(e<g-1){var c=this._getScroll(),f=this._getClientHeight(),i=this._getLineHeight(),j=Math.min(g-e-1,Math.floor(f/i)),j=Math.max(1,j),k=this._columnX;if(k===-1||a.select&&h)k=this._getOffsetToX(d)+c.x;b.extend(this._getXToOffset(e+j,k-c.x));a.select||b.collapse();a=g*i;d=
c.y+j*i;d+f>a&&(d=a-f);this._setSelection(b,!0,!0,d-c.y);this._columnX=k}return!0},_doPageUp:function(a){var c=this._model,b=this._getSelection(),d=b.getCaret(),e=c.getLineAtOffset(d);if(e>0){var c=this._getScroll(),g=this._getClientHeight(),f=this._getLineHeight(),i=Math.max(1,Math.min(e,Math.floor(g/f))),g=this._columnX;if(g===-1||a.select&&h)g=this._getOffsetToX(d)+c.x;b.extend(this._getXToOffset(e-i,g-c.x));a.select||b.collapse();a=Math.max(0,c.y-i*f);this._setSelection(b,!0,!0,a-c.y);this._columnX=
g}return!0},_doPaste:function(a){var c=this;return this._getClipboardText(a,function(a){a&&(r&&c._lastMouseButton===2&&(new Date).getTime()-c._lastMouseTime<=c._clickTime&&c._setSelectionTo(c._lastMouseX,c._lastMouseY),c._doContent(a))})!==null},_doScroll:function(a){var c=a.type,b=this._model,d=b.getLineCount(),a=this._getClientHeight(),e=this._getLineHeight();d*=e;var h=this._getScroll().y,g;switch(c){case "textStart":g=0;break;case "textEnd":g=d-a;break;case "pageDown":g=h+a;break;case "pageUp":g=
h-a;break;case "centerLine":c=this._getSelection(),g=b.getLineAtOffset(c.start),b=(b.getLineAtOffset(c.end)-g+1)*e,g=g*e-a/2+b/2}g!==void 0&&(g=Math.min(Math.max(0,g),d-a),this._scrollView(0,g-h));return!0},_doSelectAll:function(){var a=this._model,c=this._getSelection();c.setCaret(0);c.extend(a.getCharCount());this._setSelection(c,!1);return!0},_doTab:function(){if(this._tabMode&&!this._readonly){var a="\t";if(this._expandTab)var c=this._model,a=this._getSelection().getCaret(),b=c.getLineAtOffset(a),
c=c.getLineStart(b),a=Array(this._tabSize-(a-c)%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},_applyStyle:function(a,c,b){if(b){c.className="";for(var b=c.attributes,d=b.length;d-- >0;)b[d].specified&&c.removeAttributeNode(b[d])}if(a){if(a.styleClass)c.className=a.styleClass;if(b=a.style)for(var e in b)b.hasOwnProperty(e)&&(c.style[e]=b[e]);if(a=a.attributes)for(var h in a)a.hasOwnProperty(h)&&
c.setAttribute(h,a[h])}},_autoScroll:function(){var a=this._getSelection(),c,b=this._autoScrollX;if(this._autoScrollDir==="up"||this._autoScrollDir==="down"){var d=this._autoScrollY/this._getLineHeight(),d=d<0?Math.floor(d):Math.ceil(d);c=this._model.getLineAtOffset(a.getCaret());c=Math.max(0,Math.min(this._model.getLineCount()-1,c+d))}else if(this._autoScrollDir==="left"||this._autoScrollDir==="right")c=this._getYToLine(this._autoScrollY),b+=this._getOffsetToX(a.getCaret());a.extend(this._getXToOffset(c,
b));this._setSelection(a,!0)},_autoScrollTimer:function(){this._autoScroll();var a=this;this._autoScrollTimerID=setTimeout(function(){a._autoScrollTimer()},this._AUTO_SCROLL_RATE)},_calculateMetrics:function(){var a=this._clientDiv,c=document.createElement("DIV");c.style.lineHeight="normal";var b={type:"LineStyle",textView:this,0:0,lineText:this._model.getLine(0),lineStart:0};this.onLineStyle(b);this._applyStyle(b.style,c);c.style.position="fixed";c.style.left="-1000px";var d=document.createElement("SPAN");
d.appendChild(document.createTextNode(" "));c.appendChild(d);var e=document.createElement("SPAN");e.style.fontStyle="italic";e.appendChild(document.createTextNode(" "));c.appendChild(e);var h=document.createElement("SPAN");h.style.fontWeight="bold";h.appendChild(document.createTextNode(" "));c.appendChild(h);var g=document.createElement("SPAN");g.style.fontWeight="bold";g.style.fontStyle="italic";g.appendChild(document.createTextNode(" "));c.appendChild(g);a.appendChild(c);var b=c.getBoundingClientRect(),
d=d.getBoundingClientRect(),e=e.getBoundingClientRect(),h=h.getBoundingClientRect(),f=g.getBoundingClientRect(),g=d.bottom-d.top,d=e.bottom-e.top,e=h.bottom-h.top,h=f.bottom-f.top,f=0,b=Math.max(1,b.bottom-b.top);d>g&&(f=1);e>d&&(f=2);h>e&&(f=3);var i;if(f!==0){i={style:{}};if((f&1)!==0)i.style.fontStyle="italic";if((f&2)!==0)i.style.fontWeight="bold"}g=this._getLineTrim(c);a.removeChild(c);d=this._getPadding(this._viewDiv);c=document.createElement("DIV");c.style.position="fixed";c.style.left="-1000px";
c.style.paddingLeft=d.left+"px";c.style.paddingTop=d.top+"px";c.style.paddingRight=d.right+"px";c.style.paddingBottom=d.bottom+"px";c.style.width="100px";c.style.height="100px";h=document.createElement("DIV");h.style.width="100%";h.style.height="100%";c.appendChild(h);a.appendChild(c);d=c.getBoundingClientRect();e=h.getBoundingClientRect();c.style.overflow="hidden";h.style.height="200px";h=c.clientWidth;c.style.overflow="scroll";f=c.clientWidth;a.removeChild(c);d={left:e.left-d.left,top:e.top-d.top,
right:d.right-e.right,bottom:d.bottom-e.bottom};return{lineHeight:b,largestFontStyle:i,lineTrim:g,viewPadding:d,scrollWidth:h-f}},_clearSelection:function(a){var c=this._getSelection();if(c.isEmpty())return!1;a==="next"?c.start=c.end:c.end=c.start;this._setSelection(c,!0);return!0},_clone:function(a){return a instanceof Array?a.slice(0):a},_compare:function(a,c){if(a===c)return!0;if(a&&!c||!a&&c)return!1;if(a&&a.constructor===String||c&&c.constructor===String)return!1;if(a instanceof Array||c instanceof
Array){if(!(a instanceof Array&&c instanceof Array))return!1;if(a.length!==c.length)return!1;for(var b=0;b<a.length;b++)if(!this._compare(a[b],c[b]))return!1;return!0}if(!(a instanceof Object)||!(c instanceof Object))return!1;for(b in a)if(a.hasOwnProperty(b)){if(!c.hasOwnProperty(b))return!1;if(!this._compare(a[b],c[b]))return!1}for(b in c)if(!a.hasOwnProperty(b))return!1;return!0},_commitIME:function(){if(this._imeOffset!==-1){this._scrollDiv.focus();this._clientDiv.focus();var a=this._model,c=
a.getLineAtOffset(this._imeOffset),b=a.getLineStart(c),d=this._getDOMText(c),a=a.getLine(c),b=this._imeOffset-b,a=b+d.length-a.length;b!==a&&this._doContent(d.substring(b,a));this._imeOffset=-1}},_convertDelimiter:function(a,c,b){for(var d=0,e=0,h=0,g=a.length;h<g;){d!==-1&&d<=h&&(d=a.indexOf("\r",h));e!==-1&&e<=h&&(e=a.indexOf("\n",h));var f=h,i;if(e===-1&&d===-1){c(a.substring(h));break}d!==-1&&e!==-1?d+1===e?(i=d,h=e+1):(i=d<e?d:e,h=(d<e?d:e)+1):d!==-1?(i=d,h=d+1):(i=e,h=e+1);c(a.substring(f,i));
b()}},_createActions:function(){var a=f.KeyBinding,c=this._keyBindings=[];c.push({actionID:"lineUp",keyBinding:new a(38),predefined:!0});c.push({actionID:"lineDown",keyBinding:new a(40),predefined:!0});c.push({actionID:"charPrevious",keyBinding:new a(37),predefined:!0});c.push({actionID:"charNext",keyBinding:new a(39),predefined:!0});o?(c.push({actionID:"scrollPageUp",keyBinding:new a(33),predefined:!0}),c.push({actionID:"scrollPageDown",keyBinding:new a(34),predefined:!0}),c.push({actionID:"pageUp",
keyBinding:new a(33,null,null,!0),predefined:!0}),c.push({actionID:"pageDown",keyBinding:new a(34,null,null,!0),predefined:!0}),c.push({actionID:"lineStart",keyBinding:new a(37,!0),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a(39,!0),predefined:!0}),c.push({actionID:"wordPrevious",keyBinding:new a(37,null,null,!0),predefined:!0}),c.push({actionID:"wordNext",keyBinding:new a(39,null,null,!0),predefined:!0}),c.push({actionID:"scrollTextStart",keyBinding:new a(36),predefined:!0}),c.push({actionID:"scrollTextEnd",
keyBinding:new a(35),predefined:!0}),c.push({actionID:"textStart",keyBinding:new a(38,!0),predefined:!0}),c.push({actionID:"textEnd",keyBinding:new a(40,!0),predefined:!0}),c.push({actionID:"scrollPageUp",keyBinding:new a(38,null,null,null,!0),predefined:!0}),c.push({actionID:"scrollPageDown",keyBinding:new a(40,null,null,null,!0),predefined:!0}),c.push({actionID:"lineStart",keyBinding:new a(37,null,null,null,!0),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a(39,null,null,null,!0),predefined:!0}),
c.push({actionID:"lineStart",keyBinding:new a(38,null,null,!0),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a(40,null,null,!0),predefined:!0})):(c.push({actionID:"pageUp",keyBinding:new a(33),predefined:!0}),c.push({actionID:"pageDown",keyBinding:new a(34),predefined:!0}),c.push({actionID:"lineStart",keyBinding:new a(36),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a(35),predefined:!0}),c.push({actionID:"wordPrevious",keyBinding:new a(37,!0),predefined:!0}),c.push({actionID:"wordNext",
keyBinding:new a(39,!0),predefined:!0}),c.push({actionID:"textStart",keyBinding:new a(36,!0),predefined:!0}),c.push({actionID:"textEnd",keyBinding:new a(35,!0),predefined:!0}));j&&r&&(c.push({actionID:"lineUp",keyBinding:new a(38,!0),predefined:!0}),c.push({actionID:"lineDown",keyBinding:new a(40,!0),predefined:!0}));c.push({actionID:"selectLineUp",keyBinding:new a(38,null,!0),predefined:!0});c.push({actionID:"selectLineDown",keyBinding:new a(40,null,!0),predefined:!0});c.push({actionID:"selectCharPrevious",
keyBinding:new a(37,null,!0),predefined:!0});c.push({actionID:"selectCharNext",keyBinding:new a(39,null,!0),predefined:!0});c.push({actionID:"selectPageUp",keyBinding:new a(33,null,!0),predefined:!0});c.push({actionID:"selectPageDown",keyBinding:new a(34,null,!0),predefined:!0});o?(c.push({actionID:"selectLineStart",keyBinding:new a(37,!0,!0),predefined:!0}),c.push({actionID:"selectLineEnd",keyBinding:new a(39,!0,!0),predefined:!0}),c.push({actionID:"selectWordPrevious",keyBinding:new a(37,null,!0,
!0),predefined:!0}),c.push({actionID:"selectWordNext",keyBinding:new a(39,null,!0,!0),predefined:!0}),c.push({actionID:"selectTextStart",keyBinding:new a(36,null,!0),predefined:!0}),c.push({actionID:"selectTextEnd",keyBinding:new a(35,null,!0),predefined:!0}),c.push({actionID:"selectTextStart",keyBinding:new a(38,!0,!0),predefined:!0}),c.push({actionID:"selectTextEnd",keyBinding:new a(40,!0,!0),predefined:!0}),c.push({actionID:"selectLineStart",keyBinding:new a(37,null,!0,null,!0),predefined:!0}),
c.push({actionID:"selectLineEnd",keyBinding:new a(39,null,!0,null,!0),predefined:!0}),c.push({actionID:"selectLineStart",keyBinding:new a(38,null,!0,!0),predefined:!0}),c.push({actionID:"selectLineEnd",keyBinding:new a(40,null,!0,!0),predefined:!0})):(r&&(c.push({actionID:"selectWholeLineUp",keyBinding:new a(38,!0,!0),predefined:!0}),c.push({actionID:"selectWholeLineDown",keyBinding:new a(40,!0,!0),predefined:!0})),c.push({actionID:"selectLineStart",keyBinding:new a(36,null,!0),predefined:!0}),c.push({actionID:"selectLineEnd",
keyBinding:new a(35,null,!0),predefined:!0}),c.push({actionID:"selectWordPrevious",keyBinding:new a(37,!0,!0),predefined:!0}),c.push({actionID:"selectWordNext",keyBinding:new a(39,!0,!0),predefined:!0}),c.push({actionID:"selectTextStart",keyBinding:new a(36,!0,!0),predefined:!0}),c.push({actionID:"selectTextEnd",keyBinding:new a(35,!0,!0),predefined:!0}));c.push({actionID:"deletePrevious",keyBinding:new a(8),predefined:!0});c.push({actionID:"deletePrevious",keyBinding:new a(8,null,!0),predefined:!0});
c.push({actionID:"deleteNext",keyBinding:new a(46),predefined:!0});c.push({actionID:"deleteWordPrevious",keyBinding:new a(8,!0),predefined:!0});c.push({actionID:"deleteWordPrevious",keyBinding:new a(8,!0,!0),predefined:!0});c.push({actionID:"deleteWordNext",keyBinding:new a(46,!0),predefined:!0});c.push({actionID:"tab",keyBinding:new a(9),predefined:!0});c.push({actionID:"shiftTab",keyBinding:new a(9,null,!0),predefined:!0});c.push({actionID:"enter",keyBinding:new a(13),predefined:!0});c.push({actionID:"enter",
keyBinding:new a(13,null,!0),predefined:!0});c.push({actionID:"selectAll",keyBinding:new a("a",!0),predefined:!0});c.push({actionID:"toggleTabMode",keyBinding:new a("m",!0),predefined:!0});o&&(c.push({actionID:"deleteNext",keyBinding:new a(46,null,!0),predefined:!0}),c.push({actionID:"deleteWordPrevious",keyBinding:new a(8,null,null,!0),predefined:!0}),c.push({actionID:"deleteWordNext",keyBinding:new a(46,null,null,!0),predefined:!0}));if(!j){var b=o&&k;c.push({actionID:null,keyBinding:new a("u",
!b,!1,!1,b),predefined:!0});c.push({actionID:null,keyBinding:new a("i",!b,!1,!1,b),predefined:!0});c.push({actionID:null,keyBinding:new a("b",!b,!1,!1,b),predefined:!0})}j&&(c.push({actionID:"copy",keyBinding:new a(45,!0),predefined:!0}),c.push({actionID:"paste",keyBinding:new a(45,null,!0),predefined:!0}),c.push({actionID:"cut",keyBinding:new a(46,null,!0),predefined:!0}));o&&(c.push({actionID:"lineStart",keyBinding:new a("a",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"lineEnd",keyBinding:new a("e",
!1,!1,!1,!0),predefined:!0}),c.push({actionID:"lineUp",keyBinding:new a("p",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"lineDown",keyBinding:new a("n",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"charPrevious",keyBinding:new a("b",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"charNext",keyBinding:new a("f",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"deletePrevious",keyBinding:new a("h",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"deleteNext",keyBinding:new a("d",!1,!1,!1,!0),predefined:!0}),
c.push({actionID:"deleteLineEnd",keyBinding:new a("k",!1,!1,!1,!0),predefined:!0}),j?(c.push({actionID:"scrollPageDown",keyBinding:new a("v",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"deleteLineStart",keyBinding:new a("u",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"deleteWordPrevious",keyBinding:new a("w",!1,!1,!1,!0),predefined:!0})):(c.push({actionID:"pageDown",keyBinding:new a("v",!1,!1,!1,!0),predefined:!0}),c.push({actionID:"centerLine",keyBinding:new a("l",!1,!1,!1,!0),predefined:!0}),
c.push({actionID:"enterNoCursor",keyBinding:new a("o",!1,!1,!1,!0),predefined:!0})));var d=this;this._actions={lineUp:{defaultHandler:function(){return d._doLineUp({select:!1})}},lineDown:{defaultHandler:function(){return d._doLineDown({select:!1})}},lineStart:{defaultHandler:function(){return d._doHome({select:!1,ctrl:!1})}},lineEnd:{defaultHandler:function(){return d._doEnd({select:!1,ctrl:!1})}},charPrevious:{defaultHandler:function(){return d._doCursorPrevious({select:!1,unit:"character"})}},
charNext:{defaultHandler:function(){return d._doCursorNext({select:!1,unit:"character"})}},pageUp:{defaultHandler:function(){return d._doPageUp({select:!1})}},pageDown:{defaultHandler:function(){return d._doPageDown({select:!1})}},scrollPageUp:{defaultHandler:function(){return d._doScroll({type:"pageUp"})}},scrollPageDown:{defaultHandler:function(){return d._doScroll({type:"pageDown"})}},wordPrevious:{defaultHandler:function(){return d._doCursorPrevious({select:!1,unit:"word"})}},wordNext:{defaultHandler:function(){return d._doCursorNext({select:!1,
unit:"word"})}},textStart:{defaultHandler:function(){return d._doHome({select:!1,ctrl:!0})}},textEnd:{defaultHandler:function(){return d._doEnd({select:!1,ctrl:!0})}},scrollTextStart:{defaultHandler:function(){return d._doScroll({type:"textStart"})}},scrollTextEnd:{defaultHandler:function(){return d._doScroll({type:"textEnd"})}},centerLine:{defaultHandler:function(){return d._doScroll({type:"centerLine"})}},selectLineUp:{defaultHandler:function(){return d._doLineUp({select:!0})}},selectLineDown:{defaultHandler:function(){return d._doLineDown({select:!0})}},
selectWholeLineUp:{defaultHandler:function(){return d._doLineUp({select:!0,wholeLine:!0})}},selectWholeLineDown:{defaultHandler:function(){return d._doLineDown({select:!0,wholeLine:!0})}},selectLineStart:{defaultHandler:function(){return d._doHome({select:!0,ctrl:!1})}},selectLineEnd:{defaultHandler:function(){return d._doEnd({select:!0,ctrl:!1})}},selectCharPrevious:{defaultHandler:function(){return d._doCursorPrevious({select:!0,unit:"character"})}},selectCharNext:{defaultHandler:function(){return d._doCursorNext({select:!0,
unit:"character"})}},selectPageUp:{defaultHandler:function(){return d._doPageUp({select:!0})}},selectPageDown:{defaultHandler:function(){return d._doPageDown({select:!0})}},selectWordPrevious:{defaultHandler:function(){return d._doCursorPrevious({select:!0,unit:"word"})}},selectWordNext:{defaultHandler:function(){return d._doCursorNext({select:!0,unit:"word"})}},selectTextStart:{defaultHandler:function(){return d._doHome({select:!0,ctrl:!0})}},selectTextEnd:{defaultHandler:function(){return d._doEnd({select:!0,
ctrl:!0})}},deletePrevious:{defaultHandler:function(){return d._doBackspace({unit:"character"})}},deleteNext:{defaultHandler:function(){return d._doDelete({unit:"character"})}},deleteWordPrevious:{defaultHandler:function(){return d._doBackspace({unit:"word"})}},deleteWordNext:{defaultHandler:function(){return d._doDelete({unit:"word"})}},deleteLineStart:{defaultHandler:function(){return d._doBackspace({unit:"line"})}},deleteLineEnd:{defaultHandler:function(){return d._doDelete({unit:"line"})}},tab:{defaultHandler:function(){return d._doTab()}},
shiftTab:{defaultHandler:function(){return d._doShiftTab()}},enter:{defaultHandler:function(){return d._doEnter()}},enterNoCursor:{defaultHandler:function(){return d._doEnter({noCursor:!0})}},selectAll:{defaultHandler:function(){return d._doSelectAll()}},copy:{defaultHandler:function(){return d._doCopy()}},cut:{defaultHandler:function(){return d._doCut()}},paste:{defaultHandler:function(){return d._doPaste()}},toggleTabMode:{defaultHandler:function(){return d._doTabMode()}}}},_createLine:function(a,
c,b,d,e){var g=e.getLine(d),f=e.getLineStart(d),i={type:"LineStyle",textView:this,lineIndex:d,lineText:g,lineStart:f};this.onLineStyle(i);e=c||b.createElement("DIV");if(!c||!this._compare(c.viewStyle,i.style)){this._applyStyle(i.style,e,c);if(c)c._trim=null;e.viewStyle=i.style;e.setAttribute("role","presentation")}e.lineIndex=d;d=[];this._createRanges(i.ranges,g,0,g.length,f,{tabOffset:0,ranges:d});g=" ";!this._fullSelection&&h<9&&(g="\ufeff");m&&(g="\u200c");d.push({text:g,style:this._metrics.largestFontStyle,
ignoreChars:1});var j,k,l,n,s,o,i=g=0,q,p;if(c){if(l=c.modelChangedEvent)l.removedLineCount===0&&l.addedLineCount===0?(p=l.start-f,q=l.addedCharCount-l.removedCharCount):p=-1,c.modelChangedEvent=void 0;l=c.firstChild}for(f=0;f<d.length;f++){j=d[f];s=j.text;g+=s.length;k=j.style;if(l)if(o=l.firstChild.data,n=l.viewStyle,o===s&&this._compare(k,n)){i+=o.length;l._rectsCache=void 0;j=l=l.nextSibling;continue}else for(;l;){if(p!==-1){n=g;n>=p&&(n-=q);o=(o=l.firstChild.data)?o.length:0;if(i+o>n)break;i+=
o}n=l.nextSibling;e.removeChild(l);l=n}j=this._createSpan(e,b,s,k,j.ignoreChars);l?e.insertBefore(j,l):e.appendChild(j);if(c)c.lineWidth=void 0}if(c)for(a=j?j.nextSibling:null;a;)n=a.nextSibling,c.removeChild(a),a=n;else a.appendChild(e);return e},_createRanges:function(a,c,b,d,e,h){if(!(b>=d)){if(a)for(var g=0;g<a.length;g++){var f=a[g];if(!(f.end<=e+b)){var i=Math.max(e+b,f.start)-e;if(i>=d)break;var j=Math.min(e+d,f.end)-e;if(i<j){i=Math.max(b,i);j=Math.min(d,j);for(b<i&&this._createRange(c,b,
i,null,h);g+1<a.length&&a[g+1].start-e===j&&this._compare(f.style,a[g+1].style);)f=a[g+1],j=Math.min(e+d,f.end)-e,g++;this._createRange(c,i,j,f.style,h);b=j}}}b<d&&this._createRange(c,b,d,null,h)}},_createRange:function(a,c,b,d,e){if(!(c>=b)){var h=this._customTabSize;if(h&&h!==8)for(var g=a.indexOf("\t",c);g!==-1&&g<b;){c<g&&(c={text:a.substring(c,g),style:d},e.ranges.push(c),e.tabOffset+=c.text.length);c=h-e.tabOffset%h;if(c>0){for(var f="\u00a0",i=1;i<c;i++)f+=" ";c={text:f,style:d,ignoreChars:c-
1};e.ranges.push(c);e.tabOffset+=c.text.length}c=g+1;g=a.indexOf("\t",c)}c<b&&(c={text:a.substring(c,b),style:d},e.ranges.push(c),e.tabOffset+=c.text.length)}},_createSpan:function(a,b,d,e,h){var g=e&&e.tagName==="A";if(g)a.hasLink=!0;a=g&&this._linksVisible?"A":"SPAN";g=b.createElement(a);g.appendChild(b.createTextNode(d));this._applyStyle(e,g);if(a==="A"){var f=this;c(g,"click",function(a){return f._handleLinkClick(a)},!1)}g.viewStyle=e;if(h)g.ignoreChars=h;return g},_createRuler:function(a,c){if(this._clientDiv){var b=
a.getLocation()==="left"?this._leftDiv:this._rightDiv,d=document.createElement("DIV");d._ruler=a;d.rulerChanged=!0;d.style.position="relative";var b=b.firstChild.rows[0],e=b.cells.length,b=b.insertCell(c===void 0||c<0||c>e?e:c);b.vAlign="top";b.appendChild(d)}},_createView:function(){if(!this._clientDiv){for(var a=this._parent;a.hasChildNodes();)a.removeChild(a.lastChild);var c=document.createElement("DIV");this._rootDiv=c;c.tabIndex=-1;c.style.position="absolute";c.style.overflow="hidden";c.setAttribute("role",
"application");a.appendChild(c);var b=document.createElement("DIV");b.className="textviewLeftRuler";this._leftDiv=b;b.tabIndex=-1;b.style.overflow="hidden";b.style.MozUserSelect="none";b.style.WebkitUserSelect="none";b.style.position="absolute";b.style.cursor="default";b.setAttribute("aria-hidden","true");a=document.createElement("TABLE");b.appendChild(a);a.cellPadding="0px";a.cellSpacing="0px";a.border="0px";a.insertRow(0);c.appendChild(b);b=document.createElement("DIV");b.className="textview";this._viewDiv=
b;b.tabIndex=-1;b.style.overflow="auto";b.style.position="absolute";b.style.top="0px";b.style.borderWidth="0px";b.style.margin="0px";b.style.outline="none";c.appendChild(b);var d=document.createElement("DIV");d.className="textviewRightRuler";this._rightDiv=d;d.tabIndex=-1;d.style.overflow="hidden";d.style.MozUserSelect="none";d.style.WebkitUserSelect="none";d.style.position="absolute";d.style.cursor="default";d.setAttribute("aria-hidden","true");a=document.createElement("TABLE");d.appendChild(a);
a.cellPadding="0px";a.cellSpacing="0px";a.border="0px";a.insertRow(0);c.appendChild(d);this._scrollDiv=a=document.createElement("DIV");a.style.margin="0px";a.style.borderWidth="0px";a.style.padding="0px";b.appendChild(a);if(j)this._clipboardDiv=a=document.createElement("DIV"),a.style.position="fixed",a.style.whiteSpace="pre",a.style.left="-1000px",c.appendChild(a),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",c.appendChild(a),this._clipScrollDiv=b=document.createElement("DIV"),b.style.position="absolute",b.style.height="1px",b.style.top="-1000px",a.appendChild(b);this._setFullSelection(this._fullSelection,!0);a=document.createElement("DIV");a.className="textviewContent";this._clientDiv=a;a.style.whiteSpace="pre";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(n)a.style.WebkitTapHighlightColor="transparent";(this._clipDiv||c).appendChild(a);if(n)this._vScrollDiv=b=document.createElement("DIV"),b.style.position="absolute",b.style.borderWidth="1px",b.style.borderColor="white",b.style.borderStyle="solid",b.style.borderRadius="4px",b.style.backgroundColor="black",b.style.opacity="0.5",b.style.margin="0px",b.style.padding="0px",b.style.outline="none",b.style.zIndex="3",b.style.width="8px",b.style.display="none",
c.appendChild(b),this._hScrollDiv=b=document.createElement("DIV"),b.style.position="absolute",b.style.borderWidth="1px",b.style.borderColor="white",b.style.borderStyle="solid",b.style.borderRadius="4px",b.style.backgroundColor="black",b.style.opacity="0.5",b.style.margin="0px",b.style.padding="0px",b.style.outline="none",b.style.zIndex="3",b.style.height="8px",b.style.display="none",c.appendChild(b);if(j&&!a.setCapture)this._overlayDiv=b=document.createElement("DIV"),b.style.position=a.style.position,
b.style.borderWidth=a.style.borderWidth,b.style.margin=a.style.margin,b.style.padding=a.style.padding,b.style.cursor="text",b.style.zIndex="2",(this._clipDiv||c).appendChild(b);a.contentEditable="true";a.setAttribute("role","textbox");a.setAttribute("aria-multiline","true");this._setReadOnly(this._readonly);this._setThemeClass(this._themeClass,!0);this._setTabSize(this._tabSize,!0);this._hookEvents();c=this._rulers;for(a=0;a<c.length;a++)this._createRuler(c[a]);this._updatePage()}},_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},themeClass:{value:void 0,update:this._setThemeClass}}},_destroyRuler:function(a){var c=a.getLocation()==="left"?this._leftDiv:this._rightDiv;if(c){for(var c=c.firstChild.rows[0],b=c.cells,d=0;d<b.length;d++)if(b[d].firstChild._ruler===a)break;
if(d!==b.length)c.cells[d]._ruler=void 0,c.deleteCell(d)}},_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;this._insertedSelRule=!1}},_doAutoScroll:function(a,c,b){this._autoScrollDir=a;this._autoScrollX=c;this._autoScrollY=b;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 c=this._hasFocus;this._ignoreFocus=!0;c&&a.blur();
a.contentEditable=!1;a.contentEditable=!0;c&&a.focus();this._ignoreFocus=!1}},_getBaseText:function(a,c){var b=this._model;b.getBaseModel&&(a=b.mapOffset(a),c=b.mapOffset(c),b=b.getBaseModel());return b.getText(a,c)},_getBorder:function(a){var c,b,d,e;if(window.getComputedStyle)a=window.getComputedStyle(a,null),c=a.getPropertyValue("border-left-width"),b=a.getPropertyValue("border-top-width"),d=a.getPropertyValue("border-right-width"),e=a.getPropertyValue("border-bottom-width");else if(a.currentStyle)c=
a.currentStyle.borderLeftWidth,b=a.currentStyle.borderTopWidth,d=a.currentStyle.borderRightWidth,e=a.currentStyle.borderBottomWidth;return{left:parseInt(c,10)||0,top:parseInt(b,10)||0,right:parseInt(d,10)||0,bottom:parseInt(e,10)||0}},_getBoundsAtOffset:function(a){var c=this._model,b=this._clientDiv,d=c.getLineAtOffset(a),e,g=this._getLineNode(d);g||(g=e=this._createLine(b,null,document,d,c));var f=null;if(a<c.getLineEnd(d)){c=c.getLineStart(d);for(d=g.firstChild;d;){var i=d.firstChild,j=i.length;
d.ignoreChars&&(j-=d.ignoreChars);if(c+j>a){f=a-c;if(t)c=document.createRange(),c.setStart(i,f),c.setEnd(i,f+1),f=c.getBoundingClientRect();else if(h)c=document.body.createTextRange(),c.moveToElementText(d),c.collapse(),c.moveEnd("character",f+1),c.moveStart("character",f),f=c.getBoundingClientRect();else{a=i.data;d.removeChild(i);d.appendChild(document.createTextNode(a.substring(0,f)));var k=document.createElement("SPAN");k.appendChild(document.createTextNode(a.substring(f,f+1)));d.appendChild(k);
d.appendChild(document.createTextNode(a.substring(f+1)));f=k.getBoundingClientRect();d.innerHTML="";d.appendChild(i);e||(d=this._getSelection(),(c<=d.start&&d.start<c+j||c<=d.end&&d.end<c+j)&&this._updateDOMSelection())}if(h)c=window.screen.logicalXDPI,d=window.screen.deviceXDPI,f.left=f.left*c/d,f.right=f.right*c/d;break}c+=j;d=d.nextSibling}}f||(g=this._getLineBoundingClientRect(g),f={left:g.right,right:g.right});e&&b.removeChild(e);return f},_getBottomIndex:function(a){var c=this._bottomChild;
if(a&&this._getClientHeight()>this._getLineHeight()){var a=c.getBoundingClientRect(),b=this._clientDiv.getBoundingClientRect();a.bottom>b.bottom&&(c=this._getLinePrevious(c)||c)}return c.lineIndex},_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,c){var b=this._model.getLineDelimiter(),
d,e;if(window.clipboardData)return d=[],e=window.clipboardData.getData("Text"),this._convertDelimiter(e,function(a){d.push(a)},function(){d.push(b)}),e=d.join(""),c&&c(e),e;if(j){this._ignoreFocus=!0;var h=this._clipboardDiv;h.innerHTML="<pre contenteditable=''></pre>";h.firstChild.focus();var g=this,f=function(){var a=g._getTextFromElement(h);h.innerHTML="";d=[];g._convertDelimiter(a,function(a){d.push(a)},function(){d.push(b)});return d.join("")},i=!1;this._ignorePaste=!0;if(!r||this._lastMouseButton!==
2)try{i=document.execCommand("paste",!1,null)}catch(k){i=h.childNodes.length>1||h.firstChild&&h.firstChild.childNodes.length>0}this._ignorePaste=!1;if(!i)return a?(setTimeout(function(){g.focus();(e=f())&&c&&c(e);g._ignoreFocus=!1},0),null):(this.focus(),this._ignoreFocus=!1,"");this.focus();this._ignoreFocus=!1;(e=f())&&c&&c(e);return e}return a&&a.clipboardData?(d=[],e=a.clipboardData.getData("text/plain"),this._convertDelimiter(e,function(a){d.push(a)},function(){d.push(b)}),(e=d.join(""))&&c&&
c(e),e):""},_getDOMText:function(a){for(var a=this._getLineNode(a).firstChild,c="";a;){for(var b=a.firstChild;b;){if(a.ignoreChars)for(var d=0;d<b.length;d++){var e=b.data.substring(d,d+1);e!==" "&&(c+=e)}else c+=b.data;b=b.nextSibling}a=a.nextSibling}return c},_getTextFromElement:function(a){var c=a.ownerDocument,b=c.defaultView;if(!b.getSelection)return a.innerText||a.textContent;c=c.createRange();c.selectNode(a);var a=b.getSelection(),b=[],d;for(d=0;d<a.rangeCount;d++)b.push(a.getRangeAt(d));this._ignoreSelect=
!0;a.removeAllRanges();a.addRange(c);c=a.toString();a.removeAllRanges();for(d=0;d<b.length;d++)a.addRange(b[d]);this._ignoreSelect=!1;return c},_getViewPadding:function(){return this._metrics.viewPadding},_getLineTrim:function(a){var c=a._trim;if(!c){var c=this._getPadding(a),b=this._getBorder(a);c.left+=b.left;c.top+=b.top;c.right+=b.right;c.bottom+=b.bottom;a._trim=c}return c},_getLineBoundingClientRect:function(a,c){for(var b=a.getBoundingClientRect(),b={left:b.left,top:b.top,right:b.left,bottom:b.bottom},
d=a.lastChild;d&&d.ignoreChars===d.firstChild.length;)d=d.previousSibling;if(d)d=d.getBoundingClientRect(),b.right=d.right+this._getLineTrim(a).right;c&&(d=this._getLineTrim(a),b.left+=d.left,b.right-=d.right);return b},_getLineHeight:function(){return this._metrics.lineHeight},_getLineNode:function(a){for(var c=this._clientDiv.firstChild;c;){if(a===c.lineIndex)return c;c=c.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},_getOffset:function(a,c,b){return c==="line"?(c=this._model,a=c.getLineAtOffset(a),b>0?c.getLineEnd(a):c.getLineStart(a)):c==="wordend"?this._getOffset_W3C(a,c,b):h?this._getOffset_IE(a,c,b):this._getOffset_W3C(a,c,b)},_getOffset_W3C:function(a,c,b){function d(a){return 33<=a&&a<=47||58<=a&&a<=64||91<=a&&a<=94||a===96||123<=a&&a<=126}if(c==="word"||c==="wordend"){var e=
this._model,h=e.getLineAtOffset(a),g=e.getLine(h),f=e.getLineStart(h),h=e.getLineEnd(h),e=g.length;a-=f;var i,j;if(b>0){if(a===e)return h;i=g.charCodeAt(a);j=d(i);b=!j&&!(i===32||i===9);for(a++;a<e;){i=g.charCodeAt(a);h=d(i);if(c==="wordend"){if(!h&&j)break}else if(h&&!j)break;i=!h&&!(i===32||i===9);if(c==="wordend"){if(!i&&b)break}else if(i&&!b)break;b=i;j=h;a++}}else{if(a===0)return f;a--;i=g.charCodeAt(a);j=d(i);for(b=!j&&!(i===32||i===9);0<a;){i=g.charCodeAt(a-1);h=d(i);if(c==="wordend"){if(h&&
!j)break}else if(!h&&j)break;i=!h&&!(i===32||i===9);if(c==="wordend"){if(i&&!b)break}else if(!i&&b)break;b=i;j=h;a--}}return f+a}return a+b},_getOffset_IE:function(a,c,b){var d=this._model,e=d.getLineAtOffset(a),h=this._clientDiv,g,f=this._getLineNode(e);f||(f=g=this._createLine(h,null,document,e,d));var i=0,j;j=d.getLineStart(e);if(a===d.getLineEnd(e))i=document.body.createTextRange(),i.moveToElementText(f.lastChild),j=i.text.length,i.moveEnd(c,b),i=a+i.text.length-j;else if(a===j&&b<0)i=j;else for(f=
f.firstChild;f;){d=f.firstChild.length;f.ignoreChars&&(d-=f.ignoreChars);if(j+d>a){i=document.body.createTextRange();a===j&&b<0?i.moveToElementText(f.previousSibling):(i.moveToElementText(f),i.collapse(),i.moveEnd("character",a-j));j=i.text.length;i.moveEnd(c,b);i=a+i.text.length-j;break}j=d+j;f=f.nextSibling}g&&h.removeChild(g);return i},_getOffsetToX:function(a){return this._getBoundsAtOffset(a).left},_getPadding:function(a){var c,b,d,e;if(window.getComputedStyle)a=window.getComputedStyle(a,null),
c=a.getPropertyValue("padding-left"),b=a.getPropertyValue("padding-top"),d=a.getPropertyValue("padding-right"),e=a.getPropertyValue("padding-bottom");else if(a.currentStyle)c=a.currentStyle.paddingLeft,b=a.currentStyle.paddingTop,d=a.currentStyle.paddingRight,e=a.currentStyle.paddingBottom;return{left:parseInt(c,10)||0,top:parseInt(b,10)||0,right:parseInt(d,10)||0,bottom:parseInt(e,10)||0}},_getScroll:function(){var a=this._viewDiv;return{x:a.scrollLeft,y:a.scrollTop}},_getSelection:function(){return this._selection.clone()},
_getTopIndex:function(a){var c=this._topChild;if(a&&this._getClientHeight()>this._getLineHeight()){var a=c.getBoundingClientRect(),b=this._getViewPadding(),d=this._viewDiv.getBoundingClientRect();a.top<d.top+b.top&&(c=this._getLineNext(c)||c)}return c.lineIndex},_getXToOffset:function(a,c){function b(a){var c,d,e,h;if(!a._rectsCache){c=a.getClientRects();d=[c.length];for(e=0;e<c.length;e++)h=c[e],d[e]={left:h.left-k+s,top:h.top,right:h.right-k+s,bottom:h.bottom};a._rectsCache=d}c=a._rectsCache;d=
[c.length];for(e=0;e<c.length;e++)h=c[e],d[e]={left:h.left-s,top:h.top,right:h.right-s,bottom:h.bottom};return d}var d=this._model,e=d.getLineStart(a),g=d.getLineEnd(a);if(e===g)return e;var f=this._clientDiv,i,j=this._getLineNode(a);j||(j=i=this._createLine(f,null,document,a,d));d=this._getLineBoundingClientRect(j,!0);if(c<d.left)c=d.left;if(c>d.right)c=d.right;var k=0,l;if(h<9){l=j.getClientRects();for(var m=l[0].left,n=1;n<l.length;n++)m=Math.min(l[n].left,m);k=m-d.left-this._getLineTrim(j).left}var s=
this._getScroll().x,o=h?window.screen.logicalXDPI:1,q=h?window.screen.deviceXDPI:1,d=e,m=j.firstChild;a:for(;m;){n=m.firstChild;j=n.length;m.ignoreChars&&(j-=m.ignoreChars);l=b(m);for(var p=0;p<l.length;p++){var r=l[p];if(r.left<=c&&c<r.right){if(h||t){for(var p=t?document.createRange():document.body.createTextRange(),B=j,J=-1;B-J>1;){var N=Math.floor((B+J)/2);l=J+1;r=N===j-1&&m.ignoreChars?n.length:N+1;t?(p.setStart(n,l),p.setEnd(n,r)):(p.moveToElementText(m),p.move("character",l),p.moveEnd("character",
r-l));l=p.getClientRects();for(var S=!1,Q=0;Q<l.length;Q++){var r=l[Q],T=r.right*o/q-k;if(r.left*o/q-k<=c&&c<T){S=!0;break}}S?B=N:J=N}d+=B;l=B;r=B===j-1&&m.ignoreChars?n.length:Math.min(B+1,n.length);t?(p.setStart(n,l),p.setEnd(n,r)):(p.moveToElementText(m),p.move("character",l),p.moveEnd("character",r-l));r=p.getClientRects()[0];c>r.left*o/q-k+(r.right-r.left)*o/q/2&&d++}else{l=[];for(o=0;o<j;o++)l.push("<span>"),o===j-1?l.push(n.data.substring(o)):l.push(n.data.substring(o,o+1)),l.push("</span>");
m.innerHTML=l.join("");for(l=m.firstChild;l;){r=l.getBoundingClientRect();if(r.left<=c&&c<r.right){c>r.left+(r.right-r.left)/2&&d++;break}d++;l=l.nextSibling}if(!i)m.innerHTML="",m.appendChild(n),m=this._getSelection(),(d<=m.start&&m.start<d+j||d<=m.end&&m.end<d+j)&&this._updateDOMSelection()}break a}}d+=j;m=m.nextSibling}i&&f.removeChild(i);return Math.min(g,Math.max(e,d))},_getYToLine:function(a){var c=this._getViewPadding(),b=this._viewDiv.getBoundingClientRect();a-=b.top+c.top;c=this._getLineHeight();
a=Math.floor((a+this._getScroll().y)/c);c=this._model.getLineCount();return Math.max(0,Math.min(c-1,a))},_hookEvents:function(){var a=this;this._modelListener={onChanging:function(c){a._onModelChanging(c)},onChanged:function(c){a._onModelChanged(c)}};this._model.addEventListener("Changing",this._modelListener.onChanging);this._model.addEventListener("Changed",this._modelListener.onChanged);var b=this._handlers=[],d=this._clientDiv,e=this._viewDiv,g=this._rootDiv,f=this._overlayDiv||d,i=h?document:
window;b.push({target:window,type:"resize",handler:function(c){return a._handleResize(c)}});b.push({target:d,type:"blur",handler:function(c){return a._handleBlur(c)}});b.push({target:d,type:"focus",handler:function(c){return a._handleFocus(c)}});b.push({target:e,type:"focus",handler:function(){d.focus()}});b.push({target:e,type:"scroll",handler:function(c){return a._handleScroll(c)}});b.push({target:d,type:"keydown",handler:function(c){return a._handleKeyDown(c)}});b.push({target:d,type:"keypress",
handler:function(c){return a._handleKeyPress(c)}});b.push({target:d,type:"keyup",handler:function(c){return a._handleKeyUp(c)}});b.push({target:d,type:"selectstart",handler:function(c){return a._handleSelectStart(c)}});b.push({target:d,type:"contextmenu",handler:function(c){return a._handleContextMenu(c)}});b.push({target:d,type:"copy",handler:function(c){return a._handleCopy(c)}});b.push({target:d,type:"cut",handler:function(c){return a._handleCut(c)}});b.push({target:d,type:"paste",handler:function(c){return a._handlePaste(c)}});
if(n)b.push({target:document,type:"selectionchange",handler:function(c){return a._handleSelectionChange(c)}}),b.push({target:d,type:"touchstart",handler:function(c){return a._handleTouchStart(c)}}),b.push({target:d,type:"touchmove",handler:function(c){return a._handleTouchMove(c)}}),b.push({target:d,type:"touchend",handler:function(c){return a._handleTouchEnd(c)}});else{b.push({target:d,type:"mousedown",handler:function(c){return a._handleMouseDown(c)}});b.push({target:d,type:"mouseover",handler:function(c){return a._handleMouseOver(c)}});
b.push({target:d,type:"mouseout",handler:function(c){return a._handleMouseOut(c)}});b.push({target:i,type:"mouseup",handler:function(c){return a._handleMouseUp(c)}});b.push({target:i,type:"mousemove",handler:function(c){return a._handleMouseMove(c)}});b.push({target:g,type:"mousedown",handler:function(c){return a._handleRootMouseDown(c)}});b.push({target:g,type:"mouseup",handler:function(c){return a._handleRootMouseUp(c)}});b.push({target:f,type:"dragstart",handler:function(c){return a._handleDragStart(c)}});
b.push({target:f,type:"drag",handler:function(c){return a._handleDrag(c)}});b.push({target:f,type:"dragend",handler:function(c){return a._handleDragEnd(c)}});b.push({target:f,type:"dragenter",handler:function(c){return a._handleDragEnter(c)}});b.push({target:f,type:"dragover",handler:function(c){return a._handleDragOver(c)}});b.push({target:f,type:"dragleave",handler:function(c){return a._handleDragLeave(c)}});b.push({target:f,type:"drop",handler:function(c){return a._handleDrop(c)}});b.push({target:this._clientDiv,
type:j?"DOMMouseScroll":"mousewheel",handler:function(c){return a._handleMouseWheel(c)}});if(j&&!p)(e=window.MutationObserver||window.MozMutationObserver)?(this._mutationObserver=new e(function(c){a._handleDataModified(c)}),this._mutationObserver.observe(d,{subtree:!0,characterData:!0})):b.push({target:this._clientDiv,type:"DOMCharacterDataModified",handler:function(c){return a._handleDataModified(c)}});this._overlayDiv&&(b.push({target:this._overlayDiv,type:"mousedown",handler:function(c){return a._handleMouseDown(c)}}),
b.push({target:this._overlayDiv,type:"mouseover",handler:function(c){return a._handleMouseOver(c)}}),b.push({target:this._overlayDiv,type:"mouseout",handler:function(c){return a._handleMouseOut(c)}}),b.push({target:this._overlayDiv,type:"contextmenu",handler:function(c){return a._handleContextMenu(c)}}));q||b.push({target:this._clientDiv,type:"dblclick",handler:function(c){return a._handleDblclick(c)}})}e=this._leftDiv;g=this._rightDiv;h&&b.push({target:e,type:"selectstart",handler:function(){return!1}});
b.push({target:e,type:j?"DOMMouseScroll":"mousewheel",handler:function(c){return a._handleMouseWheel(c)}});b.push({target:e,type:"click",handler:function(c){a._handleRulerEvent(c)}});b.push({target:e,type:"dblclick",handler:function(c){a._handleRulerEvent(c)}});b.push({target:e,type:"mousemove",handler:function(c){a._handleRulerEvent(c)}});b.push({target:e,type:"mouseover",handler:function(c){a._handleRulerEvent(c)}});b.push({target:e,type:"mouseout",handler:function(c){a._handleRulerEvent(c)}});
h&&b.push({target:g,type:"selectstart",handler:function(){return!1}});b.push({target:g,type:j?"DOMMouseScroll":"mousewheel",handler:function(c){return a._handleMouseWheel(c)}});b.push({target:g,type:"click",handler:function(c){a._handleRulerEvent(c)}});b.push({target:g,type:"dblclick",handler:function(c){a._handleRulerEvent(c)}});b.push({target:g,type:"mousemove",handler:function(c){a._handleRulerEvent(c)}});b.push({target:g,type:"mouseover",handler:function(c){a._handleRulerEvent(c)}});b.push({target:g,
type:"mouseout",handler:function(c){a._handleRulerEvent(c)}});for(e=0;e<b.length;e++)g=b[e],c(g.target,g.type,g.handler,g.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(),d;for(d in c)c.hasOwnProperty(d)&&(this["_"+d]=a[d]!==void 0?a[d]:c[d].value);this._rulers=[];this._selection=new e(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()},_isLinkURL:function(a){return a.toLowerCase().lastIndexOf(".css")===a.length-4},_modifyContent:function(a,c){if(!this._readonly||a._code)if(a.type="Verify",this.onVerify(a),!(a.text===null||a.text===void 0)){var b=this._model;try{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!0;b.setText(a.text,a.start,a.end)}finally{if(a._ignoreDOMSelection)this._ignoreDOMSelection=!1}c&&(b=this._getSelection(),b.setCaret(a.start+a.text.length),this._setSelection(b,!0));this.onModify({type:"Modify"})}},
_onModelChanged:function(a){a.type="ModelChanged";this.onModelChanged(a);a.type="Changed";var c=a.start,b=a.addedCharCount,d=a.removedCharCount,e=a.addedLineCount,h=a.removedLineCount,g=this._getSelection();g.end>c&&(g.end>c&&g.start<c+d?g.setCaret(c+b):(g.start+=b-d,g.end+=b-d),this._setSelection(g,!1,!1));c=this._model.getLineAtOffset(c);for(b=this._getLineNext();b;){d=b.lineIndex;if(c<=d&&d<=c+h)c===d&&!b.modelChangedEvent&&!b.lineRemoved?(b.modelChangedEvent=a,b.lineChanged=!0):(b.lineRemoved=
!0,b.lineChanged=!1,b.modelChangedEvent=null);if(d>c+h)b.lineIndex=d+e-h;b=this._getLineNext(b)}if(c<=this._maxLineIndex&&this._maxLineIndex<=c+h)this._checkMaxLineIndex=this._maxLineIndex,this._maxLineIndex=-1,this._maxLineWidth=0;this._updatePage()},_onModelChanging:function(a){a.type="ModelChanging";this.onModelChanging(a);a.type="Changing"},_queueUpdatePage:function(){if(!this._updateTimer){var a=this;this._updateTimer=setTimeout(function(){a._updateTimer=null;a._updatePage()},0)}},_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._partialY=0;this._setSelection(new e(0,0,!1),!1,!1);if(this._viewDiv)this._viewDiv.scrollLeft=0,this._viewDiv.scrollTop=0;var a=this._clientDiv;if(a){for(var c=a.firstChild;c;)c.lineRemoved=!0,c=c.nextSibling;if(j)this._ignoreFocus=!1,(c=this._hasFocus)&&a.blur(),a.contentEditable=!1,a.contentEditable=
!0,c&&a.focus(),this._ignoreFocus=!1}},_scrollView:function(a,c){this._ensureCaretVisible=!1;var b=this._viewDiv;a&&(b.scrollLeft+=a);c&&(b.scrollTop+=c)},_setClipboardText:function(a,c){var b;if(window.clipboardData)return b=[],this._convertDelimiter(a,function(a){b.push(a)},function(){b.push(s)}),window.clipboardData.setData("Text",b.join(""));if(c&&c.clipboardData&&(b=[],this._convertDelimiter(a,function(a){b.push(a)},function(){b.push(s)}),c.clipboardData.setData("text/plain",b.join(""))))return!0;
var d=document.createElement("PRE");d.style.position="fixed";d.style.left="-1000px";this._convertDelimiter(a,function(a){d.appendChild(document.createTextNode(a))},function(){d.appendChild(document.createElement("BR"))});d.appendChild(document.createTextNode(" "));this._clientDiv.appendChild(d);var e=document.createRange();e.setStart(d.firstChild,0);e.setEndBefore(d.lastChild);var h=window.getSelection();h.rangeCount>0&&h.removeAllRanges();h.addRange(e);var g=this,e=function(){d&&d.parentNode===g._clientDiv&&
g._clientDiv.removeChild(d);g._updateDOMSelection()},h=!1;this._ignoreCopy=!0;try{h=document.execCommand("copy",!1,null)}catch(f){}this._ignoreCopy=!1;if(!h&&c)return setTimeout(e,0),!1;e();return!0},_setDOMSelection:function(a,c,b,d){for(var e,h,g,f,i=0,j=a.firstChild,k,l,m=this._model.getLine(a.lineIndex).length;j;){k=j.firstChild;l=k.length;j.ignoreChars&&(l-=j.ignoreChars);if(i+l>c||i+l>=m){e=k;h=c-i;j.ignoreChars&&l>0&&h===l&&(h+=j.ignoreChars);break}i+=l;j=j.nextSibling}for(var i=0,j=b.firstChild,
n=this._model.getLine(b.lineIndex).length;j;){k=j.firstChild;l=k.length;j.ignoreChars&&(l-=j.ignoreChars);if(l+i>d||i+l>=n){g=k;f=d-i;j.ignoreChars&&l>0&&f===l&&(f+=j.ignoreChars);break}i+=l;j=j.nextSibling}this._setDOMFullSelection(a,c,m,b,d,n);if(window.getSelection)a=document.createRange(),a.setStart(e,h),a.setEnd(g,f),g=window.getSelection(),this._ignoreSelect=!1,g.rangeCount>0&&g.removeAllRanges(),g.addRange(a),this._ignoreSelect=!0;else if(document.selection)c=document.body,a=document.createElement("DIV"),
c.appendChild(a),c.removeChild(a),a=c.createTextRange(),a.moveToElementText(e.parentNode),a.moveStart("character",h),e=c.createTextRange(),e.moveToElementText(g.parentNode),e.moveStart("character",f),a.setEndPoint("EndToStart",e),this._ignoreSelect=!1,a.select(),this._ignoreSelect=!0},_setDOMFullSelection:function(a,c,b,d,e,h){if(this._selDiv1){var g=this._selDiv1;g.style.width="0px";g.style.height="0px";g=this._selDiv2;g.style.width="0px";g.style.height="0px";g=this._selDiv3;g.style.width="0px";
g.style.height="0px";if(!(a===d&&c===e)){var f=this._model,i=this._getViewPadding(),j=this._clientDiv.getBoundingClientRect(),k=this._viewDiv.getBoundingClientRect(),g=k.left+i.left,l=j.right,i=k.top+i.top,m=j.bottom,k=j=0;this._clipDiv?(k=this._clipDiv.getBoundingClientRect(),j=k.left-this._clipDiv.scrollLeft):(k=this._rootDiv.getBoundingClientRect(),j=k.left);var k=k.top,n;n=this._getLineBoundingClientRect(a);c===0?b=n.left:c>=b?b=n.right:(this._ignoreDOMSelection=!0,b=this._getBoundsAtOffset(f.getLineStart(a.lineIndex)+
c).left,this._ignoreDOMSelection=!1);c=this._getLineBoundingClientRect(d);e===0?h=c.left:e>=h?h=c.right:(this._ignoreDOMSelection=!0,h=this._getBoundsAtOffset(f.getLineStart(d.lineIndex)+e).left,this._ignoreDOMSelection=!1);var f=this._selDiv1,b=Math.min(l,Math.max(g,b)),s=Math.min(m,Math.max(i,n.top)),o=l,e=Math.min(m,Math.max(i,n.bottom));f.style.left=b-j+"px";f.style.top=s-k+"px";f.style.width=Math.max(0,o-b)+"px";f.style.height=Math.max(0,e-s)+"px";if(a===d)o=Math.min(h,l),f.style.width=Math.max(0,
o-b)+"px";else if(a=Math.min(m,Math.max(i,c.top)),d=Math.min(l,Math.max(g,h)),i=Math.min(m,Math.max(i,c.bottom)),m=this._selDiv3,m.style.left=g-j+"px",m.style.top=a-k+"px",m.style.width=Math.max(0,d-g)+"px",m.style.height=Math.max(0,i-a)+"px",a-e>0)d=this._selDiv2,d.style.left=g-j+"px",d.style.top=e-k+"px",d.style.width=Math.max(0,l-g)+"px",d.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(h&&a)this._hadFocus=this._hasFocus;var c=this._clientDiv;c.contentEditable=!a;this._hadFocus&&!a&&c.focus();if(this._overlayDiv)this._overlayDiv.style.zIndex=a?"-1":"1";for(a=this._getLineNext();a;){if(a.hasLink)for(c=a.firstChild;c;){var b=c.nextSibling,d=c.viewStyle;d&&d.tagName==="A"&&a.replaceChild(this._createSpan(a,document,c.firstChild.data,d),c);c=b}a=
this._getLineNext(a)}}},_setSelection:function(a,c,b,d){if(a){this._columnX=-1;b===void 0&&(b=!0);var e=this._selection;if(!e.equals(a))this._selection=a,this.onSelection({type:"Selection",oldValue:{start:e.start,end:e.end},newValue:{start:a.start,end:a.end}});c&&(b=!this._showCaret(!1,d));b&&this._updateDOMSelection()}},_setSelectionTo:function(a,c,b,d){var e=this._model,h=this._getSelection(),c=this._getYToLine(c);if(this._clickCount===1){e=this._getXToOffset(c,a);if(d&&!b&&h.start<=e&&e<h.end)return this._dragOffset=
e,!1;h.extend(e);b||h.collapse()}else(this._clickCount&1)===0?(e=this._getXToOffset(c,a),this._doubleClickSelection?e>=this._doubleClickSelection.start?(b=this._doubleClickSelection.start,e=this._getOffset(e,"wordend",1)):(b=this._getOffset(e,"word",-1),e=this._doubleClickSelection.end):(b=this._getOffset(e,"word",-1),e=this._getOffset(b,"wordend",1))):this._doubleClickSelection?(d=e.getLineAtOffset(this._doubleClickSelection.start),c>=d?(b=e.getLineStart(d),e=e.getLineEnd(c)):(b=e.getLineStart(c),
e=e.getLineEnd(d))):(b=e.getLineStart(c),e=e.getLineEnd(c)),h.setCaret(b),h.extend(e);this._setSelection(h,!0,!0);return!0},_setFullSelection:function(a,c){this._fullSelection=a;if(m)this._fullSelection=!0;var b=this._clipDiv||this._rootDiv;if(b)if(this._fullSelection){if(!this._selDiv1&&this._fullSelection&&!m){this._hightlightRGB="Highlight";var d=document.createElement("DIV");this._selDiv1=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._hightlightRGB;d.style.width="0px";d.style.height="0px";d.style.zIndex="0";b.appendChild(d);var e=document.createElement("DIV");this._selDiv2=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._hightlightRGB;e.style.width="0px";e.style.height="0px";e.style.zIndex="0";b.appendChild(e);var h=document.createElement("DIV");this._selDiv3=h;h.style.position="absolute";h.style.borderWidth=
"0px";h.style.margin="0px";h.style.padding="0px";h.style.outline="none";h.style.background=this._hightlightRGB;h.style.width="0px";h.style.height="0px";h.style.zIndex="0";b.appendChild(h);if(j&&o){b=window.getComputedStyle(h,null).getPropertyValue("background-color");switch(b){case "rgb(119, 141, 168)":b="rgb(199, 208, 218)";break;case "rgb(127, 127, 127)":b="rgb(198, 198, 198)";break;case "rgb(255, 193, 31)":b="rgb(250, 236, 115)";break;case "rgb(243, 70, 72)":b="rgb(255, 176, 139)";break;case "rgb(255, 138, 34)":b=
"rgb(255, 209, 129)";break;case "rgb(102, 197, 71)":b="rgb(194, 249, 144)";break;case "rgb(140, 78, 184)":b="rgb(232, 184, 255)";break;default:b="rgb(180, 213, 255)"}this._hightlightRGB=b;d.style.background=b;e.style.background=b;h.style.background=b;if(!this._insertedSelRule)d=document.createElement("STYLE"),e=document.getElementsByTagName("HEAD")[0]||document.documentElement,d.appendChild(document.createTextNode("::-moz-selection {background: "+b+"; }")),e.insertBefore(d,e.firstChild),this._insertedSelRule=
!0}c||this._updateDOMSelection()}}else{if(this._selDiv1)b.removeChild(this._selDiv1),this._selDiv1=null;if(this._selDiv2)b.removeChild(this._selDiv2),this._selDiv2=null;if(this._selDiv3)b.removeChild(this._selDiv3),this._selDiv3=null}},_setReadOnly:function(a){this._readonly=a;this._clientDiv.setAttribute("aria-readonly",a?"true":"false")},_setTabSize:function(a,c){this._tabSize=a;this._customTabSize=void 0;var b=this._clientDiv;if(i){if(b)b.style.OTabSize=this._tabSize+""}else if(j>=4){if(b)b.style.MozTabSize=
this._tabSize+""}else if(this._tabSize!==8)this._customTabSize=this._tabSize;c||(this.redrawLines(),this._resetLineWidth())},_setThemeClass:function(a,c){this._themeClass=a;var b="textviewContainer";this._themeClass&&(b+=" "+this._themeClass);this._rootDiv.className=b;this._updateStyle(c)},_showCaret:function(a,c){if(this._clientDiv){var b=this._model,d=this._getSelection(),e=this._getScroll(),h=d.getCaret(),g=d.start,f=d.end,i=b.getLineAtOffset(g),j=b.getLineAtOffset(f),k=Math.max(Math.max(g,b.getLineStart(j)),
f-1),l=this._getViewPadding(),m=this._getClientWidth(),n=l.left,l=l.left+m,s=this._getBoundsAtOffset(h===g?g:k),o=s.left,q=s.right,p=m/4;if(a&&!d.isEmpty()&&i===j&&(s=this._getBoundsAtOffset(h===f?g:k),m-p>(h===g?s.right-o:q-s.left))){if(o>s.left)o=s.left;if(q<s.right)q=s.right}d=this._viewDiv.getBoundingClientRect();o-=d.left;q-=d.left;d=0;o<n&&(d=Math.min(o-n,-p));q>l&&(d=Math.min(this._scrollDiv.scrollWidth-e.x-m,Math.max(q-l,p)));n=0;o=this._getTopIndex(!0);q=this._getBottomIndex(!0);b=b.getLineAtOffset(h);
l=this._getClientHeight();o<=b&&b<=q||(o=this._getLineHeight(),i=a?(j-i)*o:0,n=b*o,n-=e.y,n+o>l?(n-=l-o,h===g&&g!==f&&(n+=Math.min(l-o,i))):h===f&&(n-=Math.min(l-o,i)),c&&(c>0?n>0&&(n=Math.max(n,c)):n<0&&(n=Math.min(n,c))));return d!==0||n!==0?(this._scrollView(d,n),l!==this._getClientHeight()||m!==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("Changing",this._modelListener.onChanging);this._model.removeEventListener("Changed",this._modelListener.onChanged);this._modelListener=null;for(var a=0;a<this._handlers.length;a++){var c=this._handlers[a],b=c.target,d=c.type,c=c.handler;typeof b.removeEventListener==="function"?b.removeEventListener(d,c,!1):b.detachEvent("on"+d,c)}this._handlers=null;if(this._mutationObserver)this._mutationObserver.disconnect(),
this._mutationObserver=null},_updateDOMSelection:function(){if(!this._ignoreDOMSelection&&this._clientDiv&&this._hasFocus){var a=this._getSelection(),c=this._model,b=c.getLineAtOffset(a.start),d=c.getLineAtOffset(a.end),e=this._getLineNext();if(e){var h=this._getLinePrevious(),g;b<e.lineIndex?(g=e,b=0):b>h.lineIndex?(g=h,b=0):(g=this._getLineNode(b),b=a.start-c.getLineStart(b));d<e.lineIndex?a=0:d>h.lineIndex?(e=h,a=0):(e=this._getLineNode(d),a=a.end-c.getLineStart(d));this._setDOMSelection(g,b,e,
a)}}},_updatePage:function(a){var u;if(!(this._redrawCount>0)){if(this._updateTimer)clearTimeout(this._updateTimer),this._updateTimer=null,a=!1;var c=this._clientDiv;if(c){var b=this._model,d=this._getScroll(),e=this._getViewPadding(),g=b.getLineCount(),f=this._getLineHeight(),i=Math.max(0,d.y)/f,j=Math.floor(i),k=Math.max(0,j-1),l=Math.round((i-k)*f),n=this._partialY=Math.round((i-j)*f),i=g*f,s;if(a)b=this._getClientWidth(),s=this._getClientHeight(),g=this._leftDiv?this._leftDiv.scrollWidth:0,j=
Math.max(this._maxLineWidth,b);else{var o=this._parent;s=this._rootDiv;var d=o.clientWidth,q=o.clientHeight;s.style.width=d+"px";s.style.height=q+"px";o=this._viewDiv;o.style.height=Math.max(0,q-e.top-e.bottom)+"px";s=this._getClientHeight();for(var f=Math.min(j+Math.floor((s+n)/f),g-1),p=Math.min(f+1,g-1),q=c.firstChild;q;){var n=q.lineIndex,r=q.nextSibling;if(!(k<=n&&n<=p)||q.lineRemoved||q.lineIndex===-1)this._mouseWheelLine===q?(q.style.display="none",q.lineIndex=-1):c.removeChild(q);q=r}q=this._getLineNext();
r=document.createDocumentFragment();for(n=k;n<=p;n++)if(!q||q.lineIndex>n)this._createLine(r,null,document,n,b);else{r.firstChild&&(c.insertBefore(r,q),r=document.createDocumentFragment());if(q&&q.lineChanged)q=this._createLine(r,q,document,n,b),q.lineChanged=!1;q=this._getLineNext(q)}r.firstChild&&c.insertBefore(r,q);if(m)c.style.width=(524287).toString()+"px";for(q=this._getLineNext();q;){k=q.lineWidth;if(k===void 0)k=this._getLineBoundingClientRect(q),u=q.lineWidth=Math.ceil(k.right-k.left),k=
u;if(k>=this._maxLineWidth)this._maxLineWidth=k,this._maxLineIndex=q.lineIndex;if(q.lineIndex===j)this._topChild=q;if(q.lineIndex===f)this._bottomChild=q;if(this._checkMaxLineIndex===q.lineIndex)this._checkMaxLineIndex=-1;q=this._getLineNext(q)}if(this._checkMaxLineIndex!==-1&&(n=this._checkMaxLineIndex,this._checkMaxLineIndex=-1,0<=n&&n<g)){b=this._createLine(c,null,document,n,b);k=this._getLineBoundingClientRect(b);k=k.right-k.left;if(k>=this._maxLineWidth)this._maxLineWidth=k,this._maxLineIndex=
n;c.removeChild(b)}this._updateRuler(this._leftDiv,j,f);this._updateRuler(this._rightDiv,j,f);g=this._leftDiv?this._leftDiv.scrollWidth:0;j=this._rightDiv?this._rightDiv.scrollWidth:0;o.style.left=g+"px";o.style.width=Math.max(0,d-g-j-e.left-e.right)+"px";if(this._rightDiv)this._rightDiv.style.left=d-j+"px";d=this._scrollDiv;d.style.height=i+"px";b=this._getClientWidth();j=o=Math.max(this._maxLineWidth,b);if(!h||h>=9)o+=e.right;d.style.width=o+"px";if(this._clipScrollDiv)this._clipScrollDiv.style.width=
o+"px";d=this._getScroll();o=s+e.top+e.bottom;this._updateRulerSize(this._leftDiv,o);this._updateRulerSize(this._rightDiv,o)}if(this._vScrollDiv)o=s-8,k=Math.max(15,Math.ceil(Math.min(1,o/(i+e.top+e.bottom))*o)),this._vScrollDiv.style.left=g+b-8+"px",this._vScrollDiv.style.top=Math.floor(Math.max(0,d.y*o/i))+"px",this._vScrollDiv.style.height=k+"px";if(this._hScrollDiv)o=b-8,k=Math.max(15,Math.ceil(Math.min(1,o/(this._maxLineWidth+e.left+e.right))*o)),this._hScrollDiv.style.left=g+Math.floor(Math.max(0,
Math.floor(d.x*o/this._maxLineWidth)))+"px",this._hScrollDiv.style.top=s-9+"px",this._hScrollDiv.style.width=k+"px";q=d.x;n=this._clipDiv;o=this._overlayDiv;if(n){n.scrollLeft=q;k=g+e.left;f=e.top;a=b;g=s;q=0;p=-l;if(d.x===0)k-=e.left,a+=e.left,q=e.left;d.x+b===j&&(a+=e.right);d.y===0&&(f-=e.top,g+=e.top,p+=e.top);d.y+s===i&&(g+=e.bottom);n.style.left=k+"px";n.style.top=f+"px";n.style.width=a+"px";n.style.height=g+"px";c.style.left=q+"px";c.style.top=p+"px";c.style.width=j+"px";c.style.height=s+l+
"px";if(o)o.style.left=c.style.left,o.style.top=c.style.top,o.style.width=c.style.width,o.style.height=c.style.height}else{k=q;f=l;n=q+b;p=l+s;k===0&&(k-=e.left);f===0&&(f-=e.top);n===j&&(n+=e.right);d.y+s===i&&(p+=e.bottom);c.style.clip="rect("+f+"px,"+n+"px,"+p+"px,"+k+"px)";c.style.left=-q+g+e.left+"px";c.style.width=(m?j:b+q)+"px";if(!a)c.style.top=-l+e.top+"px",c.style.height=s+l+"px";if(o&&(o.style.clip=c.style.clip,o.style.left=c.style.left,o.style.width=c.style.width,!a))o.style.top=c.style.top,
o.style.height=c.style.height}this._updateDOMSelection();c=this._ensureCaretVisible;this._ensureCaretVisible=!1;s!==this._getClientHeight()&&(this._updatePage(),c&&this._showCaret())}}},_updateRulerSize:function(a,c){if(a){for(var b=this._partialY,d=this._getLineHeight(),e=a.firstChild.rows[0].cells,h=0;h<e.length;h++){var g=e[h].firstChild,f=d;g._ruler.getOverview()==="page"&&(f+=b);g.style.top=-f+"px";g.style.height=c+f+"px"}a.style.height=c+"px"}},_updateRuler:function(a,c,b){if(a)for(var a=a.firstChild.rows[0].cells,
d=this._getLineHeight(),e=this._getViewPadding(),h=0;h<a.length;h++){var g=a[h].firstChild,f=g._ruler;g.rulerChanged&&this._applyStyle(f.getRulerStyle(),g);var i,j=g.firstChild;j?(i=j,j=j.nextSibling):(i=document.createElement("DIV"),i.style.visibility="hidden",g.appendChild(i));var k,l;if(g.rulerChanged&&i){k=-1;if(l=f.getWidestAnnotation())if(this._applyStyle(l.style,i),l.html)i.innerHTML=l.html;i.lineIndex=k;i.style.height=d+e.top+"px"}var m,n;if(f.getOverview()==="page"){for(f=f.getAnnotations(c,
b+1);j;)k=j.lineIndex,l=j.nextSibling,(!(c<=k&&k<=b)||j.lineChanged)&&g.removeChild(j),j=l;j=g.firstChild.nextSibling;n=document.createDocumentFragment();for(k=c;k<=b;k++)if(!j||j.lineIndex>k){m=document.createElement("DIV");if(l=f[k]){this._applyStyle(l.style,m);if(l.html)m.innerHTML=l.html;m.annotation=l}m.lineIndex=k;m.style.height=d+"px";n.appendChild(m)}else if(n.firstChild&&(g.insertBefore(n,j),n=document.createDocumentFragment()),j)j=j.nextSibling;n.firstChild&&g.insertBefore(n,j)}else{l=this._getClientHeight();
k=this._model.getLineCount();j=l+e.top+e.bottom-2*this._metrics.scrollWidth;i=d*k<j?d:j/k;if(g.rulerChanged){for(l=g.childNodes.length;l>1;)g.removeChild(g.lastChild),l--;f=f.getAnnotations(0,k);n=document.createDocumentFragment();for(var s in f)if(k=s>>>0,!(k<0)){m=document.createElement("DIV");l=f[s];this._applyStyle(l.style,m);m.style.position="absolute";m.style.top=this._metrics.scrollWidth+d+Math.floor(k*i)+"px";if(l.html)m.innerHTML=l.html;m.annotation=l;m.lineIndex=k;n.appendChild(m)}g.appendChild(n)}else if(g._oldTrackHeight!==
j)for(m=g.firstChild?g.firstChild.nextSibling:null;m;)m.style.top=this._metrics.scrollWidth+d+Math.floor(m.lineIndex*i)+"px",m=m.nextSibling;g._oldTrackHeight=j}g.rulerChanged=!1}},_updateStyle:function(a){if(!a&&h)this._rootDiv.style.lineHeight="normal";var c=this._metrics=this._calculateMetrics();this._rootDiv.style.lineHeight=h?c.lineHeight-(c.lineTrim.top+c.lineTrim.bottom)+"px":"normal";a||(this.redraw(),this._resetLineWidth())}};a.EventTarget.addMixin(d.prototype);return{TextView:d}});
define("orion/textview/tooltip",["i18n!orion/textview/nls/messages","orion/textview/textView","orion/textview/textModel","orion/textview/projectionTextModel"],function(b,f,a,c){function e(a){this._view=a;this._create(a.getOptions("parent").ownerDocument);a.addEventListener("Destroy",this,this.destroy)}e.getTooltip=function(a){if(!a._tooltip)a._tooltip=new e(a);return a._tooltip};e.prototype={_create:function(a){if(!this._tooltipDiv){var c=this._tooltipDiv=a.createElement("DIV");c.className="textviewTooltip";
c.setAttribute("aria-live","assertive");c.setAttribute("aria-atomic","true");var b=this._tooltipContents=a.createElement("DIV");c.appendChild(b);a.body.appendChild(c);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,c){if(this.target!==a&&(this._target=a,this.hide(),a)){var b=this;c===0?b.show(!0):b._showTimeout=setTimeout(function(){b.show(!0)},c?c:500)}},show:function(a){if(this._target){var b=
this._target.getTooltipInfo();if(b){var e=this._tooltipDiv,j=this._tooltipContents;e.style.left=e.style.right=e.style.width=e.style.height=j.style.width=j.style.height="auto";var i=b.contents;i instanceof Array&&(i=this._getAnnotationContents(i));if(typeof i==="string")j.innerHTML=i;else if(this._isNode(i))j.appendChild(i);else if(i instanceof c.ProjectionTextModel){var k=this._view,l=k.getOptions();l.parent=j;var m=l.themeClass;m?((m=m.replace("tooltip",""))&&(m=" "+m),m="tooltip"+m):m="tooltip";
l.themeClass=m;l=this._contentsView=new f.TextView(l);l._clientDiv.contentEditable=!1;l.addEventListener("LineStyle",function(a){k.onLineStyle(a)});l.setModel(i);i=l.computeSize();j.style.width=i.width+20+"px";j.style.height=i.height+"px";l.resize()}else return;j=e.ownerDocument.documentElement;b.anchor==="right"?(i=j.clientWidth-b.x,e.style.right=i+"px"):(i=parseInt(this._getNodeStyle(e,"padding-left","0"),10),i+=parseInt(this._getNodeStyle(e,"border-left-width","0"),10),i=b.x-i,e.style.left=i+"px");
e.style.maxWidth=j.clientWidth-i-10+"px";i=parseInt(this._getNodeStyle(e,"padding-top","0"),10);i+=parseInt(this._getNodeStyle(e,"border-top-width","0"),10);i=b.y-i;e.style.top=i+"px";e.style.maxHeight=j.clientHeight-i-10+"px";e.style.opacity="1";e.style.visibility="visible";if(a){var n=this;n._hideTimeout=setTimeout(function(){var a=parseFloat(n._getNodeStyle(e,"opacity","1"));n._fadeTimeout=setInterval(function(){e.style.visibility==="visible"&&a>0?(a-=0.1,e.style.opacity=a):n.hide()},50)},5E3)}}}},
_getAnnotationContents:function(a){function e(a){var c=a.title;if(c==="")return null;var b="<div>";a.html&&(b+=a.html+"&nbsp;");if(!c)c=a.end,a=f.getLineStart(f.getLineAtOffset(a.start)),c=f.getLineEnd(f.getLineAtOffset(c),!0),c=f.getText(a,c);c=c.replace(/</g,"&lt;").replace(/>/g,"&gt;");b+="<span style='vertical-align:middle;'>"+c+"</span><div>";return b}if(a.length===0)return null;var h=this._view.getModel(),f=h.getBaseModel?h.getBaseModel():h;if(a.length===1)if(h=a[0],h.title!==void 0)return e(h);
else{var a=new c.ProjectionTextModel(f),i=f.getLineStart(f.getLineAtOffset(h.start)),k=f.getCharCount();h.end!==k&&a.addProjection({start:h.end,end:k});i>0&&a.addProjection({start:0,end:i});return a}else{i="<div><em>"+b.multipleAnnotations+"</em></div>";for(k=0;k<a.length;k++)h=a[k],(h=e(h))&&(i+=h);return i}},_getNodeStyle:function(a,c,b){var e;if(a&&(e=a.style[c],!e))if(a.currentStyle){for(e=0;(e=c.indexOf("-",e))!==-1;)c=c.substring(0,e)+c.substring(e+1,e+2).toUpperCase()+c.substring(e+2);e=a.currentStyle[c]}else e=
(a=a.ownerDocument.defaultView.getComputedStyle(a,null))?a.getPropertyValue(c):null;return e||b},_isNode:function(a){return typeof Node==="object"?a instanceof Node:a&&typeof a==="object"&&typeof a.nodeType==="number"&&typeof a.nodeName==="string"}};return{Tooltip:e}});
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,f,a,c,e,d){function g(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 h(a){var c=this,b=Array.prototype.slice.call(arguments,1);return b.length?function(){return arguments.length?c.apply(a,b.concat(Array.prototype.slice.call(arguments))):
c.apply(a,b)}:function(){return arguments.length?c.apply(a,arguments):c.call(a)}}var j;g.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 c=this._textView;a?c.addRuler(this._annotationRuler,0):c.removeRuler(this._annotationRuler)}},setFoldingRulerVisible:function(a){if(this._foldingRulerVisible!==a&&(this._foldingRulerVisible=a,this._foldingRuler)){var c=
this._textView;c.getModel().getBaseModel&&(a?c.addRuler(this._foldingRuler,100):c.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 c=this._textView;a?c.addRuler(this._lineNumberRuler,1):c.removeRuler(this._lineNumberRuler)}},setOverviewRulerVisible:function(a){if(this._overviewRulerVisible!==
a&&(this._overviewRulerVisible=a,this._overviewRuler)){var c=this._textView;a?c.addRuler(this._overviewRuler):c.removeRuler(this._overviewRuler)}},mapOffset:function(a,c){var b=this._textView.getModel();b.getBaseModel&&(a=b.mapOffset(a,c));return a},getCaretOffset:function(){return this.mapOffset(this._textView.getCaretOffset())},getSelection:function(){var a=this._textView,c=a.getSelection(),a=a.getModel();if(a.getBaseModel)c.start=a.mapOffset(c.start),c.end=a.mapOffset(c.end);return c},getText:function(a,
c){var b=this._textView.getModel();b.getBaseModel&&(b=b.getBaseModel());return b.getText(a,c)},_expandOffset:function(a){var c=this._textView.getModel(),b=this._annotationModel;if(b&&c.getBaseModel)for(a=b.getAnnotations(a,a+1);a.hasNext();)c=a.next(),c.type===e.AnnotationType.ANNOTATION_FOLDING&&c.expand&&(c.expand(),b.modifyAnnotation(c))},setCaretOffset:function(a){var c=this._textView,b=c.getModel();b.getBaseModel&&(this._expandOffset(a),a=b.mapOffset(a,!0));c.setCaretOffset(a)},setText:function(a,
c,b){var d=this._textView,e=d.getModel();e.getBaseModel&&(c!==void 0&&(this._expandOffset(c),c=e.mapOffset(c,!0)),b!==void 0&&(this._expandOffset(b),b=e.mapOffset(b,!0)));d.setText(a,c,b)},setFoldingEnabled:function(a){this.setFoldingRulerVisible(a)},setSelection:function(a,c,b){var d=this._textView,e=d.getModel();e.getBaseModel&&(this._expandOffset(a),this._expandOffset(c),a=e.mapOffset(a,!0),c=e.mapOffset(c,!0));d.setSelection(a,c,b)},moveSelection:function(a,c,b,d){var e=this._textView;this.setSelection(a,
c||a,!1);var c=e.getTopPixel(),g=e.getBottomPixel(),a=this.getModel().getLineAtOffset(a),a=e.getLinePixel(a);a<c||a>g?(g=Math.max(0,a-Math.floor((a<c?3:1)*(g-c)/4)),(new j({node:e,duration:300,curve:[c,g],onAnimate:function(a){e.setTopPixel(Math.floor(a))},onEnd:function(){e.showSelection();(d===void 0||d)&&e.focus();b&&b()}})).play()):(e.showSelection(),(d===void 0||d)&&e.focus(),b&&b())},checkDirty:function(){this.setDirty(!this._undoStack.isClean())},reportStatus:function(a,c,b){this._statusReporter?
this._statusReporter(a,c,b):window.alert(c==="error"?"ERROR: "+a:a)},_getTooltipInfo:function(a,c){var b=this._textView,d=this.getAnnotationModel();if(!d)return null;var e=this._annotationStyler;if(!e)return null;var g=b.getOffsetAtLocation(a,c);if(g===-1)return null;g=this.mapOffset(g);e=e.getAnnotationsByType(d,g,g+1);d=[];for(g=0;g<e.length;g++)e[g].rangeStyle&&d.push(e[g]);if(d.length===0)return null;b=b.convert({x:a,y:c},"document","page");return{contents:d,anchor:"left",x:b.x+10,y:b.y+20}},
_highlightCurrentLine:function(a,c){var b=this._annotationModel;if(b){var d=this._textView.getModel(),g=c?d.getLineAtOffset(c.start):-1,h=d.getLineAtOffset(a.start),f=a.start===a.end,j=!c||c.start===c.end;if(!(g===h&&j&&f)){g=this._currentLineAnnotation?[this._currentLineAnnotation]:null;this._currentLineAnnotation=null;var q;if(f)f=d.getLineStart(h),h=d.getLineEnd(h),d.getBaseModel&&(f=d.mapOffset(f),h=d.mapOffset(h)),this._currentLineAnnotation=e.AnnotationType.createAnnotation(e.AnnotationType.ANNOTATION_CURRENT_LINE,
f,h),q=[this._currentLineAnnotation];b.replaceAnnotations(g,q)}}},highlightAnnotations:function(){if(this._annotationStyler)this._annotationStyler.destroy(),this._annotationStyler=null;if(this._annotationFactory)this._annotationStyler=this._annotationFactory.createAnnotationStyler(this.getTextView(),this._annotationModel),this._annotationStyler.addAnnotationType(e.AnnotationType.ANNOTATION_CURRENT_SEARCH),this._annotationStyler.addAnnotationType(e.AnnotationType.ANNOTATION_MATCHING_SEARCH),this._annotationStyler.addAnnotationType(e.AnnotationType.ANNOTATION_ERROR),
this._annotationStyler.addAnnotationType(e.AnnotationType.ANNOTATION_WARNING),this._annotationStyler.addAnnotationType(e.AnnotationType.ANNOTATION_MATCHING_BRACKET),this._annotationStyler.addAnnotationType(e.AnnotationType.ANNOTATION_CURRENT_BRACKET),this._annotationStyler.addAnnotationType(e.AnnotationType.ANNOTATION_CURRENT_LINE),this._annotationStyler.addAnnotationType("orion.annotation.highlightError")},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 d=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 f.KeyBinding(27),"cancelMode");g.setAction("cancelMode",function(){for(var a=!1,c=0;c<this._keyModes.length;c++)this._keyModes[c].isActive()&&(a=this._keyModes[c].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));if(this._annotationFactory){a=g.getModel();a.getBaseModel&&(a=a.getBaseModel());this._annotationModel=this._annotationFactory.createAnnotationModel(a);g.annotationModel=
this._annotationModel;var a=this._annotationFactory.createAnnotationRulers(this._annotationModel),j=this._annotationRuler=a.annotationRuler;if(j)j.onClick=function(a){if(a!==void 0&&a!==-1)for(var c=g.getModel(),b=this.getAnnotationModel(),e=d.mapOffset(c.getLineStart(a)),a=d.mapOffset(c.getLineEnd(a)),a=b.getAnnotations(e,a);a.hasNext();)if(b=a.next(),this.isAnnotationTypeVisible(b.type)){a=d.getModel();d.onGotoLine(a.getLineAtOffset(e),b.start-e,b.end-e);break}},j.setMultiAnnotationOverlay({html:"<div class='annotationHTML overlay'></div>"}),
j.addAnnotationType(e.AnnotationType.ANNOTATION_ERROR),j.addAnnotationType(e.AnnotationType.ANNOTATION_WARNING),j.addAnnotationType(e.AnnotationType.ANNOTATION_TASK);this.setAnnotationRulerVisible(!0);if(j=this._overviewRuler=a.overviewRuler)j.onClick=function(a){a!==void 0&&(a=g.getModel().getLineStart(a),d.moveSelection(d.mapOffset(a)))},j.addAnnotationType(e.AnnotationType.ANNOTATION_CURRENT_SEARCH),j.addAnnotationType(e.AnnotationType.ANNOTATION_MATCHING_SEARCH),j.addAnnotationType(e.AnnotationType.ANNOTATION_ERROR),
j.addAnnotationType(e.AnnotationType.ANNOTATION_WARNING),j.addAnnotationType(e.AnnotationType.ANNOTATION_TASK),j.addAnnotationType(e.AnnotationType.ANNOTATION_MATCHING_BRACKET),j.addAnnotationType(e.AnnotationType.ANNOTATION_CURRENT_BRACKET),j.addAnnotationType(e.AnnotationType.ANNOTATION_CURRENT_LINE);this.setOverviewRulerVisible(!0)}if(this._lineNumberRulerFactory)this._lineNumberRuler=this._lineNumberRulerFactory.createLineNumberRuler(this._annotationModel),this.setLineNumberRulerVisible(!0);if(this._foldingRulerFactory)this._foldingRuler=
this._foldingRulerFactory.createFoldingRuler(this._annotationModel),this._foldingRuler.addAnnotationType(e.AnnotationType.ANNOTATION_FOLDING),this.setFoldingRulerVisible(!1);this.dispatchEvent({type:"TextViewInstalled",textView:g})},_updateCursorStatus:function(){var a=this.getModel(),c=this.getCaretOffset(),e=a.getLineAtOffset(c),a=a.getLineStart(e);c-=a;for(a=0;a<this._keyModes.length;a++){var g=this._keyModes[a];if(g.isActive()&&g.isStatusActive&&g.isStatusActive())return}this.reportStatus(d.formatMessage(b.lineColumn,
e+1,c+1))},showProblems:function(a){var c=this._annotationModel;if(c){for(var b=[],d=[],g=c.getTextModel(),h=c.getAnnotations(0,g.getCharCount()),f;h.hasNext();)f=h.next(),(f.type===e.AnnotationType.ANNOTATION_ERROR||f.type===e.AnnotationType.ANNOTATION_WARNING)&&b.push(f);if(a)for(h=0;h<a.length;h++)if(f=a[h]){var j=f.description.replace(/'/g,"&#39;").replace(/"/g,"&#34;"),q=g.getLineStart(f.line-1);f=e.AnnotationType.createAnnotation(f.severity==="error"?e.AnnotationType.ANNOTATION_ERROR:e.AnnotationType.ANNOTATION_WARNING,
q+f.start-1,q+f.end,j);d.push(f)}c.replaceAnnotations(b,d)}},showSelection:function(a,c,b,d,e){typeof a==="number"?(typeof c!=="number"&&(c=a),this.moveSelection(a,c)):typeof b==="number"&&(a=this.getModel().getLineStart(b-1),typeof d==="number"&&(a+=d),typeof e!=="number"&&(e=0),this.moveSelection(a,a+e))},setInput:function(a,c,b,d){this._title=a;this._textView&&(d?(this._undoStack.markClean(),this.checkDirty()):(c?this._textView.setText(c):b!==null&&b!==void 0&&(this._textView.setText(b),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:c,contents:b,contentsSaved:d})},onInputChanged:function(a){return this.dispatchEvent(a)},onGotoLine:function(a,c,b){if(this._textView){var d=this.getModel(),e=d.getLineStart(a),g=0;b===void 0&&(b=0);typeof c==="string"?(a=d.getLine(a).indexOf(c),a!==-1&&(g=a,b=g+c.length)):(g=c,c=d.getLineEnd(a)-e,g=Math.min(g,c),b=Math.min(b,
c));this.moveSelection(e+g,e+b)}},onDirtyChanged:function(a){return this.dispatchEvent(a)}};a.EventTarget.addMixin(g.prototype);j=function(){function a(c){this.options=c}a.prototype.play=function(){var a=typeof this.options.duration==="number"?this.options.duration:350,c=this.options.easing||this.defaultEasing,b=this.options.onAnimate||function(){},d=this.options.onEnd||function(){},e=this.options.curve[0],g=this.options.curve[1]-e,h,f,i=-1;f=setInterval(function(){i=i===-1?(new Date).getTime():i;
var j=((new Date).getTime()-i)/a;j<1?(j=c(j),h=e+j*g,b(h)):(clearInterval(f),d())},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=h;return{Editor:g,util:{bind:h}}});
define("orion/textview/rulers",["i18n!orion/textview/nls/messages","orion/textview/annotations","orion/textview/tooltip","orion/textview/i18nUtil"],function(b,f,a,c){function e(a,c,b,d){this._location=c||"left";this._overview=b||"page";this._rulerStyle=d;this._view=null;var e=this;this._listener={onTextModelChanged:function(a){e._onTextModelChanged(a)},onAnnotationModelChanged:function(a){e._onAnnotationModelChanged(a)}};this.setAnnotationModel(a)}function d(a,c,b,d,g){e.call(this,a,c,"page",b);this._oddStyle=
d||{style:{backgroundColor:"white"}};this._evenStyle=g||{style:{backgroundColor:"white"}};this._numOfDigits=0}function g(a,c,b){e.call(this,a,c,"page",b)}function h(a,c,b){e.call(this,a,c,"document",b)}function j(a,c,b){g.call(this,a,c,b)}e.prototype={getAnnotations:function(a,c){var b=this._annotationModel;if(!b)return[];var d=this._view.getModel(),e=d.getLineStart(a),g=d.getLineEnd(c-1),h=d;d.getBaseModel&&(h=d.getBaseModel(),e=d.mapOffset(e),g=d.mapOffset(g));for(var f=[],b=this.getAnnotationsByType(b,
e,g),e=0;e<b.length;e++)for(var g=b[e],j=h.getLineAtOffset(g.start),t=h.getLineAtOffset(Math.max(g.start,g.end-1)),s=j;s<=t;s++){var u=s;if(d!==h){u=h.getLineStart(s);u=d.mapOffset(u,!0);if(u===-1)continue;u=d.getLineAtOffset(u)}if(a<=u&&u<c){var w=this._mergeAnnotation(f[u],g,s-j,t-j+1);w&&(f[u]=w)}}if(!this._multiAnnotation&&this._multiAnnotationOverlay)for(var v in f)f[v]._multiple&&(f[v].html+=this._multiAnnotationOverlay.html);return f},getAnnotationModel:function(){return this._annotationModel},
getLocation:function(){return this._location},getOverview:function(){return this._overview},getRulerStyle:function(){return this._rulerStyle},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(c,b){var d=a.Tooltip.getTooltip(this._view);if(d&&!(d.isVisible()&&this._tooltipLineIndex===c)){this._tooltipLineIndex=
c;var e=this;d.setTarget({y:b.clientY,getTooltipInfo:function(){return e._getTooltipInfo(e._tooltipLineIndex,this.y)}})}},onMouseOver:function(a,c){this.onMouseMove(a,c)},onMouseOut:function(){var c=a.Tooltip.getTooltip(this._view);c&&c.setTarget(null)},_getTooltipInfo:function(a,c){if(a!==void 0){var b=this._view,d=b.getModel(),e=this._annotationModel,g=[];if(e){var g=d.getLineStart(a),h=d.getLineEnd(a);d.getBaseModel&&(g=d.mapOffset(g),h=d.mapOffset(h));g=this.getAnnotationsByType(e,g,h)}e=this._getTooltipContents(a,
g);if(!e)return null;e={contents:e,anchor:this.getLocation()};g=b.getClientArea();g.y=this.getOverview()==="document"?b.convert({y:c},"view","document").y:b.getLocationAtOffset(d.getLineStart(a)).y;b.convert(g,"document","page");e.x=g.x;e.y=g.y;e.anchor==="right"&&(e.x+=g.width);return e}},_getTooltipContents:function(a,c){return c},_onAnnotationModelChanged:function(a){function c(a){for(var g=0;g<a.length;g++)if(e.isAnnotationTypeVisible(a[g].type)){var h=a[g].start,f=a[g].end;d.getBaseModel&&(h=
d.mapOffset(h,!0),f=d.mapOffset(f,!0));h!==-1&&f!==-1&&b.redrawLines(d.getLineAtOffset(h),d.getLineAtOffset(Math.max(h,f-1))+1,e)}}var b=this._view;if(b){var d=b.getModel(),e=this,g=d.getLineCount();a.textModelChangedEvent?(a=a.textModelChangedEvent.start,d.getBaseModel&&(a=d.mapOffset(a,!0)),a=d.getLineAtOffset(a),b.redrawLines(a,g,e)):(c(a.added),c(a.removed),c(a.changed))}},_mergeAnnotation:function(a,c,b){a||(a={});if(b===0)if(a.html&&c.html){if(c.html!==a.html&&!a._multiple&&this._multiAnnotation)a.html=
this._multiAnnotation.html;a._multiple=!0}else a.html=c.html;a.style=this._mergeStyle(a.style,c.style);return a},_mergeStyle:function(a,c){if(c){a||(a={});a.styleClass&&c.styleClass&&a.styleClass!==c.styleClass?a.styleClass+=" "+c.styleClass:a.styleClass=c.styleClass;var b;if(c.style){if(!a.style)a.style={};for(b in c.style)a.style[b]||(a.style[b]=c.style[b])}if(c.attributes){if(!a.attributes)a.attributes={};for(b in c.attributes)a.attributes[b]||(a.attributes[b]=c.attributes[b])}}return a}};f.AnnotationTypeList.addMixin(e.prototype);
d.prototype=new e;d.prototype.getAnnotations=function(a,c){for(var b=e.prototype.getAnnotations.call(this,a,c),d=this._view.getModel(),g=a;g<c;g++){var h=g&1?this._oddStyle:this._evenStyle,f=g;d.getBaseModel&&(f=d.getLineStart(f),f=d.getBaseModel().getLineAtOffset(d.mapOffset(f)));b[g]||(b[g]={});b[g].html=f+1+"";if(!b[g].style)b[g].style=h}return b};d.prototype.getWidestAnnotation=function(){var a=this._view.getModel().getLineCount();return this.getAnnotations(a-1,a)[a-1]};d.prototype._onTextModelChanged=
function(a){var a=a.start,c=this._view.getModel(),b=((c.getBaseModel?c.getBaseModel().getLineCount():c.getLineCount())+"").length;if(this._numOfDigits!==b)this._numOfDigits=b,this._view.redrawLines(c.getLineAtOffset(a),c.getLineCount(),this)};g.prototype=new e;h.prototype=new e;h.prototype.getRulerStyle=function(){var a={style:{lineHeight:"1px",fontSize:"1px"}};return a=this._mergeStyle(a,this._rulerStyle)};h.prototype.onClick=function(a){a!==void 0&&this._view.setTopIndex(a)};h.prototype._getTooltipContents=
function(a,d){if(d.length===0){var g=this._view.getModel(),h=a;g.getBaseModel&&(h=g.getLineStart(h),h=g.getBaseModel().getLineAtOffset(g.mapOffset(h)));return c.formatMessage(b.line,h+1)}return e.prototype._getTooltipContents.call(this,a,d)};h.prototype._mergeAnnotation=function(a,c,b,d){if(b===0){if(!a)a={html:"&nbsp;",style:{style:{height:3*d+"px"}}},a.style=this._mergeStyle(a.style,c.overviewStyle);return a}};j.prototype=new g;j.prototype.onClick=function(c){if(c!==void 0){var b=this._annotationModel;
if(b){var d=this._view.getModel(),e=d.getLineStart(c),c=d.getLineEnd(c,!0);d.getBaseModel&&(e=d.mapOffset(e),c=d.mapOffset(c),d=d.getBaseModel());for(var g,b=b.getAnnotations(e,c);!g&&b.hasNext();)c=b.next(),this.isAnnotationTypeVisible(c.type)&&(g=c);g&&d.getLineAtOffset(g.start)===d.getLineAtOffset(e)&&((d=a.Tooltip.getTooltip(this._view))&&d.setTarget(null),g.expanded?g.collapse():g.expand(),this._annotationModel.modifyAnnotation(g))}}};j.prototype._getTooltipContents=function(a,c){return c.length===
1&&c[0].expanded?null:g.prototype._getTooltipContents.call(this,a,c)};j.prototype._onAnnotationModelChanged=function(a){function c(a){for(h=0;h<a.length;h++)if(e.isAnnotationTypeVisible(a[h].type)){var b=a[h].start;d.getBaseModel&&(b=d.mapOffset(b,!0));b!==-1&&(j=Math.min(j,d.getLineAtOffset(b)))}}if(a.textModelChangedEvent)g.prototype._onAnnotationModelChanged.call(this,a);else{var b=this._view;if(b){var d=b.getModel(),e=this,h,f=d.getLineCount(),j=f;c(a.added);c(a.removed);c(a.changed);a=b.getRulers();
for(h=0;h<a.length;h++)b.redrawLines(j,f,a[h])}}};return{Ruler:e,AnnotationRuler:g,LineNumberRuler:d,OverviewRuler:h,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,f,a,c,e,d,g,h,j){function i(){}function k(){}function l(){}function m(){}function n(){}function o(a,c,b){this.editor=a;this.textView=a.getTextView();this.undoStack=c;this._incrementalFindActive=!1;this._incrementalFindSuccess=
!0;this._incrementalFindIgnoreSelection=!1;this._incrementalFindPrefix="";this._searcher=b;this._lastEditLocation=null;this.init()}function p(a,c,b,d){this.editor=a;this.textView=a.getTextView();this.undoStack=c;this.contentAssist=b;this.linkedMode=d;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 c=!1,b=0,d=0;d<this.linkedModePositions.length;++d){var e=this.linkedModePositions[d];if(c)e.offset+=b;else if(a.start>=e.offset&&a.end<=e.offset+e.length)c=e.length,e.length=a.start-e.offset+a.text.length+(e.offset+e.length-a.end),b=e.length-c,c=!0}c?this.linkedModeEscapePosition+=b:this.cancel()}.bind(this)}}i.prototype={createUndoStack:function(c){var c=c.getTextView(),d=new f.UndoStack(c,200);c.setKeyBinding(new a.KeyBinding("z",
!0),"undo");c.setAction("undo",function(){d.undo();return!0},{name:b.undo});var e=navigator.platform.indexOf("Mac")!==-1;c.setKeyBinding(e?new a.KeyBinding("z",!0,!0):new a.KeyBinding("y",!0),"redo");c.setAction("redo",function(){d.redo();return!0},{name:b.redo});return d}};k.prototype={createLineNumberRuler:function(a){return new c.LineNumberRuler(a,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"})}};l.prototype={createFoldingRuler:function(a){return new c.FoldingRuler(a,
"left",{styleClass:"ruler folding"})}};m.prototype={createAnnotationModel:function(a){return new e.AnnotationModel(a)},createAnnotationStyler:function(a,c){return new e.AnnotationStyler(a,c)},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}}};n.prototype={createTextDND:function(a,c){return new g.TextDND(a.getTextView(),c)}};o.prototype={init:function(){var c=
this;this._incrementalFindListener={onVerify:function(a){var d=c.editor,e=d.getModel(),g=d.mapOffset(a.start),f=d.mapOffset(a.end),g=e.getText(g,f),e=c._incrementalFindPrefix;if((e=e.match(RegExp("^"+h.escape(g),"i")))&&e.length>0)e=c._incrementalFindPrefix+=a.text,c.editor.reportStatus(j.formatMessage(b.incrementalFind,e)),g=d.getSelection().start,(g=d.getModel().find({string:e,start:g,caseInsensitive:e.toLowerCase()===e}).next())?(c._incrementalFindSuccess=!0,c._incrementalFindIgnoreSelection=!0,
d.moveSelection(g.start,g.end),c._incrementalFindIgnoreSelection=!1):(d.reportStatus(j.formatMessage(b.incrementalFindNotFound,e),"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 d;d=0;this._incrementalFindSuccess&&(d=a.getSelection().start+1);(d=a.getModel().find({string:c,start:d,caseInsensitive:c.toLowerCase()===
c}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,a.moveSelection(d.start,d.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 d=a.getModel().find({string:c,start:a.getCaretOffset()-c.length-1,reverse:!0,caseInsensitive:c.toLowerCase()===c}).next();d?(this._incrementalFindIgnoreSelection=
this._incrementalFindSuccess=!0,a.moveSelection(d.start,d.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,c=a.getModel(),b=a.getSelection(),d=c.getLineAtOffset(b.start),e=c.getLineAtOffset(b.end>b.start?b.end-1:b.end);if(d!==e){var g=[];g.push("");for(var h=d;h<=e;h++)g.push(c.getLine(h,!0));var h=c.getLineStart(d),
c=c.getLineEnd(e,!0),f=this.textView.getOptions("tabSize","expandTab"),f=f.expandTab?Array(f.tabSize+1).join(" "):"\t";a.setText(g.join(f),h,c);a.setSelection(h===b.start?b.start:b.start+f.length,b.end+(e-d+1)*f.length);return!0}a=a.getKeyModes();for(b=0;b<a.length;b++)if(a[b].isActive())return a[b].tab();return!1}}.bind(this));this.textView.setAction("shiftTab",function(){if(this.textView.getOptions("tabMode")){for(var a=this.editor,c=a.getModel(),b=a.getSelection(),d=c.getLineAtOffset(b.start),
e=c.getLineAtOffset(b.end>b.start?b.end-1:b.end),g=this.textView.getOptions("tabSize"),h=Array(g+1).join(" "),f=[],i=0,j=0,k=d;k<=e;k++){var l=c.getLine(k,!0);if(c.getLineStart(k)!==c.getLineEnd(k))if(l.indexOf("\t")===0)l=l.substring(1),i++;else if(l.indexOf(h)===0)l=l.substring(g),i+=g;else return!0;k===d&&(j=i);f.push(l)}d=c.getLineStart(d);g=c.getLineEnd(e,!0);c=c.getLineStart(e);a.setText(f.join(""),d,g);a.setSelection(d===b.start?b.start:b.start-j,b.end-i+(b.end===c+1?1:0));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,c=a.getModel(),b=a.getSelection(),d=c.getLineAtOffset(b.start);if(d===0)return!0;var e=c.getLineAtOffset(b.end>b.start?b.end-1:b.end),g=c.getLineCount(),b=c.getLineStart(d-1),h=c.getLineStart(d),f=c.getLineEnd(e,!0),i=c.getText(h,f),j=0;e===g-1&&(e=c.getLineEnd(d-1),d=c.getLineEnd(d-1,!0),i+=c.getText(e,d),h=e,j=d-e);this.startUndo();a.setText("",
h,f);a.setText(i,b,b);a.setSelection(b,b+i.length-j);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,c=a.getModel(),b=a.getSelection(),d=c.getLineAtOffset(b.start),e=c.getLineAtOffset(b.end>b.start?b.end-1:b.end),g=c.getLineCount();if(e===g-1)return!0;var d=c.getLineStart(d),b=c.getLineEnd(e,!0),h=c.getLineEnd(e+1,!0)-(b-d),f=0;e!==g-2?c=c.getText(d,
b):(e=c.getLineEnd(e),c=c.getText(e,b)+c.getText(d,e),f+=b-e);this.startUndo();a.setText("",d,b);a.setText(c,h,h);a.setSelection(h+f,h+f+c.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,c=a.getModel(),b=a.getSelection(),d=c.getLineAtOffset(b.start),b=c.getLineAtOffset(b.end>b.start?b.end-1:b.end),d=c.getLineStart(d),e=c.getLineEnd(b,!0),g=
c.getLineCount(),h="",e=c.getText(d,e);b===g-1&&(e+=h=c.getLineDelimiter());a.setText(e,d,d);a.setSelection(d,d+e.length-h.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,c=a.getModel(),b=a.getSelection(),d=c.getLineAtOffset(b.start),b=c.getLineAtOffset(b.end>b.start?b.end-1:b.end),e=c.getLineStart(d),d=c.getLineEnd(b,!0),g=c.getLineCount(),h="",e=c.getText(e,
d);b===g-1&&(e=(h=c.getLineDelimiter())+e);a.setText(e,d,d);a.setSelection(d+h.length,d+e.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,c=a.getSelection(),b=a.getModel(),d=b.getLineAtOffset(c.start),c=b.getLineAtOffset(c.end>c.start?c.end-1:c.end),d=b.getLineStart(d),b=b.getLineEnd(c,!0);a.setText("",d,b);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,c=a.getAnnotationModel();if(!c)return!0;for(var b=a.getModel(),g=a.getCaretOffset(),c=c.getAnnotations(g,b.getCharCount());c.hasNext();){var h=
c.next();if(!(h.start<=g)&&!(h.type!==e.AnnotationType.ANNOTATION_ERROR&&h.type!==e.AnnotationType.ANNOTATION_WARNING&&h.type!==e.AnnotationType.ANNOTATION_TASK)){var f=d.Tooltip.getTooltip(this.textView);if(!f){a.moveSelection(h.start);break}var i=b.getLineAtOffset(h.start),j=this.textView;a.moveSelection(h.start,h.start,function(){setTimeout(function(){f.setTarget({getTooltipInfo:function(){var a=j.convert({x:j.getLocationAtOffset(h.start).x,y:j.getLocationAtOffset(b.getLineStart(i)).y},"document",
"page");return{contents:[h],x:a.x,y:a.y+Math.floor(j.getLineHeight(i)*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,c=a.getAnnotationModel();if(!c)return!0;for(var b=a.getModel(),g=a.getCaretOffset(),c=c.getAnnotations(0,g),h=null;c.hasNext();){var f=c.next();f.start>=g||f.type!==e.AnnotationType.ANNOTATION_ERROR&&f.type!==e.AnnotationType.ANNOTATION_WARNING&&
f.type!==e.AnnotationType.ANNOTATION_TASK||(h=f)}if(h){var i=b.getLineAtOffset(h.start),j=d.Tooltip.getTooltip(this.textView);if(!j)return a.moveSelection(h.start),!0;var k=this.textView;a.moveSelection(h.start,h.start,function(){setTimeout(function(){j.setTarget({getTooltipInfo:function(){var a=k.convert({x:k.getLocationAtOffset(h.start).x,y:k.getLocationAtOffset(b.getLineStart(i)).y},"document","page");return{contents:[h],x:a.x,y:a.y+Math.floor(k.getLineHeight(i)*1.33)}}},0)},0)})}return!0}.bind(this),
{name:b.prevAnnotation});var g=navigator.platform.indexOf("Mac")!==-1;this.textView.setKeyBinding(new a.KeyBinding("q",!g,!1,!1,g),"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,d=c.getModel(),d=this._incrementalFindSuccess?c.getCaretOffset()-a.length-1:d.getCharCount()-1;(d=c.getModel().find({string:a,start:d,reverse:!0,
caseInsensitive:a.toLowerCase()===a}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,c.moveSelection(d.start,d.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,d=0;this._incrementalFindSuccess&&
(d=c.getSelection().start+1);(d=c.getModel().find({string:a,start:d,caseInsensitive:a.toLowerCase()===a}).next())?(this._incrementalFindIgnoreSelection=this._incrementalFindSuccess=!0,c.moveSelection(d.start,d.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,d){var e=a.getLineAtOffset(b),g=a.getLineAtOffset(d),h,f,i,j,k,l;for(h=e;h>=0;h--)if(f=a.getLine(h),i=h===e?b-a.getLineStart(e):f.length,j=f.lastIndexOf("/*",i),f=f.lastIndexOf("*/",i),f>j)break;else if(j!==-1){k=a.getLineStart(h)+j;break}for(h=g;h<a.getLineCount();h++)if(f=a.getLine(h),i=h===g?d-a.getLineStart(g):0,j=f.indexOf("/*",i),f=f.indexOf("*/",i),j!==
-1&&j<f)break;else if(f!==-1){l=a.getLineStart(h)+f;break}return{commentStart:k,commentEnd:l}}this.textView.setAction("lineStart",function(){for(var a=this.editor,c=a.getModel(),b=a.getCaretOffset(),d=c.getLineAtOffset(b),e=c.getLineStart(d),c=c.getLine(d),d=0;d<c.length;d++){var g=c.charCodeAt(d);if(!(g===32||g===9))break}d+=e;return b!==d?(a.setSelection(d,d),!0):!1}.bind(this));this.textView.setKeyBinding(new a.KeyBinding(191,!0),"toggleLineComment");this.textView.setAction("toggleLineComment",
function(){for(var a=this.editor,c=a.getModel(),b=a.getSelection(),d=c.getLineAtOffset(b.start),e=c.getLineAtOffset(b.end>b.start?b.end-1:b.end),g=!0,h=[],f,i,j=d;j<=e;j++)if(f=c.getLine(j,!0),h.push(f),!g||(i=f.indexOf("//"))===-1)g=!1;else if(i!==0){var k;for(k=0;k<i;k++)if(g=f.charCodeAt(k),!(g===32||g===9))break;g=k===i}j=c.getLineStart(d);k=c.getLineEnd(e,!0);if(g){for(g=0;g<h.length;g++)f=h[g],i=f.indexOf("//"),h[g]=f.substring(0,i)+f.substring(i+2);h=h.join("");f=c.getLineStart(e);c=j===b.start?
b.start:b.start-2;b=b.end-2*(e-d+1)+(b.end===f+1?2:0)}else h.splice(0,0,""),h=h.join("//"),c=j===b.start?b.start:b.start+2,b=b.end+2*(e-d+1);a.setText(h,j,k);a.setSelection(c,b);return!0}.bind(this),{name:b.toggleLineComment});var d=navigator.platform.indexOf("Mac")!==-1;this.textView.setKeyBinding(new a.KeyBinding(191,!0,!d,!1,d),"addBlockComment");this.textView.setAction("addBlockComment",function(){var a=this.editor,b=a.getModel(),d=a.getSelection(),e=RegExp("/\\*|\\*/","g"),g=c(b,d.start,d.end);
if(g.commentStart!==void 0&&g.commentEnd!==void 0)return!0;b=b.getText(d.start,d.end);if(b.length===0)return!0;g=b.length;b=b.replace(e,"");e=b.length;a.setText("/*"+b+"*/",d.start,d.end);a.setSelection(d.start+2,d.end+2+(e-g));return!0}.bind(this),{name:b.addBlockComment});this.textView.setKeyBinding(new a.KeyBinding(220,!0,!d,!1,d),"removeBlockComment");this.textView.setAction("removeBlockComment",function(){var a=this.editor,b=a.getModel(),d=a.getSelection(),e=b.getText(d.start,d.end),g,h,f;for(f=
0;f<e.length;f++)if(e.substring(f,f+2)==="/*"){g=d.start+f;break}for(;f<e.length;f++)if(e.substring(f,f+2)==="*/"){h=d.start+f;break}if(g!==void 0&&h!==void 0)a.setText(b.getText(g+2,h),g,h+2),a.setSelection(g,h);else{e=c(b,d.start,d.end);if(e.commentStart===void 0||e.commentEnd===void 0)return!0;b=b.getText(e.commentStart+2,e.commentEnd);a.setText(b,e.commentStart,e.commentEnd+2);a.setSelection(d.start-2,d.end-2)}return!0}.bind(this),{name:b.removeBlockComment})},contentAssistProposalApplied:function(a){a=
a.data.proposal;if(a.positions&&this.linkedMode){for(var c=[],b=0;b<a.positions.length;++b)c[b]={positions:[{offset:a.positions[b].offset,length:a.positions[b].length}]};this.linkedMode.enterLinkedMode({groups:c,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,c=a.getSelection();if(c.start===c.end){for(var b=a.getModel(),d=b.getLineAtOffset(c.start),e=b.getLine(d,!0),g=b.getLineStart(d),d=0,g=c.start-g,h;d<g&&((h=e.charCodeAt(d))===32||h===9);)d++;if(d>0){for(var f=e.substring(0,d),d=g;d<e.length&&((h=e.charCodeAt(d++))===32||h===9);)c.end++;a.setText(b.getLineDelimiter()+f,c.start,c.end);return!0}}return!1},tab:function(){return!1}};r.prototype={enterLinkedMode:function(c){if(!this.linkedModeActive){this.linkedModeActive=!0;this.linkedModePositions=
[];for(var d=0;d<c.groups.length;++d){var e=c.groups[d];this.linkedModePositions[d]={offset:e.positions[0].offset,length:e.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(){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"),this.textView.setCaretOffset(this.linkedModeEscapePosition,!1),this.editor.reportStatus(b.linkedModeExited,null,!0)},selectTextForLinkedModePosition:function(a){this.textView.setSelection(a.offset,a.offset+a.length)}};return{UndoFactory:i,LineNumberRulerFactory:k,FoldingRulerFactory:l,AnnotationFactory:m,TextDNDFactory:n,TextActions:o,SourceCodeActions:p,LinkedMode:r}});
var JsDiff=function(){function b(a){for(var c=[],b=0;b<a.length;b++)a[b]&&c.push(a[b]);return c}function f(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,c){if(c==a)return[{value:c}];if(!c)return[{value:a,removed:!0}];if(!a)return[{value:c,added:!0}];var c=this.tokenize(c),a=this.tokenize(a),b=c.length,d=a.length,e=b+d,g=[{newPos:-1,components:[]}],f=this.extractCommon(g[0],
c,a,0);if(g[0].newPos+1>=b&&f+1>=d)return g[0].components;for(var o=1;o<=e;o++)for(var p=-1*o;p<=o;p+=2){var r;r=g[p-1];var q=g[p+1],f=(q?q.newPos:0)-p;r&&(g[p-1]=void 0);var t=r&&r.newPos+1<b,s=q&&0<=f&&f<d;if(!t&&!s)g[p]=void 0;else if(!t||s&&r.newPos<q.newPos?(r={newPos:q.newPos,components:q.components.slice(0)},this.pushComponent(r.components,a[f],void 0,!0)):(r={newPos:r.newPos,components:r.components.slice(0)},r.newPos++,this.pushComponent(r.components,c[r.newPos],!0,void 0)),f=this.extractCommon(r,
c,a,p),r.newPos+1>=b&&f+1>=d)return r.components;else g[p]=r}},pushComponent:function(a,c,b,d){var e=a[a.length-1];e&&e.added===b&&e.removed===d?a[a.length-1]={value:this.join(e.value,c),added:b,removed:d}:a.push({value:c,added:b,removed:d})},extractCommon:function(a,c,b,d){for(var e=c.length,g=b.length,f=a.newPos,d=f-d;f+1<e&&d+1<g&&this.equals(c[f+1],b[d+1]);)f++,d++,this.pushComponent(a.components,c[f],void 0,void 0);a.newPos=f;return d},equals:function(a,c){var b=/\S/;return this.ignoreWhitespace&&
!b.test(a)&&!b.test(c)?!0:a==c},join:function(a,c){return a+c},tokenize:function(a){return a}};var c=new a,e=new a(!1);e.tokenize=function(a){return b(a.split(/(\s+|\b)/))};var d=new a(!0);d.tokenize=function(a){return b(a.split(/([{}:;,]|\s+)/))};var g=new a;g.tokenize=function(a){return a.split(/^/m)};return{diffChars:function(a,b){return c.diff(a,b)},diffWords:function(a,c){return e.diff(a,c)},diffLines:function(a,c){return g.diff(a,c)},diffCss:function(a,c){return d.diff(a,c)},createPatch:function(a,
c,b,d,e){var f=[];f.push("Index: "+a);f.push("===================================================================");f.push("--- "+a+"\t"+d);f.push("+++ "+a+"\t"+e);a=g.diff(c,b);a.push({value:"",lines:[]});for(var b=c=0,d=[],n=e=1,o=0;o<a.length;o++){var p=a[o],r=p.lines||p.value.replace(/\n$/,"").split("\n");p.lines=r;if(p.added||p.removed){if(!c){var q=a[o-1],c=e,b=n;q&&(d.push.apply(d,q.lines.slice(-4).map(function(a){return" "+a})),c-=4,b-=4)}d.push.apply(d,r.map(function(a){return(p.added?"+":
"-")+a}));p.added?n+=r.length:e+=r.length}else c&&(r.length<=8&&o<a.length-1?d.push.apply(d,r.map(function(a){return" "+a})):(q=Math.min(r.length,4),f.push("@@ -"+c+","+(e-c+q)+" +"+b+","+(n-b+q)+" @@"),f.push.apply(f,d),f.push.apply(f,r.slice(0,q).map(function(a){return" "+a})),b=c=0,d=[])),e+=r.length,n+=r.length}a.length>1&&!/\n$/.test(a[a.length-2].value)&&f.push("\\ No newline at end of file\n");return f.join("\n")},convertChangesToXML:function(a){for(var c=[],b=0;b<a.length;b++){var d=a[b];
d.added?c.push("<ins>"):d.removed&&c.push("<del>");c.push(f(d.value));d.added?c.push("</ins>"):d.removed&&c.push("</del>")}return c.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 f=f||{};f.JSDiffAdapter=function(){function a(){}a.prototype={adapt:function(a,e){for(var d=a.split("\n"),g=e.split("\n"),h=d[d.length-1]==="",g=g[g.length-1]==="",f=b.diffLines(a,e),i=[],k=[],l=0,m=0,n=-1,o=0,p=!0,r=0;r<f.length;r++){var q=f[r],t=q.lines||q.value.split("\n"),s=t.length,u=0;t.length>1&&t[t.length-1]===""&&s--;s>1&&!p&&t[0]===""&&(s--,u++);q.lines=t;if(!q.added&&!q.removed){if(l||m)i.push([l,m,n]),m=l=0,n=-1,o+=m;
i.push([s,s,0]);o+=s}else if(q.added){n===-1&&(n=k.length+1);l+=s;for(p=u;p<s+u;p++)k.push(q.lines[p])}else m+=s;p=!1;t.length>1&&t[t.length-1]===""&&(p=!0)}if(l||m)i.push([l,m,n]),o+=m;o<d.length&&d.length>1&&(d=i[i.length-1],d[2]===0?(d[0]+=1,d[1]+=1):d[2]===-1?i.push([1,1,0]):h===g?i.push([1,1,0]):(g&&(d[0]+=1),h&&(d[1]+=1)));return{mapper:i,changContents:{array:k,index:0}}},adaptCharDiff:function(a,e,d){for(var a=d?b.diffWords(a,e):b.diffChars(a,e),e=[],g=d=0,h=0,f=0,i=0;i<a.length;i++){var k=
a[i];if(!k.added&&!k.removed){if(h>0||f>0)e.push([g,g+h,d,d+f]),g+=h,d+=f,f=h=0;g+=k.value.length;d+=k.value.length}else k.added?h+=k.value.length:f+=k.value.length}(h>0||f>0)&&e.push([g,g+h,d,d+f]);return e}};return a}();return f});
define("examples/textview/textStyler",["orion/textview/annotations"],function(b){function f(a,c){this.keywords=a;this.whitespacesVisible=c;this.setText("")}function a(){f.call(this,null,!0)}function c(a){f.call(this,null,a)}function e(){f.call(this,null,!1)}function d(b,d,i){this.commentStart="/*";this.commentEnd="*/";var k=[];switch(d){case "java":k=h;break;case "js":k=g;break;case "css":k=j}this.whitespacesVisible=!1;this.detectHyperlinks=!0;this.highlightCaretLine=!1;this.detectTasks=this.foldingEnabled=
!0;this._scanner=new f(k,this.whitespacesVisible);this._firstScanner=new e;this._commentScanner=new c(this.whitespacesVisible);this._whitespaceScanner=new a;if(d==="css")this._scanner.isCSS=!0,this._firstScanner.isCSS=!0;this.view=b;this.annotationModel=i;this._bracketAnnotations=void 0;var l=this;this._listener={onChanged:function(a){l._onModelChanged(a)},onDestroy:function(a){l._onDestroy(a)},onLineStyle:function(a){l._onLineStyle(a)},onSelection:function(a){l._onSelection(a)}};d=b.getModel();d.getBaseModel?
d.getBaseModel().addEventListener("Changed",this._listener.onChanged):b.addEventListener("ModelChanged",this._listener.onChanged);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 g="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(","),
h="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(","),
i={styleClass:"token_singleline_comment"},k={styleClass:"token_multiline_comment"},l={styleClass:"token_doc_comment"},m={styleClass:"token_doc_html_markup"},n={styleClass:"token_task_tag"},o={styleClass:"token_doc_tag"},p={styleClass:"token_string"},r={styleClass:"token_number"},q={styleClass:"token_keyword"},t={styleClass:"token_space"},s={styleClass:"token_tab"},u={styleClass:"line_caret"};f.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 c=this.isCSS,b=this.offset-1;if(48<=a&&a<=57){var d=c=!1,e=!1,g=a;do if(a=this._read(),a===46&&!c)c=!0;else if(a===101&&!d)c=d=!0,a=this._read(),a!==45&&this._unread(a);else if(a===
120&&g===48&&this.offset-b===2)c=d=e=!0;else if(!(48<=a&&a<=57||e&&(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&&c){do a=this._read();while(97<=a&&a<=122||65<=a&&a<=90||a===95||48<=a&&a<=57||45===a&&c);this._unread(a);a=this.keywords;if(a.length>0){b=this.text.substring(b,this.offset);for(c=0;c<a.length;c++)if(this.keywords[c]===b)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(),c;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();c=7;for(a===42&&(c=8);;){for(;a===42;)if(a=this._read(),a===47)return c;if(a===-1)return this._unread(a),c;a=this._read()}}this._unread(a);return 1;case 39:for(c=4;;)switch(a=this._read(),a){case 39:return c;
case 13:case 10:case -1:return this._unread(a),c;case 92:switch(a=this._read(),a){case 10:c=5;break;case 13:c=5,a=this._read(),a!==10&&this._unread(a)}}break;case 34:for(c=4;;)switch(a=this._read(),a){case 34:return c;case 13:case 10:case -1:return this._unread(a),c;case 92:switch(a=this._read(),a){case 10:c=5;break;case 13:c=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 f(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 f(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}}};e.prototype=new f(null);e.prototype._default=function(a){for(;;)switch(a=this._read(),a){case 47:case 34:case 39:case -1:return this._unread(a),1}};d.prototype={getClassNameForToken:function(a){switch(a){case "singleLineComment":return i.styleClass;case "multiLineComment":return k.styleClass;case "docComment":return l.styleClass;case "docHtmlComment":return m.styleClass;case "tasktag":return n.styleClass;case "doctag":return o.styleClass;
case "string":return p.styleClass;case "number":return r.styleClass;case "keyword":return q.styleClass;case "space":return t.styleClass;case "tab":return s.styleClass;case "caretLine":return u.styleClass}return null},destroy:function(){var a=this.view;if(a){var c=a.getModel();c.getBaseModel?c.getBaseModel().removeEventListener("Changed",this._listener.onChanged):a.removeEventListener("ModelChanged",this._listener.onChanged);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,c,b,d,e){var g;
d===void 0&&(d=-1);if(e===void 0)e=a.length;for(;e-d>1;)if(g=Math.floor((e+d)/2),c<=a[g].start)e=g;else if(b&&c<a[g].end){e=g;break}else d=g;return e},_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 d=[],e=a.getBaseModel(),
g=this.comments,h=0;h<g.length;h++){var f=g[h];(f=this._createFoldingAnnotation(a,e,f.start,f.end))&&d.push(f)}c.replaceAnnotations(null,d)}}}},_createFoldingAnnotation:function(a,c,d,e){var g=c.getLineAtOffset(d),c=c.getLineAtOffset(e);return g===c?null:new (b.AnnotationType.getType(b.AnnotationType.ANNOTATION_FOLDING))(d,e,a)},_computeTasks:function(a,c,d){if(this.detectTasks){var e=this.annotationModel;if(e){var g=this.view.getModel(),h=g;g.getBaseModel&&(h=g.getBaseModel());for(var f=e.getAnnotations(c,
d),g=[],i=b.AnnotationType.ANNOTATION_TASK;f.hasNext();){var j=f.next();j.type===i&&g.push(j)}f=[];j=this._commentScanner;j.setText(h.getText(c,d));for(var k;k=j.nextToken();){var l=j.getStartOffset()+c;k===14&&(k=h.getLineEnd(h.getLineAtOffset(l)),a!==6&&(k=Math.min(k,d-this.commentEnd.length)),f.push(b.AnnotationType.createAnnotation(i,l,k,h.getText(l,k))))}e.replaceAnnotations(g,f)}}},_getLineStyle:function(a){if(this.highlightCaretLine){var c=this.view,b=c.getModel(),c=c.getSelection();if(c.start===
c.end&&b.getLineAtOffset(c.start)===a)return u}return null},_getStyles:function(a,c,b){a.getBaseModel&&(b=a.mapOffset(b));for(var d=b+c.length,e=[],g=b,h=this.comments,f=this._binarySearch(h,b,!0);f<h.length;f++){if(h[f].start>=d)break;var i=h[f].start,j=h[f].end;g<i&&this._parse(c.substring(g-b,i-b),g,e);var m=h[f].type,n;switch(m){case 8:n=l;break;case 7:n=k;break;case 5:n=p}g=Math.max(g,i);i=Math.min(d,j);(m===8||m===7)&&(this.whitespacesVisible||this.detectHyperlinks)?this._parseComment(c.substring(g-
b,i-b),g,e,n,m):m===5&&this.whitespacesVisible?this._parseString(c.substring(g-b,i-b),g,e,p):e.push({start:g,end:i,style:n});g=j}g<d&&this._parse(c.substring(g-b,d-b),g,e);if(a.getBaseModel)for(c=0;c<e.length;c++)b=e[c].end-e[c].start,e[c].start=a.mapOffset(e[c].start,!0),e[c].end=e[c].start+b;return e},_parse:function(a,c,b){var d=this._scanner;for(d.setText(a);a=d.nextToken();){var e=d.getStartOffset()+c,g=null;switch(a){case 2:g=q;break;case 3:g=r;break;case 5:case 4:if(this.whitespacesVisible){this._parseString(d.getData(),
e,b,p);continue}else g=p;break;case 8:this._parseComment(d.getData(),e,b,l,a);continue;case 6:this._parseComment(d.getData(),e,b,i,a);continue;case 7:this._parseComment(d.getData(),e,b,k,a);continue;case 10:this.whitespacesVisible&&(g=s);break;case 11:this.whitespacesVisible&&(g=t)}b.push({start:e,end:d.getOffset()+c,style:g})}},_parseComment:function(a,c,b,d,e){var g=this._commentScanner;g.setText(a);for(g.setType(e);a=g.nextToken();){var e=g.getStartOffset()+c,h=d;switch(a){case 10:this.whitespacesVisible&&
(h=s);break;case 11:this.whitespacesVisible&&(h=t);break;case 12:h=m;break;case 13:h=o;break;case 14:h=n;break;default:this.detectHyperlinks&&(h=this._detectHyperlinks(g.getData(),e,b,h))}h&&b.push({start:e,end:g.getOffset()+c,style:h})}},_parseString:function(a,c,b,d){var e=this._whitespaceScanner;for(e.setText(a);a=e.nextToken();){var g=e.getStartOffset()+c,h=d;switch(a){case 10:this.whitespacesVisible&&(h=s);break;case 11:this.whitespacesVisible&&(h=t)}h&&b.push({start:g,end:e.getOffset()+c,style:h})}},
_detectHyperlinks:function(a,c,b,d){var e=null,g;if((g=a.indexOf("://"))>0){for(var e=a,h=g;h>0;){g=e.charCodeAt(h-1);if(!(97<=g&&g<=122||65<=g&&g<=90||45===g||48<=g&&g<=57))break;h--}if(h>0&&(g="\"\"''(){}[]<>".indexOf(e.substring(h-1,h)),g!==-1&&(g&1)===0&&(g=e.lastIndexOf("\"\"''(){}[]<>".substring(g+1,g+2)))!==-1)){var f=g;g=this._clone(d);g.tagName="A";g.attributes={href:e.substring(h,f)};b.push({start:c,end:c+h,style:d});b.push({start:c+h,end:c+f,style:g});b.push({start:c+f,end:c+a.length,style:d});
return null}}else a.toLowerCase().indexOf("bug#")===0&&(e="https://bugs.eclipse.org/bugs/show_bug.cgi?id="+parseInt(a.substring(4),10));return e?(g=this._clone(d),g.tagName="A",g.attributes={href:e},g):d},_clone:function(a){if(!a)return a;var c={},b;for(b in a)a.hasOwnProperty(b)&&(c[b]=a[b]);return c},_findComments:function(a,c){var c=c||0,b=this._firstScanner,d;b.setText(a);for(var e=[];d=b.nextToken();)(d===7||d===8||d===5)&&e.push({start:b.getStartOffset()+c,end:b.getOffset()+c,type:d}),(d===
6||d===7||d===8)&&this._computeTasks(d,b.getStartOffset()+c,b.getOffset()+c);return e},_findMatchingBracket:function(a,c){var b="{}()[]<>",d=a.getText(c,c+1),e=b.indexOf(d,0);if(e===-1)return-1;var g;g=e&1?b.substring(e-1,e):b.substring(e+1,e+2);for(var h=a.getLineAtOffset(c),b=a.getLine(h),f=a.getLineStart(h),i=a.getLineEnd(h),b=this._findBrackets(d,g,b,f,f,i),i=0;i<b.length;i++)if(f=b[i]>=0?1:-1,b[i]*f===c){var j=1;if(e&1){for(i--;i>=0;i--)if(f=b[i]>=0?1:-1,j+=f,j===0)return b[i]*f;for(h-=1;h>=
0;){b=a.getLine(h);f=a.getLineStart(h);i=a.getLineEnd(h);b=this._findBrackets(d,g,b,f,f,i);for(e=b.length-1;e>=0;e--)if(f=b[e]>=0?1:-1,j+=f,j===0)return b[e]*f;h--}}else{for(i++;i<b.length;i++)if(f=b[i]>=0?1:-1,j+=f,j===0)return b[i]*f;h+=1;for(e=a.getLineCount();h<e;){b=a.getLine(h);f=a.getLineStart(h);i=a.getLineEnd(h);b=this._findBrackets(d,g,b,f,f,i);for(i=0;i<b.length;i++)if(f=b[i]>=0?1:-1,j+=f,j===0)return b[i]*f;h++}}break}return-1},_findBrackets:function(a,c,b,d,e,g){for(var h=[],a=a.charCodeAt(0),
c=c.charCodeAt(0),f=e,i=this._scanner,j,k=this.comments,l=this._binarySearch(k,e,!0);l<k.length;l++){if(k[l].start>=g)break;j=k[l].start;var m=k[l].end;if(f<j)for(i.setText(b.substring(f-e,j-e));j=i.nextToken();)j===a?h.push(i.getStartOffset()+f-e+d):j===c&&h.push(-(i.getStartOffset()+f-e+d));f=m}if(f<g)for(i.setText(b.substring(f-e,g-e));j=i.nextToken();)j===a?h.push(i.getStartOffset()+f-e+d):j===c&&h.push(-(i.getStartOffset()+f-e+d));return h},_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,d=a.newValue,e=this.view,a=e.getModel(),g;if(this.highlightCaretLine){var h=a.getLineAtOffset(c.start);g=a.getLineAtOffset(d.start);var f=d.start===d.end,c=c.start===c.end;h===g&&c&&f||(c&&e.redrawLines(h,h+1),(h!==g||!c)&&f&&e.redrawLines(g,g+1))}if(this.annotationModel){var c=this._bracketAnnotations,i,j;if(d.start===d.end&&(j=e.getCaretOffset())>
0)j-=1,a.getBaseModel&&(j=a.mapOffset(j),a=a.getBaseModel()),a=this._findMatchingBracket(a,j),a!==-1&&(i=[b.AnnotationType.createAnnotation(b.AnnotationType.ANNOTATION_MATCHING_BRACKET,a,a+1),b.AnnotationType.createAnnotation(b.AnnotationType.ANNOTATION_CURRENT_BRACKET,j,j+1)]);this._bracketAnnotations=i;this.annotationModel.replaceAnnotations(c,i)}},_onModelChanged:function(a){var c=a.start,d=a.removedCharCount,e=a.addedCharCount-d,g=this.view,a=g.getModel(),h=a.getBaseModel?a.getBaseModel():a,d=
c+d,f=h.getCharCount(),i=this.comments.length,j=h.getLineStart(h.getLineAtOffset(c)),k=this._binarySearch(this.comments,j,!0),l=this._binarySearch(this.comments,d,!1,k-1,i);k<i&&this.comments[k].start<=j&&j<this.comments[k].end?(j=this.comments[k].start,j>c&&(j+=e)):j=k===i&&i>0&&f-e===this.comments[i-1].end?this.comments[i-1].start:j;var m;l<i?(m=this.comments[l].end,m>c&&(m+=e),l+=1):(l=i,m=f);for(var n,f=this._findComments(h.getText(j,m),j),i=k;i<this.comments.length;i++)n=this.comments[i],n.start>
c&&(n.start+=e),n.start>c&&(n.end+=e);var s=l-k!==f.length;if(!s)for(i=0;i<f.length;i++){n=this.comments[k+i];var o=f[i];if(n.start!==o.start||n.end!==o.end||n.type!==o.type){s=!0;break}}i=[k,l-k].concat(f);Array.prototype.splice.apply(this.comments,i);s&&(i=j,n=m,a!==h&&(i=a.mapOffset(i,!0),n=a.mapOffset(n,!0)),g.redrawRange(i,n));if(this.foldingEnabled&&h!==a&&this.annotationModel){g=this.annotationModel;k=g.getAnnotations(j,m);j=[];for(m=[];k.hasNext();)if(n=k.next(),n.type===b.AnnotationType.ANNOTATION_FOLDING){m.push(n);
for(i=0;i<f.length;i++)if(n.start===f[i].start&&n.end===f[i].end)break;i===f.length?(j.push(n),n.expand()):(i=n.start,l=n.end,i>c&&(i-=e),l>c&&(l-=e),i<=c&&c<l&&i<=d&&d<l&&(i=h.getLineAtOffset(n.start),l=h.getLineAtOffset(n.end),i!==l?n.expanded||(n.expand(),g.modifyAnnotation(n)):g.removeAnnotation(n)))}c=[];for(i=0;i<f.length;i++){n=f[i];for(e=0;e<m.length;e++)if(m[e].start===n.start&&m[e].end===n.end)break;e===m.length&&(n=this._createFoldingAnnotation(a,h,n.start,n.end))&&c.push(n)}g.replaceAnnotations(j,
c)}}};return{TextStyler:d}});
define("orion/editor/textMateStyler",["orion/editor/regex"],function(b){function f(a,b,d){this.initialize(a);this.grammar=this.clone(b);this.externalGrammars=d?this.clone(d):[];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(c){function b(a,
c){throw Error('Unsupported regex feature "'+a+'": "'+c[0]+'" at index: '+c.index+" in "+c.input);}var d="",g,c=a.processGlobalFlag("x",c,function(a){for(var c="",b=!1,d=a.length,e=0;e<d;){var g=a.charAt(e);if(!b&&g==="#")for(;e<d&&g!=="\r"&&g!=="\n";)g=a.charAt(++e);else if(!b&&/\s/.test(g))for(;e<d&&/\s/.test(g);)g=a.charAt(++e);else g==="\\"?(c+=g,/\s/.test(a.charAt(e+1))||(c+=a.charAt(e+1),e+=1)):(g==="["?b=!0:g==="]"&&(b=!1),c+=g),e+=1}return c}),c=a.processGlobalFlag("i",c,function(a){d+="i";
return a});for(g=0;g<this.unsupported.length;g++){var h;(h=this.unsupported[g].regex.exec(c))&&b(this.unsupported[g].func(h),h)}return RegExp(c,d)},processGlobalFlag:function(a,b,d){function g(a,c){for(var b=0,d=a.length,e=-1,g=c;g<d&&e===-1;g++)switch(a.charAt(g)){case "\\":g++;break;case "(":b++;break;case ")":b--,b===0&&(e=g)}return e}var h="(?"+a+")",a="(?"+a+":";if(b.substring(0,h.length)===h)return d(b.substring(h.length));else if(b.substring(0,a.length)===a){h=g(b,0);if(h<b.length-1)throw Error("Only a "+
a+") group that encloses the entire regex is supported in: "+b);return d(b.substring(a.length,h))}return b},hasBackReference:function(a){return/\\\d+/.test(a.source)},getSubstitutedRegex:function(a,e,d){for(var d=typeof d==="undefined"?!0:!1,a=a.source.split(/(\\\d+)/g),g=[],h=0;h<a.length;h++){var f=a[h],i=/\\(\d+)/.exec(f);i?(f=e[i[1]]||"",g.push(d?b.escape(f):f)):g.push(f)}return RegExp(g.join(""))},groupify:function(a,b){for(var d=a.source,g=d.length,h=[],f=0,i=[],k=1,l=1,m=[],n={},o={},p=0;p<
g;p++){var r=h[h.length-1],q=d.charAt(p);switch(q){case "(":if(r===4)h.pop(),m.push(")"),i[i.length-1].end=p;var t=p+2<g?d.charAt(p+1)+""+d.charAt(p+2):null;if(t==="?:"||t==="?="||t==="?!"){var s;t==="?:"?s=1:(s=3,f++);h.push(s);i.push({start:p,end:-1,type:s});m.push(q);m.push(t);p+=t.length}else h.push(2),i.push({start:p,end:-1,type:2,oldNum:k,num:l}),m.push(q),f===0&&(o[l]=null),n[k]=l,k++,l++;break;case ")":r=h.pop();r===3&&f--;i[i.length-1].end=p;m.push(q);break;case "*":case "+":case "?":case "}":var u=
q,w=d.charAt(p-1),t=p-1;if(q==="}"){for(s=p-1;d.charAt(s)!=="{"&&s>=0;s--);w=d.charAt(s-1);t=s-1;u=d.substring(s,p+1)}s=i[i.length-1];if(w===")"&&(s.type===2||s.type===4)){m.splice(s.start,0,"(");m.push(u);m.push(")");q={start:s.start,end:m.length-1,type:4,num:s.num};for(w=0;w<i.length;w++)if(r=i[w],(r.type===2||r.type===4)&&r.start>=s.start&&r.end<=t)if(r.start+=1,r.end+=1,r.num+=1,r.type===2)n[r.oldNum]=r.num;i.push(q);l++;break}default:q!=="|"&&r!==2&&r!==4&&f===0&&(h.push(4),i.push({start:p,end:-1,
type:4,num:l}),m.push("("),o[l]=null,l++),m.push(q),q==="\\"&&(q=d.charAt(p+1),m.push(q),p+=1)}}for(;h.length;)h.pop(),m.push(")");var d=RegExp(m.join("")),g={},b=b||n,v;for(v in b)b.hasOwnProperty(v)&&(g[v]="\\"+b[v]);d=this.getSubstitutedRegex(d,g,!1);return[d,n,o]},complexCaptures:function(a){if(!a)return!1;for(var b in a)if(a.hasOwnProperty(b)&&b!=="0")return!0;return!1}};f.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 e(a){var b;if(a instanceof Array){b=Array(a.length);for(var h=0;h<a.length;h++)b[h]=e(a[h])}else for(h in b={},a)if(Object.prototype.hasOwnProperty.call(a,h)){var f=a[h];b[h]=typeof f==="object"&&f!==null?e(f):f}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 g=0;g<b.patterns.length;g++)a.push(b.patterns[g])}},addStyles:function(a){if(a&&!this._styles[a]){this._styles[a]=[];for(var b=a.split("."),g=0;g<b.length;g++)this._styles[a].push(b.slice(0,g+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(d){this.rule=d;this.beginRegex=a.toRegExp(d.begin);this.endRegex=a.toRegExp(d.end);this.subrules=d.patterns||[];this.endRegexHasBackRef=a.hasBackReference(this.endRegex);var e=a.complexCaptures(d.captures),d=a.complexCaptures(d.beginCaptures)||a.complexCaptures(d.endCaptures);if(this.isComplex=e||d)e=a.groupify(this.beginRegex),
this.beginRegex=e[0],this.beginOld2New=e[1],this.beginConsuming=e[2],e=a.groupify(this.endRegex,this.beginOld2New),this.endRegex=e[0],this.endOld2New=e[1],this.endConsuming=e[2]}b.prototype.valueOf=function(){return this.beginRegex};return b}(),MatchRule:function(){function b(d){this.rule=d;this.matchRegex=a.toRegExp(d.match);if(this.isComplex=a.complexCaptures(d.captures))d=a.groupify(this.matchRegex),this.matchRegex=d[0],this.matchOld2New=d[1],this.matchConsuming=d[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 g=0;g<this.externalGrammars.length;g++){var h=this.externalGrammars[g];if(h.scopeName===a){this.preprocess(h);b=this._allGrammars[a]=h;break}}}return b},ContainerNode:function(){function a(b,e){this.parent=b;this.rule=e;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(d,e,h){this.parent=d;this.rule=e;this.children=[];this.setStart(h);this.endMatch=this.end=null;this.endRegexSubstituted=e.endRegexHasBackRef?a.getSubstitutedRegex(e.endRegex,h):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 g=b.length;g>0;)a.push(b[--g])},exec:function(a,b,g){(b=a.exec(b))&&(b.index+=g);
a.lastIndex=0;return b},afterMatch:function(a){return a.index+a[0].length},getEndMatch:function(a,b,g){if(a instanceof this.BeginEndNode){var h=a.rule,a=a.endRegexSubstituted||h.endRegex;return!a?null:this.exec(a,b,g)}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,g=a.removedCharCount,a=a.start;if(this._tree){var h=this.textView.getModel(),
f=h.getCharCount(),h=h.getLineEnd(h.getLineAtOffset(a)-1),i=this.getFirstDamaged(h,h),h=h===-1?0:h,b=i?this.parse(i,!0,h,a,b,g):f;this.textView.redrawRange(h,b)}else this.initialParse()},getFirstDamaged:function(a,b){if(a<0)return this._tree;for(var g=[this._tree],h=null;g.length;){var f=g.pop();if(!f.parent||this.isDamaged(f,a,b)){f instanceof this.BeginEndNode&&(h=f);for(var i=0;i<f.children.length;i++)g.push(f.children[i])}}return h||this._tree},isDamaged:function(a,b,g){return a.start<=g&&a.end>
b},parse:function(a,b,g,h,f,i){var k=this.textView.getModel(),l=k.getLineStart(k.getLineCount()-1),m=k.getCharCount(),n=this.getInitialExpected(a,g),o=-1;if(b)a.repaired=!0,a.endNeedsUpdate=!0,o=(o=a.children[a.children.length-1])?k.getLineEnd(k.getLineAtOffset(o.end+(f-i))):-1,h=k.getLineEnd(k.getLineAtOffset(h+i)),o=Math.max(o,h);for(var o=o===-1?m:o,h=n,p=a,r=!1,q=g,t=-1;p&&(!b||q<o);){var s=this.getNextMatch(k,p,q);s||(q=q>=l?m:k.getLineStart(k.getLineAtOffset(q)+1));var u=s&&s.match,w=s&&s.rule,
v=s&&s.isEnd;if(s&&s.isSub){if(q=this.afterMatch(u),w instanceof this.BeginEndRule)r=!0,b&&w===h.rule&&p===h.parent?(p=h,p.setStart(u),p.repaired=!0,p.endNeedsUpdate=!0,h=this.getNextExpected(h,"begin")):(b&&(this.prune(p,h),b=!1),u=new this.BeginEndNode(p,w,u),p.addChild(u),p=u)}else if(v||q===m){if(p instanceof this.BeginEndNode)u?(r=!0,t=Math.max(t,p.end),p.setEnd(u),q=this.afterMatch(u),b&&p===h&&p.parent===h.parent?(p.repaired=!0,delete p.endNeedsUpdate,h=this.getNextExpected(h,"end")):b&&(this.prune(p,
h),b=!1)):(p.setEnd(m),delete p.endNeedsUpdate);p=p.parent}b&&q>=o&&!r&&(this.prune(a,n),b=!1)}this.removeUnrepairedChildren(a,b,g);this.cleanup(b,a,g,o,m,f,i);return b?Math.max(t,q):q},removeUnrepairedChildren:function(a,b,g){if(b){for(var b=a.children,h=-1,f=0;f<b.length;f++){var i=b[f];if(!i.repaired&&this.isDamaged(i,g,Number.MAX_VALUE)){h=f;break}}if(h!==-1)a.children.length=h}},cleanup:function(a,b,g,h,f,i,k){if(a){a=i-k;f=this.getIntersecting(h-a+1,f);b=this.getIntersecting(g,h);for(g=0;g<
f.length;g++)h=f[g],!h.repaired&&h instanceof this.BeginEndNode&&(h.shiftEnd(a),h.shiftStart(a));for(g=0;g<b.length;g++)h=b[g],h.repaired&&h.endNeedsUpdate&&h.shiftEnd(a),delete h.endNeedsUpdate,delete h.repaired}else{b=this.getIntersecting(g,h);for(g=0;g<b.length;g++)delete b[g].repaired}},getNextMatch:function(a,b,g,f){var j=a.getLineAtOffset(g),j=a.getLineEnd(j),i=a.getText(g,j),k=[],l=[],a=[],j=[];for(this.push(k,b.rule.subrules);k.length;){var m=k.length?k.pop():null,m=m&&m._resolvedRule._typedRule;
if(m instanceof this.ContainerRule&&l.indexOf(m)===-1)l.push(m),this.push(k,m.subrules);else if(!m||!f||m.matchRegex){var n=m&&this.exec(m.matchRegex||m.beginRegex,i,g);n&&(a.push(n),j.push(m))}}k=Number.MAX_VALUE;l=-1;for(m=0;m<a.length;m++)if(n=a[m],n.index<k)k=n.index,l=m;if(!f&&(g=this.getEndMatch(b,i,g)))if(f=b.rule.applyEndPatternLast,l===-1||g.index<k||!f&&g.index===k)return{isEnd:!0,rule:b.rule,match:g};return l===-1?null:{isSub:!0,rule:j[l],match:a[l]}},getInitialExpected:function(a,b){var g,
f;if(a===this._tree)for(g=0;g<a.children.length;g++){if(f=a.children[g],f.start>=b)return f}else if(a instanceof this.BeginEndNode&&a.endMatch){var j=a.endMatch.index;for(g=0;g<a.children.length;g++)if(f=a.children[g],f.start>=b)break;if(f&&f.start<j)return f}return a},getNextExpected:function(a,b){if(b==="begin"){var g=a.children[0];return g?g:a}else if(b==="end"&&(g=a.parent)){var f=g.children[g.children.indexOf(a)+1];return f?f:g}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,g=this.textView.getModel(),f=g.getLineEnd(a.lineIndex),j=g.getLineEnd(g.getLineAtOffset(b)-1),j=this.getFirstDamaged(j,j),b=this.getLineScope(g,j,b,f);a.ranges=this.toStyleRanges(b);a.ranges.sort(function(a,b){return a.start-b.start})},getLineScope:function(a,b,g,f){for(var j=g,
i=this.getInitialExpected(b,g),k=[],l=[];b&&j<f;){var m=this.getNextMatch(a,b,j);if(!m)break;var n=m&&m.match,o=m&&m.rule,p=m&&m.isSub,m=m&&m.isEnd;n.index!==j&&l.push({start:j,end:n.index,node:b});if(p)j=this.afterMatch(n),o instanceof this.BeginEndRule?(this.addBeginScope(k,n,o),b=i,i=this.getNextExpected(i,"begin")):this.addMatchScope(k,n,o);else if(m)j=this.afterMatch(n),this.addEndScope(k,n,o),i=this.getNextExpected(i,"end"),b=b.parent}j<f&&l.push({start:j,end:f,node:b});a=this.getInheritedLineScope(l,
g,f);return k.concat(a)},getInheritedLineScope:function(a){for(var b=[],g=0;g<a.length;g++)for(var f=a[g],j=f.node;j;){var i=j.rule.rule,k=i.name;if(i=i.contentName||k){this.addScopeRange(b,f.start,f.end,i);break}j=j.parent}return b},addBeginScope:function(a,b,g){var f=g.rule;this.addCapturesScope(a,b,f.beginCaptures||f.captures,g.isComplex,g.beginOld2New,g.beginConsuming)},addEndScope:function(a,b,g){var f=g.rule;this.addCapturesScope(a,b,f.endCaptures||f.captures,g.isComplex,g.endOld2New,g.endConsuming)},
addMatchScope:function(a,b,g){var f=g.rule,j=f.name;(f=f.captures)?this.addCapturesScope(a,b,f,g.isComplex,g.matchOld2New,g.matchConsuming):this.addScope(a,b,j)},addScope:function(a,b,g){g&&a.push({start:b.index,end:this.afterMatch(b),scope:g})},addScopeRange:function(a,b,g,f){f&&a.push({start:b,end:g,scope:f})},addCapturesScope:function(a,b,g,f,j,i){if(g)if(f){for(var f={1:0},k=0,l=1;b[l]!==void 0;l++)i[l]!==void 0&&(k+=b[l].length),b[l+1]!==void 0&&(f[l+1]=k);i=b.index;for(k=1;g[k];k++){var l=g[k].name,
m=j[k],n=i+f[m];typeof b[m]!=="undefined"&&this.addScopeRange(a,n,n+b[m].length,l)}}else this.addScope(a,b,g[0]&&g[0].name)},getIntersecting:function(a,b){for(var g=[],f=this._tree?[this._tree]:[];f.length;){var j=f.pop(),i=!1;j instanceof this.ContainerNode?i=!0:this.isDamaged(j,a,b)&&(i=!0,g.push(j));if(i)for(var i=j.children.length,k=0;k<i;k++)f.push(j.children[k])}return g.reverse()},toStyleRanges:function(a){for(var b=[],g=0;g<a.length;g++){var f=a[g],j=this._styles[f.scope];if(!j)throw Error("styles not found for "+
f.scope);j=j.join(" ");b.push({start:f.start,end:f.end,style:{styleClass:j}})}return b}};return{RegexUtil:a,TextMateStyler:f}});
define("orion/editor/asyncStyler",["i18n!orion/editor/nls/messages","orion/textview/annotations"],function(b,f){function a(a){return a.getName()===e&&a.getProperty("type")==="highlighter"}function c(a,c,b){this.initialize(a,c,b);this.lineStyles=[]}var e="orion.edit.highlighter";f.AnnotationType.registerType("orion.annotation.highlightError",{title:b.syntaxError,html:"<div class='annotationHTML error'></div>",rangeStyle:{styleClass:"annotationRange error"}});c.prototype={initialize:function(c,b,f){this.textView=
c;this.serviceRegistry=b;this.annotationModel=f;this.services=[];var j=this;this.listener={onModelChanging:function(a){j.onModelChanging(a)},onModelChanged:function(a){j.onModelChanged(a)},onDestroy:function(a){j.onDestroy(a)},onLineStyle:function(a){j.onLineStyle(a)},onStyleReady:function(a){j.onStyleReady(a)},onServiceAdded:function(a,c){j.onServiceAdded(a,c)},onServiceRemoved:function(a,c){j.onServiceRemoved(a,c)}};c.addEventListener("ModelChanging",this.listener.onModelChanging);c.addEventListener("ModelChanged",
this.listener.onModelChanged);c.addEventListener("Destroy",this.listener.onDestroy);c.addEventListener("LineStyle",this.listener.onLineStyle);b.addEventListener("serviceAdded",this.listener.onServiceAdded);b.addEventListener("serviceRemoved",this.listener.onServiceRemoved);c=b.getServiceReferences(e);for(f=0;f<c.length;f++){var i=c[f];a(i)&&this.addServiceListener(b.getService(i))}},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("serviceAdded",this.listener.onServiceAdded),
this.serviceRegistry.removeEventListener("onServiceRemoved",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 c=this.startLine;(a.addedLineCount||a.removedLineCount)&&Array.prototype.splice.apply(this.lineStyles,[c,a.removedLineCount].concat(this._getEmptyStyle(a.addedLineCount)))},onStyleReady:function(a){var c=a.lineStyles||a.style,
a=Number.MAX_VALUE,b=-1,e=this.textView.getModel(),i;for(i in c)c.hasOwnProperty(i)&&(this.lineStyles[i]=c[i],a=Math.min(a,i),b=Math.max(b,i));a=Math.max(a,0);b=Math.min(b,e.getLineCount());if(c=this.annotationModel){for(var k=c.getAnnotations(e.getLineStart(a),e.getLineEnd(b)),l=[];k.hasNext();){var m=k.next();m.type==="orion.annotation.highlightError"&&l.push(m)}k=[];for(m=a;m<=b;m++){i=m;var n=this.lineStyles[i],n=n&&n.errors;i=e.getLineStart(i);if(n)for(var o=0;o<n.length;o++){var p=n[o];k.push(f.AnnotationType.createAnnotation("orion.annotation.highlightError",
p.start+i,p.end+i))}}c.replaceAnnotations(l,k)}this.textView.redrawLines(a,b+1)},onLineStyle:function(a){function c(a,b){for(var d=a.length,e=[],g=0;g<d;g++){var f=a[g];e.push({start:f.start+b,end:f.end+b,style:f.style})}return e}var b=this.lineStyles[a.lineIndex];if(b)if(b.ranges)a.ranges=c(b.ranges,a.lineStart);else if(b.style)a.style=b.style},_getEmptyStyle:function(a){for(var c=[],b=0;b<a;b++)c.push(null);return c},setContentType:function(a){this.contentType=a;if(this.services)for(a=0;a<this.services.length;a++){var c=
this.services[a];c.setContentType&&c.setContentType(this.contentType)}},onServiceAdded:function(c,b){a(c)&&this.addServiceListener(b)},onServiceRemoved:function(a,c){this.services.indexOf(c)!==-1&&this.removeServiceListener(c)},addServiceListener:function(a){a.addEventListener("orion.edit.highlighter.styleReady",this.listener.onStyleReady);this.services.push(a);a.setContentType&&this.contentType&&a.setContentType(this.contentType)},removeServiceListener:function(a){a.removeEventListener("orion.edit.highlighter.styleReady",
this.listener.onStyleReady);a=this.services.indexOf(a);a!==-1&&this.services.splice(a,1)}};return{AsyncStyler:c}});
define("examples/textview/textStylerOptions",["orion/bootstrap"],function(b){function f(c){this._styler=c;this._view=this._styler.view;var e=this;this._listener={onStorage:function(a){e._onStorage(a)}};var d=this;this._view&&b.startup().then(function(c){a=c.preferences;d.preferences=a;d._updateStylesheet(a);d.storageKey=a.listenForChangedSettings(d._listener.onStorage)})}var a;f.prototype={_getSetting:function(a,b,d){for(var g,f=0;f<a.length;f++)if(a[f].label===b)for(var j=0;j<a[f].data.length;j++)if(a[f].data[j].label===
d){g=a[f].data[j].value;break}return g},_getStyleSheet:function(c,b){function d(d,f){var h=l.getClassNameForToken(d);if(h){var i=a.getSetting(c,f,"Color"),j=a.getSetting(c,f,"Weight").toLowerCase();g.push("."+b+" ."+h+" {");g.push("\tcolor: "+i+";");g.push("\tfont-weight: "+j+";");g.push("}")}}var g=[];g.push("");var f=this.preferences.getSetting(c,"Font","Family").toLowerCase(),f=f==="sans serif"?'"Menlo", "Consolas", "Vera Mono", "monospace"':"monospace",j=this.preferences.getSetting(c,"Font","Size"),
i=this.preferences.getSetting(c,"Font","Color"),k=this.preferences.getSetting(c,"Font","Background");g.push("."+b+" {");g.push("\tfont-family: "+f+";");g.push("\tfont-size: "+j+";");g.push("\tcolor: "+i+";");g.push("}");g.push("."+b+" .textview {");g.push("\tbackground-color: "+k+";");g.push("}");g.push("."+b+" .ruler {");g.push("\tbackground-color: "+k+";");g.push("}");var l=this._styler;l.getClassNameForToken&&(d("keyword","Keyword Types"),d("string","String Types"),d("singleLineComment","Comment Types"),
d("multiLineComment","Comment Types"),d("docComment","Comment Types"),d("docHtmlComment","Comment Types"));return g.join("\n")},_onStorage:function(a){a.key===this.storageKey&&this._updateStylesheet(this.preferences)},_updateStylesheet:function(a,b){var d,g=this;a.getPreferences("/settings",2).then(function(a){if(a.get("JavaScript Editor")!==void 0&&(d=JSON.parse(a.get("JavaScript Editor")))){if(g._stylesheet)g._stylesheet.parentNode.removeChild(g._stylesheet),g._stylesheet=null;a=g._stylesheet=document.createElement("STYLE");
a.appendChild(document.createTextNode(g._getStyleSheet(d,"userTheme",b)));(document.getElementsByTagName("HEAD")[0]||document.documentElement).appendChild(a);var a=g._view,c={themeClass:null};a.getOptions(c);var f=c.themeClass;f?((f=f.replace("userTheme",""))&&(f+=" "),f+="userTheme"):f="userTheme";c.themeClass=f;a.setOptions(c);a.update(!0)}})}};return{TextStylerOptions:f}});
define("orion/highlight",["dojo","examples/textview/textStyler","orion/editor/textMateStyler","orion/editor/asyncStyler","examples/textview/textStylerOptions"],function(b,f,a,c,e){function d(d,g,i,k,l,m,n){function o(a,c){var d=a.getProperty("contentType"),e=a.getProperty("fileTypes");if(d)return g.isSomeExtensionOf(i,d).then(function(c){return c?a:null});else if(c&&e&&e.indexOf(c)!==-1)return d=new b.Deferred,d.callback(a),d;return null}var p=function(a){var c=null;switch(a&&a.id){case "application/javascript":case "application/json":c=
new f.TextStyler(k,"js",l);break;case "text/x-java-source":c=new f.TextStyler(k,"java",l);break;case "text/css":c=new f.TextStyler(k,"css",l)}c&&new e.TextStylerOptions(c);return c}(i);if(p)return m=new b.Deferred,m.callback(p),m;for(var p=m&&m.split(".").pop().toLowerCase(),m=d.getServiceReferences("orion.edit.highlighter"),r=[],q=[],t=0;t<m.length;t++){var s=m[t];s.getProperty("type")==="grammar"&&r.push(s.getProperty("grammar"));(s=o(s,p))&&q.push(s)}return(new b.DeferredList(q)).then(function(b){for(var e,
g=b.length-1;g>=0;g--){var f=b[g][1];if(f&&(n||f.getProperty("type")!=="highlighter")){e=f;break}}var j;if(e)if(b=e.getProperty("type"),b==="highlighter")j=new c.AsyncStyler(k,d,l),j.setContentType(i);else if(b==="grammar"||typeof b==="undefined")e=e.getProperty("grammar"),j=new a.TextMateStyler(k,e,r);return j})}function g(a){this.serviceRegistry=a;this.styler=null}g.prototype={setup:function(a,c,b,e,g){g=typeof g==="undefined"?!0:g;if(this.styler)this.styler.destroy&&this.styler.destroy(),this.styler=
null;var f=this;return d(this.serviceRegistry,this.serviceRegistry.getService("orion.core.contenttypes"),a,c,b,e,g).then(function(a){return f.styler=a})},getStyler:function(){return this.styler}};return{createStyler:d,SyntaxHighlighter:g}});
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 c=a.children&&a.children.length>0;this.isExpanded&&c&&(c=this.isExpanded(a));return c},_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 c=this._diveIn(this._cursor);if(!c){if(a&&this._expandable(this._cursor)&&this.forceExpandFunc){var b=this;return this.forceExpandFunc(this._cursor,"first",function(a){mdoel&&b.setCursor(a)})}(c=this._findSibling(this._cursor,!0))&&
this.setCursor(c)}return c},_backward:function(a){var c=this._findSibling(this._cursor,!1);c&&c!==this._cursor.parent&&(c=this._drillToLast(c));if(a&&c&&this._expandable(c)&&this.forceExpandFunc&&c!==this._cursor.parent)return this.forceExpandFunc(c,"last",function(a){mdoel&&that.setCursor(a)});c&&this.setCursor(c);return c},_findSibling:function(a,c){for(var b=this.topLevel(a),d=b?this.firstLevelChildren:a.parent.children,g=0;g<d.length;g++)if(d[g]===a)return g===0&&!c?b?null:a.parent:g===d.length-
1&&c?b?null:this._findSibling(a.parent,c):c?d[g+1]:d[g-1];return null},_inParentChain:function(a,c){for(var b=a.parent;b;){if(b===c)return!0;b=b.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,c,b){this.setCursor(c);var d=[];for(d.push(c);;){if(this.iterate(a))d.push(this.cursor());else break;if(b===
this.cursor())return d}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,c){var b=this.cursor(),d=this._scan(!0,a,c);d||(d=this._scan(!1,a,c));this.setCursor(b);return d},iterate:function(a,c){return a?this._forward(c):this._backward(c)},iterateOnTop:function(a,c){var b=this._findSibling(this._getTopLevelParent(this.cursor()),
a);b?this.setCursor(b):c&&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/compare/compareUtils",["dojo","dijit"],function(b,f){var a=a||{};a.compareUtils=a.compareUtils||{};a.compareUtils.lookUpMapper=function(a,b,d){for(var g=0,f=0;f<a.length;f++){var j=a[f][b];j===0&&(j=1);if(d>=g&&d<g+j)return{mapperIndex:f,startFrom:g};if(f===a.length-1)break;g+=a[f][b]}return{mapperIndex:a.length-1,startFrom:g}};a.compareUtils.lookUpLineIndex=function(a,b,d){if(d===0)return 0;for(var g=0,f=0;f<d;f++)g+=a[f][b];return g};a.compareUtils.updateMapper=function(c,b,d,g,f){if(g!==
f&&(g>0||f>0)){var j=a.compareUtils.lookUpMapper(c,b,d);if(!(j.mapperIndex<0)){if(g>0)for(var i=d-j.startFrom,d=j.mapperIndex;d<c.length;d++){i=c[d][b]-i;if(g<=i){c[d][b]-=g;break}c[d][b]-=i;g-=i;i=0}f>0&&(c[j.mapperIndex][b]+=f)}}};a.compareUtils.overlapMapper=function(a,b,d,g,f){a=d+a[b]-1;a<d&&(a=d);f<g&&(f=g);return a<g||f<d?!1:!0};a.compareUtils.findFirstDiff=function(c,b,d,g){for(var f=0,j=void 0,i=0;i<c.length;i++){if(f>g)break;if(a.compareUtils.overlapMapper(c[i],b,f,d,g)&&(j={mapperIndex:i,
startFrom:f},c[i][2]!==0))break;f+=c[i][b]}return j};a.compareUtils.matchMapper=function(c,b,d,g){if(c.length===0)return d;var f=d+Math.round((g-d)/3),j=a.compareUtils.findFirstDiff(c,b,d,g),i=c[j.mapperIndex][b]===0?j.startFrom:j.startFrom+c[j.mapperIndex][b]-1,k=a.compareUtils.lookUpLineIndex(c,1-b,j.mapperIndex),l=j.startFrom-d;return c[j.mapperIndex][2]===0?k-l:f>=j.startFrom&&f<=i?k-Math.round((g-d)/3):f<j.startFrom?k-l:(c[j.mapperIndex][1-b]===0?k:k+c[j.mapperIndex][1-b]-1)-(i-d)};a.compareUtils.getMapperLineCount=
function(a){for(var b=0,d=0;d<a.length;d++)b+=Math.max(a[d][0],a[d][1]);return b};a.compareUtils.getAnnotationIndex=function(a,b){for(var d=0;d<a.length;d++)if(a[d][0]===b)return d;return-1};a.compareUtils.getAnnotationMapperIndex=function(a,b){return a[b][1]};a.compareUtils.getAnnotationIndexByMapper=function(a,b){for(var d=0;d<a.length;d++)if(a[d][1]===b)return{current:d,prev:d-1,next:d+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,d,g,f,j){for(var i=0;i<b.length;i++){var k=b[i][0],l=d[b[i][1]];if(l[0]>0){for(var m="",n=0;n<l[0];n++)m=m+g[l[2]-1+n].substring(f)+j;k=a.getLineStart(k);a.setText(m,k,k)}}};a.compareUtils.generateCompareHref=function(a,e){var d=require.toUrl("compare/compare.html"),g="",f="";e&&(e.readonly&&(g="?readonly"),e.conflict&&(g===""?g="?conflict":g+="&conflict"),e.block&&e.block>0&&(f=",block="+e.block,e.change&&e.change>0&&(f=f+"&change="+e.change)));
return b.create("a",{href:d+g+"#"+a+f}).href};a.compareUtils.parseCompareHash=function(a){var b={complexURL:a},d=a.indexOf(",block=");if(d>0){b.complexURL=a.substring(0,d);a=a.substring(d+1).split("&");for(d=0;d<a.length;d++){var g=a[d].split("=");if(g.length===2)if(g[0]==="block")b.block=parseInt(g[1]);else if(g[0]==="change")b.change=parseInt(g[1])}}return b};a.compareUtils.destroyDijit=function(a){(a=f.byId(a))&&a.destroyRecursive()};a.compareUtils.getDijitSizeStyle=function(a){return"height:"+
(b.marginBox(a).h+"px")+";width:100%"};return a.compareUtils});
define("orion/compare/diffTreeNavigator",["orion/treeModelIterator","orion/compare/compareUtils","orion/textview/annotations","orion/compare/jsdiffAdapter"],function(b,f,a,c){var e={},d,g,h,j,i,k,l,m,n,o,p,r,q,t,s,u;e.DiffTreeNavigator=function(){function e(a,c,b,d,g,f){this._root={type:"root",children:[]};this._initialized=!1;this.initAll(a,c,b,d,g,f)}d="orion.annotation.diff.addedBlock";g="orion.annotation.diff.currentAddedBlock";h="orion.annotation.diff.deletedBlock";j="orion.annotation.diff.currentDeletedBlock";
i="orion.annotation.diff.blockTop";k="orion.annotation.diff.currentBlockTop";l="orion.annotation.diff.blockConflict";m="orion.annotation.diff.currentBlockConflict";n="orion.annotation.diff.addedWord";o="orion.annotation.diff.currentAddedWord";p="orion.annotation.diff.deletedWord";r="orion.annotation.diff.currentDeletedWord";q="orion.annotation.diff.emptyDeletedWordLeft";t="orion.annotation.diff.emptyDeletedWordRight";s="orion.annotation.diff.emptyAddedWordLeft";u="orion.annotation.diff.emptyAddedWordRight";
a.AnnotationType.registerType(d,{title:"",html:"",lineStyle:{styleClass:"annotationLine addedBlockDiff"}});a.AnnotationType.registerType(g,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentAddedBlockDiff"}});a.AnnotationType.registerType(h,{title:"",html:"",lineStyle:{styleClass:"annotationLine deletedBlockDiff"}});a.AnnotationType.registerType(j,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentDeletedBlockDiff"}});a.AnnotationType.registerType(i,{title:"",html:"",lineStyle:{styleClass:"annotationLine blockDiffTopOnly"}});
a.AnnotationType.registerType(k,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentBlockDiffTopOnly"}});a.AnnotationType.registerType(l,{title:"",html:"",lineStyle:{styleClass:"annotationLine blockDiffConflict"}});a.AnnotationType.registerType(m,{title:"",html:"",lineStyle:{styleClass:"annotationLine currentBlockDiffConflict"}});a.AnnotationType.registerType(n,{title:"word added",html:"",rangeStyle:{styleClass:"annotationRange addedWordDiff"}});a.AnnotationType.registerType(o,{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(q,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyDeletedWordDiffLeft"}});a.AnnotationType.registerType(t,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyDeletedWordDiffRight"}});
a.AnnotationType.registerType(s,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyAddedWordDiffLeft"}});a.AnnotationType.registerType(u,{title:"",html:"",rangeStyle:{styleClass:"annotationRange emptyAddedWordDiffRight"}});e.prototype={initAll:function(a,c,b,d,e,g,f){this._charOrWordDiff=a?a:"word";if(c)this._initialized=!0;this.editorWrapper=[{editor:c,diffFeeder:d},{editor:b,diffFeeder:e}];this._curveRuler=f;(this._overviewRuler=g)&&this._overviewRuler.setDiffNavigator(this)},initMapper:function(a){if(a)for(var c=
0;c<this.editorWrapper.length;c++)this.editorWrapper[c].diffFeeder.init(this.editorWrapper[c].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 d=0;d<this.editorWrapper[a].annoTypes.length;d++)this.editorWrapper[a].annoTypes[d].current&&
this.editorWrapper[a].editor.getAnnotationStyler().addAnnotationType(this.editorWrapper[a].annoTypes[d].current),this.editorWrapper[a].annoTypes[d].normal&&this.editorWrapper[a].editor.getAnnotationStyler().addAnnotationType(this.editorWrapper[a].annoTypes[d].normal)}this._root.children=[];d=this.editorWrapper[0].diffFeeder.getDiffBlocks();if(!d||d.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 e=new c.JSDiffAdapter,a=0;a<d.length;a++){var g=this.generatePairBlockAnnotations(this._root,a);this._root.children.push(g);var f=this.generatePairWordAnnotations(g,a,e);if(f)g.children=f}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,c,b,d,e){for(var g=0;g<this.editorWrapper[c].annoTypes.length;g++)this.editorWrapper[c].annoTypes[g].type===b&&this.replaceDiffAnnotations(this.editorWrapper[c].editor,e?e:this.editorWrapper[c].annoTypes[g].list,d?this.editorWrapper[c].annoTypes[g].normal:this.editorWrapper[c].annoTypes[g].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,c){this.iterator&&(this.iterator.iterateOnTop(a,c),this.updateCurrentAnnotation(!0))},iterateOnChange:function(a){if(this.iterator){this.iterator.iterate(a);var c=this.iterator.cursor();c.type==="block"&&c.children&&c.children.length>0&&this.iterator.iterate(a);this.updateCurrentAnnotation(!0)}},gotoBlock:function(a,c){if(this.iterator){if(a<0||a>=this._root.children.length||
this._root.children.length===0)a=0;c!==void 0&&c>=0&&this._root.children[a].children&&c<this._root.children[a].children.length?this.iterator.setCursor(this._root.children[a].children[c]):this.iterator.setCursor(this._root.children[a]);this.updateCurrentAnnotation(!1);this._positionDiffBlock()}},_hitDiffAnnotation:function(a,c,b){if(b===this.editorWrapper[a].editor.getTextView()){for(var d=0;d<this._root.children.length;d++){var b=this._root.children[d],e=a===0?b.oldA:b.newA;if(c>=e.start&&c<=e.end){d=
b;if(b.children&&b.children.length>0)for(e=0;e<b.children.length;e++){var g=b.children[e],f=a===0?g.oldA:g.newA;if(c>=f.start&&c<=f.end){d=g;break}}return d}}return null}},gotoChange:function(a,c){for(var b=0;b<this.editorWrapper.length;b++){var d=this._hitDiffAnnotation(b,a,c);if(d)return this.iterator.setCursor(d),this.updateCurrentAnnotation(!1,c),!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,c,b,d){if(c&&b&&(a=a.getAnnotationModel())){for(var e=a.getAnnotations(0,a.getTextModel().getCharCount()),g=[];d&&e.hasNext();){var f=
e.next();f.type===b&&g.push(f)}a.replaceAnnotations(g,c)}},updateCurrentAnnotation:function(c,b){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 d=this.iterator.cursor();if(d){var e,g,f={start:d.oldA.start,end:d.oldA.end},h={start:d.newA.start,end:d.newA.end};d.type==="word"?(e=this.editorWrapper[0].diffFeeder.getCurrentWordAnnoType(f,this.editorWrapper[0].editor.getTextView().getModel()),
g=this.editorWrapper[1].diffFeeder.getCurrentWordAnnoType(h,this.editorWrapper[1].editor.getTextView().getModel())):(e=this.editorWrapper[0].diffFeeder.getCurrentBlockAnnoType(d.index),g=this.editorWrapper[1].diffFeeder.getCurrentBlockAnnoType(d.index));this.replaceDiffAnnotations(this.editorWrapper[0].editor,[new (a.AnnotationType.getType(e.current))(f.start,f.end)],e,!0);this.replaceDiffAnnotations(this.editorWrapper[1].editor,[new (a.AnnotationType.getType(g.current))(h.start,h.end)],g,!0);if(c)this.autoSelecting=
!0,this.editorWrapper[0].editor.setSelection(d.oldA.start,d.oldA.end,!0),this.editorWrapper[1].editor.setSelection(d.newA.start,d.newA.end,!0),this.autoSelecting=!1;else if(b)this.autoSelecting=!0,b!==this.editorWrapper[0].editor.getTextView()&&this.editorWrapper[0].editor.setSelection(d.oldA.start,d.oldA.end,!0),b!==this.editorWrapper[1].editor.getTextView()&&this.editorWrapper[1].editor.setSelection(d.newA.start,d.newA.end,!0),this.autoSelecting=!1}}},generatePairBlockAnnotations:function(a,c){var b=
this.generateBlockDiffAnnotations(0,c),d=this.generateBlockDiffAnnotations(1,c);return{parent:a,index:c,type:"block",oldA:b,newA:d}},generatePairWordAnnotations:function(a,c,b){var d=this.editorWrapper[0].diffFeeder.getTextOnBlock(c),e=this.editorWrapper[1].diffFeeder.getTextOnBlock(c),c=null,g=0,f=0;if(d&&e)c=b.adaptCharDiff(d.text,e.text,this._charOrWordDiff==="word"),f=e.start,g=d.start;else return null;b=[];d=[];this.generateWordDiffAnnotations(0,b,g,c,2,3);this.generateWordDiffAnnotations(1,
d,f,c,0,1);c=[];for(g=0;g<b.length;g++)c.push({parent:a,index:g,type:"word",oldA:b[g],newA:d[g]});return c},getAnnoModelList:function(a,c,b){for(var d=0;d<this.editorWrapper[a].annoTypes.length;d++)if(this.editorWrapper[a].annoTypes[d].type===c&&this.editorWrapper[a].annoTypes[d].normal===b)return this.editorWrapper[a].annoTypes[d].list;return null},generateBlockDiffAnnotations:function(c,b){var d=this.editorWrapper[c].diffFeeder.getCurrentBlockAnnoType(b),e=this.getAnnoModelList(c,"block",d.normal),
g=this.editorWrapper[c].diffFeeder.getCharRange(b),d=a.AnnotationType.createAnnotation(d.normal,g.start,g.end);e&&e.push(d);return d},generateWordDiffAnnotations:function(c,b,d,e,g,f){if(e)for(var h=this.editorWrapper[c].diffFeeder.getCurrentWordAnnoType({start:-1,end:-1}),c=this.getAnnoModelList(c,"word",h.normal),i=0;i<e.length;i++){var j=a.AnnotationType.createAnnotation(h.normal,e[i][g]+d,e[i][f]+d);c.push(j);b.push(j)}},_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,c){var b=a.getLineHeight(),d=a.getClientArea(),b=Math.floor(d.height/b/3);a.setTopIndex(c-b>0?c-b:0)},_positionDiffBlock:function(){var a=this.getCurrentBlockIndex(),c=this.getFeeder().getDiffBlocks();c.length!==0&&(this._setTextViewPosition(this.editorWrapper[0].editor.getTextView(),c[a][0]),this.editorWrapper[0].editor!==
this.editorWrapper[1].editor&&(a=f.lookUpLineIndex(this.getMapper(),0,c[a][1]),this._setTextViewPosition(this.editorWrapper[1].editor.getTextView(),a)),this._updateOverviewRuler(),this._updateCurveRuler())},matchPositionFromOverview:function(a){this._initialized&&this.gotoBlock(a<0?0:f.getAnnotationIndex(this.getFeeder().getDiffBlocks(),a))},gotoDiff:function(a,c){this.gotoChange(a,c)&&(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 e}();e.DiffBlockFeeder=function(){function a(){}a.prototype={getWordAnnoTypes:function(a){this._mapperColumnIndex===0?a.push({type:"word",current:o,normal:n,list:[]}):a.push({type:"word",current:r,normal:p,list:[]});a.push({type:"word",current:q});a.push({type:"word",current:t});
a.push({type:"word",current:s});a.push({type:"word",current:u})},getCurrentWordAnnoType:function(a,c){return a.start===a.end&&c?this._mapperColumnIndex===0?{current:this._repositionEmptyWord(a,c),normal:n}:{current:this._repositionEmptyWord(a,c),normal:p}:this._mapperColumnIndex===0?{current:o,normal:n}:{current:r,normal:p}},_repositionEmptyWord:function(a,c){var b=c.getLineAtOffset(a.start),d=c.getLineStart(b),e=c.getLineEnd(b);if(d!==e){if(a.start===e)return a.start--,this._mapperColumnIndex===
0?u:t;a.end++}else if(b>0&&(b--,d=c.getLineStart(b),e=c.getLineEnd(b),d!==e))return a.start=e-1,a.end=e,this._mapperColumnIndex===0?u:t;return this._mapperColumnIndex===0?s:q},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 c=this._diffBlocks[a][0],b=c+this._mapper[this._diffBlocks[a][1]][this._mapperColumnIndex]-1,a=this._textModel.getLineStart(c);if(b<c)return{start:a,end:a};c=this._textModel.getLineEnd(b,!0);return{start:a,end:c}},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}();e.TwoWayDiffBlockFeeder=function(){function a(c,b,d){this._mapperColumnIndex=
d;this.init(c,b)}a.prototype=new e.DiffBlockFeeder;a.prototype.init=function(a,c){this._textModel=a;this._diffBlocks=void 0;if(c){this._mapper=c;this._diffBlocks=[];for(var b=0,d=0;d<this._mapper.length;d++)this._mapper[d][2]!==0&&this._diffBlocks.push([b,d]),b+=this._mapper[d][this._mapperColumnIndex]}};a.prototype.getBlockAnnoTypes=function(a){this._mapperColumnIndex===0?a.push({type:"block",normal:d,current:g,list:[]}):a.push({type:"block",normal:h,current:j,list:[]});a.push({type:"block",normal:i,
current:k,list:[]});a.push({type:"block",normal:l,current:m,list:[]})};a.prototype.getCurrentBlockAnnoType=function(a){a=this._diffBlocks[a][1];if(this._mapper[a][this._mapperColumnIndex]===0)return{normal:i,current:k};else if(f.isMapperConflict(this.getMapper(),a))return{normal:l,current:m};else if(this._mapperColumnIndex===0)return{type:"block",normal:d,current:g,list:[]};return{type:"block",normal:h,current:j,list:[]}};return a}();e.inlineDiffBlockFeeder=function(){function a(c,b){this._mapperColumnIndex=
b;this.init(c)}a.prototype=new e.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 c=a=0,b=0;b<this._mapper.length;b++){if(this._mapper[b][2]!==0){if(this._mapperColumnIndex===0){var d=a+this._mapper[b][1];this._diffBlocks.push([d,b]);this._gapBlocks.push([d,d+this._mapper[b][0],c])}else this._diffBlocks.push([a,b]),this._gapBlocks.push([a,a+this._mapper[b][1],
c]);a+=this._mapper[b][0]+this._mapper[b][1]}else this._gapBlocks.push([a,a+this._mapper[b][this._mapperColumnIndex],c]),a+=this._mapper[b][this._mapperColumnIndex];c+=this._mapper[b][this._mapperColumnIndex]}}};a.prototype.getBlockAnnoTypes=function(a){this._mapperColumnIndex===0?a.push({type:"block",normal:d,current:g,list:[]}):a.push({type:"block",normal:h,current:j,list:[]});a.push({type:"block",normal:l,current:m,list:[]})};a.prototype.getCurrentBlockAnnoType=function(a){a=this._diffBlocks[a][1];
if(this._mapper[a][this._mapperColumnIndex]===0)return{current:o,normal:n};else if(f.isMapperConflict(this.getMapper(),a))return{normal:l,current:m};else if(this._mapperColumnIndex===0)return{type:"block",normal:d,current:g,list:[]};return{type:"block",normal:h,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 c=0;c<this._gapBlocks.length;c++)if(this._gapBlocks[c][0]!==
this._gapBlocks[c][1]&&a>=this._gapBlocks[c][0]&&a<this._gapBlocks[c][1])return a-this._gapBlocks[c][0]+this._gapBlocks[c][2];return-1};return a}();return e});
define("orion/compare/compare-rulers",["orion/compare/compareUtils","orion/compare/diffTreeNavigator"],function(b){var f=f||{};f.CompareRuler=function(){function a(a,b,d){this._location=a||"left";this._overview=b||"page";this._rulerStyle=d;this._editor=null;var g=this;this._listener={onModelChanged:function(a){g._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 d=[],g=a;g<b;g++){var f=this.getStyle(g);f&&(d[g]={html:this.getHTML(g),style:f})}return d},getWidestAnnotation:function(){return{html:this.getHTML(-1),
style:this.getStyle(-1)}},getRulerStyle:function(){return this.getStyle(void 0)}};return a}();f.LineNumberCompareRuler=function(){function a(a,b,d,g,h,j){f.CompareRuler.call(this,d,"page",g);this._diffNavigator=a;this._oddStyle=h||{style:{backgroundColor:"white"}};this._evenStyle=j||{style:{backgroundColor:"white"}};this._numOfDigits=0;this._mapperColumnIndex=b}a.prototype=new f.CompareRuler;a.prototype.getStyle=function(a){return a===void 0?this._rulerStyle:this._evenStyle};a.prototype.getHTML=function(a){var b=
this._editor.getModel(),d=this._diffNavigator.getFeeder(this._mapperColumnIndex===0);return!d?"":a===-1?b.getLineCount():d.getLineNumber?(a=d.getLineNumber(a),a===-1?"":a+1):a+1};a.prototype._onModelChanged=function(a){var a=a.start,b=this._editor.getModel(),d=b.getLineCount(),g=(d+"").length;if(this._numOfDigits!==g)this._numOfDigits=g,this._editor.redrawLines(b.getLineAtOffset(a),d,this)};return a}();f.CompareOverviewRuler=function(){function a(a,b,d,g){this._diffNavigator=d;this._onClick=g;f.CompareRuler.call(this,
a,"document",b)}a.prototype=new f.CompareRuler;a.prototype.getStyle=function(a){var e,d;if(a===void 0)e=this._rulerStyle||{},d=e.style||(e.style={}),d.lineHeight="1px",d.fontSize="1px",d.width="14px";else if(e=a!==-1?{styleClass:"annotationOverview breakpoint"}:{},d=e.style||(e.style={}),d.cursor="pointer",d.width="8px",d.left="2px",this._editor.getModel(),a>=0){var g;if(this._diffNavigator&&this._diffNavigator.getFeeder())g=this._diffNavigator.getFeeder().getDiffBlocks();else return null;a=b.getAnnotationIndex(g,
a);if(a===-1)return null;g=b.getAnnotationMapperIndex(g,a);var f;f=this._diffNavigator.getMapper();if(g=b.isMapperConflict(f,g))d.border="1px #FF0000 solid";if(a===this._diffNavigator.getCurrentBlockIndex())d.backgroundColor=g?"red":"blue";a=this._diffNavigator.getFeeder().getDiffBlockH(a);g=this._diffNavigator.getFeeder().getOverviewLineCount();if(a<0)return null;f=this._editor.getClientArea();a=Math.floor(f.height*a/g);a<2&&(a=2);d.height=a+"px"}else return d.height="3px";return e};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}();f.CompareCurveRuler=function(){function a(a){this._canvasDiv=a;this._mapper=void 0;this._initialized=!1}a.prototype={init:function(a,b,d,g){this._initing=this._initialized=!0;this._mapper=a;this._leftEditor=b;this._rightEditor=
d;this._leftTextView=b.getTextView();this._rightTextView=d.getTextView();this._diffNavigator=g;this.render()},matchPositionFrom:function(a){var e=a?this._leftTextView:this._rightTextView,d=a?this._rightTextView:this._leftTextView,g=e.getTopIndex(),e=e.getBottomIndex(),a=b.matchMapper(this._mapper,a?0:1,g,e);d.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 e=this._leftTextView.getTopIndex(),d=this._leftTextView.getBottomIndex(),g=this._rightTextView.getTopIndex(),f=this._rightTextView.getBottomIndex();this._leftLineH=this._leftTextView.getLineHeight();this._rightLineH=this._rightTextView.getLineHeight();for(var j=0,i=0,k=!1,l=0;l<this._mapper.length;l++){if(this._mapper[l][2]!==
0)if(b.overlapMapper(this._mapper[l],0,j,e,d)||b.overlapMapper(this._mapper[l],1,i,g,f))this._renderCurve(l,j,i,this._canvasDiv,a,e,d,g,f),k=!0;else if(k)break;j+=this._mapper[l][0];i+=this._mapper[l][1]}a.stroke()}},_renderCurve:function(a,b,d,g,f){var j=this._mapper[a],b=this._leftTextView.getLinePixel(b+j[0]/2)+j[0]%2*this._leftLineH/3-this._leftTextView.getTopPixel(),d=this._rightTextView.getLinePixel(d+j[1]/2)+j[1]%2*this._rightLineH/3-this._rightTextView.getTopPixel(),g=g.parentNode.clientWidth;
a===this._diffNavigator.getCurrentMapperIndex()?(f.stroke(),f.strokeStyle="#000",f.lineWidth=1,f.beginPath(),f.moveTo(0,b),f.bezierCurveTo(g/3,b,g*0.666,d,g,d),f.stroke(),f.strokeStyle="#AAAAAA",f.lineWidth=1,f.beginPath()):(f.moveTo(0,b),f.bezierCurveTo(g/3,b,g*0.666,d,g,d),f.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 f});
define("orion/contentTypes",[],function(){function b(a,c){function b(a,c,d,e){var d=c.filename.indexOf(d)>=0,f=c.extension.indexOf(e)>=0;if(d||f)if(!a||d&&a.extension.indexOf(e)>=0)return c;return a}for(var e=a&&a.split(".").pop(),f=null,k=0;k<c.length;k++){var l=c[k];b(f,l,a,e)===l&&(f=l)}return f}function f(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(e)),
d={},f=0;f<a.length;f++)for(var k=b(a[f].getProperty("contentTypes")),l=0;l<k.length;l++){var m=k[l];d[m.id]||(d[m.id]={id:m.id,name:m.name,image:m.image,"extends":m["extends"],extension:b(m.extension),filename:b(m.filename)})}return d}(b);b.registerService(a,this)}var a="orion.core.contenttypes",c="orion.core.contenttype",e="orion.file.contenttype";f.prototype={getContentTypes:function(){var a=this.getContentTypesMap(),c=[],b;for(b in a)a.hasOwnProperty(b)&&c.push(a[b]);return c},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,c){a=typeof a==="string"?this.getContentType(a):a;c=typeof c==="string"?this.getContentType(c):c;if(!a||!c)return!1;if(a.id===c.id)return!0;else for(var b=a,e={};b&&(b=this.getContentType(b["extends"]));){if(b.id===c.id)return!0;if(e[b.id])throw Error("Cycle: "+b.id);e[b.id]=!0}return!1},
isSomeExtensionOf:function(a,c){for(var b=0;b<c.length;b++)if(this.isExtensionOf(a,c[b]))return!0;return!1}};return{ContentTypeService:f,getFilenameContentType:b}});
define("dojo/parser",["dojo","dojo/date/stamp"],function(b){b.parser=new function(){function f(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":e.isFunction(a)&&(a=a.toString(),a=e.trim(a.substring(a.indexOf("{")+1,a.length-1)));try{return a===""||a.search(/[^\w\.]+/i)!=-1?new Function(a):e.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 e.date.stamp.fromISOString(a)}case "url":return e.baseUrl+a;default:return e.fromJson(a)}}function a(a,c){for(var b in a)if(b.charAt(0)!="_"&&!(b in d)){var f=c,g=b,m;m=a[b];m=e.isString(m)?"string":typeof m=="number"?"number":typeof m=="boolean"?"boolean":e.isFunction(m)?"function":e.isArray(m)?"array":m instanceof Date?"date":m instanceof e._Url?"url":"object";f[g]=m}return c}function c(c,b){var d=g[c];
if(d){if(!b&&!d.params)d.params=a(d.cls.prototype,{})}else{var d=e.getObject(c),f=null;if(!d)return null;b||(f=a(d.prototype,{}));d={cls:d,params:f}}return d}var e=b,d={},g={};e.connect(e,"extend",function(){g={}});this._functionFromScript=function(a,c){var b="",d="",f=a.getAttribute(c+"args")||a.getAttribute("args");f&&e.forEach(f.split(/\s*,\s*/),function(a,c){b+="var "+a+" = arguments["+c+"]; "});(f=a.getAttribute("with"))&&f.length&&e.forEach(f.split(/\s*,\s*/),function(a){b+="with("+a+"){";d+=
"}"});return new Function(b+a.innerHTML+d)};this.instantiate=function(a,d,g){var k=[],d=d||{},g=g||{},l=(g.scope||e._scopeName)+"Type",m="data-"+(g.scope||e._scopeName)+"-";e.forEach(a,function(a){if(a){var h,p,r,q,t,s;a.node?(h=a.node,p=a.type,s=a.fastpath,q=(r=a.clsInfo||p&&c(p,s))&&r.cls,t=a.scripts):(h=a,t=(q=(r=(p=l in d?d[l]:h.getAttribute(l))&&c(p))&&r.cls)&&(q._noScript||q.prototype._noScript)?[]:e.query("> script[type^='dojo/']",h));if(!r)throw Error("Could not load class '"+p);var u={};
g.defaults&&e._mixin(u,g.defaults);a.inherited&&e._mixin(u,a.inherited);if(s){if((r=h.getAttribute(m+"props"))&&r.length)try{r=e.fromJson.call(g.propsThis,"{"+r+"}"),e._mixin(u,r)}catch(w){throw Error(w.toString()+" in data-dojo-props='"+r+"'");}if(r=h.getAttribute(m+"attach-point"))u.dojoAttachPoint=r;if(r=h.getAttribute(m+"attach-event"))u.dojoAttachEvent=r;b.mixin(u,d)}else{var a=h.attributes,v;for(v in r.params)if((p=v in d?{value:d[v],specified:!0}:a.getNamedItem(v))&&(p.specified||b.isIE&&v.toLowerCase()==
"value")){p=p.value;switch(v){case "class":p="className"in d?d.className:h.className;break;case "style":p="style"in d?d.style:h.style&&h.style.cssText}s=r.params[v];u[v]=typeof p=="string"?f(p,s):p}}var C=[],K=[];e.forEach(t,function(a){h.removeChild(a);var c=a.getAttribute(m+"event")||a.getAttribute("event"),b=a.getAttribute("type"),a=e.parser._functionFromScript(a,m);c?b=="dojo/connect"?C.push({event:c,func:a}):u[c]=a:K.push(a)});var x=(t=q.markupFactory||q.prototype&&q.prototype.markupFactory)?
t(u,h,q):new q(u,h);k.push(x);(q=h.getAttribute(m+"id")||h.getAttribute("jsId"))&&e.setObject(q,x);e.forEach(C,function(a){e.connect(x,a.event,null,a.func)});e.forEach(K,function(a){a.call(x)})}});d._started||e.forEach(k,function(a){!g.noStart&&a&&b.isFunction(a.startup)&&!a._started&&(!a.getParent||!a.getParent())&&a.startup()});return k};this.parse=function(a,d){function f(a,e){var g=b.clone(a.inherited);b.forEach(["dir","lang"],function(c){var b=a.node.getAttribute(c);b&&(g[c]=b)});for(var h=a.clsInfo&&
!a.clsInfo.cls.prototype._noScript?a.scripts:null,k=!a.clsInfo||!a.clsInfo.cls.prototype.stopParser||d&&d.template,n=a.node.firstChild;n;n=n.nextSibling)if(n.nodeType==1){var o,v=k&&n.getAttribute(m+"type");o=v?v:k&&n.getAttribute(l);v=v==o;o?(o={type:o,fastpath:v,clsInfo:c(o,v),node:n,scripts:[],inherited:g},e.push(o),f(o,e)):h&&n.nodeName.toLowerCase()=="script"?(o=n.getAttribute("type"))&&/^dojo\/\w/i.test(o)&&h.push(n):k&&f({node:n,inherited:g},e)}}var g;!d&&a&&a.rootNode?(d=a,g=d.rootNode):g=
a;g=g?b.byId(g):b.body();var d=d||{},l=(d.scope||e._scopeName)+"Type",m="data-"+(d.scope||e._scopeName)+"-",n={};if(d&&d.inherited)for(var o in d.inherited)d.inherited[o]&&(n[o]=d.inherited[o]);o=[];f({node:g,inherited:n},o);return this.instantiate(o,d&&d.template?{template:!0}:null,d)}};(function(){var f=function(){b.config.parseOnLoad&&b.parser.parse()};b.getObject("dijit.wai.onload")===b._loaders[0]?b._loaders.splice(1,0,f):b._loaders.unshift(f)})();return b.parser});
define("dijit/_Templated","dojo,dijit,dijit/_Widget,dojo/string,dojo/parser,dojo/cache".split(","),function(b,f){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,e=this;return b.string.substitute(a,this,function(a,f){f.charAt(0)=="!"&&(a=b.getObject(f.substr(1),!1,e));if(typeof a=="undefined")throw Error(c+
" template:"+f);return a==null?"":f.charAt(0)=="!"?a:a.toString().replace(/"/g,"&quot;")},this)},buildRendering:function(){var a=f._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=f.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)},e=b.isArray(a)?a:a.all||a.getElementsByTagName("*"),d=b.isArray(a)?0:-1;d<e.length;d++){var g=
d==-1?a:e[d];if(!this.widgetsInTemplate||!c(g,"dojoType")&&!c(g,"data-dojo-type")){var h=c(g,"dojoAttachPoint")||c(g,"data-dojo-attach-point");if(h)for(var j=h.split(/\s*,\s*/);h=j.shift();)b.isArray(this[h])?this[h].push(g):this[h]=g,this._attachPoints.push(h);if(h=c(g,"dojoAttachEvent")||c(g,"data-dojo-attach-event"))for(var j=h.split(/\s*,\s*/),i=b.trim;h=j.shift();)if(h){var k=null;h.indexOf(":")!=-1?(k=h.split(":"),h=i(k[0]),k=i(k[1])):h=i(h);k||(k=h);this._attachEvents.push(this.connect(g,h,
k))}(h=c(g,"waiRole"))&&f.setWaiRole(g,h);(h=c(g,"waiState"))&&b.forEach(h.split(/\s*,\s*/),function(a){a.indexOf("-")!=-1&&(a=a.split("-"),f.setWaiState(g,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)}});
f._Templated._templateCache={};f._Templated.getCachedTemplate=function(a,c,e){var d=f._Templated._templateCache,g=c||a,h=d[g];if(h){try{if(!h.ownerDocument||h.ownerDocument==b.doc)return h}catch(j){}b.destroy(h)}c||(c=b.cache(a,{sanitize:!0}));c=b.string.trim(c);if(e||c.match(/\$\{([^\}]+)\}/g))return d[g]=c;else{a=b._toDom(c);if(a.nodeType!=1)throw Error("Invalid template: "+c);return d[g]=a}};b.isIE&&b.addOnWindowUnload(function(){var a=f._Templated._templateCache,c;for(c in a){var e=a[c];typeof e==
"object"&&b.destroy(e);delete a[c]}});b.extend(f._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});return f._Templated});
define("dijit/form/_FormWidget","dojo,dijit,dojo/window,dijit/_Widget,dijit/_Templated,dijit/_CssStateMixin".split(","),function(b,f){b.declare("dijit.form._FormWidget",[f._Widget,f._Templated,f._CssStateMixin],{name:"",alt:"",value:"",type:"text",tabIndex:"0",disabled:!1,intermediateChanges:!1,scrollOnFocus:!0,attributeMap:b.delegate(f._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);f.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||f.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||f.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",
f.form._FormWidget,{readOnly:!1,attributeMap:b.delegate(f.form._FormWidget.prototype.attributeMap,{value:"",readOnly:"focusNode"}),_setReadOnlyAttr:function(a){b.attr(this.focusNode,"readOnly",a);f.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,e=a.firstChild||a,d=e.style.filter,f=this;c&&c.clientHeight==0;)(function(){var a=f.connect(c,"onscroll",function(){f.disconnect(a);e.style.filter=(new Date).getMilliseconds();setTimeout(function(){e.style.filter=d},0)})})(),c=c.parentNode}});return f.form._FormWidget});
define("dijit/form/TextBox",["dojo","dijit","text!dijit/form/templates/TextBox.html","dijit/form/_FormWidget"],function(b,f){b.declare("dijit.form.TextBox",f.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(f.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==f.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 d;a!==void 0&&(d=this.filter(a),typeof b!="string"&&(b=d!==null&&(typeof d!="number"||!isNaN(d))?this.filter(this.format(d,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,[d,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 e=0;e<c.length;e++)c[e].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&&f.selectInputText(this.textbox)});this._updatePlaceHolder();this.inherited(arguments);this._refreshState()}},reset:function(){this.textbox.value="";this.inherited(arguments)}});f.selectInputText=function(a,c,e){var d=b.global,g=b.doc,a=b.byId(a);isNaN(c)&&(c=0);isNaN(e)&&(e=a.value?a.value.length:0);f.focus(a);g.selection&&b.body().createTextRange?a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),a.moveStart("character",-99999),a.moveStart("character",c),a.moveEnd("character",
e-c),a.select()):d.getSelection&&a.setSelectionRange&&a.setSelectionRange(c,e)};return f.form.TextBox});
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,f){b.declare("dijit.form.Button",f.form._FormWidget,{label:"",showLabel:!0,iconClass:"",type:"button",baseClass:"dijitButton",templateString:b.cache("dijit.form","templates/Button.html"),attributeMap:b.delegate(f.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=f.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",[f.form.Button,f._Container,f._HasDropDown],{baseClass:"dijitDropDownButton",templateString:b.cache("dijit.form","templates/DropDownButton.html"),_fillContent:function(){if(this.srcNodeRef){var a=
b.query("*",this.srcNodeRef);f.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=f.byNode(a);delete this.dropDownContainer}this.dropDown&&f.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",f.form.DropDownButton,{templateString:b.cache("dijit.form","templates/ComboButton.html"),attributeMap:b.mixin(b.clone(f.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"])f.focus(this._popupStateNode),b.stopEvent(a)},_onArrowKeyPress:function(a){if(a.charOrCode==b.keys[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"])f.focus(this.titleNode),b.stopEvent(a)},focus:function(a){this.disabled||f.focus(a=="start"?this.titleNode:this._popupStateNode)}});
b.declare("dijit.form.ToggleButton",f.form.Button,{baseClass:"dijitToggleButton",checked:!1,attributeMap:b.mixin(b.clone(f.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);f.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 f.form.Button});define("dijit/form/DropDownButton",["dojo","dijit","dijit/form/Button"],function(b,f){return f.form.DropDownButton});define("dijit/form/ToggleButton",["dojo","dijit","dijit/form/Button"],function(b,f){return f.form.ToggleButton});
define("dijit/form/CheckBox",["dojo","dijit","text!dijit/form/templates/CheckBox.html","dijit/form/ToggleButton"],function(b,f){b.declare("dijit.form.CheckBox",f.form.ToggleButton,{templateString:b.cache("dijit.form","templates/CheckBox.html"),baseClass:"dijitCheckBox",type:"checkbox",value:"on",readOnly:!1,attributeMap:b.delegate(f.form._FormWidget.prototype.attributeMap,{readOnly:"focusNode"}),_setReadOnlyAttr:function(a){this._set("readOnly",a);b.attr(this.focusNode,"readOnly",a);f.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",f.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=f.getEnclosingWidget(a))&&a.checked&&a.set("checked",!1)})}},_clicked:function(){this.checked||this.set("checked",!0)}});return f.form.CheckBox});
define("dijit/Tooltip",["dojo","dijit","dijit/_Widget","dijit/_Templated","text!dijit/templates/Tooltip.html"],function(b,f){b.declare("dijit._MasterTooltip",[f._Widget,f._Templated],{duration:f.defaultDuration,templateString:b.cache("dijit","templates/Tooltip.html"),postCreate:function(){b.body().appendChild(this.domNode);this.bgIframe=new f.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,e,d){if(!(this.aroundNode&&this.aroundNode===c))this.domNode.width="auto",this.fadeOut.status()=="playing"?this._onDeck=arguments:(this.containerNode.innerHTML=a,f.placeOnScreenAroundElement(this.domNode,c,f.getPopupAroundAlignment(e&&e.length?e:f.Tooltip.defaultPosition,!d),b.hitch(this,"orient")),b.style(this.domNode,"opacity",0),this.fadeIn.play(),this.isShowingNow=!0,this.aroundNode=c)},orient:function(a,c,e,d,f){this.connectorNode.style.top=
"";var h=d.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+"-"+e];this.domNode.style.width="auto";var j=b.contentBox(this.domNode),i=Math.min(Math.max(h,1),j.w),k=i<j.w;this.domNode.style.width=i+"px";if(k&&(this.containerNode.style.overflow=
"auto",k=this.containerNode.scrollWidth,this.containerNode.style.overflow="visible",k>i))k=k+b.style(this.domNode,"paddingLeft")+b.style(this.domNode,"paddingRight"),this.domNode.style.width=k+"px";e.charAt(0)=="B"&&c.charAt(0)=="B"?(a=b.marginBox(a),c=this.connectorNode.offsetHeight,a.h>d.h?(this.connectorNode.style.top=d.h-f.h/2-c/2+"px",this.connectorNode.style.bottom=""):(this.connectorNode.style.bottom=Math.min(Math.max(f.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-h)},_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}});f.showTooltip=function(a,c,b,d){if(!f._masterTT)f._masterTT=
new f._MasterTooltip;return f._masterTT.show(a,c,b,d)};f.hideTooltip=function(a){if(!f._masterTT)f._masterTT=new f._MasterTooltip;return f._masterTT.hide(a)};b.declare("dijit.Tooltip",f._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);f.showTooltip(this.label||this.domNode.innerHTML,a,this.position,!this.isLeftToRight());this._connectNode=a;this.onShow(a,this.position)},close:function(){this._connectNode&&(f.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)}});f.Tooltip.defaultPosition=["after","before"];return f.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,f){b.declare("dijit.form.ValidationTextBox",f.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 d=this._isEmpty(this.textbox.value),g=!b&&a&&this._isValidSubset();this._set("state",b?"":((!this._hasBeenBlurred||a)&&d||g)&&this._maskValidSubsetError?"Incomplete":"Error");f.setWaiState(this.focusNode,
"invalid",b?"false":"true");this.state=="Error"?(this._maskValidSubsetError=a&&g,c=this.getErrorMessage(a)):this.state=="Incomplete"?(c=this.getPromptMessage(a),this._maskValidSubsetError=!this._hasBeenBlurred||a):d&&(c=this.getPromptMessage(a));this.set("message",c);return b},displayMessage:function(a){f.hideTooltip(this.domNode);a&&this._focused&&f.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);f.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",f.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",f.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 b=
this.get("value");return b!==null&&b!==""&&b!==void 0&&(typeof b!="number"||!isNaN(b))&&!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?f.setWaiState(this.focusNode,"valuemin",this.constraints.min):
f.removeWaiState(this.focusNode,"valuemin"),this.constraints.max!==void 0?f.setWaiState(this.focusNode,"valuemax",this.constraints.max):f.removeWaiState(this.focusNode,"valuemax"))},_setValueAttr:function(a,b){f.setWaiState(this.focusNode,"valuenow",a);this.inherited(arguments)}});return f.form.ValidationTextBox});
define("dijit/form/ComboBox","dojo,dijit,text!dijit/form/templates/DropDownBox.html,dojo/window,dojo/regexp,dojo/data/util/simpleFetch,dojo/data/util/filter,dijit/_CssStateMixin,dijit/form/_FormWidget,dijit/form/ValidationTextBox,dijit/_HasDropDown,i18n!dijit/form/nls/ComboBox".split(","),function(b,f){b.declare("dijit.form.ComboBoxMixin",f._HasDropDown,{item:null,pageSize:Infinity,store:null,fetchProperties:{},query:{},autoComplete:!0,highlightMatch:"first",searchDelay:100,searchAttr:"name",labelAttr:"",
labelType:"text",queryExpr:"${0}*",ignoreCase:!0,hasDownArrow:!0,templateString:b.cache("dijit.form","templates/DropDownBox.html"),baseClass:"dijitTextBox dijitComboBox",dropDownClass:"dijit.form._ComboBoxMenu",cssStateNodes:{_buttonNode:"dijitDownArrowButton"},maxHeight:-1,_stopClickEvents:!1,_getCaretPos:function(a){var c=0;if(typeof a.selectionStart=="number")c=a.selectionStart;else if(b.isIE){var e=b.doc.selection.createRange().duplicate(),a=a.createTextRange();e.move("character",0);a.move("character",
0);try{a.setEndPoint("EndToEnd",e),c=String(a.text).replace(/\r/g,"").length}catch(d){}}return c},_setCaretPos:function(a,b){b=parseInt(b);f.selectInputText(a,b,b)},_setDisabledAttr:function(a){this.inherited(arguments);f.setWaiState(this.domNode,"disabled",a)},_abortQuery:function(){if(this.searchTimer)clearTimeout(this.searchTimer),this.searchTimer=null;if(this._fetchHandle)this._fetchHandle.abort&&this._fetchHandle.abort(),this._fetchHandle=null},_onInput:function(a){if(!this.searchTimer&&(a.type==
"paste"||a.type=="input")&&this._lastInput!=this.textbox.value)this.searchTimer=setTimeout(b.hitch(this,function(){this._onKey({charOrCode:229})}),100);this.inherited(arguments)},_onKey:function(a){var c=a.charOrCode;if(!a.altKey&&!((a.ctrlKey||a.metaKey)&&c!="x"&&c!="v"||c==b.keys.SHIFT)){var e=!1,d=this.dropDown,f=b.keys,h=null;this._prev_key_backspace=!1;this._abortQuery();this.inherited(arguments);this._opened&&(h=d.getHighlightedOption());switch(c){case f.PAGE_DOWN:case f.DOWN_ARROW:case f.PAGE_UP:case f.UP_ARROW:this._opened&&
this._announceOption(h);b.stopEvent(a);break;case f.ENTER:if(h)if(h==d.nextButton){this._nextSearch(1);b.stopEvent(a);break}else{if(h==d.previousButton){this._nextSearch(-1);b.stopEvent(a);break}}else this._setBlurValue(),this._setCaretPos(this.focusNode,this.focusNode.value.length);(this._opened||this._fetchHandle)&&a.preventDefault();case f.TAB:c=this.get("displayedValue");if(d&&(c==d._messages.previousMessage||c==d._messages.nextMessage))break;h&&this._selectOption();if(this._opened)this._lastQuery=
null,this.closeDropDown();break;case " ":h?(b.stopEvent(a),this._selectOption(),this.closeDropDown()):e=!0;break;case f.DELETE:case f.BACKSPACE:e=this._prev_key_backspace=!0;break;default:e=typeof c=="string"||c==229}if(e)this.item=void 0,this.searchTimer=setTimeout(b.hitch(this,"_startSearchFromInput"),1)}},_autoCompleteText:function(a){var b=this.focusNode;f.selectInputText(b,b.value.length);var e=this.ignoreCase?"toLowerCase":"substr";if(a[e](0).indexOf(this.focusNode.value[e](0))==0){if(e=this._getCaretPos(b),
e+1>b.value.length)b.value=a,f.selectInputText(b,e)}else b.value=a,f.selectInputText(b)},_openResultList:function(a,c){this._fetchHandle=null;if(!this.disabled&&!(this.readOnly||c.query[this.searchAttr]!=this._lastQuery)){var e=this.dropDown._highlighted_option&&b.hasClass(this.dropDown._highlighted_option,"dijitMenuItemSelected");this.dropDown.clearResultList();if(!a.length&&!this._maxOptions)this.closeDropDown();else{c._maxOptions=this._maxOptions;var d=this.dropDown.createOptions(a,c,b.hitch(this,
"_getMenuLabelFromItem"));this._showResultList();c.direction?(1==c.direction?this.dropDown.highlightFirstOption():-1==c.direction&&this.dropDown.highlightLastOption(),e&&this._announceOption(this.dropDown.getHighlightedOption())):this.autoComplete&&!this._prev_key_backspace&&!/^[*]+$/.test(c.query[this.searchAttr])&&this._announceOption(d[1])}}},_showResultList:function(){this.closeDropDown(!0);this.displayMessage("");this.openDropDown();f.setWaiState(this.domNode,"expanded","true")},loadDropDown:function(){this._startSearchAll()},
isLoaded:function(){return!1},closeDropDown:function(){this._abortQuery();this._opened&&(this.inherited(arguments),f.setWaiState(this.domNode,"expanded","false"),f.removeWaiState(this.focusNode,"activedescendant"))},_setBlurValue:function(){var a=this.get("displayedValue"),b=this.dropDown;b&&(a==b._messages.previousMessage||a==b._messages.nextMessage)?this._setValueAttr(this._lastValueReported,!0):typeof this.item=="undefined"?(this.item=null,this.set("displayedValue",a)):(this.value!=this._lastValueReported&&
f.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,!0),this._refreshState())},_onBlur:function(){this.closeDropDown();this.inherited(arguments)},_setItemAttr:function(a,b,e){e||(e=this.store.getValue(a,this.searchAttr));var d=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):e;this._set("item",a);f.form.ComboBox.superclass._setValueAttr.call(this,d,b,e)},_announceOption:function(a){if(a){var c;a==this.dropDown.nextButton||a==this.dropDown.previousButton?(c=a.innerHTML,
this.item=void 0,this.value=""):(c=this.store.getValue(a.item,this.searchAttr).toString(),this.set("item",a.item,!1,c));this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);f.setWaiState(this.focusNode,"activedescendant",b.attr(a,"id"));this._autoCompleteText(c)}},_selectOption:function(a){a&&this._announceOption(a.target);this.closeDropDown();this._setCaretPos(this.focusNode,this.focusNode.value.length);f.form._FormValueWidget.prototype._setValueAttr.call(this,this.value,
!0)},_startSearchAll:function(){this._startSearch("")},_startSearchFromInput:function(){this._startSearch(this.focusNode.value.replace(/([\\\*\?])/g,"\\$1"))},_getQueryString:function(a){return b.string.substitute(this.queryExpr,[a])},_startSearch:function(a){if(!this.dropDown){var c=this.id+"_popup";this.dropDown=new (b.getObject(this.dropDownClass,!1))({onChange:b.hitch(this,this._selectOption),id:c,dir:this.dir});f.removeWaiState(this.focusNode,"activedescendant");f.setWaiState(this.textbox,"owns",
c)}c=b.clone(this.query);this._lastInput=a;this._lastQuery=c[this.searchAttr]=this._getQueryString(a);this.searchTimer=setTimeout(b.hitch(this,function(a,c){this.searchTimer=null;var f={queryOptions:{ignoreCase:this.ignoreCase,deep:!0},query:a,onBegin:b.hitch(this,"_setMaxOptions"),onComplete:b.hitch(this,"_openResultList"),onError:function(a){c._fetchHandle=null;console.error("dijit.form.ComboBox: "+a);c.closeDropDown()},start:0,count:this.pageSize};b.mixin(f,c.fetchProperties);this._fetchHandle=
c.store.fetch(f);this._nextSearch=this.dropDown.onPage=b.hitch(this,function(a,b){a.start+=a.count*b;a.direction=b;this._fetchHandle=this.store.fetch(a);this.focus()},this._fetchHandle)},c,this),this.searchDelay)},_setMaxOptions:function(a){this._maxOptions=a},_getValueField:function(){return this.searchAttr},constructor:function(){this.query={};this.fetchProperties={}},postMixInProperties:function(){if(!this.store&&(this.store=new f.form._ComboBoxDataStore(this.srcNodeRef),!("value"in this.params))){var a=
this.item=this.store.fetchSelectedItem();if(a){var b=this._getValueField();this.value=this.store.getValue(a,b)}}this.inherited(arguments)},postCreate:function(){var a=b.query('label[for="'+this.id+'"]');if(a.length)a[0].id=this.id+"_label",f.setWaiState(this.domNode,"labelledby",a[0].id);this.inherited(arguments)},_setHasDownArrowAttr:function(a){this.hasDownArrow=a;this._buttonNode.style.display=a?"":"none"},_getMenuLabelFromItem:function(a){var a=this.labelFunc(a,this.store),b=this.labelType;this.highlightMatch!=
"none"&&this.labelType=="text"&&this._lastInput&&(a=this.doHighlight(a,this._escapeHtml(this._lastInput)),b="html");return{html:b=="html",label:a}},doHighlight:function(a,c){var e=(this.ignoreCase?"i":"")+(this.highlightMatch=="all"?"g":""),d=this.queryExpr.indexOf("${0}"),c=b.regexp.escapeString(c);return this._escapeHtml(a).replace(RegExp((d==0?"^":"")+"("+c+")"+(d==this.queryExpr.length-4?"$":""),e),'<span class="dijitComboBoxHighlightMatch">$1</span>')},_escapeHtml:function(a){return a=String(a).replace(/&/gm,
"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")},reset:function(){this.item=null;this.inherited(arguments)},labelFunc:function(a,b){return b.getValue(a,this.labelAttr||this.searchAttr).toString()}});b.declare("dijit.form._ComboBoxMenu",[f._Widget,f._Templated,f._CssStateMixin],{templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' style='overflow: \"auto\"; overflow-x: \"hidden\";'><li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton' role='option'></li><li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton' role='option'></li></ul>",
_messages:null,baseClass:"dijitComboBoxMenu",postMixInProperties:function(){this.inherited(arguments);this._messages=b.i18n.getLocalization("dijit.form","ComboBox",this.lang)},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages.previousMessage;this.nextButton.innerHTML=this._messages.nextMessage},_setValueAttr:function(a){this.value=a;this.onChange(a)},onChange:function(){},onPage:function(){},onClose:function(){this._blurOptionNode()},_createOption:function(a,
c){var e=b.create("li",{"class":"dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl"),role:"option"}),d=c(a);d.html?e.innerHTML=d.label:e.appendChild(b.doc.createTextNode(d.label));if(e.innerHTML=="")e.innerHTML="&nbsp;";e.item=a;return e},createOptions:function(a,c,e){this.previousButton.style.display=c.start==0?"none":"";b.attr(this.previousButton,"id",this.id+"_prev");b.forEach(a,function(a,c){var d=this._createOption(a,e);b.attr(d,"id",this.id+c);this.domNode.insertBefore(d,
this.nextButton)},this);var d=!1;c._maxOptions&&c._maxOptions!=-1?c.start+c.count<c._maxOptions?d=!0:c.start+c.count>c._maxOptions&&c.count==a.length&&(d=!0):c.count==a.length&&(d=!0);this.nextButton.style.display=d?"":"none";b.attr(this.nextButton,"id",this.id+"_next");return this.domNode.childNodes},clearResultList:function(){for(;this.domNode.childNodes.length>2;)this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-2]);this._blurOptionNode()},_onMouseDown:function(a){b.stopEvent(a)},
_onMouseUp:function(a){if(a.target!==this.domNode&&this._highlighted_option)if(a.target==this.previousButton)this._blurOptionNode(),this.onPage(-1);else if(a.target==this.nextButton)this._blurOptionNode(),this.onPage(1);else{for(a=a.target;!a.item;)a=a.parentNode;this._setValueAttr({target:a},!0)}},_onMouseOver:function(a){if(a.target!==this.domNode){a=a.target;if(!(a==this.previousButton||a==this.nextButton))for(;!a.item;)a=a.parentNode;this._focusOptionNode(a)}},_onMouseOut:function(a){a.target!==
this.domNode&&this._blurOptionNode()},_focusOptionNode:function(a){if(this._highlighted_option!=a)this._blurOptionNode(),this._highlighted_option=a,b.addClass(this._highlighted_option,"dijitMenuItemSelected")},_blurOptionNode:function(){if(this._highlighted_option)b.removeClass(this._highlighted_option,"dijitMenuItemSelected"),this._highlighted_option=null},_highlightNextOption:function(){if(this.getHighlightedOption()){var a=this._highlighted_option.nextSibling;a&&a.style.display!="none"?this._focusOptionNode(a):
this.highlightFirstOption()}else a=this.domNode.firstChild,this._focusOptionNode(a.style.display=="none"?a.nextSibling:a);b.window.scrollIntoView(this._highlighted_option)},highlightFirstOption:function(){var a=this.domNode.firstChild,c=a.nextSibling;this._focusOptionNode(c.style.display=="none"?a:c);b.window.scrollIntoView(this._highlighted_option)},highlightLastOption:function(){this._focusOptionNode(this.domNode.lastChild.previousSibling);b.window.scrollIntoView(this._highlighted_option)},_highlightPrevOption:function(){if(this.getHighlightedOption()){var a=
this._highlighted_option.previousSibling;a&&a.style.display!="none"?this._focusOptionNode(a):this.highlightLastOption()}else a=this.domNode.lastChild,this._focusOptionNode(a.style.display=="none"?a.previousSibling:a);b.window.scrollIntoView(this._highlighted_option)},_page:function(a){var c=0,e=this.domNode.scrollTop,d=b.style(this.domNode,"height");for(this.getHighlightedOption()||this._highlightNextOption();c<d;){if(a){if(!this.getHighlightedOption().previousSibling||this._highlighted_option.previousSibling.style.display==
"none")break;this._highlightPrevOption()}else{if(!this.getHighlightedOption().nextSibling||this._highlighted_option.nextSibling.style.display=="none")break;this._highlightNextOption()}var f=this.domNode.scrollTop;c+=(f-e)*(a?-1:1);e=f}},pageUp:function(){this._page(!0)},pageDown:function(){this._page(!1)},getHighlightedOption:function(){var a=this._highlighted_option;return a&&a.parentNode?a:null},handleKey:function(a){switch(a.charOrCode){case b.keys.DOWN_ARROW:return this._highlightNextOption(),
!1;case b.keys.PAGE_DOWN:return this.pageDown(),!1;case b.keys.UP_ARROW:return this._highlightPrevOption(),!1;case b.keys.PAGE_UP:return this.pageUp(),!1;default:return!0}}});b.declare("dijit.form.ComboBox",[f.form.ValidationTextBox,f.form.ComboBoxMixin],{_setValueAttr:function(a,b,e){this._set("item",null);a||(a="");f.form.ValidationTextBox.prototype._setValueAttr.call(this,a,b,e)}});b.declare("dijit.form._ComboBoxDataStore",null,{constructor:function(a){this.root=a;if(a.tagName!="SELECT"&&a.firstChild)a=
b.query("select",a),a.length>0?a=a[0]:(this.root.innerHTML="<SELECT>"+this.root.innerHTML+"</SELECT>",a=this.root.firstChild),this.root=a;b.query("> option",a).forEach(function(a){a.innerHTML=b.trim(a.innerHTML)})},getValue:function(a,b){return b=="value"?a.value:a.innerText||a.textContent||""},isItemLoaded:function(){return!0},getFeatures:function(){return{"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0}},_fetchItems:function(a,c){if(!a.query)a.query={};if(!a.query.name)a.query.name="";if(!a.queryOptions)a.queryOptions=
{};var e=b.data.util.filter.patternToRegExp(a.query.name,a.queryOptions.ignoreCase),d=b.query("> option",this.root).filter(function(a){return(a.innerText||a.textContent||"").match(e)});a.sort&&d.sort(b.data.util.sorter.createSortFunction(a.sort,this));c(d,a)},close:function(){},getLabel:function(a){return a.innerHTML},getIdentity:function(a){return b.attr(a,"value")},fetchItemByIdentity:function(a){var c=b.query("> option[value='"+a.identity+"']",this.root)[0];a.onItem(c)},fetchSelectedItem:function(){var a=
this.root,c=a.selectedIndex;return typeof c=="number"?b.query("> option:nth-child("+(c!=-1?c+1:1)+")",a)[0]:null}});b.extend(f.form._ComboBoxDataStore,b.data.util.simpleFetch);return f.form.ComboBox});
define("dijit/MenuItem","dojo,dijit,text!dijit/templates/MenuItem.html,dijit/_Widget,dijit/_Templated,dijit/_Contained,dijit/_CssStateMixin".split(","),function(b,f){b.declare("dijit.MenuItem",[f._Widget,f._Templated,f._Contained,f._CssStateMixin],{templateString:b.cache("dijit","templates/MenuItem.html"),attributeMap:b.delegate(f._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");f.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(),f.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){f.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 f.MenuItem});
define("dijit/CheckedMenuItem",["dojo","dijit","text!dijit/templates/CheckedMenuItem.html","dijit/MenuItem"],function(b,f){b.declare("dijit.CheckedMenuItem",f.MenuItem,{templateString:b.cache("dijit","templates/CheckedMenuItem.html"),checked:!1,_setCheckedAttr:function(a){b.toggleClass(this.domNode,"dijitCheckedMenuItemChecked",a);f.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 f.CheckedMenuItem});
define("dijit/PopupMenuItem",["dojo","dijit","dijit/MenuItem"],function(b,f){b.declare("dijit.PopupMenuItem",f.MenuItem,{_fillContent:function(){if(this.srcNodeRef){var a=b.query("*",this.srcNodeRef);f.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=f.byNode(a)}b.body().appendChild(this.popup.domNode);this.popup.startup();
this.popup.domNode.style.display="none";this.arrowWrapper&&b.style(this.arrowWrapper,"visibility","");f.setWaiState(this.focusNode,"haspopup","true")}},destroyDescendants:function(){this.popup&&(this.popup._destroyed||this.popup.destroyRecursive(),delete this.popup);this.inherited(arguments)}});return f.PopupMenuItem});
define("dijit/MenuSeparator","dojo,dijit,text!dijit/templates/MenuSeparator.html,dijit/_Widget,dijit/_Templated,dijit/_Contained".split(","),function(b,f){b.declare("dijit.MenuSeparator",[f._Widget,f._Templated,f._Contained],{templateString:b.cache("dijit","templates/MenuSeparator.html"),buildRendering:function(){this.inherited(arguments);b.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}});return f.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,f){b.declare("dijit._MenuBase",[f._Widget,f._Templated,f._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 b=a.popup;if(b)this._stopPendingCloseTimer(b),b._pendingClose_timer=setTimeout(function(){b._pendingClose_timer=null;if(b.parentMenu)b.parentMenu.currentPopup=null;f.popup.close(b)},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,
b){typeof this.isShowingNow=="undefined"&&this._markActive();this.focusChild(a);if(a.disabled)return!1;a.popup?this._openPopup():(this.onExecute(),a.onClick(b))},_openPopup:function(){this._stopPopupTimer();var a=this.focusedChild;if(a){var c=a.popup;if(!c.isShowingNow){this.currentPopup&&(this._stopPendingCloseTimer(this.currentPopup),f.popup.close(this.currentPopup));c.parentMenu=this;c.from_item=a;var e=this;f.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(){e.focusChild(a);e._cleanUp();a._setSelected(!0);e.focusedChild=a},onExecute:b.hitch(this,"_cleanUp")});this.currentPopup=c;c.connect(c.domNode,"onmouseenter",b.hitch(e,"_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)f._curFocus&&b.isDescendant(f._curFocus,this.currentPopup.domNode)&&this.focusedChild.focusNode.focus(),f.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",f._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 e=a,d=this._iframeContentWindow(e);c=
b.withGlobal(d,b.body)}else c=a==b.body()?b.doc.documentElement:a;var f={node:a,iframe:e};b.attr(a,"_dijitMenu"+this.id,this._bindings.push(f));var h=b.hitch(this,function(a){return[b.connect(a,this.leftClickToOpen?"onclick":"oncontextmenu",this,function(a){b.stopEvent(a);this._scheduleOpen(a.target,e,{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,e))})]});f.connects=c?h(c):[];if(e)f.onloadHandler=b.hitch(this,
function(){var a=this._iframeContentWindow(e);c=b.withGlobal(a,b.body);f.connects=h(c)}),e.addEventListener?e.addEventListener("load",f.onloadHandler,!1):e.attachEvent("onload",f.onloadHandler)},unBindDomNode:function(a){var c;try{c=b.byId(a)}catch(e){return}a="_dijitMenu"+this.id;if(c&&b.hasAttr(c,a)){var d=b.attr(c,a)-1,f=this._bindings[d];b.forEach(f.connects,b.disconnect);var h=f.iframe;h&&(h.removeEventListener?h.removeEventListener("load",f.onloadHandler,!1):h.detachEvent("onload",f.onloadHandler));
b.removeAttr(c,a);delete this._bindings[d]}},_scheduleOpen:function(a,c,e){if(!this._openTimer)this._openTimer=setTimeout(b.hitch(this,function(){delete this._openTimer;this._openMyself({target:a,iframe:c,coords:e})}),1)},_openMyself:function(a){function c(){k.refocus&&f.focus(l);f.popup.close(k)}var e=a.target,d=a.iframe;if(a=a.coords){if(d){var e=b.position(d,!0),g=this._iframeContentWindow(d),g=b.withGlobal(g,"_docScroll",b),h=b.getComputedStyle(d),j=b._toPixelValue,i=(b.isIE&&b.isQuirks?0:j(d,
h.paddingLeft))+(b.isIE&&b.isQuirks?j(d,h.borderLeftWidth):0),d=(b.isIE&&b.isQuirks?0:j(d,h.paddingTop))+(b.isIE&&b.isQuirks?j(d,h.borderTopWidth):0);a.x+=e.x+i-g.x;a.y+=e.y+d-g.y}}else a=b.position(e,!0),a.x+=10,a.y+=10;var k=this,l=f.getFocus(this);f.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);f.popup.close(this)}},uninitialize:function(){b.forEach(this._bindings,function(a){a&&
this.unBindDomNode(a.node)},this);this.inherited(arguments)}});return f.Menu});
define("dijit/DialogUnderlay",["dojo","dijit","dojo/window","dijit/_Widget","dijit/_Templated"],function(b,f){b.declare("dijit.DialogUnderlay",[f._Widget,f._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 e=b.window.getBox();c.top=e.t+"px";c.left=e.l+"px";a.width=e.w+"px";a.height=e.h+"px";c.display="block"},show:function(){this.domNode.style.display="block";this.layout();this.bgIframe=new f.BackgroundIframe(this.domNode)},hide:function(){this.bgIframe.destroy();delete this.bgIframe;this.domNode.style.display="none"}});return f.DialogUnderlay});
define("dijit/form/Form","dojo,dijit,dijit/_Widget,dijit/_Templated,dijit/form/_FormMixin,dijit/layout/_ContentPaneResizeMixin".split(","),function(b,f){b.declare("dijit.form.Form",[f._Widget,f._Templated,f.form._FormMixin,f.layout._ContentPaneResizeMixin],{name:"",action:"",method:"",encType:"","accept-charset":"",accept:"",target:"",templateString:"<form dojoAttachPoint='containerNode' dojoAttachEvent='onreset:_onReset,onsubmit:_onSubmit' ${!nameAttrSetting}></form>",attributeMap:b.delegate(f._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=f.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 f.form.Form});
define("dijit/ProgressBar","dojo,dijit,text!dijit/templates/ProgressBar.html,dojo/fx,dojo/number,dijit/_Widget,dijit/_Templated".split(","),function(b,f){b.declare("dijit.ProgressBar",[f._Widget,f._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,e=1;this.indeterminate?(f.removeWaiState(c,"valuenow"),f.removeWaiState(c,"valuemin"),f.removeWaiState(c,"valuemax")):(String(this.progress).indexOf("%")!=-1?(e=Math.min(parseFloat(this.progress)/
100,1),this.progress=e*this.maximum):(this.progress=Math.min(this.progress,this.maximum),e=this.progress/this.maximum),f.setWaiState(c,"describedby",this.labelNode.id),f.setWaiState(c,"valuenow",this.progress),f.setWaiState(c,"valuemin",0),f.setWaiState(c,"valuemax",this.maximum));this.labelNode.innerHTML=this.report(e);b.toggleClass(this.domNode,"dijitProgressBarIndeterminate",this.indeterminate);a.style.width=e*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 f.ProgressBar});
define("dojo/dnd/Container",["dojo","dojo/dnd/common","dojo/parser"],function(b){b.declare("dojo.dnd.Container",null,{skipForm:!1,constructor:function(f,a){this.node=b.byId(f);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(f,a){var a=a||b.global,c=this.map,e=b.dnd._empty,d;for(d in c)d in e||f.call(a,c[d],d,this);return a},clearItems:function(){this.map={}},getAllNodes:function(){return b.query("> .dojoDndItem",this.parent)},
sync:function(){var f={};this.getAllNodes().forEach(function(a){if(a.id){var c=this.getItem(a.id);if(c){f[a.id]=c;return}}else a.id=b.dnd.getUniqueId();var c=a.getAttribute("dndType"),e=a.getAttribute("dndData");f[a.id]={data:e||a.innerHTML,type:c?c.split(/\s*,\s*/):["text"]}},this);this.map=f;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 e=this._normalizedCreator(b[a]);
this.setItem(e.node.id,{data:e.data,type:e.type});this.parent.insertBefore(e.node,c)}else for(a=0;a<b.length;++a)e=this._normalizedCreator(b[a]),this.setItem(e.node.id,{data:e.data,type:e.type}),this.parent.appendChild(e.node);return this},destroy:function(){b.forEach(this.events,b.disconnect);this.clearItems();this.node=this.parent=this.current=null},markupFactory:function(f,a){f._skipStartup=!0;return new b.dnd.Container(a,f)},startup:function(){if(!this.parent&&(this.parent=this.node,this.parent.tagName.toLowerCase()==
"table")){var f=this.parent.getElementsByTagName("tbody");if(f&&f.length)this.parent=f[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(f){(!this.skipForm||!b.dnd.isFormElement(f))&&b.stopEvent(f)},onOverEvent:function(){},onOutEvent:function(){},_changeState:function(f,a){var c="dojoDnd"+f,e=f.toLowerCase()+"State";b.replaceClass(this.node,c+a,c+this[e]);this[e]=a},_addItemClass:function(f,a){b.addClass(f,
"dojoDndItem"+a)},_removeItemClass:function(f,a){b.removeClass(f,"dojoDndItem"+a)},_getChildByEvent:function(f){if(f=f.target)for(var a=f.parentNode;a;f=a,a=f.parentNode)if(a==this.parent&&b.hasClass(f,"dojoDndItem"))return f;return null},_normalizedCreator:function(f,a){var c=(this.creator||this.defaultCreator).call(this,f,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(f){return!f?b.dnd._createSpan:
function(a){return b.create(f,{innerHTML:a})}};b.dnd._createTrTd=function(f){var a=b.create("tr");b.create("td",{innerHTML:f},a);return a};b.dnd._createSpan=function(f){return b.create("span",{innerHTML:f})};b.dnd._defaultCreatorNodes={ul:"li",ol:"li",div:"div",p:"div"};b.dnd._defaultCreator=function(f){var f=f.tagName.toLowerCase(),a=f=="tbody"||f=="thead"?b.dnd._createTrTd:b.dnd._createNode(b.dnd._defaultCreatorNodes[f]);return function(c,e){var d=c&&b.isObject(c),f,h;d&&c.tagName&&c.nodeType&&
c.getAttribute?(f=c.getAttribute("dndData")||c.innerHTML,d=(d=c.getAttribute("dndType"))?d.split(/\s*,\s*/):["text"],h=c):(f=d&&c.data?c.data:c,d=d&&c.type?c.type:["text"],h=(e=="avatar"?b.dnd._createSpan:a)(String(f)));if(!h.id)h.id=b.dnd.getUniqueId();return{node:h,data:f,type:d}}};return b.dnd.Container});
define("dijit/tree/_dndContainer",["dojo","dijit","dojo/dnd/common","dojo/dnd/Container"],function(b,f){b.getObject("tree",!0,b);f.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 e=doc.createRange();e.setStartBefore(a);var d=doc.createRange();d.setStartBefore(b);return e.compareBoundaryPoints(e.END_TO_END,
d)}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 e="dojoDnd"+a,d=a.toLowerCase()+"State";b.replaceClass(this.node,e+c,e+this[d]);
this[d]=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 f.tree._dndContainer});
define("dijit/tree/_dndSelector",["dojo","dijit","dojo/dnd/common","dijit/tree/_dndContainer"],function(b,f){b.declare("dijit.tree._dndSelector",f.tree._dndContainer,{constructor:function(){this.selection={};this.anchor=null;f.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,e;for(e in b)a.push(b[e]);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 e=b.filter(a,function(a){return!a.__exclude__});b.forEach(c,function(a){delete a.__exclude__});return e},_updateSelectionProperties:function(){var a=
this.getSelectedTreeNodes(),c=[],e=[];b.forEach(a,function(a){e.push(a);c.push(a.getTreePath())});a=b.map(e,function(a){return a.item});this.tree._set("paths",c);this.tree._set("path",c[0]||[]);this.tree._set("selectedNodes",e);this.tree._set("selectedNode",e[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,
e=b.isCopyKey(a),d=c.id;!this.singular&&!a.shiftKey&&this.selection[d]?this._doDeselect=!0:(this._doDeselect=!1,this.userSelect(c,e,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,e){if(this.singular)this.anchor==a&&b?this.selectNone():(this.setSelection([a]),this.anchor=a);else if(e&&this.anchor){e=this.anchor;f.tree._compareNodes(this.anchor.rowNode,
a.rowNode)<0?b=e:(b=a,a=e);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,e;for(e in this.selection)a.call(c,this.getItem(e),e,this)}});return f.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,f){b.declare("dijit._TreeNode",[f._Widget,f._Templated,f._Container,f._Contained,f._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(f._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&&f.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,e=b.model;b._v10Compat&&a===e.root&&(a=null);
this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a,"row","Row")},_applyClassAndStyle:function(a,c,e){var d="_"+c+"Class";c+="Node";var f=this[d];this[d]=this.tree["get"+e+"Class"](a,this.isExpanded);b.replaceClass(this[c],this[d]||"",f||"");b.style(this[c],this.tree["get"+e+"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;f.setWaiState(this.labelNode,"expanded","true");(this.tree.showRoot||
this!==this.tree.rootNode)&&f.setWaiRole(this.containerNode,"group");b.addClass(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&f.setWaiState(this.tree.domNode,"expanded","true");var a,c=b.fx.wipeIn({node:this.containerNode,duration:f.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;f.setWaiState(this.labelNode,"expanded","false");this==this.tree.rootNode&&f.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:f.defaultDuration});this._wipeOut.play()}},indent:0,setChildItems:function(a){var c=this.tree,e=c.model,
d=[];b.forEach(this.getChildren(),function(a){f._Container.prototype.removeChild.call(this,a)},this);this.state="LOADED";a&&a.length>0?(this.isExpandable=!0,b.forEach(a,function(a){var b=e.getIdentity(a),f=c._itemNodesMap[b],i;if(f)for(var k=0;k<f.length;k++)if(f[k]&&!f[k].getParent()){i=f[k];i.set("indent",this.indent+1);break}i||(i=this.tree._createTreeNode({item:a,tree:c,isExpandable:e.mayHaveChildren(a),label:c.getLabel(a),tooltip:c.getTooltip(a),dir:c.dir,lang:c.lang,indent:this.indent+1}),f?
f.push(i):c._itemNodesMap[b]=[i]);this.addChild(i);(this.tree.autoExpand||this.tree._state(a))&&d.push(c._expandNode(i))},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(d)},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){f.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",[f._Widget,f._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,d){this.getItemChildren(this._v10Compat&&a===this.model.root?null:a,b,d)});this.model=new f.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",f.setWaiRole(this.domNode,"presentation"),f.setWaiRole(c.labelNode,"presentation"),f.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 e=b.map(a,function(a){return!a||b.isString(a)?a:c.model.getIdentity(a)}),d=[];b.forEach(e,function(a){d=d.concat(c._itemNodesMap[a]||[])});this.set("selectedNodes",d)}))},_setPathAttr:function(a){return a.length?
this.set("paths",[a]):this.set("paths",[])},_setPathsAttr:function(a){function c(a,f,h){var j=a.shift(),i=b.filter(f,function(a){return a.getIdentity()==j})[0];i?a.length?e._expandNode(i).addCallback(function(){c(a,i.getChildren(),h)}):h.callback(i):h.errback("Could not expand path at "+j)}var e=this;return(new b.DeferredList(b.map(a,function(a){var f=new b.Deferred,a=b.map(a,function(a){return b.isString(a)?a:e.model.getIdentity(a)});a.length?e._loadDeferred.addCallback(function(){c(a,[e.rootNode],
f)}):f.errback("Empty path");return f}))).addCallback(function(a){e.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,e=f.getEnclosingWidget(a.target);if(e){var d=a.charOrCode;if(typeof d=="string"&&d!=" ")!a.altKey&&!a.ctrlKey&&!a.shiftKey&&!a.metaKey&&(this._onLetterKeyNav({node:e,key:d.toLowerCase()}),b.stopEvent(a));else{this._curSearch&&(clearTimeout(this._curSearch.timer),
delete this._curSearch);var g=this._keyHandlerMap;if(!g)g={},g[c.ENTER]="_onEnterKey",g[c.SPACE]=g[" "]="_onEnterKey",g[this.isLeftToRight()?c.LEFT_ARROW:c.RIGHT_ARROW]="_onLeftArrow",g[this.isLeftToRight()?c.RIGHT_ARROW:c.LEFT_ARROW]="_onRightArrow",g[c.UP_ARROW]="_onUpArrow",g[c.DOWN_ARROW]="_onDownArrow",g[c.HOME]="_onHomeKey",g[c.END]="_onEndKey",this._keyHandlerMap=g;this._keyHandlerMap[d]&&(this[this._keyHandlerMap[d]]({node:e,item:e.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 e=this;b.timer=setTimeout(function(){delete e._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 e=this.isExpandoNode(c.target,a);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));b.stopEvent(c)},_onDblClick:function(a,c){var e=c.target,e=e==a.expandoNode||e==a.expandoNodeText;this.openOnDblClick&&a.isExpandable||e?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 e=this.model,d=a.item,f=this;switch(a.state){case "UNCHECKED":a.markProcessing();var h=a._expandNodeDeferred=new b.Deferred;e.getChildren(d,function(b){a.unmarkProcessing();var b=a.setChildItems(b),c=f._expandNode(a,
!0);b.addCallback(function(){c.addCallback(function(){h.callback()})})},function(a){console.error(f,": error loading root children: ",a)});break;default:h=a._expandNodeDeferred=a.expand(),this.onOpen(a.item,a),d&&(this._state(d,!0),this._saveState())}return h},focusNode:function(a){f.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 e=this.getLabel(a),d=this.getTooltip(a);b.forEach(c,function(b){b.set({item:a,label:e,tooltip:d});b._updateItemClasses(a)})}},_onItemChildrenChange:function(a,c){var e=this._itemNodesMap[this.model.getIdentity(a)];e&&b.forEach(e,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 e=this.model.getIdentity(a);if(arguments.length===1)return this._openedItemIds[e];b?this._openedItemIds[e]=!0:delete this._openedItemIds[e]},_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 f._TreeNode(a)}});return f.Tree});
define("orion/widgets/ExplorerTree",["dojo","dijit","dijit/Tree","text!orion/widgets/templates/_ExplorerTreeNode.html"],function(b,f){b.declare("orion.widgets._ExplorerTreeNode",[f._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",
[f.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,e){a.push(e.item)});return a},_getSelectedNodes:function(){var a=[];this._forEachSelectedNode(function(b,e){a.push(e)});
return a},_forEachSelectedNode:function(a){var b=this.selectedNodes,e;for(e in b)b.hasOwnProperty(e)&&a(e,b[e])},_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 e=c.target,d=e===a.expandoNode||e===a.expandoNodeText,e=e===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(e)this.onFollowClick(a.item,a,c);else 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));!d&&!e&&this._selectNode(a)}e||b.stopEvent(c)},_onItemDelete:function(a){var c=this._itemNodesMap[this.model.getIdentity(a)];if(c){var e=this;b.forEach(c,function(a){e._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 e(a,b){var c=[],d=a;do c.push(d),d=h._getNextNode(d);while(d&&d!==b);return d===b?
(c.push(b),c):null}var d=this._getVisibleAncestor(a),f=this._getVisibleAncestor(b);if(d&&f)if(d===f)this._selectNode(d);else{var h=this,j=e(d,f);j?this._selectNodes(j.reverse(),!0):(j=e(f,d))?this._selectNodes(j,!0):console.debug("Warning: couldn't select range from "+d.label+" to "+f.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 e=
a[b];e.setSelected(!0);this._addToSelection(e);this.selectedNode=e}}})});
define("dojo/hash",["dojo"],function(b){(function(){function f(a,b){var c=a.indexOf(b);return c>=0?a.substring(c+1):""}function a(){return f(location.href,"#")}function c(){b.publish("/dojo/hashchange",[a()])}function e(){a()!==h&&(h=a(),c())}function d(a){if(j)if(j.isTransitioning())setTimeout(b.hitch(null,d,a),k);else{var c=j.iframe.location.href,f=c.indexOf("?");j.iframe.location.replace(c.substring(0,f)+"?"+a)}else location.replace("#"+a),!i&&e()}function g(){function d(){h=a();i=t?h:f(s.href,
"?");j=!1;r=null}var e=document.createElement("iframe"),g=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");e.id="dojo-hash-iframe";e.src=g+"?"+a();e.style.display="none";document.body.appendChild(e);this.iframe=b.global["dojo-hash-iframe"];
var i,j,r,q,t,s=this.iframe.location;this.isTransitioning=function(){return j};this.pollLocation=function(){if(!t)try{var u=f(s.href,"?");if(document.title!=q)q=this.iframe.document.title=document.title}catch(w){t=!0,console.error("dojo.hash: Error adding history entry. Server unreachable.")}var v=a();if(j&&h===v)if(t||u===r)d(),c();else{setTimeout(b.hitch(this,this.pollLocation),0);return}else if(!(h===v&&(t||i===u)))if(h!==v){h=v;j=!0;r=v;e.src=g+"?"+r;t=!1;setTimeout(b.hitch(this,this.pollLocation),
0);return}else if(!t)location.href="#"+s.search.substring(1),d(),c();setTimeout(b.hitch(this,this.pollLocation),k)};d();setTimeout(b.hitch(this,this.pollLocation),k)}b.hash=function(b,c){if(!arguments.length)return a();b.charAt(0)=="#"&&(b=b.substring(1));c?d(b):location.href="#"+b;return b};var h,j,i,k=b.config.hashPollFrequency||100;b.addOnLoad(function(){"onhashchange"in b.global&&(!b.isIE||b.isIE>=8&&document.compatMode!="BackCompat")?i=b.connect(b.global,"onhashchange",c):document.addEventListener?
(h=a(),setInterval(e,k)):document.attachEvent&&(j=new g)})})();return b.hash});
define("orion/util",["i18n!orion/nls/messages","dojo","dijit","dojo/hash","dijit/form/ValidationTextBox"],function(b,f,a){function c(a){var b=window.navigator.platform.indexOf("Mac")!==-1;return b&&a.metaKey||!b&&a.ctrlKey}function e(a){return typeof a.textContent!=="undefined"?a.textContent:a.innerText}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 e in f.keys)if(typeof(f.keys[e]==="number")&&f.keys[e]===a.keyCode)return b+e;var i;switch(a.keyCode){case 59:i=a.mod2?":":";";break;case 61:i=a.mod2?"+":"=";break;case 188:i=a.mod2?"<":",";break;case 190:i=a.mod2?">":".";break;case 191:i=a.mod2?"?":"/";break;case 192:i=a.mod2?"~":"`";break;case 219:i=a.mod2?"{":"[";break;case 220:i=a.mod2?"|":"\\";break;case 221:i=a.mod2?"}":"]";break;case 222:i=a.mod2?'"':"'"}return i?b+i:b+String.fromCharCode(a.keyCode)},openDialog:function(b,
c){b.startup();if(typeof c==="string"){var e=f.byId(c);if(!e&&(e=a.byId(c)))e=e.domNode;c=e?e:null}c&&(e=f.position(c),b._setStyleAttr("left:"+(e.x+16)+"px !important;"),b._setStyleAttr("top:"+(e.y+16)+"px !important;"));b.show()},getUserText:function(b,c,e,j,i,k,l,m,n){var l=function(l){return function(m){var o=a.byId(b),t=o.get("value");l&&m.keyCode===f.keys.ESCAPE?(e&&f.style(c,"display","inline"),o.destroyRecursive(),k&&k()):l&&m.keyCode!==f.keys.ENTER||(!o.isValid()||!n&&t===j?e&&f.style(c,"display",
"inline"):i(t),o.destroyRecursive(),k&&k())}},o=new a.form.ValidationTextBox({id:b,required:!0,value:j||""});f.place(o.domNode,c,"after");f.addClass(o.domNode,"userEditBoxPrompt");e&&f.style(c,"display","none");f.connect(o,"onKeyDown",l(!0));f.connect(o,"onBlur",l(!1));window.setTimeout(function(){o.focus();if(j){var c=f.byId(b),e=m?j.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},makeRelative:function(a){if(!a)return a;
var b=window.location.protocol+"//"+window.location.host;return a.indexOf(b)===0?a.substring(b.length):a},makeFullPath:function(a){if(!a)return a;var b=window.location.protocol+"//"+window.location.host;a.charAt(0)!=="/"&&(a="/"+a);return b+a},isAtRoot:function(a){return this.makeRelative(a).indexOf("/workspace")===0},processNavigatorParent:function(a,b){a.children=b;for(var c in b)b[c].parent=a;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})},getText:e,safeText:function(a){return e(document.createTextNode(a))},setText:function(a,b){typeof a.textContent!=="undefined"?a.textContent=b:a.innerText=b},forceLayout:function(b){for(typeof b==="string"&&(b=f.byId(b));b;){var c=a.byId(b.id);if(c&&typeof c.layout==="function"){c.layout();break}b=b.parentNode}},saveFileContents:function(a,c,e,f){a.write(c.Location,e,{ETag:c.ETag}).then(function(){f&&f()},function(i){i.status===412?window.confirm(b["Resource is out of sync with the server. Do you want to save it anyway?"])&&
a.write(c.Location,e).then(function(a){c.ETag=a.ETag;f&&f()}):i.log=!0})},splitFile:function(a){for(var b=0,c=0,e=0,f=0,k=[];;){b!==-1&&b<=e&&(b=a.indexOf("\r",e));c!==-1&&c<=e&&(c=a.indexOf("\n",e));if(c===-1&&b===-1){k.push(a.substring(f));break}var l=1;b!==-1&&c!==-1?b+1===c?(l=2,e=c+1):e=(b<c?b:c)+1:e=b!==-1?b+1:c+1;k.push(a.substring(f,e-l));f=e}return k}}});
define("orion/status",["require","dojo","orion/util"],function(b,f,a){function c(a,b,c,e,f){this._serviceRegistry=a;this._serviceRegistration=a.registerService("orion.page.message",this);this._operationsClient=b;this.notificationContainerDomId=f;this.domId=c;this.progressDomId=e||c;this._hookedClose=!1}function e(a,b,c,e){this.statusService=a;this.progressId=b;if(c){this.deferred=c;this.begin(e);var i=this;c.then(function(){f.hitch(i,i.done)()},function(){f.hitch(i,i.done)()})}}c.prototype={_init:function(){var a=
f.byId("closeNotifications");a&&!this._hookedClose&&(f.connect(a,"onclick",this,function(){this.setProgressMessage("");f.removeClass(this.notificationContainerDomId,"slideContainerActive")}),f.connect(a,"onkeypress",this,function(a){if(a.keyCode===f.keys.ENTER||a.keyCode===f.keys.SPACE)this.setProgressMessage(""),f.removeClass(this.notificationContainerDomId,"slideContainerActive")}))},setMessage:function(a,b,c){this._init();this.currentMessage=a;if(typeof c==="boolean"){var e=this,i=f.byId(this.domId),
k=f.attr(i,"aria-live");f.attr(i,"aria-live",c?"polite":"off");window.setTimeout(function(){f.place(window.document.createTextNode(a),e.domId,"only")},100);window.setTimeout(function(){f.attr(i,"aria-live",k)},200)}else f.place(window.document.createTextNode(a),this.domId,"only");typeof b==="number"&&(e=this,window.setTimeout(function(){var b=f.byId(e.domId);(typeof b.textContent==="string"?b.textContent:b.innerText)===a&&f.place(window.document.createTextNode(""),e.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,e="red";if(b.Severity)switch(b.Severity){case "Warning":e="#FFCC00";break;case "Error":e="red";break;case "Info":case "Ok":e="green"}b=f.create("span",{style:{color:e}});f.place(window.document.createTextNode(a),b);f.place(b,this.domId,"only")},setProgressMessage:function(b){this._init();this.currentMessage=b;var c=f.create("span",{"class":"imageSprite core-sprite-progress"});f.place(c,this.progressDomId,
"only");f.place(window.document.createTextNode(b),this.progressDomId,"last");f.addClass(this.notificationContainerDomId,"progressNormal");b&&b.length>0?f.addClass(this.notificationContainerDomId,"slideContainerActive"):this._progressMonitors&&this._progressMonitors.length>0?this._renderOngoingMonitors():f.removeClass(this.notificationContainerDomId,"slideContainerActive");a.forceLayout(this.notificationContainerDomId)},setProgressResult:function(b){this.currentMessage=b;b=b.responseText||b;try{b=
JSON.parse(b)}catch(c){}this._init();var e=b.Message||b,j="imageSprite core-sprite-info",i="progressInfo",k="progressWarning progressError progressNormal";if(b.Severity)switch(b.Severity){case "Warning":j="imageSprite core-sprite-warning";i="progressWarning";k="progressInfo progressError progressNormal";break;case "Error":j="imageSprite core-sprite-error",i="progressError",k="progressWarning progressInfo progressNormal"}j=f.create("span",{"class":j});f.place(j,this.progressDomId,"only");b.HTML?f.place(e,
this.progressDomId,"last"):(f.place(window.document.createTextNode("   "+e),this.progressDomId,"last"),i&&this.progressDomId!==this.domId&&(f.addClass(this.notificationContainerDomId,i),f.removeClass(this.notificationContainerDomId,k)));f.addClass(this.notificationContainerDomId,"slideContainerActive");a.forceLayout(this.notificationContainerDomId)},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 e(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;e.prototype=new f.Deferred;e.prototype.begin=function(a){this.status=a;this.statusService._beginProgressMonitor(this)};e.prototype.done=function(a){this.status=a;this.statusService._doneProgressMonitor(this)};
e.prototype.worked=function(a){this.status=a;this.statusService._workedProgressMonitor(this)};e.prototype.constructor=e;return{StatusReportingService:c,ProgressMonitor:e}});
define("orion/searchUtils",["require","dojo","orion/editor/regex","orion/util"],function(b,f,a,c){var e=e||{};e.searchUtils=e.searchUtils||{};e.searchUtils.parseQueryStr=function(a){var b=a.indexOf("?"),c=a.indexOf("q=");b<c&&c>0&&(a=a.substring(b+1));b=a.split("&");a={queryStr:a,start:0,rows:10,sort:"Path asc",replace:null};for(c=0;c<b.length;c++){var f=b[c].indexOf("q="),i=b[c].indexOf("replace=");if(f>=0)e.searchUtils.parseLocationAndSearchStr(b[c].substring(f+2),a);else if(i>=0)a.replace=b[c].substring(i+
8);else if(f=b[c].split("="),f.length===2)if(f[0]==="rows")a.rows=parseInt(f[1]);else if(f[0]==="start")a.start=parseInt(f[1]);else if(f[0]==="sort")a.sort=f[1]}return a};e.searchUtils.copyQueryParams=function(a,b){return{sort:a.sort,rows:a.rows,start:a.start,searchStr:a.searchStr,location:a.location,replace:b?a.replace:null}};e.searchUtils.generateSearchHref=function(a){return b.toUrl("search/search.html")+"#"+e.searchUtils.generateSearchQuery(a)};e.searchUtils.generateSearchQuery=function(a){var b=
"Path asc",c=40,e=0,f="",k="",l="";if(a){if(a.sort)b=a.sort;if(a.rows)c=a.rows;if(a.start)e=a.start;if(a.searchStr)f=a.searchStr,f=f.split(" ").join("");if(a.location)k=a.location,k.length>0&&k[k.length-1]!=="*"&&(k+="*"),k!==""&&(k="+Location:"+k);a.replace!==null&&a.replace!==void 0&&(l="&replace="+a.replace)}return"?sort="+b+"&rows="+c+"&start="+e+"&q="+f+k+l};e.searchUtils.parseLocationAndSearchStr=function(a,b){var c=a.indexOf("+Location:")>-1;b.location="";b.searchStr=a;if(c&&(c=a.split("+Location:"),
c.length===2)){var f=c[1];f.length>0&&f[f.length-1]==="*"&&(f=f.substring(0,f.length-1));b.location=f;b.searchStr=c[0].split(" ").join("")}b.searchStrTitle=b.searchStr.split("\\").join("");b.inFileQuery=e.searchUtils.generateInFileQuery(b.searchStr)};e.searchUtils.generateInFileQuery=function(b){var c={};c.originalSearchStr=b;var e=b.indexOf("*")>-1,f=b.indexOf("?")>-1;e&&(b=b.split("*").join(".*"));f&&(b=b.split("?").join("."));if(!e&&!f)c.searchStr=b.split("\\").join("").toLowerCase(),c.wildCard=
!1;else if(c.searchStr=b.toLowerCase(),e=a.parse("/"+c.searchStr+"/"))b=e.pattern,e=e.flags,e+=e.indexOf("i")===-1?"i":"",c.regExp={pattern:b,flags:e},c.wildCard=!0;c.searchStrLength=c.searchStr.length;return c};e.searchUtils.generateFindURLBinding=function(a,b,c){a=",find="+a.originalSearchStr;typeof c==="string"&&(a=a+"@@replaceWith@@"+c);typeof b==="number"&&(a=a+"@@atLine@@"+b);return a};e.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@@"),f=c[0];c.length>1&&(a=c[1]);c=e.searchUtils.generateInFileQuery(f);return{searchStr:c.searchStr,replaceStr:a,lineNumber:b,useRegExp:c.wildCard}};e.searchUtils.replaceRegEx=function(a,b,c){return a.replace(RegExp(b.pattern,b.flags),c)};e.searchUtils.replaceStringLiteral=function(b,c,f){c=a.parse("/"+c+"/gim");return e.searchUtils.replaceRegEx(b,c,f)};e.searchUtils.searchOnelineLiteral=function(a,b,c){var e;e=0;for(var f=!1,k=[];;)if(e=b.indexOf(a.searchStr,
e),e<0)break;else{k.push({startIndex:e});f=!0;if(c)break;e+=a.searchStrLength}return f?k:null};e.searchUtils.findRegExp=function(a,b,c,e){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(e)))&&{startIndex:f.index+e,length:f[0].length}};e.searchUtils.searchOnelineRegEx=function(a,b,c){for(var f=0,i=!1,k=[];;)if(f=e.searchUtils.findRegExp(b,a.regExp.pattern,a.regExp.flags,f)){k.push(f);i=!0;if(c)break;f=f.startIndex+
f.length}else break;return i?k:null};e.searchUtils.generateNewContents=function(a,b,c,f,i){if(c&&a){var k;k=b.length>0?!0:!1;for(var l=0;l<a.length;l++){for(var m=a[l],n=!1,o=!1,p=[],r,q=0,t=0;t<c.children.length;t++)if(c.children[t].lineNumber-1===l){q=t;for(n=0;n<c.children[t].matches.length;n++)c.children[t+n].checked!==!1&&p.push(n);o=p.length>0;r=c.children[t].matches;n=!0;break}if(n){if(o){p=e.searchUtils.replaceCheckedMatches(m,f,r,p,i);m=p.replacedStr;for(n=0;n<c.children[q].matches.length;n++)c.children[q+
n].newMatches=p.newMatches}else for(n=0;n<c.children[q].matches.length;n++)c.children[q+n].newMatches=c.children[q+n].matches;k?b[l]=m:b.push(m)}else k||b.push(m)}}};e.searchUtils.generateMatchContext=function(a,b,c){var e=[],f=a*2+1,k;b.length<=f?(k=0,a=b.length-1):(k=c-a,k<0?(k=0,a=k+f-1):(a=c+a,a>b.length-1&&(a=b.length-1,k=a-f+1)));for(f=k;f<=a;f++)e.push({context:b[f],current:f===c});return e};e.searchUtils.searchWithinFile=function(a,b,f,j,i,k){f=c.splitFile(f);if(i)b.contents=f;if(b){b.children=
[];for(var l=j=0;l<f.length;l++){var m=f[l];if(m&&m.length>0){var n=k?m:m.toLowerCase();if(n=a.wildCard?e.searchUtils.searchOnelineRegEx(a,n):e.searchUtils.searchOnelineLiteral(a,n)){var o=l+1;if(i)for(var p=0;p<n.length;p++){var r=p+1,r={parent:b,checked:b.checked,type:"detail",matches:n,lineNumber:o,matchNumber:r,name:m,location:b.location+"-"+o+"-"+r};b.children.push(r)}else r={parent:b,context:e.searchUtils.generateMatchContext(2,f,l),checked:b.checked,type:"detail",matches:n,lineNumber:o,name:m,
location:b.location+"-"+o},b.children.push(r);j+=n.length}}}b.totalMatches=j}};e.searchUtils.replaceCheckedMatches=function(a,b,c,e,f){for(var k=0,l="",m=[],n=0;n<c.length;n++){k!==c[n].startIndex&&(l+=a.substring(k,c[n].startIndex));if(c[n].length)f=c[n].length;for(var k=!1,o=0;o<e.length;o++)if(e[o]===n){k=!0;break}k?(m.push({startIndex:l.length,length:b.length}),l+=b):(m.push({startIndex:l.length,length:f}),l+=a.substring(c[n].startIndex,c[n].startIndex+f));k=c[n].startIndex+f}k<a.length&&(l+=
a.substring(k));return{replacedStr:l,newMatches:m}};e.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};e.searchUtils.path2FolderName=function(a,b,c){return a.substring(0,a.length-b.length-(c?0:1))};return e.searchUtils});
define("orion/breadcrumbs",["require","dojo","orion/util"],function(b,f,a){function c(a){this._init(a)}c.prototype={_init:function(a){var b=a.container;typeof b==="string"&&(b=f.byId(b));if(!b)throw"no parent container";this._container=b;f.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");f.place(document.createTextNode(this._workspaceRootSegmentName),a,"only");return a}return null},render:function(){var c=this._container,d=f.byId(this._id);d?f.empty(d):(d=document.createElement("span"),d.id=this._id,c.appendChild(d));var g;if(g=this.getNavigatorWorkspaceRootSegment())if(f.addClass(g,"breadcrumb"),d.appendChild(g),
this._resource&&this._resource.Parents)g=document.createElement("span"),f.place(document.createTextNode(" / "),g,"only"),this.path+="/",f.addClass(g,"breadcrumbSeparator"),d.appendChild(g);else{g.href="";f.removeClass(g,"breadcrumb");f.addClass(g,"currentLocation");a.forceLayout(c);return}var h=this._rootSegmentName;if(this._resource){if(this._resource.Parents)for(var j=this._resource.Parents,i=j.length;--i>=0;)g=document.createElement("a"),f.addClass(g,"breadcrumb"),h?(f.place(document.createTextNode(h),
g,"only"),h=null):f.place(document.createTextNode(j[i].Name),g,"only"),this.path+=j[i].Name,this._makeHref?this._makeHref(g,j[i].Location):g.href=b.toUrl("navigate/table.html")+"#"+j[i].ChildrenLocation,d.appendChild(g),g=document.createElement("span"),f.place(document.createTextNode(" / "),g,"only"),this.path+="/",f.addClass(g,"breadcrumbSeparator"),d.appendChild(g);g=document.createElement("span");h?(f.place(document.createTextNode(h),g,"only"),h=null):f.place(document.createTextNode(this._resource.Name),
g,"only");f.addClass(g,"currentLocation");this.path+=this._resource.Name;d.appendChild(g)}d.childNodes.length===0&&(g=document.createElement("a"),f.place(document.createTextNode(h||document.title),g,"only"),f.addClass(g,"breadcrumb"),f.addClass(g,"currentLocation"),d.appendChild(g));a.forceLayout(c)}};c.prototype.constructor=c;return{BreadCrumbs:c}});
define("orion/favorites",["require","dojo","orion/util"],function(b,f,a){function c(a){this._favorites=[];this._init(a);this._initializeFavorites()}c.prototype={_init:function(a){this._registry=a.serviceRegistry;this._serviceRegistration=this._registry.registerService("orion.core.favorite",this)},_notifyListeners:function(){this._serviceRegistration.dispatchEvent("favoritesChanged",{navigator:this._favorites,registry:this._registry})},makeFavorites:function(b){for(var b=f.isArray(b)?b:[b],c=0;c<b.length;c++){var g=
b[c],h=g.ChildrenLocation?g.ChildrenLocation:g.Location,h=a.makeRelative(h);this.addFavorite(g.Name,h,g.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,f;for(f in this._favorites)if(this._favorites[f].path===a){var j=this._favorites[f];if(j.name!==b)j.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 f=a.charAt(b);c+=f==="*"?".*":f==="?"?".?":this._SPECIAL_CHARS.indexOf(f)>=0?"\\"+f:f}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(),f=b.name.toLowerCase();return c>f?1:c<f?-1:0},getFavorites:function(){return{navigator:this._favorites}}};c.prototype.constructor=c;return{FavoritesService:c}});
define("dijit/layout/BorderContainer",["dojo","dijit","dijit/layout/_LayoutWidget","dojo/cookie","dijit/_Templated"],function(b,f){b.declare("dijit.layout.BorderContainer",f.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 e=this.isLeftToRight();c=="leading"&&(c=e?"left":"right");c=="trailing"&&(c=e?"right":"left");if(c!="center"&&(a.splitter||this.gutters)&&!a._splitterWidget)e=new (b.getObject(a.splitter?this._splitterClass:"dijit.layout._Gutter"))({id:a.id+"_splitter",container:this,child:a,region:c,live:this.liveSplitters}),e.isSplitter=!0,a._splitterWidget=e,b.place(e.domNode,
a.domNode,"after"),e.startup();a.region=c}},layout:function(){this._layoutChildren()},addChild:function(a,b){this.inherited(arguments);this._started&&this.layout()},removeChild:function(a){var c=a.region,e=a._splitterWidget;e&&(e.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(b){return b.region==a})[0]._splitterWidget},resize:function(a,c){if(!this.cs||!this.pe){var e=this.domNode;this.cs=b.getComputedStyle(e);this.pe=b._getPadExtents(e,this.cs);this.pe.r=b._toPixelValue(e,this.cs.paddingRight);this.pe.b=b._toPixelValue(e,this.cs.paddingBottom);b.style(e,"padding","0px")}this.inherited(arguments)},
_layoutChildren:function(a,c){if(this._borderBox&&this._borderBox.h){var e=b.map(this.getChildren(),function(a,b){return{pane:a,weight:[a.region=="center"?Infinity:0,a.layoutPriority,(this.design=="sidebar"?1:-1)*(/top|bottom/.test(a.region)?1:-1),b]}},this);e.sort(function(a,b){for(var c=a.weight,d=b.weight,e=0;e<c.length;e++)if(c[e]!=d[e])return c[e]-d[e];return 0});var d=[];b.forEach(e,function(a){a=a.pane;d.push(a);a._splitterWidget&&d.push(a._splitterWidget)});f.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},d,a,c)}},destroyRecursive:function(){b.forEach(this.getChildren(),function(a){var b=a._splitterWidget;b&&b.destroy();delete a._splitterWidget});this.inherited(arguments)}});b.extend(f._Widget,{region:"",layoutPriority:0,splitter:!1,minSize:0,maxSize:Infinity});b.declare("dijit.layout._Splitter",[f._Widget,f._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],e=b.filter(this.container.getChildren(),function(a){return a.region=="center"})[0],a=b.marginBox(e.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,e=this.horizontal,d=e?"pageY":"pageX",f=a[d],h=this.domNode.style,j=b.marginBox(this.child.domNode)[e?"h":"w"],i=this._computeMaxSize(),k=this.child.minSize||20,e=this.region,l=e=="top"||e=="bottom"?
"top":"left",m=parseInt(h[l],10),n=this._resize,o=b.hitch(this.container,"_layoutChildren",this.child.id),e=b.doc;this._handlers=(this._handlers||[]).concat([b.connect(e,"onmousemove",this._drag=function(a,b){var e=a[d]-f,t=c*e+j,s=Math.max(Math.min(t,i),k);(n||b)&&o(s);h[l]=e+m+c*(s-t)+"px"}),b.connect(e,"ondragstart",b.stopEvent),b.connect(b.body(),"onselectstart",b.stopEvent),b.connect(e,"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,e=1,d=b.keys;switch(a.charOrCode){case c?d.UP_ARROW:d.LEFT_ARROW:e*=-1;case c?d.DOWN_ARROW:d.RIGHT_ARROW:break;default:return}c=b._getMarginSize(this.child.domNode)[c?"h":"w"]+this._factor*e;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",[f._Widget,f._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 f.layout.BorderContainer});
define("dojo/html",["dojo","dojo/parser"],function(b){b.getObject("html",!0,b);(function(){var f=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 e=c.length,d=0;d<c.length;d=e==c.length?d+1:0)b.place(c[d],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:"",f++].join("_")},set:function(a,b){if(void 0!==a)this.content=a;b&&this._mixin(b);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 e=this.onContentError(c);try{a.innerHTML=e}catch(d){console.error("Fatal "+this.declaredClass+".setContent could not change content due to "+d.message,d)}}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 b={},e;for(e in a)e in b||(this[e]=a[e])},_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(e){this._onError("Content",e,"Error parsing in _ContentSetter#"+this.id)}},_onError:function(a,c,e){a=this["on"+a+"Error"].call(this,c);e?console.error(e,c):a&&b.html._setNodeContent(this.node,a,!0)}});b.html.set=function(a,c,e){void 0==c&&(console.warn("dojo.html.set: no cont argument provided, using empty string"),c="");return e?(new b.html._ContentSetter(b.mixin(e,
{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,f){b.declare("dijit.layout.ContentPane",[f._Widget,f.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(f._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 e=b.doc.createDocumentFragment(),c=b.byId(c);c.firstChild;)e.appendChild(c.firstChild);a=b.delegate(a,{content:e})}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")||f.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 e=this._xhrDfd=(this.ioMethod||b.xhrGet)(c);e.addCallback(function(b){try{a._isDownloaded=!0,a._setContent(b,!1),a.onDownloadEnd()}catch(c){a._onError("Content",c)}delete a._xhrDfd;return b});e.addErrback(function(b){e.canceled||a._onError("Download",b);delete a._xhrDfd;return b});delete this._hrefChanged},_onLoadHandler:function(a){this._set("isLoaded",
!0);try{this.onLoadDeferred.callback(a)}catch(b){console.error("Error "+this.widgetId+" running custom onLoad code: "+b.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 e=this._contentSetter;if(!(e&&e instanceof b.html._ContentSetter))e=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(b){console.error("Fatal "+this.id+" could not change content due to "+b.message,b)}})});var d=b.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:this.parseOnLoad,parserScope:this.parserScope,startup:!1,dir:this.dir,lang:this.lang},this._contentSetterParams||{});e.set(b.isObject(a)&&a.domNode?a.domNode:a,d);delete this._contentSetterParams;this.doLayout&&this._checkIfSingleChild();c||(this._started&&(this._startChildren(),this._scheduleLayout()),this._onLoadHandler(a))},
_onError:function(a,b,e){this.onLoadDeferred.errback(b);a=this["on"+a+"Error"].call(this,b);e?console.error(e,b):a&&this._setContent(a,!0)},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage},onContentError:function(){},onDownloadError:function(){return this.errorMessage},onDownloadEnd:function(){}});return f.layout.ContentPane});
define("dijit/TooltipDialog","dojo,dijit,text!dijit/templates/TooltipDialog.html,dijit/layout/ContentPane,dijit/_Templated,dijit/form/_FormMixin,dijit/_DialogMixin".split(","),function(b,f){b.declare("dijit.TooltipDialog",[f.layout.ContentPane,f._Templated,f.form._FormMixin,f._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,e){a="dijitTooltipAB"+(e.charAt(1)=="L"?"Left":"Right")+" dijitTooltip"+(e.charAt(0)=="T"?"Below":"Above");b.replaceClass(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems(this.containerNode);f.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,e=b.keys;a.charOrCode===e.TAB&&this._getFocusItems(this.containerNode);var d=this._firstFocusItem==this._lastFocusItem;a.charOrCode==e.ESCAPE?(setTimeout(b.hitch(this,"onCancel"),0),b.stopEvent(a)):c==this._firstFocusItem&&a.shiftKey&&a.charOrCode===e.TAB?(d||f.focus(this._lastFocusItem),b.stopEvent(a)):c==this._lastFocusItem&&a.charOrCode===e.TAB&&!a.shiftKey?(d||f.focus(this._firstFocusItem),b.stopEvent(a)):a.charOrCode===e.TAB&&
a.stopPropagation()}});return f.TooltipDialog});
define("orion/widgets/OperationsDialog","i18n!orion/operations/nls/messages,require,dojo,dijit,orion/util,dijit/TooltipDialog,text!orion/widgets/templates/OperationsDialog.html".split(","),function(b,f,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=f.toUrl("operations/list.html");this._setOperationsVisibility()},setOperations:function(a,b){this._operations=[];b=b||{};this._myOperations=[];if(a.Children)for(var c=0;c<a.Children.length;c++)b[a.Children[c].Id]?this._myOperations.push(a.Children[c]):this._operations.push(a.Children[c]);this._operations.sort(function(a,b){return parseInt(b.Modified)-parseInt(a.Modified)});this._myOperations.sort(function(a,b){return parseInt(b.Modified)-parseInt(a.Modified)});this._renderOperations()},
parseProgressResult:function(a){if(!a)return{};a=a.responseText||a;try{a=JSON.parse(a)}catch(b){}var c={Message:a.Message||a,Severity:a.Severity};if(a.DetailedMessage&&a.DetailedMessage!==c.Message)c.DetailedMessage=a.DetailedMessage;return c},_renderOperations:function(){this._renderOperationsTable(this.myOperationsList,this._myOperations);this._renderOperationsTable(this.operationsList,this._operations)},_renderOperationsTable:function(c,d){a.empty(c);for(var f=0;f<d.length;f++){var h=d[f],j=a.create("tr"),
i=a.create("td",{style:"padding-left: 5px; padding-right: 5px",innerHTML:h.Name},j),i=a.create("div",null,i,"only"),k=a.create("span",{innerHTML:h.Name,className:"primaryColumn"},i,"last");a.place(document.createTextNode(h.Name),k,"only");var l=a.create("span",null,i,"first");a.addClass(l,"imageSprite");k=this.parseProgressResult(h.Result);switch(k.Severity){case "Warning":a.addClass(l,"core-sprite-warning");a.attr(l,"aria-label",b["Operation resulted in a warning."]);break;case "Error":a.addClass(l,
"core-sprite-error");a.attr(l,"aria-label",b["Operation resulted in an error."]);break;default:h.Running===!0?(a.addClass(l,"core-sprite-start"),a.attr(l,"aria-label",b["Operation is running."])):h.Canceled===!0?(a.addClass(l,"core-sprite-stop"),a.attr(l,"aria-label",b["Operation is canceled."])):h.Failed===!0?(a.addClass(l,"core-sprite-error"),a.attr(l,"aria-label",b["Operation failed."])):(a.addClass(l,"core-sprite-ok"),a.attr(l,"aria-label","Operation ok."))}if(k.Message||h.Message)h=k.Message||
h.Message,k.DetailedMessage&&k.DetailedMessage!==""&&(h+=": "+k.DetailedMessage),a.create("br",null,i,"last"),a.create("span",{className:"secondaryColumn",style:"margin-left: 18px;",innerHTML:h},i,"last");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("orion/widgets/LoginDialog","i18n!orion/widgets/nls/messages,require,dojo,dijit,orion/util,dijit/TooltipDialog,text!orion/widgets/templates/LoginDialog.html".split(","),function(b,f,a,c){a.declare("orion.widgets.LoginDialog",[c.TooltipDialog],{widgetsInTemplate:!0,templateString:a.cache("orion","widgets/templates/LoginDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{};this.authenticatedServices={};this.unauthenticatedServices={}},postCreate:function(){this.inherited(arguments);
var b=this;a.addClass(this.closeLink,"imageSprite");a.addClass(this.closeLink,"core-sprite-close");a.connect(this.closeLink,"onmouseover",this.closeLink,function(){b.closeLink.style.cursor="pointer"});a.connect(this.closeLink,"onmouseout",this.closeLink,function(){b.closeLink.style.cursor="default"});a.connect(this.closeLink,"onclick",function(){a.hitch(b,b.closeDialog)()})},setPendingAuthentication:function(a){for(var b in this.unauthenticatedServices)delete this.unauthenticatedServices[b].pending;
for(b in a)this.unauthenticatedServices[a[b].SignInKey]?this.unauthenticatedServices[a[b].SignInKey].pending=!0:this.authenticatedServices[a[b].SignInKey]?(this.unauthenticatedServices[a[b].SignInKey]=this.authenticatedServices[a[b].SignInKey],this.unauthenticatedServices[a[b].SignInKey].pending=!0,delete this.authenticatedServices[a[b].SignInKey]):this.unauthenticatedServices[a[b].SignInKey]={label:a[b].label,SignInLocation:a[b].SignInLocation,pending:!0};this.renderUnauthenticatedServices();this.renderAuthenticatedServices()},
authenticatedService:function(a){this.unauthenticatedServices[a]&&!this.unauthenticatedServices[a].authService&&(this.authenticatedServices[a]=this.unauthenticatedServices[a],delete this.unauthenticatedServices[a])},addUserItem:function(b,c,f,h){h?(this.unauthenticatedServices[b]&&delete this.unauthenticatedServices[b],this.authenticatedServices[b]={authService:c,label:f,data:h}):(this.authenticatedServices[b]&&delete this.authenticatedServices[b],this.unauthenticatedServices[b]=this.unauthenticatedServices[b]?
{authService:c,label:f,pending:this.unauthenticatedServices[b].pending}:{authService:c,label:f});a.hitch(this,this.renderAuthenticatedServices)();a.hitch(this,this.renderUnauthenticatedServices)()},renderAuthenticatedServices:function(){a.empty(this.authenticatedList);this.authenticated.style.display=this.isEmpty(this.authenticatedServices)?"none":"";var c=this,d=!0,g;for(g in this.authenticatedServices){if(!d){var h=a.create("tr",null,this.authenticatedList);a.create("td",{style:"padding: 0; margin 0;",
colspan:2,innerHTML:"<hr style='border-bottom: medium none; border-top: 1px solid #D3D3D3; color: gray; height: 0; margin: 2px;'>"},h)}var d=!1,h=a.create("tr",{className:"navTableHeading"}),j=this.authenticatedServices[g].authService,i=a.create("td",null,h,"only"),k=a.create("h2",null,i,"only");if(j)j.getAuthForm?a.hitch(c,function(a,b){j.getAuthForm(eclipse.globalCommandUtils.notifyAuthenticationSite).then(function(d){if(c.authenticatedServices[b].label)a.innerHTML=c.authenticatedServices[b].label+
"<br>";a.innerHTML+=c.getHostname(d)})})(k,g):k.innerHTML=this.authenticatedServices[g].label?this.authenticatedServices[g].label:g;else{var l=this.authenticatedServices[g].SignInLocation;if(this.authenticatedServices[g].label)k.innerHTML=this.authenticatedServices[g].label+"<br>";k.innerHTML+=this.getHostname(l)}a.addClass(i,"LoginWindowLeft");i=a.create("td",{style:"text-align: right"},h,"last");a.addClass(i,"LoginWindowRight");k=this.authenticatedServices[g].data;j=this.authenticatedServices[g].authService;
if(!j){a.place(h,this.authenticatedList,"last");break}k.Location&&a.create("a",{href:f.toUrl("profile/user-profile.html")+"#"+k.Location,innerHTML:b.Profile},i,"last");a.place(document.createTextNode(" "),i,"last");if(j.logout){var m=a.create("a",{innerHTML:b["Sign out"]},i,"last");a.connect(m,"onmouseover",m,function(){m.style.cursor="pointer"});a.connect(m,"onmouseout",m,function(){m.style.cursor="default"});a.connect(m,"onclick",a.hitch(c,function(b,d){return function(){b.logout().then(a.hitch(c,
function(){this.addUserItem(d,b,this.authenticatedServices[d].label);this.isSingleService()&&this.closeDialog();localStorage.removeItem(d)}))}})(j,g))}a.place(h,this.authenticatedList,"last");i=b["N/A"];k&&k.lastlogintimestamp&&(i=a.date.locale.format(new Date(k.lastlogintimestamp),{formatLength:"short"}));k=k.Name&&k.Name.replace(/^\s+|\s+$/g,"")!==""?k.Name:k.login;h=a.create("tr");i=k.length>40?a.create("td",{innerHTML:k.substring(0,30)+"... "+b["logged in since "]+i,colspan:2,title:k+" "+b["logged in since "]+
i},h,"only"):a.create("td",{innerHTML:k+" "+b["logged in since "]+i,colspan:2},h,"only");a.addClass(i,"LoginWindowLeft");a.addClass(i,"LoginWindowRight");a.addClass(i,"LoginWindowComment");a.place(h,this.authenticatedList,"last")}},renderUnauthenticatedServices:function(){this.emptyListInfo.style.display=this.unauthenticatedServices.length===0&&this.authenticatedServices.length===0?"":"none";a.empty(this.otherUnauthenticatedList);var e=this;this.otherUnauthenticated.style.display=this.isEmpty(this.unauthenticatedServices)?
"none":"";var d=!0,g;for(g in this.unauthenticatedServices){if(!d||!this.isEmpty(this.authenticatedServices)){var h=a.create("tr",null,this.otherUnauthenticatedList);a.create("td",{style:"padding: 0; margin 0;",colspan:2,innerHTML:"<hr style='border-bottom: medium none; border-top: 1px solid #D3D3D3; color: gray; height: 0; margin: 2px;'>"},h)}var d=!1,h=a.create("tr",{className:"navTableHeading"}),j=a.create("td",null,h,"only");a.addClass(j,"LoginWindowLeft");var i=a.create("h2",null,j,"only"),j=
a.create("td",{style:"text-align: right"},h,"last");a.addClass(j,"LoginWindowRight");var k=this.unauthenticatedServices[g].authService,l=eclipse.globalCommandUtils.notifyAuthenticationSite,m=l+(l.indexOf("?")===-1?"?":"&")+"key="+g;if(k)if(k.getAuthForm)a.hitch(e,function(c,d){k.getAuthForm(m).then(function(f){a.create("a",{target:"_blank",href:f,innerHTML:b["Sign in"]},c,"last");if(e.unauthenticatedServices[d].label)i.innerHTML=e.unauthenticatedServices[d].label+"<br>";i.innerHTML+=e.getHostname(f)})})(j,
g);else{if(k.login){a.place(document.createTextNode(this.unauthenticatedServices[g].label?this.unauthenticatedServices[g].label:g),i,"only");var n=a.create("a",{innerHTML:b["Sign in"],style:"cursor: hand;"},j,"last");a.connect(n,"onmouseover",n,function(){n.style.cursor="pointer"});a.connect(n,"onmouseout",n,function(){n.style.cursor="default"});a.connect(n,"onclick",a.hitch(e,function(a){return function(){a.login(m).then(function(){e.isSingleService()&&c.popup.hide&&c.popup.hide(e);c.popup.close(e)})}})(k))}}else{l=
this.unauthenticatedServices[g].SignInLocation;l.indexOf("?")===-1?a.create("a",{target:"_blank",href:l+"?redirect="+encodeURIComponent(m),innerHTML:b["Sign in"]},j,"last"):a.create("a",{target:"_blank",href:l+"&redirect="+encodeURIComponent(m),innerHTML:b["Sign in"]},j,"last");if(this.unauthenticatedServices[g].label)i.innerHTML=this.unauthenticatedServices[g].label+"<br>";i.innerHTML+=this.getHostname(l)}a.place(h,this.otherUnauthenticatedList,"last");this.unauthenticatedServices[g].pending&&(h=
a.create("tr"),j=a.create("td",{innerHTML:b["Authentication required!"],style:"padding-left: 10px",colspan:2},h,"only"),a.addClass(j,"LoginWindowLeft"),a.addClass(j,"LoginWindowRight"),a.create("img",{src:f.toUrl("images/warning.gif"),style:"padding-right: 4px; vertical-align: bottom; padding-bottom: 2px;"},j,"first"),a.place(h,this.otherUnauthenticatedList,"last"))}},isSingleService:function(){return this.length(this.unauthenticatedServices)+this.length(this.authenticatedServices)===1},isEmpty:function(a){for(var b in a)if(a.hasOwnProperty(b))return!1;
return!0},length:function(a){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b},getHostname:function(a){var b=document.createElement("a");b.href=a;a=b.href;return a.match(/^(?:f|ht)tp(?:s)?:\/\/([^/]+)/im)[1].toString()},closeDialog:function(){c.popup.hide&&c.popup.hide(this);c.popup.close(this)}})});
define("orion/commands","i18n!orion/nls/messages,require,dojo,dijit,orion/util,orion/PageUtil,orion/navigationUtils,dijit/Menu,dijit/form/DropDownButton,dijit/MenuItem,dijit/PopupMenuItem,dijit/MenuSeparator,dijit/Tooltip,dijit/TooltipDialog".split(","),function(b,f,a,c,e,d,g){function h(b,c,d){var e=function(){d&&a.addClass(this,d)},f=function(){d&&a.removeClass(this,d)};a.connect(b,"onmouseover",b,e);a.connect(c,"onfocus",b,e);a.connect(b,"onmouseout",b,f);a.connect(c,"onblur",b,f)}function j(a,
b,c,d,e){this.commandService=a;this.handler=b;this.items=c;this.userData=d;this.command=e;if(e.parameters)this.parameters=e.parameters.makeCopy();this.id=e.id}function i(a){this._commandList={};this._contributionsByScopeId={};this._activeBindings={};this._urlBindings={};this._init(a);this._parameterCollector=null;this.showMenuIcons=!1}function k(b,c,d){a.addClass(c,"commandImage");var e;b.imageClass?(e=a.create("span",{},c,"last"),a.addClass(e,b.spriteClass),a.addClass(e,b.imageClass)):(e=new Image,
e.alt=b.name,e.name=d,e.id=d,e.src=b.image,a.place(e,c,"last"));return e}function l(a){this._init(a)}function m(b,c,d,e,f,g,h){this.keyCode=typeof b==="string"?b.toUpperCase().charCodeAt(0):b;this.mod1=c!==void 0&&c!==null?c:!1;this.mod2=d!==void 0&&d!==null?d:!1;this.mod3=e!==void 0&&e!==null?e:!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 n(a,b){this.token=a;this.parameterName=b}function o(a,
b,c,d,e){this.name=a;this.type=b;this.label=c;this.value=d;this.lines=e||1}function p(a,b,c){this._storeParameters(a);this._hasOptionalParameters=b&&b.hasOptionalParameters;this._clientCollect=b&&b.clientCollect;this._options=b;this.optionsRequested=!1;this.getParameters=c}j.prototype={collectsParameters:function(){return this.commandService&&this.commandService.collectsParameters()},makeCopy:function(){var a=new j(this.commandService,this.handler,this.items,this.userData,this.command);a.domNode=
this.domNode;a.domParent=this.domParent;if(this.parameters)a.parameters=this.parameters.makeCopy();return a}};j.prototype.constructor=j;var r=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},setLink:function(a,b){this.set("label","<a class='commandMenuItemAnchor' href='"+a+"'>"+b+"</a>");this._anchorLocation=a},_onClick:function(a){this.hasLink||this.inherited(arguments)}}),q=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()}))}});i.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(a.target.contentEditable!=="true"){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 d in this._activeBindings)if(this._activeBindings[d]&&this._activeBindings[d].keyBinding&&
this._activeBindings[d].command&&this._activeBindings[d].keyBinding.match(b)){var e=this._activeBindings[d],f=e.invocation;if(f)if(e=e.command,e.hrefCallback){c(b);b=e.hrefCallback.call(f.handler||window,f);b.then?b.then(function(a){window.open(a)}):window.open(b);break}else if(e.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 d=
this._urlBindings[c].urlBinding.match(b);if(d){var e=this._urlBindings[c],f=e.command,g=e.invocation;if(g&&g.parameters&&f.callback){g.parameters.setValue(d.parameterName,d.parameterValue);window.setTimeout(a.hitch(this,function(){this._invoke(g)}),0);break}}}},findCommand:function(a){return this._commandList[a]},runCommand:function(b,c,d){if(c){var e=this._commandList[b];(e.visibleWhen?e.visibleWhen(c):1)&&e.callback&&window.setTimeout(a.hitch(this,function(){this._invoke(new j(this,d,c,null,e))}),
0)}else{var f=this._urlBindings[b];f&&f.command&&f.command.callback&&window.setTimeout(a.hitch(this,function(){this._invoke(f.invocation)}),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){return this._collectAndInvoke(a.makeCopy(),!1)},_collectAndInvoke:function(b,d){if(b)if(this._parameterCollector&&b.parameters&&b.parameters.hasParameters()&&(d||b.parameters.shouldCollectParameters())){var e=!1;b.parameters.updateParameters(b);e=this._parameterCollector.collectParameters(b);if(!e){var f=new c.TooltipDialog({onBlur:function(){c.popup.close(f)}}),g=a.create("div"),h=window.document.activeElement,i=this._parameterCollector.getFillFunction(b,
function(){c.popup.close(f);f.destroyRecursive();h&&h.focus()})(g);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(){i.focus();i.select()},0),e=!0)}if(!e)b.parameters=null,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={},d,f,g;for(g in this._activeBindings)if((f=this._activeBindings[g])&&f.keyBinding&&f.command)f.keyBinding.scopeName?(c[f.keyBinding.scopeName]||(c[f.keyBinding.scopeName]=[]),c[f.keyBinding.scopeName].push(f)):(d=e.getUserKeyString(f.keyBinding),a.place("<span role='listitem'>"+d+" = "+f.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++)f=c[h][g],d=e.getUserKeyString(f.keyBinding),a.place("<span role='listitem'>"+d+" = "+f.command.name+"<br></span>",b,"last")}},addCommand:function(a){this._commandList[a.id]=a},addCommandGroup:function(a,b,c,d,e,f){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=this._contributionsByScopeId[a];e&&(a=this._createEntryForPath(a,e));if(a[b]){if(d)a[b].title=d;if(c)a[b].position=c;a[b].emptyGroupMessage=f}else a[b]={title:d,position:c,emptyGroupMessage:f,
children:{}},a.sortedContributions=null},_createEntryForPath:function(a,b){if(b)for(var c=b.split("/"),d=0;d<c.length;d++)if(c[d].length>1)a[c[d]]||(a[c[d]]={position:0,children:{}}),a=a[c[d]].children;return a},registerSelectionService:function(a,b){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});this._contributionsByScopeId[a].localSelectionService=b},registerCommandContribution:function(a,b,c,d,e,f,g){this._contributionsByScopeId[a]||(this._contributionsByScopeId[a]={});a=
this._contributionsByScopeId[a];d&&(a=this._createEntryForPath(a,d));a[b]={position:c};f&&(c=this._commandList[b])&&(this._activeBindings[b]={command:c,keyBinding:f,bindingOnly:e});g&&(c=this._commandList[b])&&(this._urlBindings[b]={command:c,urlBinding:g,bindingOnly:e});a.sortedContributions=null},_isLastChildSeparator:function(b,d){if(d==="tool"||d==="button")return b.childNodes.length>0&&a.hasClass(b.childNodes[b.childNodes.length-1],"commandSeparator");if(d==="menu"){var e=b.getChildren();return e.length>
0&&e[e.length-1]instanceof c.MenuSeparator}return!1},renderCommands:function(b,c,d,f,g,h,i){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(!d&&j){var d=j.localSelectionService||this._defaultSelectionService,k=this;d&&d.getSelections(function(a){k.renderCommands(b,c,a,f,g,h)})}else j&&(this._render(this._contributionsByScopeId[b],c,d,f,g,h,i),g==="tool"||g==="button"?this._isLastChildSeparator(c,
g)&&c.removeChild(c.childNodes[c.childNodes.length-1]):g==="menu"&&this._isLastChildSeparator(c,g)&&(d=c.getChildren()[c.getChildren().length-1],c.removeChild(d),d.destroy()),e.forceLayout(c))},destroy:function(b){typeof b==="string"&&(b=a.byId(b));if(!b)throw"no parent";var d=c.findWidgets(b);a.forEach(d,function(a){a.destroyRecursive()});a.empty(b)},_render:function(d,e,f,i,k,l,m){var n=d.sortedContributions;if(!n){var n=[],o=!1,q;for(q in d)if(!d.hasOwnProperty||d.hasOwnProperty(q)){var p=d[q];
if(p&&typeof p.position==="number")p.id=q,n.push(p),o=!0}if(o)n.sort(function(a,b){return a.position-b.position}),d.sortedContributions=n}for(d=0;d<n.length;d++){var r,t;if(n[d].children&&Object.getOwnPropertyNames(n[d].children).length>0){q=n[d];var I,o=n[d].children,G=this;if(k==="tool"||k==="button")if(q.title){var z=new c.Menu({style:"display: none;"});r=new c.form.DropDownButton({label:q.title==="*"?b.Actions:q.title,showLabel:q.title!=="*",style:"visibility: hidden;",dropDown:z});a.addClass(r.domNode,
"commandMenu");m&&g.generateNavGrid(m,r.domNode,r);p=e;e.nodeName.toLowerCase()==="ul"?p=a.create("li",{},e):a.addClass(r.domNode,"commandMargins");a.removeAttr(r.titleNode,"title");a.destroy(r.valueNode);h(r.domNode,r.focusNode);a.place(r.domNode,p,"last");z.eclipseScopeId=e.eclipseScopeId||e.id;window.setTimeout(a.hitch({contributions:o,emptyGroupMessage:q.emptyGroupMessage},function(){if(!z._destroyed){G._render(this.contributions,z,f,i,"menu",l,m);I=z.getChildren();if(G._isLastChildSeparator(z,
"menu")){var b=I[I.length-1];z.removeChild(b);b.destroy();I=z.getChildren()}I.length===0?this.emptyGroupMessage?(a.connect(r.focusNode,"onclick",this,function(){var a=new c.TooltipDialog({content:"<p>"+this.emptyGroupMessage+"</p>",onMouseLeave:function(){c.popup.close(a);a.destroyRecursive()}});c.popup.open({popup:a,around:r.domNode});window.setTimeout(function(){c.popup.close(a);a.destroyRecursive()},15E3)}),a.style(r.domNode,"visibility","visible")):(m&&g.removeNavGrid(m,r.domNode),r.destroyRecursive()):
a.style(r.domNode,"visibility","visible")}}),0)}else{var M;e.childNodes.length>0&&!this._isLastChildSeparator(e,k)&&(M=this.generateSeparatorImage(e));G._render(o,e,f,i,k,l,m);e.childNodes.length>0&&e.childNodes[e.childNodes.length-1]!==M&&(M=this.generateSeparatorImage(e))}else if(q.title)p=new c.Menu,q=new c.PopupMenuItem({label:q.title,popup:p}),e.addChild(q),G._render(o,p,f,i,k,l,m),p.getChildren().length===0&&(q.set("label","removeme"),e.removeChild(q),q.destroyRecursive());else{var H;e.getChildren().length>
0&&!this._isLastChildSeparator(e,k)&&(H=new c.MenuSeparator,e.addChild(H));G._render(o,e,f,i,k,l,m);o=e.getChildren();o[o.length-1]!==H&&(H=new c.MenuSeparator,e.addChild(H))}}else{q=(o=this._commandList[n[d].id])?!0:!1;var L=null,L=null;if(o){t=new j(this,i,f,l,o);t.domParent=e;p=q&&(o.visibleWhen?o.visibleWhen(f):!0);if(this._activeBindings[o.id]&&this._activeBindings[o.id].keyBinding)L=this._activeBindings[o.id],L.invocation=p?t:null,L.bindingOnly&&(q=!1);if(this._urlBindings[o.id]&&this._urlBindings[o.id].urlBinding)L=
this._urlBindings[o.id],L.invocation=p?t:null,L.bindingOnly&&(q=!1);q=q&&p}if(q)if(o.choiceCallback)if(q=new c.Menu({style:"display: none;"}),k==="tool"||k==="button"){r=new c.form.DropDownButton({label:o.name,dropDown:q});a.addClass(r.domNode,"commandMenu");a.removeAttr(r.titleNode,"title");a.destroy(r.valueNode);if(o.image)a.addClass(r.iconNode,"commandImage"),r.iconNode.src=o.image;a.place(r.domNode,e,"last");r.eclipseCommand=o;r.eclipseChoices=q;a.connect(r,"onClick",r,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,
f,i,l)})}else{if(k==="menu")p=new c.PopupMenuItem({label:o.name,popup:q}),e.addChild(p),p.eclipseCommand=o,p.eclipseChoices=q,a.connect(e,"_openPopup",p,function(){this.eclipseCommand.populateChoicesMenu(this.eclipseChoices,f,i,l)})}else k==="tool"?(q="tool"+o.id+d,o._addTool(e,q,t,m)):k==="button"?(q="button"+o.id+d,o._addButton(e,q,t,m)):k==="menu"&&o._addMenuItem(e,t,m)}}},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}};i.prototype.constructor=i;l.prototype={_init:function(a){this.id=a.id;this.name=a.name;this.tooltip=a.tooltip||a.name;this.callback=a.callback;this.hrefCallback=a.hrefCallback;this.choiceCallback=a.choiceCallback;this.image=a.image||f.toUrl("images/none.png");this.imageClass=a.imageClass;this.spriteClass=a.spriteClass||"commandSprite";this.visibleWhen=a.visibleWhen;this.parameters=a.parameters;
this.description=a.description},_addTool:function(b,c,d,e){d.handler=d.handler||this;var f,i;if(this.hrefCallback){if(f=this._makeLink(d),!f)return}else f=a.create("span",{tabindex:e?"-1":"0",role:"button"}),this.hasImage()?(i=k(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,d),h(f,f,i?"commandImageOver":"commandButtonOver");d.domNode=f;d.domParent=b;this.tooltip&&
new q({connectId:[f],label:this.tooltip,position:["above","left","right","below"],commandParent:b,commandService:d.commandService});b.nodeName.toLowerCase()==="ul"?b=a.create("li",{},b):a.addClass(f,"commandMargins");a.place(f,b,"last");g.generateNavGrid(e,d.domNode)},_addButton:function(b,c,d,e){d.handler=d.handler||this;var f;if(this.hrefCallback){if(f=this._makeLink(d),!f)return}else{f=a.create("span",{tabindex:"0",role:"button"});this._hookCallback(f,d);var i;this.name?(a.place(window.document.createTextNode(this.name),
f,"last"),a.addClass(f,"commandButton"),i="commandButtonOver"):(k(this,f,c),i="commandImageOver",this._addAccessibleLabel(f));h(f,f,i)}f.id=c;this.tooltip&&new q({connectId:[f],label:this.tooltip,position:["above","left","right","below"],commandParent:b,commandService:d.commandService});d.domParent=b;d.domNode=f;b.nodeName.toLowerCase()==="ul"?b=a.create("li",{},b):a.addClass(f,"commandMargins");a.place(f,b,"last");g.generateNavGrid(e,d.domNode)},_addMenuItem:function(b,c,d){var e=c.commandService.showMenuIcons;
c.domParent=b.domNode;var f=new r({labelType:this.hrefCallback?"html":"text",label:this.name,iconClass:e?this.imageClass:null,hasLink:!!this.hrefCallback});this.tooltip&&new q({connectId:[f.domNode],label:this.tooltip,commandParent:b,commandService:c.commandService});if(this.hrefCallback){var h=this.hrefCallback.call(c.handler,c);if(h)if(h.then)h.then(a.hitch(this,function(a){f.setLink(a,this.name)}));else if(h)f.setLink(h,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(e)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;g.generateNavGrid(d,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,d,e,f){b.focusedChild=null;a.forEach(b.getChildren(),function(a){b.removeChild(a);a.destroy()});for(var e=this.getChoices(d,e,f),f=this.showMenuIcons,g=0;g<
e.length;g++){var h=e[g],i;if(h.name){if(i=new c.MenuItem({label:h.name,iconClass:f?h.imageClass:null,onClick:this.makeChoiceCallback(h,d)}),f)if(h.imageClass)a.addClass(i.iconNode,h.spriteClass||"commandSprite");else if(h.image)a.addClass(i.iconNode,"commandImage"),i.iconNode.src=h.image}else i=new c.MenuSeparator;b.addChild(i)}},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!==f.toUrl("images/none.png")}};l.prototype.constructor=l;var t=window.navigator.platform.indexOf("Mac")!==-1;m.prototype={match:function(a){if(this.keyCode===a.keyCode){if(this.mod1!==(t?a.metaKey:a.ctrlKey))return!1;if(this.mod2!==a.shiftKey)return!1;if(this.mod3!==a.altKey)return!1;if(t&&this.mod4!==a.ctrlKey)return!1;if(!this.domScope)return!0;for(a=a.target;a;){if(a===window.document)break;if(a===this.domScope)return!0;a=a.parentNode}}return!1},
equals:function(a){return!a?!1:this.keyCode!==a.keyCode?!1:this.mod1!==a.mod1?!1:this.mod2!==a.mod2?!1:this.mod3!==a.mod3?!1:this.mod4!==a.mod4?!1:this.domScope!==a.domScope?!1:!0}};m.prototype.constructor=m;n.prototype={match:function(a){a=d.matchResourceParameters(a);return typeof a[this.token]!=="undefined"?(this.parameterValue=a[this.token],this):null}};n.prototype.constructor=n;o.prototype={optionsRequested:function(){return this.optionsRequested}};o.prototype.constructor=o;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 o(b.name,b.type,b.label,b.value,b.lines);a.push(b)});return new p(a,this._options,this.getParameters)},hasOptionalParameters:function(){return this._hasOptionalParameters}};p.prototype.constructor=p;return{CommandService:i,CommandKeyBinding:m,Command:l,CommandInvocation:j,
CommandMenuItem:r,URLBinding:n,ParametersDescription:p,CommandParameter:o,CommandTooltip:q}});
define("orion/parameterCollectors","i18n!orion/nls/messages,require,dojo,dijit,orion/commands,orion/util,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton".split(","),function(b,f,a,c,e,d){function g(){this._activeContainer=null}g.prototype={close:function(){if(this._activeElements){this._activeElements.parameterArea&&a.empty(this._activeElements.parameterArea);this._activeElements.parameterContainer&&(a.removeClass(this._activeElements.parameterContainer,"slideActive"),a.removeClass(this._activeElements.slideContainer,
"slideContainerActive"));this._activeElements.dismissArea&&a.empty(this._activeElements.dismissArea);this._activeElements.commandNode&&a.removeClass(this._activeElements.commandNode,"activeCommand");d.forceLayout(this._activeElements.parameterContainer);if(this._activeElements.onClose)this._activeElements.onClose();if(this._oldFocusNode)this._oldFocusNode.focus(),this._oldFocusNode=null}this._activeElements=null},_findParameterElements:function(b){var c={},d=null;typeof b==="string"&&(b=a.byId(b));
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.parameterContainer=a.query(".slide",d)[0],c.parameterArea=a.query(".parameters",d)[0],c.dismissArea=a.query(".parametersDismiss",d)[0];return c},open:function(c,e,f){typeof c==="string"&&(c=a.byId(c));this.close();this._activeElements=null;if((this._activeElements=this._findParameterElements(c))&&this._activeElements.parameterArea&&
this._activeElements.slideContainer&&this._activeElements.parameterContainer){this._activeElements.onClose=f;var g=e(this._activeElements.parameterArea,this._activeElements.dismissArea),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(b){(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)&&this.close()}));a.addClass(this._activeElements.slideContainer,"slideContainerActive");a.addClass(this._activeElements.parameterContainer,"slideActive");d.forceLayout(this._activeElements.parameterContainer);if(g)this._oldFocusNode=window.document.activeElement,window.setTimeout(function(){g.focus();g.select()},
0);this._activeElements.commandNode&&a.addClass(this._activeElements.commandNode,"activeCommand");return!0}return!1},_collectAndCall:function(b,c){a.query("input",c).forEach(function(a){a.type==="checkbox"?b.parameters.setValue(a.parameterName,a.checked):a.type!=="button"&&b.parameters.setValue(a.parameterName,a.value.trim())});a.query("textArea",c).forEach(function(a){b.parameters.setValue(a.parameterName,a.value.trim())});b.command.callback&&b.command.callback.call(b.handler,b)},collectParameters:function(b){return b.parameters?
(b.domNode&&a.addClass(b.domNode,"commandMarker"),this.open(b.domNode||b.domParent,this.getFillFunction(b))):!1},getFillFunction:function(c,d){return a.hitch(this,function(e,f){var g=null,m=a.hitch(this,function(){d&&d();this.close()}),n=a.hitch(this,function(b){b.keyCode===a.keys.ENTER&&this._collectAndCall(c,e);if(b.keyCode===a.keys.ESCAPE||b.keyCode===a.keys.ENTER)m(),a.stopEvent(b)});c.parameters.forEach(function(b){b.label&&a.create("label",{innerHTML:b.label,"class":"parameterInput","for":b.name+
"parameterCollector"},e,"last");var c={type:b.type,id:b.name+"parameterCollector"},d;if(b.type==="text"&&typeof b.lines==="number"&&b.lines>1)c.rows=b.lines,c.type="textarea",d=a.create("textarea",c,e,"last"),n=a.hitch(this,function(b){b.keyCode===a.keys.ESCAPE&&(m(),a.stopEvent(b))});else if(b.type==="boolean"){if(c.type="checkbox",b.value)c.checked=!0}else if(b.value)c.value=b.value;d||(d=a.create("input",c,e,"last"));a.addClass(d,"parameterInput parameterInput"+c.type);d.setAttribute("speech",
"speech");d.setAttribute("x-webkit-speech","x-webkit-speech");d.parameterName=b.name;g||(g=d);a.connect(d,"onkeypress",n)});var o=f||e,p=function(a){a._collectAndCall(c,e);m()};if(c.parameters.hasOptionalParameters()){c.parameters.optionsRequested=!1;var r=a.create("span",{role:"button",tabindex:"0"},o,"last");a.place(window.document.createTextNode("More"),r,"last");a.addClass(r,"dismiss");a.connect(r,"onclick",a.hitch(this,function(){c.parameters.optionsRequested=!0;p(this)}));a.connect(r,"onkeypress",
a.hitch(this,function(b){if(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)c.parameters.optionsRequested=!0,p(this)}))}r=a.create("span",{role:"button",tabindex:"0"},o,"last");a.place(window.document.createTextNode("Submit"),r,"last");a.addClass(r,"dismiss");a.connect(r,"onclick",a.hitch(this,function(){p(this)}));a.connect(r,"onkeypress",a.hitch(this,function(b){(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)&&p(this)}));o=a.create("span",{id:"closebox",role:"button",tabindex:"0"},o,"last");
a.addClass(o,"imageSprite");a.addClass(o,"core-sprite-close");a.addClass(o,"dismiss");o.title=b.Close;a.connect(o,"onclick",a.hitch(this,function(){m()}));a.connect(o,"onkeypress",a.hitch(this,function(b){(b.keyCode===a.keys.ENTER||b.charCode===a.keys.SPACE)&&m()}));return g})}};g.prototype.constructor=g;return{CommandParameterCollector:g}});
define("orion/widgets/UserMenu","i18n!orion/widgets/nls/messages,require,dojo,dijit,orion/commands,orion/util,dijit/Menu".split(","),function(b,f,a,c,e){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>',label:b.test,postCreate:function(){this.inherited(arguments);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,f,h){var j=this;(f=this.authenticatedServices[c].authService)&&f.logout&&this.addChild(new e.CommandMenuItem({label:h?b["Sign Out "]+h: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);for(var a=0,d=localStorage.length;a<d;a++){var e=localStorage.key(a);e&&e.indexOf("/orion/preferences/user")===0&&localStorage.removeItem(e)}b.getAuthForm(window.location.href).then(function(a){window.location=
a})}))}})(f,c)}))},_renderUnauthenticatedService:function(c,f,h){var j=this,i=this.unauthenticatedServices[c].authService;if(i)i.getAuthForm?a.hitch(j,function(a){i.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 e.CommandMenuItem({label:h?"<a target='_blank' href="+c+">"+b["Sign In To "]+
h+"</a>":"<a target='_blank' href="+c+">"+b["Sign In"]+"</a>",hasLink:!0}),f)})})(c):i.login&&this.addChild(new e.CommandMenuItem({label:h?"Sign In To "+h:"Sign In",onClick:a.hitch(j,function(a){return function(){a.login(eclipse.globalCommandUtils.notifyAuthenticationSite)}})(i)}),f);else{var k=this.unauthenticatedServices[c].SignInLocation;k+=k.indexOf("?")===-1?"?redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+"?key="+c:"&redirect="+eclipse.globalCommandUtils.notifyAuthenticationSite+
"?key="+c;this.addChild(new e.Command.MenuItem({label:h?"<a target='_blank' href="+k+">"+b["Sign In To "]+h+"</a>":"<a target='_blank' href="+k+">"+b["Sign In"]+"</a>",hasLink:!0}),f)}},renderServices:function(){for(var a=this.getChildren(),g=0;g<a.length;g++)this.removeChild(a[g]);this.addChild(new e.CommandMenuItem({label:"<a href="+f.toUrl("help/index.jsp")+">"+b.Help+"</a>",hasLink:!0}));this.keyAssistFunction&&this.addChild(new e.CommandMenuItem({label:b["Keyboard Shortcuts"],onClick:this.keyAssistFunction}));
this.addChild(new c.MenuSeparator);this.addChild(new e.CommandMenuItem({label:"<a href="+f.toUrl("settings/settings.html")+">"+b.Settings+"</a>",hasLink:!0}));if(this.isSingleService())for(g in this.authenticatedServices)this._renderAuthenticatedService(g,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(d,g,h,j){var i=this;j?(this.unauthenticatedServices[d]&&delete this.unauthenticatedServices[d],this.authenticatedServices[d]={authService:g,label:h,data:j}):(this.authenticatedServices[d]&&delete this.authenticatedServices[d],this.unauthenticatedServices[d]=this.unauthenticatedServices[d]?{authService:g,label:h,pending:this.unauthenticatedServices[d].pending}:{authService:g,label:h});a.hitch(this,this.renderServices)();if(a.byId("userInfo"))if(this.isSingleService()&&
j)h=d=j.Name&&j.Name.replace(/^\s+|\s+$/g,"")!==""?j.Name:j.login,h.length>40&&(h=h.substring(0,30)+"..."),j=a.create("a",{innerHTML:h,href:f.toUrl("profile/user-profile.html")+"#"+j.Location,"aria-label":b["View profile of "]+d,style:"margin-right: 0px"},a.byId("userInfo"),"only"),new e.CommandTooltip({connectId:[j],label:b["View profile of "]+d,position:["above","left","right","below"]});else if(this.isSingleService()&&!j)if(g.getAuthForm)a.hitch(this,function(c){g.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",{innerHTML:b["Sign In"],href:d,style:"margin-right: 0px",target:"_blank"},a.byId("userInfo"),"only")})})(d);else{if(g.login){var k=a.create("a",{innerHTML:b["Sign In"],style:"margin-right: 0px"},a.byId("userInfo"),"only");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(){g.login(eclipse.globalCommandUtils.notifyAuthenticationSite)})}}else this.hasServices()?(k=a.create("a",{innerHTML:b.Profiles,style:"margin-right: 0px"},a.byId("userInfo"),"only"),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(){try{c.popup.open({popup:i.options.loginDialog,around:a.byId("userInfo")})}catch(b){}c.focus(i.options.loginDialog.domNode)})):
a.empty(a.byId("userInfo"))}})});define("orion/widgets/UserMenuDropDown","require,dojo,dijit,orion/commands,orion/util,dijit/form/DropDownButton".split(","),function(b,f,a){f.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/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,f,a,c,e){var d=d||{};d.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(f){var g=document.createElement("input");g.type="text";g.name=b["Find:"];g.id="localSearchFindWith";g.placeholder=
b["Find With"];g.onkeyup=function(a){return d._handleKeyUp(a)};g.onkeydown=function(a){return d._handleKeyDown(a,!0)};f.appendChild(g);d.createButton("Next",f,function(){d.findNext(!0)});d.createButton("Previous",f,function(){d.findNext(!1)});g=document.createElement("input");g.type="text";g.name=b["ReplaceWith:"];g.id="localSearchReplaceWith";g.placeholder=b["Replace With"];c.addClass(g,"searchCmdGroupMargin");g.onkeydown=function(a){return d._handleKeyDown(a,!1)};f.appendChild(g);d.createButton(b.Replace,
f,function(){d.replace()});d.createButton(b["Replace All"],f,function(){d.replaceAll()});(g=e.byId("searchOptMenu"))&&g.destroy();g=new e.Menu({style:"display: none;",id:"searchOptMenu"});g.addChild(new e.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)}}));g.addChild(new e.CheckedMenuItem({label:b["Case sensitive"],
checked:!d._ignoreCase,onChange:function(a){d.setOptions({ignoreCase:!a})}}));g.addChild(new e.CheckedMenuItem({label:b["Wrap search"],checked:d._wrapSearch,onChange:function(a){d.setOptions({wrapSearch:a})}}));g.addChild(new e.CheckedMenuItem({label:b["Incremental search"],checked:d._incremental,onChange:function(a){d.setOptions({incremental:a})}}));g.addChild(new e.CheckedMenuItem({label:b["Whole Word"],checked:d._wholeWord,onChange:function(a){d.setOptions({wholeWord:a})}}));g.addChild(new e.CheckedMenuItem({label:b["Regular expression"],
checked:d._useRegExp,onChange:function(a){d.setOptions({useRegExp:a})}}));g.addChild(new e.CheckedMenuItem({label:b["Find after replace"],checked:d._findAfterReplace,onChange:function(a){d.setOptions({findAfterReplace:a})}}));g=new e.form.DropDownButton({label:b.Options,dropDown:g});c.addClass(g.domNode,"findSlideoutMenu");c.place(g.domNode,f,"last")},function(){d.closeUI()})},visible:function(){return document.getElementById("localSearchFindWith")?!0:!1},_handleKeyUp:function(){this._incremental&&
!this._keyUpHandled&&this.findNext(!0,null,!0);this._keyUpHandled=!1;return!0},_handleKeyDown:function(a,b){var c=this.isMac?a.metaKey:a.ctrlKey;if(c&&a.keyCode===70)return this._keyUpHandled=b,a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0,!1;if(c&&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()){if(a.length>0)c.value=a}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 g=this._editor,m=g.getAnnotationModel();if(!c)return m&&(m.removeAnnotations(a.AnnotationType.ANNOTATION_CURRENT_SEARCH),m.removeAnnotations(a.AnnotationType.ANNOTATION_MATCHING_SEARCH)),
null;this._lastSearchString=c;var n=g.getModel().find({string:c,start:d,reverse:e,wrap:f,regex:this._useRegExp,wholeWord:this._wholeWord,caseInsensitive:this._ignoreCase}).next();if(!this._replacingAll&&(n?this._editor.reportStatus(""):this._editor.reportStatus(b["Not found"],"error"),this.visible()&&(c=a.AnnotationType.ANNOTATION_CURRENT_SEARCH,m&&(m.removeAnnotations(c),n&&m.addAnnotation(a.AnnotationType.createAnnotation(c,n.start,n.end))),this._showAllOccurrence))){this._timer&&window.clearTimeout(this._timer);
var o=this;this._timer=window.setTimeout(function(){o.markAllOccurrences(n);o._timer=null},500)}n&&g.moveSelection(n.start,n.end,null,!1);return n},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=[],g;e.hasNext();){var n=e.next();n.type===d&&f.push(n)}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(g=[];e.hasNext();)b=e.next(),g.push(a.AnnotationType.createAnnotation(d,b.start,b.end))}c.replaceAnnotations(f,g)}}};return d}();return d});
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,f){b.declare("dijit._DialogBase",[f._Templated,f.form._FormMixin,f._DialogMixin,f._CssStateMixin],{templateString:b.cache("dijit","templates/Dialog.html"),baseClass:"dijitDialog",
cssStateNodes:{closeButtonNode:"dijitDialogCloseIcon"},attributeMap:b.delegate(f._Widget.prototype.attributeMap,{title:[{node:"titleNode",type:"innerHTML"},{node:"titleBar",type:"attribute"}],"aria-describedby":""}),open:!1,duration:f.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&&f._DialogLevelManager.isTop(this)&&(this._getFocusItems(this.domNode),f.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 e=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:e,h:a})):b.style(this.containerNode,{width:e+"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(),e=this._relativePosition,d=e?null:b._getBorderBox(a);b.style(a,{left:Math.floor(c.l+(e?e.x:(c.w-d.w)/2))+"px",top:Math.floor(c.t+(e?e.y:(c.h-d.h)/2))+"px"})}},_onKey:function(a){if(a.charOrCode){var c=b.keys,e=a.target;a.charOrCode===c.TAB&&this._getFocusItems(this.domNode);var d=this._firstFocusItem==this._lastFocusItem;
if(e==this._firstFocusItem&&a.shiftKey&&a.charOrCode===c.TAB)d||f.focus(this._lastFocusItem),b.stopEvent(a);else if(e==this._lastFocusItem&&a.charOrCode===c.TAB&&!a.shiftKey)d||f.focus(this._firstFocusItem),b.stopEvent(a);else{for(;e;){if(e==this.domNode||b.hasClass(e,"dijitPopup"))if(a.charOrCode==c.ESCAPE)this.onCancel();else return;e=e.parentNode}if(a.charOrCode!==c.TAB)b.stopEvent(a);else if(!b.isOpera)try{this._firstFocusItem.focus()}catch(g){}}}},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(){f._DialogLevelManager.show(this,this.underlayAttrs)}),onEnd:b.hitch(this,function(){this.autofocus&&f._DialogLevelManager.isTop(this)&&(this._getFocusItems(this.domNode),f.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";f._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"&&(f._underlay&&f._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);f._DialogLevelManager.hide(this);this.inherited(arguments)}});b.declare("dijit.Dialog",[f.layout.ContentPane,f._DialogBase],{});f._DialogLevelManager={show:function(a,c){var e=f._dialogStack;e[e.length-1].focus=f.getFocus(a);var d=f._underlay;!d||d._destroyed?d=f._underlay=new f.DialogUnderlay(c):d.set(a.underlayAttrs);var g=e[e.length-1].dialog?e[e.length-1].zIndex+2:950;e.length==1&&d.show();b.style(f._underlay.domNode,
"zIndex",g-1);b.style(a.domNode,"zIndex",g);e.push({dialog:a,underlayAttrs:c,zIndex:g})},hide:function(a){var c=f._dialogStack;if(c[c.length-1].dialog==a){c.pop();var e=c[c.length-1];c.length==1?f._underlay._destroyed||f._underlay.hide():(b.style(f._underlay.domNode,"zIndex",e.zIndex-1),f._underlay.set(e.underlayAttrs));if(a.refocus){c=e.focus;if(!c||e.dialog&&!b.isDescendant(c.node,e.dialog.domNode))e.dialog._getFocusItems(e.dialog.domNode),c=e.dialog._firstFocusItem;try{f.focus(c)}catch(d){}}}else e=
b.indexOf(b.map(c,function(a){return a.dialog}),a),e!=-1&&c.splice(e,1)},isTop:function(a){var b=f._dialogStack;return b[b.length-1].dialog==a}};f._dialogStack=[{dialog:null,focus:null,underlayAttrs:null}];return f.Dialog});
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,f,a){f.declare("orion.widgets.NewItemDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.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",f.connect(this.itemURL,"onkeyup",null,f.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("orion/widgets/DirectoryPrompterDialog","i18n!orion/widgets/nls/messages,dojo,dijit,orion/util,dijit/Dialog,dijit/form/Button,orion/widgets/ExplorerTree,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/DirectoryPrompterDialog.html".split(","),function(b,f,a,c){f.declare("orion.widgets.DirectoryPrompterDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{treeWidget:null,treeRoot:{},widgetsInTemplate:!0,templateString:f.cache("orion","widgets/templates/DirectoryPrompterDialog.html"),
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=this.options.title||b["Choose a Folder"];this.buttonOk=b.OK;this.message=this.options.message||""},postCreate:function(){this.inherited(arguments);this.loadFolderList("/");this.message||f.style(this.messageCell,{display:"none"})},loadFolderList:function(a){a=c.makeRelative(a);this.treeRoot.Location=a;this.options.fileClient.loadWorkspace(a).then(f.hitch(this,
function(a){for(var b in a)this.treeRoot[b]=a[b];c.processNavigatorParent(this.treeRoot,a.Children);this.createTree()}))},createTree:function(){var a=new orion.widgets.DirectoryTreeModel(this.options.serviceRegistry,this.treeRoot,this.options.fileClient);this.treeWidget=new orion.widgets.ExplorerTree({id:"treeWidget",style:"width:100%; height:100%",model:a,showRoot:!1,persist:!1,openOnClick:!1,getLabel:function(a){return a.Name},getIconClass:function(){return"folderItem"}});this.treeWidget.startup();
f.byId(this.treeContentPane.id).appendChild(this.treeWidget.domNode)},execute:function(){var a=this.treeWidget.getSelectedItems();this.onHide();this.options.func(a[0])}});orion.widgets.DirectoryTreeModel=function(){function a(b,c,e){this.registry=b;this.root=c;this.fileClient=e}a.prototype={destroy:function(){},getRoot:function(a){a(this.root)},mayHaveChildren:function(){return!0},getChildren:function(a,b){a.children?b(a.children):a.Directory!==void 0&&a.Directory===!1?b([]):a.Location?this.fileClient.fetchChildren(a.ChildrenLocation).then(f.hitch(this,
function(e){for(var f=[],i=0;i<e.length;i++)e[i].Directory&&f.push(e[i]);c.processNavigatorParent(a,f);b(f)})):b([])},getIdentity:function(a){return a.Name?a.Location:"ROOT"},getLabel:function(a){return a.Name},onChildrenChange:function(){}};return a}()});
define("orion/widgets/SFTPConnectionDialog","i18n!orion/widgets/nls/messages,dojo,dijit,dijit/Dialog,dijit/form/CheckBox,dijit/form/ComboBox,dojo/data/ItemFileReadStore,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/SFTPConnectionDialog.html".split(","),function(b,f,a){localStorage.getItem("orion.sftpConnections")||localStorage.setItem("orion.sftpConnections",JSON.stringify({identifier:"name",label:b.name,items:[]}));window.sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"));
f.declare("orion.widgets.SFTPConnectionDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:f.cache("orion","widgets/templates/SFTPConnectionDialog.html"),constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title="SFTP Transfer";this.sftpHostLabelText=b["Remote host:"];this.sftpPathLabelText=b["Remote path:"];this.sftpUserLabelText=b["User name:"];this.sftpPasswordLabelText=
b["Password:"];this.buttonOk=b["Start Transfer"];this.locationLabelText=b["Location:"];sftpConnectionStoreData=JSON.parse(localStorage.getItem("orion.sftpConnections"))},postCreate:function(){this.inherited(arguments);f.connect(this.addSFTPConnection,"onClick",null,f.hitch(this,this.onAddConnection))},execute:function(){var a=this.sftpConnectionList.value.split("@");if(a.length===2){var b=a[0],d=a[1].indexOf("/");if(!(d<=0)){var f=a[1].substring(0,d),a=a[1].substring(d);this.options.func(f,a,b,this.sftpPassword.value,
this._computeOverwriteValue())}}},_computeOverwriteValue:function(){if(this.overwriteCancel.checked)return"no-overwrite";else if(this.overwriteOlder.checked)return"overwrite-older";return""},onAddConnection:function(){for(var a={name:this.sftpUser.value+"@"+this.sftpHost.value+this.sftpPath.value},b=JSON.parse(localStorage.getItem("orion.sftpConnections")),d=!1,f=0;f<b.items.length;f++)if(b.items[f].name===a.name){d=!0;break}d||(b.items.unshift(a),localStorage.setItem("orion.sftpConnections",JSON.stringify(b)),
this.sftpConnectionList.set("value",a.name))}})});
define("orion/widgets/OpenResourceDialog","i18n!orion/widgets/nls/messages,require,dojo,dijit,dijit/Dialog,dijit/form/TextBox,orion/widgets/_OrionDialogMixin,text!orion/widgets/templates/OpenResourceDialog.html".split(","),function(b,f,a,c){return a.declare("orion.widgets.OpenResourceDialog",[c.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:a.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;if(!this.searcher)throw Error("Missing required argument: searcher");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);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,"onKeyPress",this,function(b){var d,f,h,j,i;if(b.keyCode===a.keys.DOWN_ARROW||b.keyCode===a.keys.UP_ARROW)f=a.query("a",this.results),d=a.query("a",this.favresults),h=c.getFocus(),i=f.indexOf(h.node),j=d.indexOf(h.node),b.keyCode===a.keys.DOWN_ARROW?j>=0?c.focus(j<d.length-1?d[j+1]:f.length>
0?f[0]:d[0]):i>=0?c.focus(i<f.length-1?f[i+1]:d.length>0?d[0]:f[0]):(f.length>0||d.length>0)&&c.focus(-1<d.length-1?d[0]:f[0]):j>=0?(h=this.resourceName&&this.resourceName.get("textbox"),c.focus(j>0?d[j-1]:h)):i>=0?(h=this.resourceName&&this.resourceName.get("textbox"),c.focus(i>0?f[i-1]:d.length>0?d[d.length-1]:h)):f.length>0?c.focus(f[f.length-1]):d.length>0&&c.focus(d[d.length-1]),a.stopEvent(b)});a.connect(this,"onMouseUp",function(a){a.target.focus()});this.populateFavorites()},populateFavorites:function(){a.place("<div>"+
b["Populating favorites&#x2026;"]+"</div>",this.favresults,"only");this.favService.getFavorites().then(this.showFavorites());this.favService.addEventListener("favoritesChanged",this.showFavorites())},showFavorites:function(){var b=this;return function(c){if(c.navigator)c=c.navigator;b.searchRenderer.makeRenderFunction(b.favresults,!1,a.hitch(b,b.decorateResult),b.showFavoritesImage)(c);c&&c.length>0&&a.place("<hr/>",b.favresults,"last")}},showFavoritesImage:function(c){var d=new Image;a.addClass(d,
"modelDecorationSprite");a.addClass(d,"core-sprite-makeFavorite");d.src=f.toUrl("images/none.png");d.title=b.Favorite;c.appendChild(d);a.style(d,"verticalAlign","middle")},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)},doSearch:function(){var c=this.resourceName&&this.resourceName.get("value"),d=this.showFavorites();this.favService.queryFavorites(c).then(function(a){d(a)});
if(c){a.place("<div>"+b["Searching&#x2026;"]+"</div>",this.results,"only");var f=this;setTimeout(function(){var b=f.searcher.createSearchQuery(null,c,"NameLower"),d=f.searchRenderer.makeRenderFunction(f.results,!1,a.hitch(f,f.decorateResult));f.searcher.search(b,!1,d)},0)}},decorateResult:function(b){var c=this;a.query("a",b).forEach(function(b){a.connect(b,"onmouseup",function(b){!a.mouseButtons.isMiddle(b)&&!a.isCopyKey(b)&&c.hide()});a.connect(b,"onkeyup",c,function(b){b.keyCode===a.keys.ENTER&&
c.hide()})})},show:function(){this.inherited(arguments);this.resourceName.focus()},onHide:function(){clearTimeout(this.timeoutId);this.inherited(arguments)}})});
define("orion/compare/compare-features","i18n!orion/compare/nls/messages,orion/util,orion/compare/compareUtils,dojo,dijit,dijit/layout/ContentPane,dijit/layout/BorderContainer".split(","),function(b,f,a,c,e){var d=d||{};d.TwoWayCompareUIFactory=function(){function d(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}d.prototype={_createNoWrapTextDiv:function(a,
b,d,e){var f=document.createElement("table");f.width="100%";var g=document.createElement("tr");f.appendChild(g);var n=document.createElement("td");n.noWrap=!0;if(d)n.align=d;g.appendChild(n);d=document.createElement("h2");d.id=a;c.place(document.createTextNode(b),d,"only");n.appendChild(d);if(e&&!this._commandSpanId)this._commandSpanId="compare_rightContainerCommands",n=document.createElement("td"),n.id=this._commandSpanId,g.appendChild(n),n.noWrap=!0,n.align="right",f.align="right";return f},_createEditorParentDiv:function(a){a=
new e.layout.ContentPane({id:a,region:"center"});c.addClass(a.domNode,"paneScrolled");c.addClass(a.domNode,"compareEditorParent");return a},_createCompareCanvasDiv:function(a){var b=new e.layout.ContentPane({region:"leading",splitter:!1});c.addClass(b.domNode,"canvasContainer");var d=document.createElement("canvas");d.id=a;d.width=46;d.height=3E3;c.toggleClass(d,"compareCanvas",!0);b.attr("content",d);return b},_appendDomNode:function(a,b){b.placeAt(a)},_createTileDiv:function(a,d,f){a=this._createNoWrapTextDiv(a,
d?d:b["Compare..."],"left",f);d=new e.layout.ContentPane({region:"top"});c.addClass(d.domNode,"titleContainer");d.attr("content",a);return d},_createStatusDiv:function(a){var a=this._createNoWrapTextDiv(a,b["Line 0 : Col 0"],"center"),d=new e.layout.ContentPane({region:"bottom"});c.addClass(d.domNode,"statusContainer");d.attr("content",a);return d},_createLeftEditorParentDiv:function(a,b){return this._createEditorParentDiv(a,b)},_createRightEditorParentDiv:function(a,b){var d=new e.layout.BorderContainer({region:"center",
gutters:!1,design:"headline",liveSplitters:!1,persist:!1,splitter:!1});c.addClass(d.domNode,"borderContainer");this._appendDomNode(d,this._createCompareCanvasDiv(b));this._appendDomNode(d,this._createEditorParentDiv(a));return d},_createLeftBorder:function(){var a=new e.layout.BorderContainer({region:"leading",gutters:!1,design:"headline",liveSplitters:!0,persist:!1,splitter:!0});c.addClass(a.domNode,"leftBorder");if(this._showTitle)this._leftTitleDivId=this._parentDivID+"_left_title_id",this._appendDomNode(a,
this._createTileDiv(this._leftTitleDivId,this._leftTitle,!1));this._leftEditorParentDivId=this._parentDivID+"_left_editor_id";this._appendDomNode(a,this._createLeftEditorParentDiv(this._leftEditorParentDivId));if(this._showLineStatus)this._leftStatusDivId=this._parentDivID+"_left_status_id",this._appendDomNode(a,this._createStatusDiv(this._leftStatusDivId));return a},_createRightBorder:function(){var a=new e.layout.BorderContainer({region:"center",gutters:!1,design:"headline",liveSplitters:!1,persist:!1,
splitter:!1});c.addClass(a.domNode,"rightBorder");if(this._showTitle)this._rightTitleDivId=this._parentDivID+"_right_title_id",this._appendDomNode(a,this._createTileDiv(this._rightTitleDivId,this._rightTitle,!0));this._rightEditorParentDivId=this._parentDivID+"_right_editor_id";this._diffCanvasDivId=this._parentDivID+"_diff_canvas_id";this._appendDomNode(a,this._createRightEditorParentDiv(this._rightEditorParentDivId,this._diffCanvasDivId));if(this._showLineStatus)this._rightStatusDivId=this._parentDivID+
"_right_status_id",this._appendDomNode(a,this._createStatusDiv(this._rightStatusDivId));return a},buildUI:function(){this._topWidgetId=this._parentDivID+"_topWidget";this.destroy();var b=this._createLeftBorder(),c=this._createRightBorder(),d=a.getDijitSizeStyle(this._parentDivID),d=new e.layout.BorderContainer({id:this._topWidgetId,style:d,region:"center",gutters:!1,design:"headline",liveSplitters:!0,persist:!1,splitter:!0});d.placeAt(this._parentDivID);d.addChild(b);d.addChild(c);d.startup();f.forceLayout(this._parentDivID)},
destroy:function(){a.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 d}();return d});
define("dojox/form/uploader/Base","dojo,dijit,dojox,dojox/form/uploader/Base,dijit/_Widget,dijit/_Templated".split(","),function(b,f){b.declare("dojox.form.uploader.Base",[f._Widget,f._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,e=Math.round(a/1048576*1E5)/1E5,d=Math.round(a/1073741824*1E5)/1E5,f=a;b>1&&(f=b.toFixed(1)+
" kb");e>1&&(f=e.toFixed(1)+" mb");d>1&&(f=d.toFixed(1)+" gb");return{kb:b,mb:e,gb:d,bytes:a,value:f}}})});
define("dojox/form/Uploader",["dojo","dijit","dojox","dojox/form/uploader/Base"],function(b,f,a){b.declare("dojox.form.Uploader",[a.form.uploader.Base],{uploadOnSelect:!1,tabIndex:0,multiple:!1,label:"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,e=this._getNodePosition(this.domNode);if(!this.btnSize.w||!this.btnSize.h)b.body().appendChild(this.domNode),this._getButtonStyle(this.domNode),a=!0;this._setButtonStyle();a&&b.place(this.domNode,e.node,e.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();b.forEach(this._inputs,b.destroy,b);this._inputs=[];this._nameIndex=0;this._createInput()},getFileList:function(){var a=[];this.supports("multiple")?b.forEach(this.inputNode.files,function(b,d){a.push({index:d,name:b.name,size:b.size,type:b.type})},this):b.forEach(this._inputs,function(b,d){a.push({index:d,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),b.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?b.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;b.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();b.style(this.button.domNode,{margin:"0px",display:"block",verticalAlign:"top"});b.style(this.button.domNode.firstChild,{margin:"0px",display:"block"});a||document.body.removeChild(this.domNode)},
_createInput:function(){this._inputs.length&&(b.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=b.create("input",{type:"file",name:a,className:"dojoxInputNode"},this.domNode,"first");this.supports("multiple")&&this.multiple&&b.attr(this.inputNode,"multiple",!0);this._inputs.push(this.inputNode);b.style(this.inputNode,{fontSize:this.inputNodeFontSize+"em"});
a=b.marginBox(this.inputNode);b.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=b.hitch(this,function(a){this._cons.push(b.connect(this.inputNode,a,this,function(){this.button._cssMouseEvent({type:a})}))});a("mouseover");a("mouseout");a("mousedown");this._cons.push(b.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 e=b.style(this.button.domNode.firstChild,"border");this._cons.push(b.connect(this.inputNode,"focus",this,function(){b.style(this.button.domNode.firstChild,"border","1px dashed #ccc")}));this._cons.push(b.connect(this.inputNode,"blur",this,function(){b.style(this.button.domNode.firstChild,"border",e)}))}},_disconnectButton:function(){b.forEach(this._cons,b.disconnect,
b)}});(function(){a.form.UploaderOrg=a.form.Uploader;var c=[a.form.UploaderOrg];a.form.addUploaderPlugin=function(a){c.push(a);b.declare("dojox.form.Uploader",c,{})}})()});
define("dojox/form/uploader/plugins/HTML5",["dojo","dijit","dojox","dojox/form/Uploader"],function(b,f,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 e=
new FormData;b.forEach(this.inputNode.files,function(a){e.append(this.name+"s[]",a)},this);if(a)for(var d in a)e.append(d,a[d]);this.createXhr().send(e)}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,e;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(e)}),!1);a.addEventListener("abort",b.hitch(this,function(a){this.onAbort(a);clearInterval(e)}),!1);a.onreadystatechange=b.hitch(this,function(){a.readyState===4&&(console.info("COMPLETE"),clearInterval(e),this.onComplete(b.eval(a.responseText)))});a.open("POST",this.getUrl());
e=setInterval(b.hitch(this,function(){}),250);return a},_buildRequestBody:function(a,e){var d="",e="--"+e,f=[];b.forEach(this.inputNode.files,function(a,b){var c=this.name+"s[]",h=this.inputNode.files[b].fileName,m;try{m=this.inputNode.files[b].getAsBinary()+"\r\n",d+=e+"\r\n",d+="Content-Disposition: form-data; ",d+='name="'+c+'"; ',d+='filename="'+h+'"\r\n',d+="Content-Type: "+this.getMimeType()+"\r\n\r\n",d+=m}catch(n){f.push({index:b,name:h})}},this);f.length&&f.length>=this.inputNode.files.length&&
(this.onError({message:this.errMsg,filesInError:f}),d=!1);if(!d)return!1;if(a)for(var h in a)d+=e+"\r\n",d+="Content-Disposition: form-data; ",d+='name="'+h+'"\r\n\r\n',d+=a[h]+"\r\n";d+=e+"--\r\n";return d}});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,f,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,f,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=f.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 e=this.progressNode,d=function(){b.style(e,"display",a.endDisp)};a.ani?(b.style(e,"display","block"),b.animateProperty({node:e,properties:{height:{start:a.beg,end:a.end,units:"px"}},onEnd:d}).play()):d()},_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,e,d,f){var h,j=this.listNode.insertRow(-1);h=j.insertCell(-1);b.addClass(h,"dojoxUploaderIndex");h.innerHTML=a;h=j.insertCell(-1);b.addClass(h,"dojoxUploaderIcon");h.innerHTML=e;h=j.insertCell(-1);b.addClass(h,"dojoxUploaderFileName");h.innerHTML=d;h=j.insertCell(-1);b.addClass(h,"dojoxUploaderSize");h.innerHTML=this.convertBytes(f).value;this.rowAmt++}})});
define("orion/widgets/ImportDialog","i18n!orion/widgets/nls/messages,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/widgets/templates/ImportDialog.html,dojo/io/iframe".split(","),function(b,f,a){f.declare("orion.widgets.ImportDialog",[a.Dialog,orion.widgets._OrionDialogMixin],{widgetsInTemplate:!0,templateString:'<div class="dijitDialog" tabindex="-1" waiRole="dialog" waiState="labelledby-${id}_title"><div data-dojo-attach-point="titleBar" class="dijitDialogTitleBar"><span data-dojo-attach-point="titleNode" class="dijitDialogTitle" id="${id}_title"></span><span data-dojo-attach-point="closeButtonNode" class="dijitDialogCloseIcon" data-dojo-attach-event="onclick:onCancel" title="${buttonCancel}"><span data-dojo-attach-point="closeText" class="closeText" title="${buttonCancel}">x</span></span></div><div ondragover="event.preventDefault()" data-dojo-attach-point="containerNode" class="dijitDialogPaneContent"><div class="uploadContainer" data-dojo-attach-event="drop:drop,dragenter:dragEnter,dragexit:dragExit,dragover:dragOver"><div class="dottedOutline"><div data-dojo-attach-point="dragArea" class="floatingSection"><div class="uploadInstruction">'+
b["Drag a File or Zip here"]+'</div><div class="tipInstruction">'+b["or if you prefer"]+'</div><form data-dojo-attach-point="importform" method="post" id="importDialog.myForm" enctype="multipart/form-data" ><input class="uploadBrowser" data-dojo-attach-point="importloader" name="uploadedfile" multiple="false" type="file" id="importLoader" force="iframe" data-dojo-type="dojox.form.Uploader" style="height: 20px" label="'+b["Browse..."]+'" ><input type="submit" label="Finish" value="OK" dojoType="dijit.form.Button" style="visibility:hidden;padding: 20 0 10 0; float: right; clear: both;"/></form></div></div></div></div></div>',
constructor:function(){this.inherited(arguments);this.options=arguments[0]||{}},postMixInProperties:function(){this.inherited(arguments);this.title=b["Import a file or zip"]},handleReadyState:function(){this.req.readyState===4&&(this.hide(),this.options.func())},uploadDroppedFiles:function(a){this.req=new XMLHttpRequest;this.req.open("post",this.options.importLocation,!0);this.req.setRequestHeader("X-Requested-With","XMLHttpRequest");this.req.setRequestHeader("Slug",a.name);a.name.indexOf(".zip")!==
a.name.length-4&&this.req.setRequestHeader("X-Xfer-Options","raw");this.req.setRequestHeader("Content-Type",a.type);this.req.onreadystatechange=f.hitch(this,"handleReadyState");this.req.send(a)},upload:function(a){a&&this.importloader.upload(a)},handleFiles:function(a){for(this.importloader.form[0].files=a;0<a.length;a++)this.uploadDroppedFiles(a[0])},dragEnter:function(){return!1},dragExit:function(){return!1},dragOver:function(){return!1},drop:function(a){a.preventDefault();a.stopPropagation();
a=a.dataTransfer.files;a.length>0&&this.handleFiles(a)},postCreate:function(){this.inherited(arguments);f.style(this.importloader.domNode,"left","100px");f.style(this.titleBar,"padding","10px 10px 10px");this.importloader.force="iframe";this.importloader.preventDefault=function(){};this.importloader.stopPropagation=function(){};this.importform.action=this.options.importLocation;this.importloader.url=this.options.importLocation;f.connect(this.importloader,"onChange",f.hitch(this,function(){this.importloader.upload({preventDefault:function(){},
stopPropagation:function(){}})}));f.connect(this.importloader,"onError",f.hitch(this,function(){setTimeout(f.hitch(this,function(){this.hide()}),2E3)}));f.connect(this.importloader,"onComplete",f.hitch(this,function(){setTimeout(f.hitch(this,function(){this.hide();this.options.func()}),2E3)}));f.connect(this.importloader,"onKeyPress",function(a){a.keyCode===f.keys.ENTER&&a.stopPropagation()})}})});
define("orion/extensionCommands","require,dojo,orion/util,orion/commands,orion/editor/regex,orion/contentTypes,orion/URITemplate,orion/i18nUtil,orion/widgets/NewItemDialog,orion/widgets/DirectoryPrompterDialog,orion/widgets/ImportDialog,orion/widgets/SFTPConnectionDialog".split(","),function(b,f,a,c,e,d,g,h){var j={},b=window.location.href.split("#")[0],i=b.substring(0,b.length-window.location.pathname.length);j._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};j._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,i=b(a,g);i.length&&e.push({properties:{name:g.name||g.id,nameKey:g.nameKey,id:"eclipse.openWithCommand."+g.id,tooltip:g.name,
tooltipKey:g.nameKey,contentType:i,uriTemplate:g.uriTemplate,nls:g.nls,forceSingleItem:!0,isEditor:h?"default":"editor"},service:{}})}return e};j._makeValidator=function(a,b,c,e){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=f.hitch(b,function(b){typeof e==="function"&&(b=e.call(this,b));if(b){if(f.isArray(b)){if((this.info.forceSingleItem||this.info.uriTemplate)&&b.length!==1)return!1;if(b.length<1)return!1}else b=[b];for(var g=0;g<b.length;g++){var i;a:{var j=b[g],m=c;if(this.info.validationProperties)for(i=0;i<this.info.validationProperties.length;i++){var w=
this.info.validationProperties[i];if(w.source){if(!h(j,w.source,w,this)){i=!1;break a}}else{window.console.log("Invalid validationProperties in "+a.id+".  No source property specified.");i=!1;break a}}if(this.info.contentType&&m){w=!1;if(j=d.getFilenameContentType(j.Name,m))for(i=0;i<this.info.contentType.length;i++)if(j.id===this.info.contentType[i]){w=!0;break}i=w}else i=!0}if(!i)return!1}return!0}return!1});b.generatesURI=f.hitch(b,function(){return!!this.info.uriTemplate});b.getURI=f.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=
i;a=new g(this.info.uriTemplate);return window.decodeURIComponent(a.expand(b))}return null});return b};j._createCommandOptions=function(a,b,c,d,e,g){function i(h,q){var t=j._makeValidator(a,c,d,g);h.visibleWhen=t.validationFunction;if(e)t.generatesURI()?h.hrefCallback=f.hitch(t,function(a){return this.getURI(f.isArray(a.items)?a.items[0]:a.items)}):h.callback=f.hitch(a,function(a){var d;if(this.forceSingleItem)a=f.isArray()?a.items[0]:a.items,d=j._cloneItemWithoutChildren(a);else if(f.isArray(a.items)){d=
[];for(var e=0;e<a.items.length;e++)d.push(j._cloneItemWithoutChildren(a.items[e]))}else d=j._cloneItemWithoutChildren(a.items);b.run?b.run(d):c&&c.getService(b).run(d)});q.resolve(h)}var t=new f.Deferred;a.nls?h.getMessageBundle(a.nls).then(function(b){i({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},t)}):i({name:a.name,image:a.image,id:a.id||a.name,tooltip:a.tooltip,isEditor:a.isEditor},t);return t};j.getOpenWithCommands=
function(a){var b=[],c;for(c in a._commandList){var d=a._commandList[c];d.isEditor&&b.push(d)}return b};return j});
define("orion/globalCommands","i18n!orion/nls/messages,require,dojo,dijit,orion/commonHTMLFragments,orion/commands,orion/parameterCollectors,orion/extensionCommands,orion/util,orion/textview/keyBinding,orion/breadcrumbs,orion/favorites,orion/contentTypes,orion/URITemplate,orion/PageUtil,dijit/Menu,dijit/MenuItem,dijit/form/DropDownButton,orion/widgets/OpenResourceDialog,orion/widgets/LoginDialog,orion/widgets/UserMenu,orion/widgets/UserMenuDropDown".split(","),function(b,f,a,c,e,d,g,h,j,i,k,l,m,n,
o){function p(b,c){if(b.getLabel)return b.getLabel();else{var d=new a.Deferred;d.callback(c.properties.name);return d}}function r(b){(b=b.getService("orion.page.progress"))&&a.hitch(b,b.init)("progressPane")}function q(a,b){var c=a.getService("orion.core.auth");c!==null&&c.getUser().then(function(a){a.Name?b.set("label",a.Name):a.login&&b.set("label",a.login)})}function t(e){var f=e.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:O,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 d.CommandTooltip({connectId:[h.focusNode],label:b.Options,position:["above","left","right","below"]});q(e,h)}for(g=0;g<f.length;g++){var h=f[g],i=e.getService(h);a.hitch(this,function(a,b){p(a,b).then(function(b){a.getKey().then(function(c){E.push(c);a.getUser().then(function(d){y.addUserItem(c,a,b,d);O.addUserItem(c,
a,b,d)},function(d,e){y.addUserItem(c,a,b);O.addUserItem(c,a,b,e)});window.addEventListener("storage",function(){A[c]!==localStorage.getItem(c)&&(A[c]=localStorage.getItem(c),a.getUser().then(function(d){y.addUserItem(c,a,b,d);O.addUserItem(c,a,b,d)},function(){y.addUserItem(c,a,b);O.addUserItem(c,a,b)}))},!1)})})})(i,h)}}}function s(){if(a.byId("relatedLinks")&&D){var b=c.byId("related");b&&b.closeDropDown();D.focusedChild=null;a.forEach(D.getChildren(),function(a){D.removeChild(a);a.destroy()})}}
function u(d,e){D||(D=new c.Menu({style:"display: none;padding:3px;border-radius:3px;",id:"relatedLinksMenu"}));d._addMenuItem(D,e);var f=c.byId("related"),g=a.byId("relatedLinks");g&&!f&&(f=new orion.widgets.UserMenuDropDown({id:"related",label:b.Related,dropDown:D}),a.addClass(f.domNode,"bannerMenu"),a.place(f.domNode,g,"only"),j.forceLayout(g))}function w(b,c,e,f,g){var i,k=b.getServiceReferences("orion.page.link.related");if(!(k.length<=0)){var l=a.byId("relatedLinks");l&&a.when(function(){if(i)return i;
var a=b.getService("orion.core.contenttypes");a||(a=new m.ContentTypeService(b),a=b.getService("orion.core.contenttypes"));return a.getContentTypes().then(function(a){return i=a})}(),a.hitch(this,function(){var m;s();for(var n=[],o=0;o<k.length;o++){var p={},q,r=k[o].getPropertyNames();for(q=0;q<r.length;q++)p[r[q]]=k[o].getProperty(r[q]);if(p.id){var K=function(b){if(b)if(!b.visibleWhen||b.visibleWhen(c)){var e=new d.CommandInvocation(f,c,c,null,b);u(b,e)}else typeof g==="function"&&(m||(m=g()),
a.when(m,a.hitch(b,function(a){a&&c===F&&(!this.visibleWhen||this.visibleWhen(a))&&u(this,new d.CommandInvocation(f,a,a,null,this))})))},t=null;if(a.indexOf(e,p.id)<0)if((p.nls&&p.nameKey||p.name)&&p.uriTemplate)q=h._createCommandOptions(p,k[o],b,i,!0),n.push(q),q.then(a.hitch(this,function(a){a=new d.Command(a);K(a)}));else{if(!t&&(t=f.findCommand(p.id))){K(t);continue}if(!t){var x=b.getServiceReferences("orion.navigate.command");for(q=0;q<x.length;q++)if(x[q].getProperty("id")===p.id){for(var p=
{},r=x[q].getPropertyNames(),A=0;A<r.length;A++)p[r[A]]=x[q].getProperty(r[A]);q=h._createCommandOptions(p,x[q],b,i,!0);n.push(q);q.then(a.hitch(this,function(a){t=new d.Command(a);K(t)}));break}}}}}(new a.DeferredList(n)).addBoth(a.hitch(this,function(){var b=a.byId("relatedLinks");D&&b&&(D.getChildren().length===0?a.style(b,"visibility","hidden"):a.style(b,"visibility","visible"));j.forceLayout(l)}))}))}}function v(b){var c=a.byId("globalActions");c&&(a.empty(c),b.renderCommands(c.id,c,{},{},"tool"))}
function C(a){var c=a.getService("orion.core.favorite");c||(c=new l.FavoritesService({serviceRegistry:a}),c=a.getService("orion.core.favorite"));G&&G.Location&&c.hasFavorite(G.ChildrenLocation||G.Location).then(function(d){d?a.getService("orion.page.message").setMessage(G.Name+b[" is already a favorite."],2E3):(c.makeFavorites([G]),a.getService("orion.page.message").setMessage(G.Name+b[" has been added to the favorites list."],2E3))})}function K(c,e){var f=a.byId("pageFavorite");f&&(G&&G.Location?
(a.addClass(f,"bannerButton"),a.connect(f,"onclick",this,function(){C(c)}),a.connect(f,"onkeypress",this,function(b){b.keyCode===a.keys.ENTER&&C(c)}),new d.CommandTooltip({connectId:[f],label:b["Add to the favorites list"],position:["below","left","right","above"],commandService:e}),a.style(f,"visibility","visible")):a.style(f,"visibility","hidden"))}var x=function(a){var b=document.createElement("a");b.href=a;return b.href}(f.toUrl("auth/NotifyAuthentication.html")),A={},y=new orion.widgets.LoginDialog,
O=new orion.widgets.UserMenu({loginDialog:y}),E=[],D,F,I=[],G=null,z;return{generateUserInfo:t,generateRelatedLinks:w,generateDomCommandsInBanner:function(b,c,d,e,f,g,h){b.closeParameterCollector();if(g=a.byId("pageActions"))a.empty(g),(g=b.renderCommands(g.id,g,d||c,c,"button"))&&g.then?g.then(function(){b.processURL(window.location.href)}):b.processURL(window.location.href);if(!h&&(g=a.byId("pageNavigationActions")))a.empty(g),b.renderCommands(g.id,g,f||d||c,e||c,"button")},generateBanner:function(h,
k,m,p,q,s,u,x){function A(b){a.query(".targetSelector").forEach(function(a){a.target=b})}function y(){p.getPreferences("/settings",2).then(function(a){a=a.get("General");if(a!==void 0&&(a=JSON.parse(a)))a=p.getSetting(a,"Navigation","Links"),A(a==="Open in new tab"?"_blank":"_self")})}var w,C=a.byId(h);if(!C)throw b["could not find banner parent, id was "]+h;a.byId("staticBanner")||a.place(e.topHTMLFragment,C,"only");(h=a.byId("pageToolbar"))?(a.place(e.toolbarHTMLFragment,h,"only"),a.addClass(h,
"toolComposite")):(h=a.create("div",{id:"pageToolbar","class":"toolbar toolComposite layoutBlock"},"titleArea","after"),a.place(e.toolbarHTMLFragment,h,"only"));a.byId("footerContent")||(h=a.byId("footer"))&&a.place(e.bottomHTMLFragment,h,"only");m.setParameterCollector(new g.CommandParameterCollector);a.place('<div id="keyAssist" style="display: none" class="keyAssistFloat" role="list" aria-atomic="true" aria-live="assertive"></div>',document.body,"last");var E=a.byId("primaryNav");if(E)for(var h=
k.getServiceReferences("orion.page.link"),s=o.matchResourceParameters(window.location.href),D={OrionHome:window.location.protocol+"//"+window.location.host,Location:s.resource},s=0;s<h.length;s++){for(var z={},F=h[s].getPropertyNames(),I=0;I<F.length;I++)z[F[I]]=h[s].getProperty(F[I]);z.uriTemplate&&z.nls&&(z.name||z.nameKey)?f(["i18n!"+z.nls],function(b){var c=new n(z.uriTemplate),c=window.decodeURIComponent(c.expand(D)),c=a.create("a",{href:c,target:"_self","class":"targetSelector"},E,"last");w=
document.createTextNode(z.nameKey?b[z.nameKey]:z.name);a.place(w,c,"only")}):z.uriTemplate&&z.name&&(F=new n(z.uriTemplate),F=window.decodeURIComponent(F.expand(D)),F=a.create("a",{href:F,target:"_self","class":"targetSelector"},E,"last"),w=document.createTextNode(z.name),a.place(w,F,"only"))}var G=a.byId("search");if(!G)throw"failed to generate HTML for banner";a.connect(G,"onkeypress",function(c){if(c.charOrCode===a.keys.ENTER)if(q){if(G.value.length>0)c=q.createSearchQuery(G.value),window.location=
f.toUrl("search/search.html")+"#"+c}else window.alert(b["Can't search: no search service is available"])});h=new d.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=k.getService("orion.core.favorite"),e=function(a){return function(c){c?
k.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))}}});m.addCommand(h);var U=function(b,c,d){var e=c.getService("orion.core.favorite");e||(e=new l.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)},h=new d.Command({name:b["Find File Named..."],tooltip:b["Choose a file by name and open an editor on it"],id:"eclipse.openResource",callback:function(){U(q,k,u)}});u&&(u.getTextView().setKeyBinding(new i.KeyBinding("f",!0,!0,!1),h.id),u.getTextView().setAction(h.id,function(){U(q,k,u);return!0},h));m.addCommand(h);m.registerCommandContribution("globalActions","eclipse.openResource",100,null,!0,new d.CommandKeyBinding("f",
!0,!0));h=new d.Command({name:b["Toggle banner and footer"],tooltip:b["Hide or show the page banner and footer"],id:"orion.toggleTrim",callback:function(){var b=c.byId(C.parentNode.id);if(b){var d=a.byId("footer");C.style.display==="none"?(C.style.display="block",d.style.display="block"):(C.style.display="none",d.style.display="none");b.layout()}return!0}});m.addCommand(h);m.registerCommandContribution("globalActions","orion.toggleTrim",100,null,!0,new d.CommandKeyBinding("m",!0,!0));u&&(u.getTextView().setKeyBinding(new d.CommandKeyBinding("m",
!0,!0),h.id),u.getTextView().setAction(h.id,h.callback,h));var P=a.byId("keyAssist");a.connect(document,"onkeypress",a.hitch(this,function(b){if(b.charOrCode===a.keys.ESCAPE)P.style.display="none"}));a.connect(document,"onclick",a.hitch(this,function(a){if((a=a.target||a.originalTarget||a.srcElement)&&a.id!=="keyAssist")P.style.display="none"}));u&&u.getTextView().addEventListener("MouseDown",function(){P.style.display="none"});x&&x.addHandler({isActive:function(){return P.style.display==="block"},
cancel:function(){return this.isActive()?(P.style.display="none",!0):!1}});x=new d.Command({name:b["System Configuration Details"],tooltip:b["System Config Tooltip"],id:"orion.configDetailsPage",hrefCallback:function(){return f.toUrl("help/about.html")}});m.addCommand(x);m.registerCommandContribution("globalActions","orion.configDetailsPage",100,null,!0,new d.CommandKeyBinding(112,!0,!0));x=new d.Command({name:b["Background Operations"],tooltip:b["Background Operations Tooltip"],id:"orion.backgroundOperations",
hrefCallback:function(){return f.toUrl("operations/list.html")}});m.addCommand(x);m.registerCommandContribution("globalActions","orion.backgroundOperations",100,null,!0,new d.CommandKeyBinding("o",!0,!0));x=new d.Command({name:b["Show Keys"],tooltip:b["Show a list of all the keybindings on this page"],id:"eclipse.keyAssist",callback:function(){if(P.style.display==="none"){a.empty(P);if(u){a.place("<h2>"+b.Editor+"</h2>",P,"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>",P,"last")}}a.place("<h2>"+b.Global+"</h2>",P,"last");m.showKeyBindings(P);P.style.display="block"}else P.style.display="none";return!0}});m.addCommand(x);m.registerCommandContribution("globalActions","eclipse.keyAssist",100,null,!0,new d.CommandKeyBinding(191,!1,!0));u&&(h=window.navigator.platform.indexOf("Mac")!==
-1,u.getTextView().setKeyBinding(new d.CommandKeyBinding(191,!1,!0,!h,h),x.id),u.getTextView().setAction(x.id,x.callback,x));O.setKeyAssist(x.callback);K(k,m);v(m);t(k);r(k);j.forceLayout(C.parentNode);a.subscribe("/dojo/hashchange",m,function(){m.processURL(window.location.href)});window.setTimeout(function(){y()},0)},notifyAuthenticationSite:x,setPendingAuthentication:function(b){y.setPendingAuthentication(b);for(var d in b)if(b.hasOwnProperty(d)){var e=a.byId("userMenu");if(e.innerHTML)try{c.popup.open({popup:y,
around:e})}catch(f){}else window.setTimeout(function(){try{c.popup.open({popup:y,around:e})}catch(a){}},500);return}c.popup.hide&&c.popup.hide(y);c.popup.close(y)},getAuthenticationIds:function(){return E},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,F=b.target,w(b.serviceRegistry,
b.target,I,b.commandService,b.makeAlternate)):(b.breadcrumbTarget||(e=e||b.task||b.name),c=b.name);(z=b.title)||(z=c?c+" - "+b.task:b.task);window.document.title=z;a.empty("location");new k.BreadCrumbs({container:"location",resource:b.breadcrumbTarget||b.target,rootSegmentName:e,workspaceRootSegmentName:d,makeHref:b.makeBreadcrumbLink});G=b.target&&b.isFavoriteTarget?b.target:null;K(b.serviceRegistry,b.commandService)},setDirtyIndicator:function(b){if(z)z.charAt(0)==="*"&&!b&&(z=z.substring(1)),b&&
z.charAt(0)!=="*"&&(z="*"+z),window.document.title=z;var c=a.byId("dirty");if(c)c.innerHTML=b?"*":""},setPageCommandExclusions:function(a){I=a},authenticatedService:function(a){y.authenticatedService(a)}}});
define("orion/progress",["i18n!orion/nls/messages","require","dojo","orion/globalCommands","orion/widgets/OperationsDialog"],function(b,f,a,c){function e(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}e.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 e=this;a.connect(this._progressPane,"onkeypress",function(b){(b.charOrCode===" "||b.keyCode===a.keys.ENTER)&&a.hitch(e,e._openOperationsPopup)()});new Date-this.getLastListUpdate()>3E5?this._operationsClient.getRunningOperations().then(function(b){a.hitch(e,e._loadOperationsList)(b);window.setTimeout(function(){a.hitch(e,e._checkOperationsChanges())},5E3)},function(a){console.error(a)}):(a.hitch(e,e._generateOperationsInfo(JSON.parse(localStorage.getItem("orionOperations")||
'{"Children": []}'))),window.setTimeout(function(){a.hitch(e,e._checkOperationsChanges())},5E3));window.addEventListener("storage",function(b){c.getAuthenticationIds().indexOf(b.key)>=0&&e._operationsClient.getRunningOperations().then(function(b){a.hitch(e,e._loadOperationsList)(b)},function(a){console.error(a)})},!1);window.addEventListener("storage",function(b){b.key==="orionOperations"&&a.hitch(e,e._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,e){a.Message=b["Operation status is unknown"];a.Running=!1;a.Failed=!0;a.Result={HttpCode:e?e.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": []}'),e=[],f=[],i=0;i<c.Children.length;i++){var k=c.Children[i];if(k.Running==!0&&new Date-new Date(k.lastClientDate?k.lastClientDate:0)>5E3){var l=this._operationsClient.getOperation(k.Location);f.push(l);a.hitch(this,function(f){l.then(function(c){c.lastClientDate=new Date;a.hitch(b,b.writeOperation)(c)},function(i,
j){if(i.status==404)return e.push(f),i;a.hitch(b,b._markOperationAsFailed(c.Children[f],i,j))})})(i)}!k.Running&&new Date-new Date(k.lastClientDate?k.lastClientDate:0)>3E5&&e.push(i)}(new a.DeferredList(f)).addBoth(function(){if(e.length>0){c.lastClientDate=new Date;for(var f=e.length-1;f>=0;f--)c.Children.splice(e[f],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 e="",f=0;f<c.Children.length;f++){var j=c.Children[f];if(this._myOperations[j.Id]&&j.Running==!0){e="running";break}}if(e===""&&this._lastOperation!=null&&this._lastOperation.Result)switch(this._operationsDialog.parseProgressResult(this._lastOperation.Result).Severity){case "Warning":e!=="error"&&(e="warning");break;case "Error":e="error"}switch(e){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,e){b.Id&&
(this._myOperations[b.Id]=!0);var f=c?c:new a.Deferred;this.writeOperation(b);var i=this;if(b&&b.Location&&b.Running==!0)window.setTimeout(function(){i._operationsClient.getOperation(b.Location).then(function(c){a.hitch(i,i.followOperation(c,f,b.Location))},function(c,e){a.hitch(i,i.setProgressResult)({Severity:"Error",Message:c});a.hitch(i,i._markOperationAsFailed(b,c,e));f.errback(c,e)})},2E3);else if(b&&b.Result)i._serviceRegistry.getService("orion.page.message").setProgressMessage(""),c=this._operationsDialog.parseProgressResult(b.Result).Severity,
c=="Error"||c=="Warning"?(b.Result.failedOperation={Location:e,Id:b.Id,Name:b.Name},f.callback(b),setTimeout(function(){i._myOperations[b.Id]&&a.hitch(i,i._openOperationsPopup)()},10)):f.callback(b),!b.Failed&&b.Idempotent==!0&&window.setTimeout(function(){a.hitch(i,i.removeOperation)(e,b.Id)},5E3);return f},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 e=b.Children[c];if(e.Id&&e.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 e=this;return b.then(function(b){if(b&&b.Location&&
b.Message&&b.Running)return a.hitch(e,e.followOperation)(b,null,b.Location);e._serviceRegistry.getService("orion.page.message").setProgressMessage("");return b},function(b){a.hitch(e,e.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 e=
b.Children[c];if(e.Id&&e.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)}};e.prototype.constructor=e;return{ProgressService:e}});
define("orion/auth","i18n!orion/nls/messages,dojo,dijit,orion/globalCommands,dojo/date/locale,orion/widgets/LoginDialog".split(","),function(b,f,a,c){var e,d={};f.addOnLoad(function(){window.dojo=f;window.eclipse=window.eclipse||{};eclipse.globalCommandUtils=c});return{handleAuthenticationError:function(f,h){if(f.status===403){typeof e==="undefined"&&(e=new a.Dialog({title:b["Forbidden access"]}));var j=f.message;f.responseText&&(j=JSON.parse(f.responseText).Message||f.message);e.set("content",j);
e.show()}else if(f.status===401)try{var i=JSON.parse(f.responseText);if(!i.SignInKey)return i;var k=localStorage.getItem(i.SignInKey),l=function(){var a=localStorage.getItem(i.SignInKey);k!==a&&(window.removeEventListener("storage",l,!1),delete d[i.SignInKey],c.setPendingAuthentication(d),c.authenticatedService(i.SignInKey),h&&h())};window.addEventListener("storage",l,!1);i.SignInKey&&(d[i.SignInKey]=i,c.setPendingAuthentication(d))}catch(m){}else try{return JSON.parse(f.responseText)}catch(n){return{Message:f.Message,
HttpCode:f.status}}}}});
define("orion/operationsClient",["i18n!orion/operations/nls/messages","orion/auth","orion/Deferred"],function(b,f,a){function c(b,c,d){var e=new a;b[c].apply(b,d).then(function(a){e.resolve(a)},function(a){a.status===401?f.handleAuthenticationError(a,function(){b[c].apply(b,d).then(function(a){e.resolve(a)},function(a){e.reject(a)})}):e.reject(a)});return e}function e(a){this._location=a}function d(){var c=new a;c.reject(b["No Matching OperationService for location:"]+this._location);return c}function g(a){this._services=
[];this._patterns=[];this._operationListeners=[];this._currentLongpollingIds=[];for(var b=a.getServiceReferences("orion.core.operation"),c=0;c<b.length;c++){var d=a.getService(b[c]);this._services[c]=d;d=b[c].getProperty("pattern")||".*";d[0]!=="^"&&(d="^"+d);this._patterns[c]=RegExp(d)}this._getService=function(a){if(!a)return this._services[0];for(var b=0;b<this._patterns.length;++b)if(this._patterns[b].test(a))return this._services[b];return new e(a)}}function h(a){for(var b={Children:[]},c=0;c<
a.length;c++)b.Children=b.Children.concat(a[c].Children);return b}function j(a,b,d){var e=this,f={Longpolling:!0};if(d)f.LongpollingId=d;c(a,"getOperations",[f]).then(function(c){d&&e._currentLongpollingIds.indexOf(d)<0||(b(c,d),c.LongpollingId?(e._currentLongpollingIds.push(c.LongpollingId),j.bind(e)(a,b,c.LongpollingId)):j.bind(e)(a,b,d))},function(c){d&&e._currentLongpollingIds.indexOf(d)<0||("timeout"===c.dojoType?j.bind(e)(a,b,d):setTimeout(function(){j.bind(e)(a,b,d)},2E3))})}function i(a){for(var b=
0;b<this._operationListeners.length;b++)this._operationListeners[b](a)}e.prototype={getOperation:d,getOperations:d,removeCompletedOperations:d,removeOperation:d,cancelOperation:d};e.prototype.constructor=e;g.prototype={getOperations:function(){for(var b=new a,d=[],e=0;e<this._services.length;e++)d[e]=c(this._services[e],"getOperations",[void 0]);(new a).all(d).then(function(a){b.resolve(h(a))});return b},getRunningOperations:function(){for(var b=new a,d=[],e=0;e<this._services.length;e++)d[e]=c(this._services[e],
"getOperations",[{RunningOnly:!0}]);(new a).all(d).then(function(a){b.resolve(h(a))});return b},getOperation:function(a){return c(this._getService(a),"getOperation",arguments)},removeCompletedOperations:function(){for(var b=[],d=0;d<this._services.length;d++)b[d]=c(this._services[d],"removeCompletedOperations");return(new a).all(b)},removeOperation:function(a){return c(this._getService(a),"removeOperation",arguments)},cancelOperation:function(a){return c(this._getService(a),"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++)j.bind(this)(this._services[a],i.bind(this))}},removeOperationChangeListener:function(a){for(var b=0;b<this._operationListeners.length;b++)if(this._operationListeners[b]===a){this._operationListeners.splice(b,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++)j.bind(this)(this._services[a],i.bind(this))}};g.prototype.constructor=g;return{OperationsClient:g}});
define("orion/fileClient",["i18n!orion/navigate/nls/messages","orion/Deferred","orion/auth"],function(b,f,a){function c(c,d,e){if(!c[d])throw d+b[" is not supportted in this file system"];var i=new f;c[d].apply(c,e).then(function(a){i.resolve(a)},function(b){b.status===401?a.handleAuthenticationError(b,function(){c[d].apply(c,e).then(function(a){i.resolve(a)},function(a){i.reject(a)})}):i.reject(b)});return i}function e(a,d,j,i){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(d[d.length-1]!=="/")return c(a,"readBlob",[d]).then(function(a){return c(j,"writeBlob",[i,a])});var k=i.substring(0,i.length-1),l=decodeURIComponent(k.substring(k.lastIndexOf("/")+1)),k=k.substring(0,k.lastIndexOf("/")+1);return c(j,"createFolder",[k,l]).then(function(){},function(){}).then(function(){d.indexOf("/")===0&&(d+="?depth=1");return c(a,"fetchChildren",[d]).then(function(b){for(var c=[],d=0;d<b.length;++d){var h=
b[d].Location,k=h;b[d].Directory&&(k=h.substring(0,h.length-1));k=decodeURIComponent(k.substring(k.lastIndexOf("/")+1));k=i+encodeURIComponent(k);b[d].Directory&&(k+="/");c[d]=e(a,h,j,k)}return(new f).all(c)})})}function d(a,c){function d(a){var c=new f;c.reject(b["No Matching FileService for location:"]+a);return c}var e=a.getServiceReferences("orion.core.file"),k=e;if(c)for(var k=[],l=0;l<e.length;++l)c(e[l])&&k.push(e[l]);for(var m=[],n=[],o=[],p=[],r={fetchChildren:function(){var a=new f;a.resolve(p);
return a},createWorkspace:function(){var a=new f;a.reject(b["no file service"]);return a},loadWorkspaces:function(){var a=new f;a.reject(b["no file service"]);return a},loadWorkspace:function(){var a=new f;window.setTimeout(function(){a.resolve({Directory:!0,Length:0,LocalTimeStamp:0,Name:b["File Servers"],Location:"/",Children:p,ChildrenLocation:"/"})},100);return a},search:d,createProject:d,createFolder:d,createFile:d,deleteFile:d,moveFile:d,copyFile:d,read:d,write:d},e=0;e<k.length;++e)p[e]={Directory:!0,
Length:0,LocalTimeStamp:0,Location:k[e].getProperty("top"),ChildrenLocation:k[e].getProperty("top"),Name:k[e].getProperty("Name")},l=k[e].getProperty("pattern")||".*",l[0]!=="^"&&(l="^"+l),m[e]=RegExp(l),n[e]=a.getService(k[e]),o[e]=k[e].getProperty("Name");this._getServiceIndex=function(a){if(a==="/")return-1;else if(!a||a.length&&a.length===0)return n[0]?0:-1;for(var c=0;c<m.length;++c)if(m[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:n[a]};this._getServiceName=function(a){a=this._getServiceIndex(a);return a===-1?r.Name:o[a]}}d.prototype={fileServiceName:function(a){return this._getServiceName(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,d,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,d){var f=this._getService(a),k=this._getService(b);if(f===k)return c(f,"moveFile",arguments);var l=a[a.length-1]==="/",m=b;m[m.length-1]!==
"/"&&(m+="/");if(d)m+=encodeURIComponent(d);else{var n=a;l&&(n=n.substring(0,n.length-1));m+=n.substring(n.lastIndexOf("/")+1)}l&&m[m.length-1]!=="/"&&(m+="/");return e(f,a,k,m).then(function(){return c(f,"deleteFile",[a])})},copyFile:function(a,b,d){var f=this._getService(a),k=this._getService(b);if(f===k)return c(f,"copyFile",arguments);var l=a[a.length-1]==="/",m=b;m[m.length-1]!=="/"&&(m+="/");if(d)m+=encodeURIComponent(d);else{var n=a;l&&(n=n.substring(0,n.length-1));m+=n.substring(n.lastIndexOf("/")+
1)}l&&m[m.length-1]!=="/"&&(m+="/");return e(f,a,k,m)},read:function(a,b){return c(this._getService(a),"read",arguments)},write:function(a,b,d){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)}};d.prototype.constructor=d;return{FileClient:d}});
define("orion/searchClient","i18n!orion/search/nls/messages,require,dojo,dijit,orion/auth,orion/util,orion/searchUtils,dijit/form/Button,dijit/layout/BorderContainer,dijit/layout/ContentPane".split(","),function(b,f,a,c,e,d,g){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){b=g.parseQueryStr(a);try{this._fileService.search(b.location,a).then(function(a){var b=
a.responseHeader.params.q,b=b.substring(b.indexOf("}")+1),b=b.substring(b.indexOf(":")+1);c(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:g.path2FolderName(d.Path,d.Name),directory:d.Directory,lineNumber:d.LineNumber})}return b}(a),b)},function(a){c(null,null,a)})}catch(d){this.registry.getService("orion.page.message").setErrorMessage(d)}},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;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);f?(this.setLocationByURL(f.Location),e=f.Name):c&&(e=this._fileService.fileServiceName(c&&c.Location));f=a.byId("search");e||(e="");if(f&&f.placeholder)f.value="",f.placeholder=e.length>23?b["Search "]+e.substring(0,20)+"...":b["Search "]+e;if(f&&f.title)f.title=b["Type a keyword or wild card to search in "]+
e},setLocationByURL:function(a){this.location=a},createSearchQuery:function(a,b,c,d){c||(c="Path");c+=" asc";return b?(a=/\*$/.test(b)?"":"*",g.generateSearchQuery({sort:c,rows:100,start:0,searchStr:"NameLower:"+this._luceneEscape(b,!0)+a})):g.generateSearchQuery({sort:c,rows:40,start:0,searchStr:this._luceneEscape(a,!0),location:d?"":this.location})},_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,d,e,g){return function(h,n,o){if(o)a.place("<div>"+b["Search failed."]+"</div>",c,"only"),typeof e==="function"&&e(c);else{var o=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)}}}(),p=!1;a.empty(c);if(h&&h.length>0){var r=document.createElement("table");r.setAttribute("role","presentation");for(var q=0;q<h.length;q++){var t=h[q],s;if(!p&&(p=!0,d))s=r.insertRow(0).insertCell(0),s.innerHTML=d;s=r.insertRow(-1).insertCell(0);s.colspan=2;g&&g(s);var u=document.createElement("a");a.place(document.createTextNode(t.name),u);t.LineNumber&&a.place(document.createTextNode(" (Line "+t.LineNumber+")"),u);var w=t.location;t.isExternalResource?w=t.path:
(w=t.directory?f.toUrl("navigate/table.html")+"#"+t.path:f.toUrl("edit/edit.html")+"#"+t.path,w==="#"&&(w=""));u.setAttribute("href",w);u.setAttribute("aria-describedby",(t.folderName?t.folderName:t.path).replace(/[^a-zA-Z0-9_\.:\-]/g,""));a.style(u,"verticalAlign","middle");s.appendChild(u);o(s,t)}a.place(r,c,"last");typeof e==="function"&&e(c)}!p&&n&&(h=a.place("<div>"+b["No matches found for "]+"</div>",c,"only"),h=a.create("b",null,h,"last"),a.place(document.createTextNode(n),h,"only"),typeof e===
"function"&&e(c))}}}}};h.prototype.constructor=h;return{Searcher:h}});
define("orion/compare/diff-provider",["i18n!orion/compare/nls/messages","dojo","orion/auth"],function(b,f,a){function c(b,c,e){var j=new f.Deferred;b[c].apply(b,e).then(function(a){j.callback(a)},function(f){f.status===401||f.status===403?a.handleAuthenticationError(f,function(){b[c].apply(b,e).then(function(a){j.callback(a)},function(a){j.errback(a)})}):j.errback(f)});return j}function e(a,c){var e=a.getServiceReferences("orion.core.diff"),f=e;if(c)for(var f=[],i=0;i<e.length;++i)c(e[i])&&f.push(e[i]);
for(var k=[],l=[],i=0;i<f.length;++i)k[i]=RegExp(f[i].getProperty("pattern")||".*"),l[i]=a.getService(f[i]);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;}}e.prototype={getDiffContent:function(a){return c(this._getService(a),"getDiffContent",arguments)},getDiffFileURI:function(a){return c(this._getService(a),"getDiffFileURI",arguments)}};
return{DiffProvider:e}});
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,f,a,c,e,d,g,h,j){var i={},k=null;i.EditorCommandFactory=function(){function h(a,b,c,d,e,f,g,i){this.serviceRegistry=a;this.commandService=b;this.fileClient=c;this.inputManager=d;this.toolbarId=e;this.pageNavId=g;this.isReadOnly=f;this._searcher=i}h.prototype={generateEditorCommands:function(h){function i(a){if(k)return k;
var b=a.getService("orion.core.contenttypes");b||(b=new d.ContentTypeService(a),b=a.getService("orion.core.contenttypes"));return b.getContentTypes().then(function(a){return k=a})}function l(a){var b=new g.KeyBinding;g.KeyBinding.apply(b,a);return b}if(!this.isReadOnly){h.getTextView().setKeyBinding(new g.KeyBinding("s",!0),"save");this.inputManager.onSave?h.getTextView().setAction("save",f.hitch(this,function(){var a=h.getText();this.inputManager.onSave(this.inputManager.getInput(),a,f.hitch(this,
function(){h.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&this.inputManager.afterSave()}),f.hitch(this,function(a){a.log=!0}));return!0}),{name:b.Save}):h.getTextView().setAction("save",f.hitch(this,function(){var a=h.getText(),c={ETag:this.inputManager.getFileMetadata().ETag};this.fileClient.write(this.inputManager.getInput(),a,c).then(f.hitch(this,function(b){this.inputManager.getFileMetadata().ETag=b.ETag;h.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&
this.inputManager.afterSave()}),f.hitch(this,function(c){c.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(f.hitch(this,function(b){this.inputManager.getFileMetadata().ETag=b.ETag;h.setInput(this.inputManager.getInput(),null,a,!0);this.inputManager.afterSave&&this.inputManager.afterSave()})):c.log=!0}));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=h.getModel().getLineAtOffset(h.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 c=h.getModel();a.parameters&&a.parameters.valueFor("line")?a=a.parameters.valueFor("line"):(a=c.getLineAtOffset(h.getCaretOffset()),(a=prompt(b["Go to line:"],a+1))&&(a=parseInt(a,10)));if(a)h.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"));h.getTextView().setKeyBinding(new g.KeyBinding("l",
!0),"gotoLine");h.getTextView().setAction("gotoLine",f.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=h.getSelection(),c="";b.end>b.start&&(c=h.getModel().getText(b.start,b.end));return[new a.CommandParameter("find","text","Find:",c)]}),r=this,p=new a.Command({name:"Find",tooltip:"Find",id:"orion.editor.find",parameters:p,callback:function(a){if(r._searcher){var b=
"",c=null,d=h.getSelection();if(d.end>d.start)b=h.getModel().getText(d.start,d.end),fromSelection=!0;else if(a.parameters&&a.parameters.valueFor("find"))a=a.parameters.valueFor("find"),c=j.parseFindURLBinding(a),b=c.searchStr;c?(r._searcher.setOptions({useRegExp:c.useRegExp}),c.lineNumber?(a=h.getModel().getLineStart(c.lineNumber-1),h.moveSelection(a,a,function(){r._searcher.buildToolBar(b,c?c.replaceStr:null);r._searcher.findNext(!0)},focus)):(r._searcher.buildToolBar(b,c?c.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"));h.getTextView().setKeyBinding(new g.KeyBinding("f",!0),"find");h.getTextView().setAction("find",f.hitch(this,function(){this.commandService.runCommand("orion.editor.find");return!0}),p);var q=this.serviceRegistry.getServiceReferences("orion.edit.command"),t=this.inputManager,
s=function(b,c,d){d.callback=f.hitch(h,function(a){h=a?a.items||this:this;var b=h.getSelection(),a=h.getModel(),d=a.getText();c.run(a.getText(b.start,b.end),d,b,t.getInput()).then(function(a){a&&a.text?(h.setText(a.text),a.selection&&(h.setSelection(a.selection.start,a.selection.end),h.getTextView().focus())):typeof a==="string"&&(h.setText(a,b.start,b.end),h.setSelection(b.start,b.start+a.length),h.getTextView().focus())});return!0});return new a.Command(d)};f.when(i(this.serviceRegistry),f.hitch(this,
function(){for(var a=[],b=0;b<q.length;b++){for(var d=q[b],g=this.serviceRegistry.getService(q[b]),i={},j=q[b].getPropertyNames(),n=0;n<j.length;n++)i[j[n]]=q[b].getProperty(j[n]);i.forceSingleItem=!0;d=e._createCommandOptions(i,d,this.serviceRegistry,k,!1,function(){return t.getFileMetadata()});a.push(d);d.then(f.hitch(this,function(a){a=s(i,g,a);this.commandService.addCommand(a);this.commandService.registerCommandContribution(this.toolbarId,a.id,100+b);if(i.key){var c=h.getTextView();c.setKeyBinding(l(i.key),
a.id);c.setAction(a.id,a.callback,a)}}))}(new f.DeferredList(a)).addBoth(f.hitch(this,function(){t.getFileMetadata()&&c.generateDomCommandsInBanner(this.commandService,h)}))}))}}};return h}();i.UndoCommandFactory=function(){function c(a,b,d){this.serviceRegistry=a;this.commandService=b;this.toolbarId=d}c.prototype={createUndoStack:function(c){var d=new h.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 g.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 g.KeyBinding("z",!0,!0):new g.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 i});
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/util,orion/compare/diff-provider,orion/compare/jsdiffAdapter,orion/highlight,orion/compare/diffTreeNavigator,orion/searchAndReplace/textSearcher".split(","),function(b,
f,a,c,e,d,g,h,j,i,k,l,m,n,o,p,r,q,t,s,u,w){var v={};v.DefaultDiffProvider=function(){function b(a){this.serviceRegistry=a;this._diffProvider=new q.DiffProvider(a)}b.prototype={_resolveComplexDiff:function(a,b,c){if(this._diffProvider){var d=this;d._diffProvider.getDiffContent(a).then(function(c){d._diffContent=d._hasConflicts?c.split("diff --git")[1]:c;b?d.callBack({diff:d._diffContent}):d._resolveComplexFileURL(a)},c)}else 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}();v.CompareStyler=function(){function a(b){this._syntaxHighlither=new s.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.highlightAnnotations(),c.setAnnotationRulerVisible(!1),d._highlighterLoaded++,d._highlighterLoaded===e&&(d._diffNavigator.renderAnnotations(),d._diffNavigator.gotoBlock(d.options.blockNumber-
1,d.options.changeNumber-1)))})}};return a}();v.CompareContainer=function(){function c(){this._diffParser=new e.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 l.Command({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 l.Command({tooltip:b["Switch to unified diff"],name:b.Unified,imageClass:"core-sprite-link",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 l.Command({tooltip:b["Switch to side by side diff"],name:b["Side by side"],imageClass:"core-sprite-link",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 l.Command({tooltip:b["Generate link of the current diff"],name:b["Generate Link"],
imageClass:"core-sprite-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 l.Command({tooltip:b["Open the compare page"],name:b.Compare,imageClass:"core-sprite-link",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 l.Command({tooltip:b["Next diff block"],imageClass:"core-sprite-move_down",id:"orion.compare.nextDiff",groupId:"orion.compareGroup",callback:function(a){a.items.nextDiff()}}),i=new l.Command({tooltip:b["Previous diff block"],imageClass:"core-sprite-move_up",id:"orion.compare.prevDiff",groupId:"orion.compareGroup",callback:function(a){a.items.prevDiff()}}),j=new l.Command({tooltip:b["Next diff change"],imageClass:"core-sprite-move_down",id:"orion.compare.nextChange",groupId:"orion.compareGroup",
callback:function(a){a.items.nextChange()}}),k=new l.Command({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(i);this.options.wordLevelNav&&
(this._commandService.addCommand(j),this._commandService.addCommand(k));this._commandService.registerCommandContribution(a,"orion.compare.openComparePage",107);this._commandService.registerCommandContribution(a,"orion.compare.generateLink",108);this.options.readonly||this._commandService.registerCommandContribution(a,"orion.compare.copyToLeft",109);this._commandService.registerCommandContribution(a,"orion.compare.toggle2Inline",110);this._commandService.registerCommandContribution(a,"orion.compare.toggle2TwoWay",
111);this._commandService.registerCommandContribution(a,"orion.compare.nextDiff",112);this._commandService.registerCommandContribution(a,"orion.compare.prevDiff",113);this.options.wordLevelNav&&(this._commandService.registerCommandContribution(a,"orion.compare.nextChange",114),this._commandService.registerCommandContribution(a,"orion.compare.prevChange",115))}},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,"button",null,this.options.gridRenderer.navGridHolder)):
(this._commandService.renderCommands(b,b,this,this,"button",null,this.options.gridRenderer.navGridHolder),this.options.gridRenderer.additionalCmdRender(this.options.gridRenderer.navGridHolder)):this._commandService.renderCommands(b,b,this,this,"button",null,this.options.gridRenderer.navGridHolder)):this._commandService.renderCommands(b,b,this,this,"button",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.getFileContent([b.options.baseFile],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 t.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}();v.TwoWayCompareContainer=function(){function e(c,f,g,h){this._diffNavigator=new u.DiffTreeNavigator("word");this._registry=c;this._commandService=this._registry.getService("orion.page.command");this._fileClient=this._registry.getService("orion.core.file");this._searchService=
this._registry.getService("orion.core.search");this._uiFactory=g;if(!this._uiFactory)this._uiFactory=new o.TwoWayCompareUIFactory({parentDivID:f,showTitle:!1,showLineStatus:!1}),this._uiFactory.buildUI();this._viewLoadedCounter=0;this.setOptions(h,!0);var i=this;if(!this.options.callback)this.options.callback=function(b,c){i._uiFactory.getTitleDivId(!0)&&i._uiFactory.getTitleDivId(!1)&&(a.place(document.createTextNode(c),i._uiFactory.getTitleDivId(!0),"only"),a.place(document.createTextNode(b),i._uiFactory.getTitleDivId(!1),
"only"))};if(!this._errorCallback)this._errorCallback=function(b,c){if(i._uiFactory.getTitleDivId(!0)&&i._uiFactory.getTitleDivId(!1)){var d=typeof b.message==="string"?b.message:c.xhr.statusText;a.place(document.createTextNode(d),i._uiFactory.getTitleDivId(!0),"only");a.place(document.createTextNode(d),i._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();i=this;this._inputManager={filePath:"",getInput:function(){return this.filePath},setDirty:function(a){k.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 i._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;k.setPageTarget({task:b.Compare,name:e,target:d,serviceRegistry:c,commandService:this._commandService,searchService:this._searchService,fileService:this._fileClient});a.charAt(0)==="*"?(k.setDirtyIndicator(!0),a.substring(1)):k.setDirtyIndicator(!1)},afterSave:function(){i.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 d.CompareCurveRuler(document.getElementById(this._uiFactory.getDiffCanvasDivId()));this._highlighter=[];this._highlighter.push(new v.CompareStyler(this._registry));this._highlighter.push(new v.CompareStyler(this._registry));this.initEditorContainers("\n",b["fetching..."],b["fetching..."],[])}e.prototype=new v.CompareContainer;e.prototype.initEditorContainers=function(a,c,e,f,g){this._leftEditor=
this.createEditorContainer(c,a,f,0,this._leftEditorDivId,this._uiFactory.getStatusDivId(!0),this.options.readonly,g,this.options.newFile);this.options.onPage&&k.generateDomCommandsInBanner(this._commandService,this._leftEditor,null,null,null,!0,!0);this._leftTextView=this._leftEditor.getTextView();this._rightEditor=this.createEditorContainer(e,a,f,1,this._rightEditorDivId,this._uiFactory.getStatusDivId(!1),!0,g,this.options.baseFile);this._rightTextView=this._rightEditor.getTextView();var h=this;
this._overviewRuler=new d.CompareOverviewRuler("right",{styleClass:"ruler overview"},null,function(a){h._diffNavigator.matchPositionFromOverview(a)});this._rightTextView.addRuler(this._overviewRuler);h=this;window.onbeforeunload=function(){if(h._leftEditor.isDirty())return b["There are unsaved changes."]}};e.prototype.getDefaultCommandSpanId=function(){return this._uiFactory.getCommandSpanId()};e.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)};e.prototype.copyToLeft=function(){this._curveRuler.copyToLeft()};e.prototype.createEditorContainer=function(e,f,k,l,o,p,q,r,s){var t=a.byId(o),u=c.byId(o),v=this,C=new m.TextModel(e,f),L="",e=q?new i.UndoFactory:new h.UndoCommandFactory(v._registry,v._commandService,"pageActions"),f=new i.AnnotationFactory,B=new j.Editor({textViewFactory:function(){var b=new n.TextView({parent:t,model:C,readonly:q,
tabSize:4});v._viewLoadedCounter++;v._viewLoadedCounter===2&&v._diffNavigator.matchPositionFromOverview(-1);if(v.onLoad)v.onLoad();a.connect(u,"resize",a.hitch(this,function(){b.resize()}));return b},undoStackFactory:e,annotationFactory:f,contentAssistFactory:{createContentAssistMode:function(a){var a=new g.ContentAssist(a.getTextView()),b=new g.ContentAssistWidget(a,"contentassist");return new g.ContentAssistMode(a,b)}},keyBindingFactory:function(a,b,c,d){if(q)v._commandService.addCommandGroup("pageActions",
"orion.editorActions.unlabeled",200);else{var e=new w.TextSearcher(a,v._commandService,c);(new h.EditorCommandFactory(v._registry,v._commandService,v._fileClient,v._inputManager,"pageActions",q,"pageNavigationActions",e)).generateEditorCommands(a);e=new i.TextActions(a,c);b.push(e);a=new i.SourceCodeActions(a,c,d);b.push(a)}},statusReporter:function(c,d){if(p)L=d?b["ERROR: "]+c:c,a.byId(p).innerHTML=""+L},domNode:t});B.installTextView();B.setOverviewRulerVisible(!1);if(!q){var J=this._inputManager;
B.addEventListener("DirtyChanged",function(){J.setDirty(B.isDirty())})}var N=B.getTextView();r&&s&&typeof s.Name==="string"&&typeof s.Type==="string"&&(B.setInput(s.Name),this._highlighter[l].highlight(s.Name,s.Type,B));N.addRuler(new d.LineNumberCompareRuler(this._diffNavigator,0,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"}));N.addEventListener("Selection",function(a){!(a.newValue&&a.newValue.start!==a.newValue.end)&&!v._diffNavigator.autoSelecting&&
v._diffNavigator.editorWrapper[0].diffFeeder&&(a=N.getCaretOffset(),v._diffNavigator.gotoDiff(a,N))});l===0?(N.getModel().addEventListener("Changed",function(a){v._curveRuler.onChanged(a)}),N.addEventListener("Scroll",function(){v._curveRuler&&(v._curveRuler.matchPositionFrom(!0),v._curveRuler.render());if(v.onScroll)v.onScroll()})):N.addEventListener("Scroll",function(){v._curveRuler&&v._curveRuler.render()});return B};e.prototype.destroy=function(){this._leftTextView&&(this._diffNavigator.destroy(),
this._leftTextView.destroy(),this._rightTextView.destroy(),this._uiFactory.destroy())};e.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 u.TwoWayDiffBlockFeeder(this._rightTextView.getModel(),d.mapper,1),e=new u.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.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 e}();v.InlineCompareContainer=function(){function b(d,e,f){this._diffNavigator=new u.DiffTreeNavigator("word");this._registry=d;this._commandService=this._registry.getService("orion.page.command");
this._fileClient=this._registry.getService("orion.core.file");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 v.CompareStyler(this._registry));this._editorDivId=e;c.byId(this._editorDivId)||(p.destroyDijit(this._editorDivId+"_dijit_inline_compare"),d=p.getDijitSizeStyle(this._editorDivId),(new c.layout.BorderContainer({id:this._editorDivId+
"_dijit_inline_compare",style:d,region:"center",gutters:!1,design:"headline",liveSplitters:!1,persist:!1,splitter:!1})).placeAt(this._editorDivId),r.forceLayout(this._editorDivId),this._editorDivId+="_dijit_inline_compare");this.initEditorContainers("","\n",[],[]);this.hasContent=!1}b.prototype=new v.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,e,f,g,h,k){var l=a.byId(this._editorDivId),o=c.byId(this._editorDivId),p=this,q=new m.TextModel(b,e),b=new i.UndoFactory,e=new i.AnnotationFactory,b=new j.Editor({textViewFactory:function(){var b=new n.TextView({parent:l,model:q,readonly:!0,tabSize:4});a.connect(o,"resize",a.hitch(this,function(){b.resize()}));return b},undoStackFactory:b,annotationFactory:e,keyBindingFactory:function(){},statusReporter:function(){},domNode:l});b.installTextView();b.setOverviewRulerVisible(!1);
b.setAnnotationRulerVisible(!1);h&&k&&b.setInput(k.Name);var r=b.getTextView();this._rulerOrigin=new d.LineNumberCompareRuler(this._diffNavigator,1,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"});this._rulerNew=new d.LineNumberCompareRuler(this._diffNavigator,0,"left",{styleClass:"ruler lines"},{styleClass:"rulerLines odd"},{styleClass:"rulerLines even"});p=this;this._overviewRuler=new d.CompareOverviewRuler("right",{styleClass:"ruler overview"},null,
function(a){p._diffNavigator.matchPositionFromOverview(a)});r.addEventListener("Selection",function(a){!(a.newValue&&a.newValue.start!==a.newValue.end)&&!p._diffNavigator.autoSelecting&&p._diffNavigator.editorWrapper[0].diffFeeder&&(a=r.getCaretOffset(),p._diffNavigator.gotoDiff(a,r))});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 u.inlineDiffBlockFeeder(b.mapper,1),c=new u.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}();v.toggleableCompareContainer=function(){function b(a,c,d,e){if(e)e.toggler=this;d==="inline"?(this.widgetType="inline",this._widget=new v.InlineCompareContainer(a,c,e)):(this.widgetType="twoWay",this._widget=new v.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 v.TwoWayCompareContainer(this._serviceRegistry,this._parentDivId,null,b)):(this.widgetType="inline",this._widget=new v.InlineCompareContainer(this._serviceRegistry,this._parentDivId,b));this._widget.setEditor()}};return b}();return v});
define("compare/compare","dojo,orion/bootstrap,orion/status,orion/progress,orion/operationsClient,orion/commands,orion/fileClient,orion/searchClient,orion/globalCommands,orion/compare/compare-features,orion/compare/compare-container,orion/compare/compareUtils,orion/contentTypes,dojo/parser,dojo/hash,dijit/layout/BorderContainer,dijit/layout/ContentPane".split(","),function(b,f,a,c,e,d,g,h,j,i,k,l,m){b.addOnLoad(function(){f.startup().then(function(f){var o=f.serviceRegistry,f=f.preferences;document.body.style.visibility=
"visible";b.parser.parse();var p=new d.CommandService({serviceRegistry:o}),r=new g.FileClient(o);new m.ContentTypeService(o);var r=new h.Searcher({serviceRegistry:o,commandService:p,fileService:r}),q=new e.OperationsClient(o);new a.StatusReportingService(o,q,"statusPane","notifications","notificationArea");new c.ProgressService(o,q);j.generateBanner("banner",o,p,f,r);var t=new i.TwoWayCompareUIFactory({parentDivID:"compareContainer",showTitle:!0,showLineStatus:!0});t.buildUI();var f=b.queryToObject(window.location.search.slice(1)).readonly!=
null,p=b.queryToObject(window.location.search.slice(1)).conflict!=null,s=l.parseCompareHash(b.hash()),r=new k.DefaultDiffProvider(o),u={readonly:f,onPage:!0,generateLink:!0,commandSpanId:"pageNavigationActions",hasConflicts:p,diffProvider:r,complexURL:s.complexURL,blockNumber:s.block,changeNumber:s.change},w=new k.TwoWayCompareContainer(o,"compareContainer",t,u);w.startup();b.subscribe("/dojo/hashchange",w,function(){s=l.parseCompareHash(b.hash());u.complexURL=s.complexURL;u.block=s.block;u.change=
s.change;w=new k.TwoWayCompareContainer(o,"compareContainer",t,u);w.startup()})})})});